minor refactor of leveled node registration.

This commit is contained in:
trans_soup 2023-10-22 22:39:58 +02:00
parent 41aa5536b0
commit f63f60a846

View file

@ -97,11 +97,6 @@ local function register_layer (kindname, def, level, modname)
}
end
def.on_construct = blockgame.check_for_stacking
def.on_place = on_place
def.after_place_node = blockgame.check_for_stacking
def.after_land = blockgame.check_for_stacking
def.groups = def.groups or {}
def.groups.leveled = level
@ -119,6 +114,11 @@ function blockgame.register_leveled_node (name, def)
local basename, modname, fullname = blockgame.extract_id_parts(name)
def.kindname = fullname
def.on_construct = blockgame.check_for_stacking
def.on_place = on_place
def.after_place_node = blockgame.check_for_stacking
def.after_land = blockgame.check_for_stacking
def.node_placement_prediction = ""
for level=1, def.level_max do