[logic]
active = ph_idle@locked

[ph_idle@locked]
tips = tip_no_access_card
nonscript_usable = true
on_info  = {=actor_has_item(labx8_labx7_code_flash)} ph_idle@closed
on_info2 = {+labx8_labx7_code_done} ph_idle@in

[ph_idle@closed]
on_use = ph_idle@wait_signal
tips = st_lx8_lift_button
nonscript_usable = true
on_info = {!actor_has_item(labx8_labx7_code_flash)} ph_idle@locked 

[ph_idle@wait_signal]
nonscript_usable = false
on_game_timer = 20 | ph_code@_1 %=play_sound_lift%

[ph_code@_1]
code = 1234
on_code = %+labx8_labx7_code_done =remove_item_no_news(labx8_labx7_code_flash) =remove_item_no_news(labx8_flash_info)%
tips = st_lx8_lift_button
info_code = actor_has_labx8_labx7_code_flash
on_info = {+labx8_labx7_code_done} ph_idle@teleport %=disable_ui =run_postprocess(fade_in) =play_lift_snd_door%

[ph_idle@teleport]
on_game_timer = 20 | ph_idle@in %=run_postprocess(black:3009:true) =teleport_actor(actor_labx8_labx7_walk:actor_labx8_labx7_look)%

[ph_idle@in]
on_info = {!actor_in_zone(labx8_sr_levelchanger)} ph_idle@wait %=run_postprocess(black:3009:true) =disable_ui%

[ph_idle@wait]
on_game_timer = 10 | ph_idle@out %=stop_postprocess(3009)%

[ph_idle@out]
on_game_timer = 10 | ph_idle@lift_open %=enable_ui%

[ph_idle@lift_open]
on_use = ph_idle@teleport %=disable_ui =run_postprocess(fade_in) =play_lift_snd_door%
tips = st_lx8_lift_button
nonscript_usable = true