[logic]
active = ph_door@locked_by_story

[ph_door@locked_by_story]
locked = true
closed = true
snd_open_start = wood_large_open
snd_close_start = wood_large_close_start
snd_close_stop = wood_large_close_stop
on_info = {+gar_story_got_info_from_digger} ph_door@open

[ph_door@locked]
locked = true
closed = true
snd_open_start = wood_large_open
snd_close_start = wood_large_close_start
snd_close_stop = wood_large_close_stop
on_info = {-val_freedom_base_under_attack} ph_door@close

[ph_door@close]
locked = false
closed = true
snd_open_start = wood_large_open
snd_close_start = wood_large_close_start
snd_close_stop = wood_large_close_stop
on_use = ph_door@open
on_info = {+val_freedom_base_under_attack} ph_door@locked

[ph_door@open]
locked = false
closed = false
snd_open_start = wood_large_open
snd_close_start = wood_large_close_start
snd_close_stop = wood_large_close_stop
on_use = ph_door@close
on_info = {+val_freedom_base_under_attack} ph_door@locked