Punch to open door
This commit is contained in:
parent
89765a36f2
commit
b5df174e6d
@ -23,7 +23,7 @@ Door segments are completely standalone, it is the reponsibility
|
||||
of the map author to construct correct doors.
|
||||
]]
|
||||
|
||||
local on_rightclick_exit = function(pos, node, clicker)
|
||||
local on_punch_exit = function(pos, node, clicker)
|
||||
local state = lzr_gamestate.get_state()
|
||||
if state ~= lzr_gamestate.LEVEL then
|
||||
return
|
||||
@ -44,7 +44,7 @@ local on_rightclick_exit = function(pos, node, clicker)
|
||||
end
|
||||
|
||||
|
||||
local on_rightclick_locked = function(pos, node, clicker)
|
||||
local on_punch_locked = function(pos, node, clicker)
|
||||
local state = lzr_gamestate.get_state()
|
||||
if state ~= lzr_gamestate.LEVEL and state ~= lzr_gamestate.LEVEL_COMPLETE and state ~= lzr_gamestate.LEVEL_TEST then
|
||||
return
|
||||
@ -77,7 +77,7 @@ lzr_doors.register_door = function(basename, modname, def)
|
||||
wield_image = "("..def.image_top .. ")^lzr_doors_overlay_exit.png",
|
||||
sounds = def.sounds or lzr_sounds.node_sound_wood_defaults(),
|
||||
element_group = "laser_element_door_"..basename.."_exit_top",
|
||||
on_rightclick = on_rightclick_exit,
|
||||
on_punch = on_punch_exit,
|
||||
})
|
||||
lzr_panes.register_pane(modname..":door_"..basename.."_exit_bottom", {
|
||||
description = S("@1 (bottom segment, exit)", def.base_description),
|
||||
@ -87,7 +87,7 @@ lzr_doors.register_door = function(basename, modname, def)
|
||||
wield_image = "("..def.image_bottom.. ")^lzr_doors_overlay_exit.png",
|
||||
sounds = lzr_sounds.node_sound_wood_defaults(),
|
||||
element_group = "laser_element_door_"..basename.."_exit_bottom",
|
||||
on_rightclick = on_rightclick_exit,
|
||||
on_punch = on_punch_exit,
|
||||
})
|
||||
|
||||
lzr_panes.register_pane(modname..":door_"..basename.."_locked_top", {
|
||||
@ -98,7 +98,7 @@ lzr_doors.register_door = function(basename, modname, def)
|
||||
wield_image = "("..def.image_top .. ")^lzr_doors_overlay_locked.png",
|
||||
sounds = def.sounds or lzr_sounds.node_sound_wood_defaults(),
|
||||
element_group = "laser_element_door_"..basename.."_locked_top",
|
||||
on_rightclick = on_rightclick_locked,
|
||||
on_punch = on_punch_locked,
|
||||
})
|
||||
lzr_panes.register_pane(modname..":door_"..basename.."_locked_bottom", {
|
||||
description = S("@1 (bottom segment, locked)", def.base_description),
|
||||
@ -108,7 +108,7 @@ lzr_doors.register_door = function(basename, modname, def)
|
||||
wield_image = "("..def.image_bottom.. ")^lzr_doors_overlay_locked.png",
|
||||
sounds = lzr_sounds.node_sound_wood_defaults(),
|
||||
element_group = "laser_element_door_"..basename.."_locked_bottom",
|
||||
on_rightclick = on_rightclick_locked,
|
||||
on_punch = on_punch_locked,
|
||||
})
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user