[logic]
active = ph_code@_1

[ph_code@_1]
code = 83465
on_code = %+labx9_exit_door_key_done =remove_item_no_news(labx9_exit_code_flash)%
tips = tunnel_lab_1_physic_door_1_code
info_code = actor_has_labx9_exit_code_flash
on_info  = {+labx9_exit_door_key_done -lab9_exit_button_pressed} ph_idle@open %+lab9_exit_button_pressed +lab9_exit_door_open%
on_info2 = {+lab9_exit_button_pressed +lab9_exit_door_open} ph_idle@open
on_info3 = {+lab9_exit_button_pressed -lab9_exit_door_open} ph_idle@close

[ph_idle@open]
nonscript_usable = false
on_info = {-lab9_exit_door_open} ph_idle@close
on_info2 = {=actor_in_zone(labx9_holl_kordon_restr)} ph_idle@close %-lab9_exit_door_open%

[ph_idle@close]
nonscript_usable = true
on_use = ph_idle@open %+lab9_exit_door_open%
tips = tunnel_lab_1_physic_door_1_code
on_info = {+lab9_exit_door_open} ph_idle@open

