Fixes some edge cases with round end and mulligan antags

This commit is contained in:
Jordan Brown
2017-06-12 12:31:43 -04:00
parent 98be1a3eab
commit 6532461baa
2 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -125,7 +125,7 @@ SUBSYSTEM_DEF(ticker)
check_maprotate()
scripture_states = scripture_unlock_alert(scripture_states)
if(!mode.explosion_in_progress && mode.check_finished() || force_ending)
if(!mode.explosion_in_progress && mode.check_finished(force_ending) || force_ending)
current_state = GAME_STATE_FINISHED
toggle_ooc(1) // Turn it on
declare_completion(force_ending)
+6 -2
View File
@@ -162,6 +162,10 @@
. = 1
sleep(rand(600,1800))
if(!SSticker.IsRoundInProgress())
message_admins("Roundtype conversion cancelled, the game appears to have finished!")
round_converted = 0
return
//somewhere between 1 and 3 minutes from now
if(!config.midround_antag[SSticker.mode.config_tag])
round_converted = 0
@@ -177,7 +181,7 @@
return 0
/datum/game_mode/proc/check_finished() //to be called by SSticker
/datum/game_mode/proc/check_finished(force_ending) //to be called by SSticker
if(replacementmode && round_converted == 2)
return replacementmode.check_finished()
if(SSshuttle.emergency && (SSshuttle.emergency.mode == SHUTTLE_ENDGAME))
@@ -208,7 +212,7 @@
living_antag_player = Player
return 0
if(!config.continuous[config_tag])
if(!config.continuous[config_tag] || force_ending)
return 1
else