Adds the ability for admins to "take the shot" and end rounds at their discretion. This is behind a two confirmation gate with a 20 second reflection period between them. All this is logged.

When mulligan antag is set to kick in, the suggestion for admins to end the round if they feel enough has happened is given. The option can also be found on the check antagonist panel.

The check antagonist panel will show what the muligan roundtype is if it exists.

If absolutely no one wants/can be the midround antags, the round ends there.

The round will end no matter what if the primary antagonist survived over an hour before biting it (unless the shuttle is already past the point of no return, in which case a peaceful ending takes priority)

Adds force_ending to VV editing protection, to avoid admins trying to shinanigans it on.
This commit is contained in:
Incoming
2015-03-03 16:39:01 -05:00
parent 64d0af336d
commit c28d8ff7d0
5 changed files with 29 additions and 5 deletions
+2 -1
View File
@@ -9,6 +9,7 @@ var/datum/subsystem/ticker/ticker
var/restart_timeout = 250 //delay when restarting server
var/current_state = GAME_STATE_STARTUP //state of current round (used by process()) Use the defines GAME_STATE_* !
var/force_ending = 0 //Round was ended by admin intervention
var/hide_mode = 0
var/datum/game_mode/mode = null
@@ -91,7 +92,7 @@ var/datum/subsystem/ticker/ticker
if(GAME_STATE_PLAYING)
mode.process(wait * 0.1)
if(!mode.explosion_in_progress && mode.check_finished())
if(!mode.explosion_in_progress && mode.check_finished() || force_ending)
current_state = GAME_STATE_FINISHED
auto_toggle_ooc(1) // Turn it on
declare_completion()
+8 -3
View File
@@ -29,6 +29,7 @@
var/pre_setup_before_jobs = 0
var/antag_flag = null //preferences flag such as BE_WIZARD that need to be turned on for players to be antag
var/datum/mind/sacrifice_target = null
var/list/datum/game_mode/replacementmode = null
var/round_converted = 0
var/reroll_friendly //During mode conversion only these are in the running
var/enemy_minimum_age = 7 //How many days must players have been playing before they can play this antagonist
@@ -102,7 +103,7 @@
if(!runnable_modes) return 0
var/list/datum/game_mode/replacementmode = pickweight(runnable_modes)
replacementmode = pickweight(runnable_modes)
switch(SSshuttle.emergency.mode) //Rounds on the verge of ending don't get new antags, they just run out
if(SHUTTLE_STRANDED, SHUTTLE_ESCAPE)
@@ -111,6 +112,9 @@
if(SSshuttle.emergency.timeLeft(1) < initial(SSshuttle.emergencyCallTime)*0.5)
return 1
if(world.time >= 36000) //If it's been over an hour, just end it
return 0
var/living_crew = 0
for(var/mob/Player in mob_list)
@@ -126,8 +130,7 @@
antag_canadates += H
if(!antag_canadates)
message_admins("The roundtype has been converted, antagonists may have been created")
return 1
return 0
antag_canadates = shuffle(antag_canadates)
@@ -136,6 +139,8 @@
if(config.protect_assistant_from_antagonist)
replacementmode.restricted_jobs += "Assistant"
message_admins("The roundtype will be converted. If you feel that the round should not continue, <A HREF='?_src_=holder;end_round=\ref[usr]'>end the round now</A>.")
spawn(rand(1800,4200)) //somewhere between 3 and 7 minutes from now
for(var/mob/living/carbon/human/H in antag_canadates)
replacementmode.make_antag_chance(H)
+3
View File
@@ -368,6 +368,8 @@
if (ticker && ticker.current_state >= GAME_STATE_PLAYING)
var/dat = "<html><head><title>Round Status</title></head><body><h1><B>Round Status</B></h1>"
dat += "Current Game Mode: <B>[ticker.mode.name]</B><BR>"
if(ticker.mode.replacementmode)
dat += "Replacement Game Mode: <B>[ticker.mode.replacementmode.name]</B><BR>"
dat += "Round Duration: <B>[round(world.time / 36000)]:[add_zero("[world.time / 600 % 60]", 2)]:[world.time / 100 % 6][world.time / 100 % 10]</B><BR>"
dat += "<B>Emergency shuttle</B><BR>"
if(SSshuttle.emergency.mode < SHUTTLE_CALL)
@@ -379,6 +381,7 @@
dat += "<a href='?_src_=holder;call_shuttle=2'>Send Back</a><br>"
else
dat += "ETA: <a href='?_src_=holder;edit_shuttle_time=1'>[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]</a><BR>"
dat += "<a href='?_src_=holder;end_round=\ref[usr]'>End Round Now</a><br>"
dat += "<a href='?_src_=holder;delay_round_end=1'>[ticker.delay_end ? "End Round Normally" : "Delay Round End"]</a><br>"
if(ticker.mode.syndicates.len)
dat += "<br><table cellspacing=5><tr><td><B>Syndicates</B></td><td></td></tr>"
+15
View File
@@ -226,6 +226,21 @@
message_admins("<span class='adminnotice'>[key_name(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].</span>")
href_list["secretsadmin"] = "check_antagonist"
else if(href_list["end_round"])
if(!check_rights(R_ADMIN)) return
message_admins("<span class='adminnotice'>[key_name_admin(usr)] is considering ending the round.</span>")
if(alert(usr, "This will end the round, are you SURE you want to do this?", "Confirmation", "Yes", "No") == "Yes")
spawn(200) //I wish you would step back from that ledge my friend
if(alert(usr, "Final Confirmation: End the round NOW?", "Confirmation", "Yes", "No") == "Yes")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has ended the round.</span>")
ticker.force_ending = 1 //Yeah there we go APC destroyed mission accomplished
return
else
message_admins("<span class='adminnotice'>[key_name_admin(usr)] decided against ending the round.</span>")
else
message_admins("<span class='adminnotice'>[key_name_admin(usr)] decided against ending the round.</span>")
else if(href_list["simplemake"])
if(!check_rights(R_SPAWN)) return
+1 -1
View File
@@ -5,7 +5,7 @@ var/list/forbidden_varedit_object_types = list(
/datum/admin_rank //editing my own rank? it's more likely than you think
)
var/list/VVlocked = list("vars", "client", "virus", "viruses", "cuffed", "last_eaten", "unlock_content", "step_x", "step_y")
var/list/VVlocked = list("vars", "client", "virus", "viruses", "cuffed", "last_eaten", "unlock_content", "step_x", "step_y", "force_ending")
var/list/VVicon_edit_lock = list("icon", "icon_state", "overlays", "underlays")
var/list/VVckey_edit = list("key", "ckey")