Event Map Refactor (#12329)

This commit is contained in:
Geeves
2021-09-23 13:34:47 -03:00
committed by GitHub
parent 9a68ae6022
commit fdddb91bd1
16 changed files with 149 additions and 46 deletions
+24
View File
@@ -899,6 +899,17 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(alert(src, "Are you sure?", "Confirm", "Yes", "No") != "Yes")
return
if(current_map.shuttle_call_restarts)
if(current_map.shuttle_call_restart_timer)
to_chat(usr, SPAN_WARNING("The shuttle round restart timer is already active!"))
return
feedback_add_details("admin_verb","CSHUT")
current_map.shuttle_call_restart_timer = addtimer(CALLBACK(GLOBAL_PROC, .proc/reboot_world), 10 MINUTES, TIMER_UNIQUE|TIMER_STOPPABLE)
log_game("[key_name(usr)] has admin-called the 'shuttle' round restart.")
message_admins("[key_name_admin(usr)] has admin-called the 'shuttle' round restart.", 1)
to_world(FONT_LARGE(SPAN_VOTE(current_map.shuttle_called_message)))
return
if(SSticker.mode.auto_recall_shuttle)
if(input("The evacuation will just be cancelled if you call it. Call anyway?") in list("Confirm", "Cancel") != "Confirm")
return
@@ -923,6 +934,19 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!ROUND_IS_STARTED || !evacuation_controller)
return
if(current_map.shuttle_call_restarts)
if(!current_map.shuttle_call_restart_timer)
to_chat(usr, SPAN_WARNING("The restart timer for this map isn't active!"))
return
feedback_add_details("admin_verb","CCSHUT")
deltimer(current_map.shuttle_call_restart_timer)
current_map.shuttle_call_restart_timer = null
log_game("[key_name(usr)] has admin-stopped the 'shuttle' round restart.", key_name(usr))
message_admins("[key_name_admin(usr)] has admin-stopped the 'shuttle' round restart.", 1)
to_world(FONT_LARGE(SPAN_VOTE(current_map.shuttle_recall_message)))
return
evacuation_controller.cancel_evacuation()
feedback_add_details("admin_verb","CCSHUT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] admin-cancelled the evacuation.",admin_key=key_name(usr))