diff --git a/deco.lua b/deco.lua index 5141abb..e9cfd53 100644 --- a/deco.lua +++ b/deco.lua @@ -4,6 +4,19 @@ minetest.register_ore({ore_type="sheet", ore="default:sandstone", wherein="default:stone", clust_num_ores=250, clust_scarcity=60, clust_size=10, y_min=-1000, y_max=31000, noise_threshold=0.1, noise_params={offset=0, scale=1, spread={x=256, y=256, z=256}, seed=4130293965, octaves=5, persist=0.60}, random_factor=1.0}) minetest.register_ore({ore_type="sheet", ore="default:desert_stone", wherein="default:stone", clust_num_ores=250, clust_scarcity=60, clust_size=10, y_min=-1000, y_max=31000, noise_threshold=0.1, noise_params={offset=0, scale=1, spread={x=256, y=256, z=256}, seed=163281090, octaves=5, persist=0.60}, random_factor=1.0}) + +if not fun_caves.breakable_wood then + print('* Fun Caves: Wood is NOT breakable by hand.') + for _, item in pairs(minetest.registered_items) do + if item.groups.tree or item.groups.wood then + local groups = table.copy(item.groups) + groups.oddly_breakable_by_hand = nil + minetest.override_item(item.name, {groups=groups}) + end + end +end + + minetest.register_node("fun_caves:sand_with_rocks", { description = "Sand and rocks", tiles = {"fun_caves_sand_with_rocks.png"}, @@ -12,6 +25,13 @@ minetest.register_node("fun_caves:sand_with_rocks", { drop = {max_items=2, items={{items={"fun_caves:small_rocks"}, rarity=1}, {items={"default:sand"}, rarity=1}}}, }) +minetest.register_craft({ + output = "default:stick 2", + recipe = { + {"group:sapling"} + } +}) + minetest.register_craft({ output = "default:stick 2", recipe = { @@ -19,7 +39,7 @@ minetest.register_craft({ } }) -minetest.add_group("default:cactus", {oddly_breakable_by_hand=1}) +--minetest.add_group("default:cactus", {oddly_breakable_by_hand=1}) if fun_caves.use_bi_hi then diff --git a/deco_caves.lua b/deco_caves.lua index 158881a..eff0a37 100644 --- a/deco_caves.lua +++ b/deco_caves.lua @@ -177,7 +177,7 @@ minetest.register_node("fun_caves:giant_mushroom_stem", { description = "Giant Mushroom Stem", tiles = {"vmg_mushroom_giant_stem.png", "vmg_mushroom_giant_stem.png", "vmg_mushroom_giant_stem.png"}, is_ground_content = false, - groups = {choppy=2, oddly_breakable_by_hand=1, flammable=2, plant=1}, + groups = {choppy=2, flammable=2, plant=1}, sounds = default.node_sound_wood_defaults(), sunlight_propagates = true, paramtype = "light", diff --git a/deco_clouds.lua b/deco_clouds.lua index 46a5002..f2b78e3 100644 --- a/deco_clouds.lua +++ b/deco_clouds.lua @@ -85,7 +85,7 @@ minetest.register_node("fun_caves:lumin_tree", { }, paramtype2 = "facedir", is_ground_content = false, - groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + groups = {tree = 1, choppy = 2, flammable = 2}, sounds = default.node_sound_wood_defaults(), on_place = minetest.rotate_node diff --git a/init.lua b/init.lua index 71c142b..4af7c53 100644 --- a/init.lua +++ b/init.lua @@ -20,6 +20,11 @@ if fun_caves.exploding_fungi == nil then fun_caves.exploding_fungi = true end +fun_caves.breakable_wood = minetest.setting_getbool('fun_caves_breakable_wood') +if fun_caves.breakable_wood == nil then + fun_caves.breakable_wood = false +end + fun_caves.DEBUG = false -- for maintenance only diff --git a/settingtypes.txt b/settingtypes.txt index 7c8261e..b231dd2 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -6,3 +6,6 @@ fun_caves_expire_elixir_on_death (Elixirs Expire On Death) bool true # Unset this to remove exploding fungi from the underworld. fun_caves_exploding_fungi (Exploding Fungi) bool true + +# Unset this to make wook breakable by hand. +fun_caves_breakable_wood (Breakable Wood) bool false diff --git a/treegen.lua b/treegen.lua index 5652241..577d4ce 100644 --- a/treegen.lua +++ b/treegen.lua @@ -112,7 +112,6 @@ newnode.description = "Glowing Fungal Wood" newnode.tiles = {"fun_caves_tree.png^vmg_glowing_fungal.png",} newnode.drop = {items={ {items={"default:wood"},}, {items={"fun_caves:glowing_fungus",},},},} newnode.light_source = fun_caves.light_max - 4 -newnode.groups.oddly_breakable_by_hand = 1 minetest.register_node("fun_caves:glowing_fungal_wood", newnode)