[logic]
active = ph_door@locked

[ph_door@locked]
locked = true
closed = true
snd_open_start = trader_door_locked
on_info = {+dar_codelock1_unlock +dar_password_info1} ph_door@closed %+dar_open_door1%
on_use = {-dar_door1_closed -dar_open_door1} ph_door@locked2 %+dar_door1_closed%

[ph_door@locked2]
locked = true
closed = true
snd_open_start = trader_door_locked
on_info = {+dar_codelock1_unlock +dar_password_info1} ph_door@closed %+dar_open_door1%

[ph_door@closed]
locked = false
closed = true
snd_init = trader_door_unlock
snd_open_start = trader_door_open_start
snd_close_start = trader_door_close_start
snd_close_stop = trader_door_close_stop
on_use = ph_door@open

[ph_door@open]
locked = false
closed = false
snd_init = trader_door_unlock
snd_open_start = trader_door_open_start
snd_close_start = trader_door_close_start
snd_close_stop = trader_door_close_stop
on_use = ph_door@closed