minor refactor of leveled node registration.
This commit is contained in:
parent
41aa5536b0
commit
f63f60a846
1 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue