From cc4a6e0f2641b471c00ccd1f0a3ca3fe6973ac10 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sun, 1 Jun 2014 15:49:13 -0400 Subject: [PATCH] Fixes config.continous_rounds and adds check --- code/controllers/configuration.dm | 2 +- code/game/gamemodes/game_mode.dm | 2 +- code/game/gamemodes/gameticker.dm | 10 ++++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 366ac7aff96..f9d825d8963 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -40,7 +40,7 @@ var/traitor_scaling = 0 //if amount of traitors scales based on amount of players var/objectives_disabled = 0 //if objectives are disabled or not var/protect_roles_from_antagonist = 0// If security and such can be traitor/cult/other - var/continous_rounds = 1 // Gamemodes which end instantly will instead keep on going until the round ends by escape shuttle or nuke. + var/continous_rounds = 0 // Gamemodes which end instantly will instead keep on going until the round ends by escape shuttle or nuke. var/allow_Metadata = 0 // Metadata is supported. var/popup_admin_pm = 0 //adminPMs to non-admins show in a pop-up 'reply' window when set to 1. var/Ticklag = 0.9 diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 32f5e9110b5..f027246efa4 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -129,7 +129,7 @@ Implants; return 1 return 0 -/datum/game_mode/proc/cleanup() //the end conditions specified by check_finished() have been met, let's clean up. +/datum/game_mode/proc/cleanup() //This is called when the round has ended but not the game, if any cleanup would be necessary in that case. return /datum/game_mode/proc/declare_completion() diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index 596156344f4..abab43ede72 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -310,8 +310,14 @@ var/global/datum/controller/gameticker/ticker emergency_shuttle.process() - var/mode_finished = (!post_game && mode.check_finished()) - var/game_finished = (emergency_shuttle.location == 2 || mode.station_was_nuked) + var/game_finished = 0 + var/mode_finished = 0 + if (config.continous_rounds) + game_finished = (emergency_shuttle.location == 2 || mode.station_was_nuked) + mode_finished = (!post_game && mode.check_finished()) + else + game_finished = (mode.check_finished() || (emergency_shuttle.location == 2 && emergency_shuttle.alert == 1)) + mode_finished = game_finished if(!mode.explosion_in_progress && game_finished && (mode_finished || post_game)) current_state = GAME_STATE_FINISHED