[logic]
active = ph_button@wait

;---------------------------------нужна карта доступа на опускание моста
[ph_button@wait]
anim = idle
tooltip = tip_need_access_card_down
on_info  = {+lim_stalker_den_attack_dialog_end -lim_lider_monolit_relic_dialog_end =dist_between_actor_and_smart_le(lim_a18:50)} ph_button@damage %=anim_obj_fast_forward(redlim_bridge)%
on_info2 = {+lim_lider_monolit_relic_dialog_end =dist_between_actor_and_smart_le(lim_a18:130)} ph_button@damage %=anim_obj_fast_forward(redlim_bridge)%
on_press = ph_button@wait

;---------------------------------Управление мостом перехвачено компьютером
[ph_button@damage]
anim = idle
tooltip = tip_damage_bridge_button
on_info = {+actor_has_red_agent_notebook} ph_button@no_card
on_press = ph_button@damage

;---------------------------------нужна карта доступа на поднятие моста
[ph_button@no_card]
anim = idle
tooltip = tip_no_access_card_up
on_press = ph_button@no_card
on_info  = {+actor_has_lim_bridge_access_card_up} ph_button@has_card_up
on_info2 = {+stop_laba_all_spawn_at_redlim =dist_between_actor_and_smart_le(lim_a18:130)} ph_button@redlim_mystic_1 %=anim_obj_fast_backward(redlim_bridge) +lim_mystic_no_card%

;---------------------------------вставить карту доступа на поднятие моста
[ph_button@has_card_up]
anim = idle
tooltip = tip_no_access_card_up
on_press = ph_code@locked_up %=remove_item(lim_bridge_access_card_up)%
on_info = {+stop_laba_all_spawn_at_redlim =dist_between_actor_and_smart_le(lim_a18:130)} ph_button@redlim_mystic_1 %=anim_obj_fast_backward(redlim_bridge) +lim_mystic_has_card_up%

;---------------------------------ввести код доступа на поднятие моста
[ph_code@locked_up]
code = 140866
on_code = ph_button@bridge_down %=anim_obj_backward(redlim_bridge) +bridge_up =give_actor(lim_bridge_access_card_up)%
tips = jup_b205_tip_door_decode
on_info = {+stop_laba_all_spawn_at_redlim =dist_between_actor_and_smart_le(lim_a18:130)} ph_button@redlim_mystic_1 %=anim_obj_fast_backward(redlim_bridge) +lim_mystic_locked_up%

;---------------------------------нужна карта доступа на опускание моста
[ph_button@bridge_down]
anim = idle
tooltip = tip_need_access_card_down
on_press = ph_button@bridge_down
on_info  = {+actor_has_lim_bridge_access_card_down} ph_button@has_card_down
on_info2 = {+stop_laba_all_spawn_at_redlim} ph_button@redlim_mystic_1 %+lim_mystic_bridge_down%

;---------------------------------вставить карту доступа на опускание моста
[ph_button@has_card_down]
anim = idle
tooltip = tip_need_access_card_down
on_press = ph_code@locked_down %=remove_item(lim_bridge_access_card_down)%
on_info = {+stop_laba_all_spawn_at_redlim -red_maria_var_final_dialog_end} ph_button@redlim_mystic_1 %+lim_mystic_has_card_down%

;---------------------------------ввести код доступа на опускание моста
[ph_code@locked_down]
code = 250366
on_code = ph_button@has_card_up %=anim_obj_forward(redlim_bridge) =give_actor(lim_bridge_access_card_down)%
tips = jup_b205_tip_door_decode
on_info = {+stop_laba_all_spawn_at_redlim -red_maria_var_final_dialog_end} ph_button@redlim_mystic_1 %+lim_mystic_locked_down%
;
;
;
;
;---------------------------------------------------------------------------------
[ph_button@redlim_mystic_1]
anim = idle
tooltip = tip_need_access_card_down
on_press = ph_button@redlim_mystic_1
on_info = {+remote_controller_active} ph_button@redlim_mystic_2 %=anim_obj_forward(redlim_bridge)%

[ph_button@redlim_mystic_2]
anim = idle
tooltip = tip_no_access_card_up
on_press = ph_button@redlim_mystic_2
on_info  = {+start_maria_teleport_actor_bar +lim_mystic_no_card}         ph_button@no_card
on_info2 = {+start_maria_teleport_actor_bar +lim_mystic_has_card_up}     ph_button@has_card_up
on_info3 = {+start_maria_teleport_actor_bar +lim_mystic_locked_up}       ph_button@locked_up
on_info4 = {+start_maria_teleport_actor_bar +lim_mystic_bridge_down}     ph_button@bridge_down   %=anim_obj_backward(redlim_bridge)%
on_info5 = {+start_maria_teleport_actor_bar +lim_mystic_has_card_down}   ph_button@has_card_down %=anim_obj_backward(redlim_bridge)%
on_info6 = {+start_maria_teleport_actor_bar +lim_mystic_locked_down}     ph_button@locked_down   %=anim_obj_backward(redlim_bridge)%
