[logic]
active = sr_idle@wait

[sr_idle@wait]
on_info  = {!black_screen -bar_kon_all_inv_mine_dial_1_end} sr_idle@control_1 %=disable_mine(redlim_zmf_7) =disable_mine(redlim_zmf_5) =disable_mine(redlim_zmf_1)%
on_info2 = {+bar_kon_all_inv_mine_dial_1_end} sr_idle@control_1

[sr_idle@control_1]
on_info  = {=dist_to_actor_le(3) =actor_active_detector(detector_mine)} sr_idle@control_2 %=deactivate_mine(st_fugas_mine)%
on_info2 = {=dist_to_actor_le(3) !actor_active_detector(detector_mine)} sr_idle@control_4 %=disable_ui =add_cs_text(st_no_deactivate_mine) =spawn_actor_rukzak_bomb%

[sr_idle@control_2]
on_info  = {+mine_destroy_yellow} sr_idle@control_3 %-mine_destroy_yellow =disable_ui =add_cs_text(st_deactivate_mine_done)%
on_info2 = {+mine_destroy_red}    sr_idle@control_4 %-mine_destroy_red =disable_ui =add_cs_text(st_no_deactivate_mine_done) =spawn_actor_rukzak_bomb%
on_info3 = {+mine_destroy_green}  sr_idle@control_4 %-mine_destroy_green =disable_ui =add_cs_text(st_no_deactivate_mine_done) =spawn_actor_rukzak_bomb%

[sr_idle@control_3]
on_game_timer = 50 | sr_idle@end %=del_cs_text =enable_ui =inc_counter(deact_mine_counter:1) =destroy_object%

[sr_idle@control_4]
on_game_timer = 50 | sr_idle@end %=enable_ui =del_cs_text =bomb_explode(actor_rukzak_bomb) =kill_actor%

[sr_idle@end]
