Make wood not breakable by hand (by default).
This commit is contained in:
parent
c8ad6d4fec
commit
aac2db0da4
6 changed files with 31 additions and 4 deletions
22
deco.lua
22
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
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
|
5
init.lua
5
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
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue