I just want to present it and would like to hear what do you think about it! :)
Code in Minetest TNG:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
default.register_node("default:wood", {
description = "Wooden Planks",
tiles = {"default_wood.png"},
is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, wood = 1, fuel = 8},
sounds = default.node_sound_wood_defaults(),
register = {stair = true, slab = true, table = true, fence = true, fencegate = true},
stair = {
legacy_alias = "stairs:stair_wood",
description = "Wooden Stair", -- if I don't change this the description would be "Wooden Planks Stair"
},
slab = {
legacy_alias = "stairs:slab_wood",
description = "Wooden Slab",
},
fence = {
description = "Wooden Fence",
},
fencegate = {
description = "Wooden Fence Gate",
},
table = {
description = "Wooden Table",
},
})
The same code without this system:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.register_node("default:wood", {
description = "Wooden Planks",
tiles = {"default_wood.png"},
is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, wood = 1, fuel = 8},
sounds = default.node_sound_wood_defaults(),
})
-- I moved the stairs and slabs API to default
default.register_stair("default:stair_wood", {
description = "Wooden Stair",
tiles = {"default_wood.png"},
material = "default:wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, wood = 1, fuel = 8},
sounds = default.node_sound_wood_defaults(),
})
default.register_slab("default:slab_wood", {
description = "Wooden Slab",
tiles = {"default_wood.png"},
material = "default:wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, wood = 1, fuel = 8},
sounds = default.node_sound_wood_defaults(),
})
default.register_fence("default:fence_wood", {
description = "Wooden Fence",
tiles = {"default_wood.png"},
material = "default:wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, wood = 1, fuel = 4},
sounds = default.node_sound_wood_defaults(),
})
default.register_fencegate("default:fencegate_wood", {
description = "Wooden Fence Gate",
tiles = {"default_wood.png"},
material = "default:wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, wood = 1, fuel = 4},
sounds = default.node_sound_wood_defaults(),
})
default.register_table("default:table_wood", {
description = "Wooden Table",
tiles = {"default_wood.png"},
material = "default:wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, fuel = 4},
sounds = default.node_sound_wood_defaults(),
})
It's GPLv3+. So it's not compatible with MTG. (But in certain circumstances I would relicense it)
