remove loose variants.

rewrite some node registration code, removing the so far unused loose
nodes, and putting in place some data that outlines how they might be
implemented in the future.
This commit is contained in:
trans_soup 2023-10-17 20:07:26 +02:00
parent bab59828f8
commit c6157df12c

View file

@ -11,9 +11,17 @@ blockgame.register_node(modname .. ":stone", {
}, },
drop = modname .. ":cobblestone", drop = modname .. ":cobblestone",
}) })
blockgame.reg_simple_node("cobblestone", "Cobblestone", {
cracky = 3, blockgame.register_node(modname .. ":cobblestone", {
stoney = 1, description = "Cobblestone",
tiles = {
modname .. "_cobblestone.png",
},
groups = {
cracky = 3,
stoney = 1,
},
loose_variant = modname .. ":cobblestone_loose",
}) })
minetest.register_alias("mapgen_stone", modname .. ":stone") minetest.register_alias("mapgen_stone", modname .. ":stone")
@ -25,18 +33,19 @@ blockgame.register_node(modname .. ":grass", {
modname .. "_grass.png", modname .. "_grass.png",
}, },
groups = { groups = {
cracky = 3,
dirty = 1, dirty = 1,
}, },
drop = modname .. ":dirt", drop = modname .. ":dirt",
}) })
blockgame.reg_simple_node("dirt", "Dirt", { blockgame.register_node(modname .. ":dirt", {
cracky = 3, description = "Dirt",
dirty = 1, tiles = {
grassable = 1, modname .. "_dirt.png",
},
groups = {
dirty = 1,
grassable = 1,
},
loose_variant = modname .. ":dirt_loose",
}) })
blockgame.register_loose_version(modname .. ":dirt")
blockgame.register_loose_version(modname .. ":grass")
blockgame.register_loose_version(modname .. ":cobblestone")