From b89a2314a2cc552e6a4261b58674464b2431c456 Mon Sep 17 00:00:00 2001 From: Hatterhat Date: Sat, 22 Feb 2020 16:17:51 -0600 Subject: [PATCH] mmm that's compiling i don't like that --- code/controllers/configuration/entries/game_options.dm | 4 ---- code/controllers/subsystem/autotransfer.dm | 4 +++- code/controllers/subsystem/shuttle.dm | 4 ++-- code/datums/elements/ghost_role_eligibility.dm | 3 ++- code/game/gamemodes/dynamic/dynamic.dm | 4 ++-- code/game/machinery/computer/communications.dm | 2 +- code/modules/mob/dead/observer/observer.dm | 6 ++++-- 7 files changed, 14 insertions(+), 13 deletions(-) diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm index a3bc47ac91..52d7c02177 100644 --- a/code/controllers/configuration/entries/game_options.dm +++ b/code/controllers/configuration/entries/game_options.dm @@ -403,10 +403,6 @@ lowercase = FALSE splitter = "," -/datum/config_entry/number/auto_transfer_delay - config_entry_value = 72000 - min_val = 0 - /datum/config_entry/flag/pai_custom_holoforms /datum/config_entry/number/marauder_delay_non_reebe diff --git a/code/controllers/subsystem/autotransfer.dm b/code/controllers/subsystem/autotransfer.dm index b80211c354..4f8fc3631d 100644 --- a/code/controllers/subsystem/autotransfer.dm +++ b/code/controllers/subsystem/autotransfer.dm @@ -5,12 +5,14 @@ SUBSYSTEM_DEF(autotransfer) var/starttime var/targettime + var/voteinterval var/maxvotes var/curvotes /datum/controller/subsystem/autotransfer/Initialize(timeofday) starttime = world.time targettime = starttime + CONFIG_GET(number/vote_autotransfer_initial) + voteinterval = CONFIG_GET(number/vote_autotransfer_interval) maxvotes = CONFIG_GET(number/vote_autotransfer_maximum) curvotes = 0 return ..() @@ -19,7 +21,7 @@ SUBSYSTEM_DEF(autotransfer) if(maxvotes > curvotes) if(world.time > targettime) SSvote.initiate_vote("transfer",null) //TODO figure out how to not use null as the user - targettime = targettime + CONFIG_GET(number/vote_autotransfer_interval) + targettime = targettime + voteinterval curvotes += 1 else SSshuttle.autoEnd() diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm index 5929e7e113..ff64732317 100644 --- a/code/controllers/subsystem/shuttle.dm +++ b/code/controllers/subsystem/shuttle.dm @@ -55,7 +55,7 @@ SUBSYSTEM_DEF(shuttle) var/lockdown = FALSE //disallow transit after nuke goes off - var/extendvote_passed = FALSE + var/endvote_passed = FALSE var/realtimeofstart = 0 @@ -650,4 +650,4 @@ SUBSYSTEM_DEF(shuttle) log_game("Round end vote passed. Shuttle has been auto-called.") message_admins("Round end vote passed. Shuttle has been auto-called.") emergencyNoRecall = TRUE - extendvote_passed = TRUE + endvote_passed = TRUE diff --git a/code/datums/elements/ghost_role_eligibility.dm b/code/datums/elements/ghost_role_eligibility.dm index e57aaddd5a..ab87d7f1d2 100644 --- a/code/datums/elements/ghost_role_eligibility.dm +++ b/code/datums/elements/ghost_role_eligibility.dm @@ -17,7 +17,8 @@ penalty += roundstart_quit_limit - world.time if(penalty) penalty += world.realtime - if(penalty - SSshuttle.realtimeofstart > SSshuttle.auto_call + SSshuttle.emergencyCallTime + SSshuttle.emergencyDockTime + SSshuttle.emergencyEscapeTime) + var/maximumRoundEnd = SSautotransfer.starttime + SSautotransfer.voteinterval * SSautotransfer.maxvotes + if(penalty - SSshuttle.realtimeofstart > maximumRoundEnd + SSshuttle.emergencyCallTime + SSshuttle.emergencyDockTime + SSshuttle.emergencyEscapeTime) penalty = CANT_REENTER_ROUND if(!(M.ckey in timeouts)) timeouts += M.ckey diff --git a/code/game/gamemodes/dynamic/dynamic.dm b/code/game/gamemodes/dynamic/dynamic.dm index 6ea357163f..4c3ef824b9 100644 --- a/code/game/gamemodes/dynamic/dynamic.dm +++ b/code/game/gamemodes/dynamic/dynamic.dm @@ -672,7 +672,7 @@ GLOBAL_VAR_INIT(dynamic_storyteller_type, /datum/dynamic_storyteller/classic) // Time to inject some threat into the round if(EMERGENCY_ESCAPED_OR_ENDGAMED) // Unless the shuttle is gone return - if((world.realtime - SSshuttle.realtimeofstart) > SSshuttle.auto_call) // no rules after shuttle is auto-called + if(SSshuttle.endvote_passed) // no rules after shuttle call is voted return message_admins("DYNAMIC: Checking for midround injection.") log_game("DYNAMIC: Checking for midround injection.") @@ -748,7 +748,7 @@ GLOBAL_VAR_INIT(dynamic_storyteller_type, /datum/dynamic_storyteller/classic) return if(EMERGENCY_ESCAPED_OR_ENDGAMED) // No more rules after the shuttle has left return - if((world.realtime - SSshuttle.realtimeofstart) > SSshuttle.auto_call) // no rules after shuttle is auto-called + if(SSshuttle.endvote_passed) // no rules after shuttle is auto-called return update_playercounts() diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 9d0053c9b2..5fe141d2cd 100755 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -194,7 +194,7 @@ state = STATE_CANCELSHUTTLE if("cancelshuttle2") if(authenticated) - if((world.realtime - SSshuttle.realtimeofstart) > SSshuttle.auto_call) //Citadel Edit Removing auto_call caused recall. + if(SSshuttle.endvote_passed) //Citadel Edit - endvote passing = no recalls say("Warning: Emergency shuttle recalls have been blocked by Central Command due to ongoing crew transfer procedures.") else SSshuttle.cancelEvac(usr) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 325ea6e8ed..d2cf3608e6 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -289,7 +289,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/roundstart_quit_limit = CONFIG_GET(number/roundstart_suicide_time_limit) MINUTES if(world.time < roundstart_quit_limit) penalty += roundstart_quit_limit - world.time - if(penalty + world.realtime - SSshuttle.realtimeofstart > SSshuttle.auto_call + SSshuttle.emergencyCallTime + SSshuttle.emergencyDockTime + SSshuttle.emergencyEscapeTime) + var/maximumRoundEnd = SSautotransfer.starttime + SSautotransfer.voteinterval * SSautotransfer.maxvotes + if(penalty - SSshuttle.realtimeofstart > maximumRoundEnd + SSshuttle.emergencyCallTime + SSshuttle.emergencyDockTime + SSshuttle.emergencyEscapeTime) penalty = CANT_REENTER_ROUND if(SEND_SIGNAL(src, COMSIG_MOB_GHOSTIZE, (stat == DEAD) ? TRUE : FALSE, FALSE, (stat == DEAD)? penalty : 0, (stat == DEAD)? TRUE : FALSE) & COMPONENT_BLOCK_GHOSTING) @@ -323,7 +324,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/roundstart_quit_limit = CONFIG_GET(number/roundstart_suicide_time_limit) MINUTES if(world.time < roundstart_quit_limit) penalty += roundstart_quit_limit - world.time - if(penalty + world.realtime - SSshuttle.realtimeofstart > SSshuttle.auto_call + SSshuttle.emergencyCallTime + SSshuttle.emergencyDockTime + SSshuttle.emergencyEscapeTime) + var/maximumRoundEnd = SSautotransfer.starttime + SSautotransfer.voteinterval * SSautotransfer.maxvotes + if(penalty - SSshuttle.realtimeofstart > maximumRoundEnd + SSshuttle.emergencyCallTime + SSshuttle.emergencyDockTime + SSshuttle.emergencyEscapeTime) penalty = CANT_REENTER_ROUND var/response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost whilst alive you won't be able to re-enter this round [penalty ? "or play ghost roles [penalty == CANT_REENTER_ROUND ? "until the round is over" : "for the next [DisplayTimeText(penalty)]"]" : ""]! You can't change your mind so choose wisely!!)","Are you sure you want to ghost?","Ghost","Stay in body")