[logic]
active = ph_door@locked

[ph_door@locked]
locked = true
closed = true
on_use = ph_door@locked
on_info  = {+stop_laba_all_spawn_at_redlim -red_maria_ghosts_past_var_dialog_end} ph_door@close_1
on_info2 = {+actor_has_leschi_key} ph_door@locked_1

[ph_door@locked_1]
locked = true
closed = true
tip_open = tip_door_need_key
on_use = ph_door@close %=remove_item_no_news(red_leschi_key) +use_red_leschi_key%
on_info = {+use_red_leschi_key} ph_door@close

[ph_door@close]
locked = false
closed = true
snd_open_start = wood_small_open
snd_close_start = wood_small_close_start
snd_close_stop = wood_small_close_stop
on_use = ph_door@open
on_info  = {+stop_laba_all_spawn_at_redlim -red_maria_ghosts_past_var_dialog_end} ph_door@close_1

[ph_door@open]
locked = false
closed = false
snd_open_start = wood_small_open
snd_close_start = wood_small_close_start
snd_close_stop = wood_small_close_stop
on_use = ph_door@close
on_info  = {+stop_laba_all_spawn_at_redlim -red_maria_ghosts_past_var_dialog_end} ph_door@close_1

[ph_door@close_1]
locked = false
closed = true
snd_open_start = wood_small_open
snd_close_start = wood_small_close_start
snd_close_stop = wood_small_close_stop
on_use = ph_door@open_1
on_info  = {+red_maria_ghosts_past_var_dialog_end} ph_door@locked

[ph_door@open_1]
locked = false
closed = false
snd_open_start = wood_small_open
snd_close_start = wood_small_close_start
snd_close_stop = wood_small_close_stop
on_use = ph_door@close_1
on_info = {+lim_shtern_ghosts_past_dialog_end} ph_door@close_1
