From c6157df12c08cf6948555e67276e33cac6bf6a6f Mon Sep 17 00:00:00 2001 From: trans_soup <> Date: Tue, 17 Oct 2023 20:07:26 +0200 Subject: [PATCH] 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. --- mods/bg_terrain/node.lua | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/mods/bg_terrain/node.lua b/mods/bg_terrain/node.lua index 8539bc3..9d2da5a 100644 --- a/mods/bg_terrain/node.lua +++ b/mods/bg_terrain/node.lua @@ -11,9 +11,17 @@ blockgame.register_node(modname .. ":stone", { }, drop = modname .. ":cobblestone", }) -blockgame.reg_simple_node("cobblestone", "Cobblestone", { - cracky = 3, - stoney = 1, + +blockgame.register_node(modname .. ":cobblestone", { + description = "Cobblestone", + tiles = { + modname .. "_cobblestone.png", + }, + groups = { + cracky = 3, + stoney = 1, + }, + loose_variant = modname .. ":cobblestone_loose", }) minetest.register_alias("mapgen_stone", modname .. ":stone") @@ -25,18 +33,19 @@ blockgame.register_node(modname .. ":grass", { modname .. "_grass.png", }, groups = { - cracky = 3, dirty = 1, }, drop = modname .. ":dirt", }) -blockgame.reg_simple_node("dirt", "Dirt", { - cracky = 3, - dirty = 1, - grassable = 1, +blockgame.register_node(modname .. ":dirt", { + description = "Dirt", + tiles = { + 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")