diff options
| author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2013-07-22 03:55:12 -0400 | 
|---|---|---|
| committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2013-07-22 03:55:12 -0400 | 
| commit | d32993e355355d196fb40a9b2bc2305486084e81 (patch) | |
| tree | c8169d2b9a2caf7b85077f380ca573464d796b33 | |
| parent | 1377d69f54fe442b216b8c5baae68ee2d4374c2f (diff) | |
Made moreblocks dependency optional and configurable
| -rw-r--r-- | default_settings.txt | 58 | ||||
| -rw-r--r-- | depends.txt | 2 | ||||
| -rw-r--r-- | node_defs.lua | 210 | 
3 files changed, 138 insertions, 132 deletions
| diff --git a/default_settings.txt b/default_settings.txt index 766d193..e13b0aa 100644 --- a/default_settings.txt +++ b/default_settings.txt @@ -2,22 +2,26 @@  -- Enable the various kinds of trees. -moretrees.enable_apple_tree	= true -moretrees.enable_oak		= true -moretrees.enable_sequoia	= true -moretrees.enable_palm		= true -moretrees.enable_pine		= true -moretrees.enable_rubber_tree	= true -moretrees.enable_willow		= true -moretrees.enable_birch		= true -moretrees.enable_spruce		= true -moretrees.enable_jungle_tree	= true -moretrees.enable_fir		= true -moretrees.enable_beech		= false +moretrees.enable_apple_tree		= true +moretrees.enable_oak			= true +moretrees.enable_sequoia		= true +moretrees.enable_palm			= true +moretrees.enable_pine			= true +moretrees.enable_rubber_tree		= true +moretrees.enable_willow			= true +moretrees.enable_birch			= true +moretrees.enable_spruce			= true +moretrees.enable_jungle_tree		= true +moretrees.enable_fir			= true +moretrees.enable_beech			= false + +-- Set this to true to allow usage of the stairsplus mod in moreblocks + +moretrees.enable_stairsplus		= true  -- Set this to true to enable leaf decay of all trees except the default ones. -moretrees.enable_leafdecay = true +moretrees.enable_leafdecay		= true  -- Enable this one if you want this mod's leafdecay code to affect the old  -- default trees too; this setting is independent of the one above.  You'll @@ -25,33 +29,33 @@ moretrees.enable_leafdecay = true  -- you enable this, otherwise you'll have two sets of leaf decay code running  -- at the same time, which will just waste CPU for no benefit. -moretrees.enable_default_leafdecay = true +moretrees.enable_default_leafdecay	= true  -- Enable this if you want moretrees to redefine default apples so that they  -- fall when leaves decay/are dug. -moretrees.enable_redefine_apple = true +moretrees.enable_redefine_apple		= true  -- various settings to configure leaf decay in general. -moretrees.leafdecay_delay = 2 -moretrees.leafdecay_chance = 200 -moretrees.leafdecay_radius = 5 +moretrees.leafdecay_delay		= 2 +moretrees.leafdecay_chance		= 200 +moretrees.leafdecay_radius		= 5 -moretrees.palm_leafdecay_radius = 12 +moretrees.palm_leafdecay_radius		= 12 -moretrees.default_leafdecay_delay = 3 -moretrees.default_leafdecay_chance = 100 -moretrees.default_leafdecay_radius = 4 +moretrees.default_leafdecay_delay	= 3 +moretrees.default_leafdecay_chance	= 100 +moretrees.default_leafdecay_radius	= 4  -- Change these settings if you want default trees to be gradually cut down  -- above the elevation where firs normally generate. -moretrees.firs_remove_default_trees = false -moretrees.firs_remove_interval = 2 -moretrees.firs_remove_chance = 150 +moretrees.firs_remove_default_trees	= false +moretrees.firs_remove_interval		= 2 +moretrees.firs_remove_chance		= 150  -- Sapling settings -moretrees.sapling_interval = 500 -moretrees.sapling_chance = 20 +moretrees.sapling_interval		= 500 +moretrees.sapling_chance		= 20 diff --git a/depends.txt b/depends.txt index 59c3cba..cacd7e6 100644 --- a/depends.txt +++ b/depends.txt @@ -1,4 +1,4 @@  default  plants_lib -moreblocks +moreblocks? diff --git a/node_defs.lua b/node_defs.lua index 9230ad1..b02a6a2 100644 --- a/node_defs.lua +++ b/node_defs.lua @@ -86,110 +86,112 @@ for i in ipairs(moretrees.treelist) do  			},  		}) -		register_stair( -			"moretrees", -			treename.."_trunk", -			"moretrees:"..treename.."_trunk", -			{ snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2, not_in_creative_inventory=1, tree_stair=1 }, -			{	"moretrees_"..treename.."_trunk_top.png", -				"moretrees_"..treename.."_trunk_top.png", -				"moretrees_"..treename.."_trunk.png" -			}, -			treedesc.." Trunk", -			treename.."_trunk", -			0 -		) - -		register_slab( -			"moretrees", -			treename.."_trunk", -			"moretrees:"..treename.."_trunk", -			{ snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2, not_in_creative_inventory=1, tree_slab=1 }, -			{	"moretrees_"..treename.."_trunk_top.png", -				"moretrees_"..treename.."_trunk_top.png", -				"moretrees_"..treename.."_trunk.png" -			}, -			treedesc.." Trunk", -			treename.."_trunk", -			0 -		) - -		register_panel( -			"moretrees", -			treename.."_trunk", -			"moretrees:"..treename.."_trunk", -			{ snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2, not_in_creative_inventory=1, tree_panel=1 }, -			{	"moretrees_"..treename.."_trunk_top.png", -				"moretrees_"..treename.."_trunk_top.png", -				"moretrees_"..treename.."_trunk.png" -			}, -			treedesc.." Trunk", -			treename.."_trunk", -			0 -		) - -		register_micro( -			"moretrees", -			treename.."_trunk", -			"moretrees:"..treename.."_trunk", -			{ snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2, not_in_creative_inventory=1, tree_micro=1 }, -			{	"moretrees_"..treename.."_trunk_top.png", -				"moretrees_"..treename.."_trunk_top.png", -				"moretrees_"..treename.."_trunk.png" -			}, -			treedesc.." Trunk", -			treename.."_trunk", -			0 -		) - -		register_stair( -			"moretrees", -			treename.."_planks", -			"moretrees:"..treename.."_planks", -			{ snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=1, wood_stair=1 }, -			{ "moretrees_"..treename.."_wood.png" }, -			treedesc.." Planks", -			treename.."_planks", -			0 -		) - -		register_slab( -			"moretrees", -			treename.."_planks", -			"moretrees:"..treename.."_planks", -			{ snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=1, wood_slab=1 }, -			{ "moretrees_"..treename.."_wood.png" }, -			treedesc.." Planks", -			treename.."_planks", -			0 -		) - -		register_panel( -			"moretrees", -			treename.."_planks", -			"moretrees:"..treename.."_planks", -			{ snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=1, wood_panel=1 }, -			{ "moretrees_"..treename.."_wood.png" }, -			treedesc.." Planks", -			treename.."_planks", -			0 -		) - -		register_micro( -			"moretrees", -			treename.."_planks", -			"moretrees:"..treename.."_planks", -			{ snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=1, wood_micro=1 }, -			{ "moretrees_"..treename.."_wood.png" }, -			treedesc.." Planks", -			treename.."_planks", -			0 -		) - - -		table.insert(circular_saw.known_stairs, "moretrees:"..treename.."_trunk") -		table.insert(circular_saw.known_stairs, "moretrees:"..treename.."_planks") - +		if minetest.get_modpath("moreblocks") and moretrees.enable_stairsplus then + +			register_stair( +				"moretrees", +				treename.."_trunk", +				"moretrees:"..treename.."_trunk", +				{ snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2, not_in_creative_inventory=1, tree_stair=1 }, +				{	"moretrees_"..treename.."_trunk_top.png", +					"moretrees_"..treename.."_trunk_top.png", +					"moretrees_"..treename.."_trunk.png" +				}, +				treedesc.." Trunk", +				treename.."_trunk", +				0 +			) + +			register_slab( +				"moretrees", +				treename.."_trunk", +				"moretrees:"..treename.."_trunk", +				{ snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2, not_in_creative_inventory=1, tree_slab=1 }, +				{	"moretrees_"..treename.."_trunk_top.png", +					"moretrees_"..treename.."_trunk_top.png", +					"moretrees_"..treename.."_trunk.png" +				}, +				treedesc.." Trunk", +				treename.."_trunk", +				0 +			) + +			register_panel( +				"moretrees", +				treename.."_trunk", +				"moretrees:"..treename.."_trunk", +				{ snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2, not_in_creative_inventory=1, tree_panel=1 }, +				{	"moretrees_"..treename.."_trunk_top.png", +					"moretrees_"..treename.."_trunk_top.png", +					"moretrees_"..treename.."_trunk.png" +				}, +				treedesc.." Trunk", +				treename.."_trunk", +				0 +			) + +			register_micro( +				"moretrees", +				treename.."_trunk", +				"moretrees:"..treename.."_trunk", +				{ snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2, not_in_creative_inventory=1, tree_micro=1 }, +				{	"moretrees_"..treename.."_trunk_top.png", +					"moretrees_"..treename.."_trunk_top.png", +					"moretrees_"..treename.."_trunk.png" +				}, +				treedesc.." Trunk", +				treename.."_trunk", +				0 +			) + +			register_stair( +				"moretrees", +				treename.."_planks", +				"moretrees:"..treename.."_planks", +				{ snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=1, wood_stair=1 }, +				{ "moretrees_"..treename.."_wood.png" }, +				treedesc.." Planks", +				treename.."_planks", +				0 +			) + +			register_slab( +				"moretrees", +				treename.."_planks", +				"moretrees:"..treename.."_planks", +				{ snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=1, wood_slab=1 }, +				{ "moretrees_"..treename.."_wood.png" }, +				treedesc.." Planks", +				treename.."_planks", +				0 +			) + +			register_panel( +				"moretrees", +				treename.."_planks", +				"moretrees:"..treename.."_planks", +				{ snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=1, wood_panel=1 }, +				{ "moretrees_"..treename.."_wood.png" }, +				treedesc.." Planks", +				treename.."_planks", +				0 +			) + +			register_micro( +				"moretrees", +				treename.."_planks", +				"moretrees:"..treename.."_planks", +				{ snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory=1, wood_micro=1 }, +				{ "moretrees_"..treename.."_wood.png" }, +				treedesc.." Planks", +				treename.."_planks", +				0 +			) + + +			table.insert(circular_saw.known_stairs, "moretrees:"..treename.."_trunk") +			table.insert(circular_saw.known_stairs, "moretrees:"..treename.."_planks") +		end  	end  	if (fruit ~= nil) then | 
