From c00f797a4a0411ea31e7e14c4a621ad57e697fe7 Mon Sep 17 00:00:00 2001 From: Hatterhat Date: Sun, 16 Feb 2020 01:26:33 -0600 Subject: [PATCH 1/9] extendies --- .../configuration/entries/general.dm | 10 +++++++ code/controllers/subsystem/autotransfer.dm | 17 ++++++++++++ code/controllers/subsystem/ticker.dm | 2 +- code/controllers/subsystem/vote.dm | 26 ++++++++++++++++++- config/config.txt | 6 +++++ 5 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 code/controllers/subsystem/autotransfer.dm diff --git a/code/controllers/configuration/entries/general.dm b/code/controllers/configuration/entries/general.dm index cb8c0fe966..b5e7137374 100644 --- a/code/controllers/configuration/entries/general.dm +++ b/code/controllers/configuration/entries/general.dm @@ -82,6 +82,16 @@ config_entry_value = 600 min_val = 0 +/datum/config_entry/number/vote_autotransfer_initial //length of time before the first autotransfer vote is called (deciseconds, default 2 hours) + config_entry_value = 72000 + integer = FALSE + min_val = 0 + +/datum/config_entry/number/vote_autotransfer_interval //length of time to wait before subsequent autotransfer votes (deciseconds, default 30 minutes) + config_entry_value = 18000 + integer = FALSE + min_val = 0 + /datum/config_entry/flag/default_no_vote // vote does not default to nochange/norestart /datum/config_entry/flag/no_dead_vote // dead people can't vote diff --git a/code/controllers/subsystem/autotransfer.dm b/code/controllers/subsystem/autotransfer.dm new file mode 100644 index 0000000000..05ef3127c1 --- /dev/null +++ b/code/controllers/subsystem/autotransfer.dm @@ -0,0 +1,17 @@ +SUBSYSTEM_DEF(autotransfer) + name = "Autotransfer Vote" + flags = SS_KEEP_TIMING | SS_BACKGROUND + wait = 1 MINUTES + + var/starttime + var/targettime + +/datum/controller/subsystem/autotransfer/Initialize(timeofday) + starttime = world.time + targettime = starttime + CONFIG_GET(number/vote_autotransfer_initial) + return ..() + +/datum/controller/subsystem/autotransfer/fire() + 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) diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index fe994facdc..3857fb0af5 100755 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -213,7 +213,7 @@ SUBSYSTEM_DEF(ticker) check_queue() check_maprotate() scripture_states = scripture_unlock_alert(scripture_states) - SSshuttle.autoEnd() + //SSshuttle.autoEnd() if(!roundend_check_paused && mode.check_finished(force_ending) || force_ending) current_state = GAME_STATE_FINISHED diff --git a/code/controllers/subsystem/vote.dm b/code/controllers/subsystem/vote.dm index 9924ed7917..10d1cbb3d0 100644 --- a/code/controllers/subsystem/vote.dm +++ b/code/controllers/subsystem/vote.dm @@ -89,6 +89,20 @@ SUBSYSTEM_DEF(vote) choices[GLOB.master_mode] += non_voters.len if(choices[GLOB.master_mode] >= greatest_votes) greatest_votes = choices[GLOB.master_mode] + else if(mode == "transfer") // austation begin -- Crew autotransfer vote + var/factor = 1 + switch(world.time / (1 MINUTES )) + if(0 to 60) + factor = 0.5 + if(61 to 120) + factor = 0.8 + if(121 to 240) + factor = 1 + if(241 to 300) + factor = 1.2 + else + factor = 1.4 + choices["Initiate Crew Transfer"] += round(non_voters.len * factor) // austation end //get all options with that many votes and return them in a list . = list() if(greatest_votes) @@ -365,6 +379,13 @@ SUBSYSTEM_DEF(vote) log_admin("The map has been voted for and will change to: [VM.map_name]") if(SSmapping.changemap(config.maplist[.])) to_chat(world, "The map vote has chosen [VM.map_name] for next round!") + if("transfer") // austation begin -- Crew autotransfer vote + if(. == "Initiate Crew Transfer") + //TODO find a cleaner way to do this + SSshuttle.requestEvac(null,"Crew transfer requested.") + var/obj/machinery/computer/communications/C = locate() in GLOB.machines + if(C) + C.post_status("shuttle") // austation end if(restart) var/active_admins = 0 for(var/client/C in GLOB.admins) @@ -444,6 +465,7 @@ SUBSYSTEM_DEF(vote) to_chat(usr, "A vote was initiated recently, you must wait [DisplayTimeText(next_allowed_time-world.time)] before a new vote can be started!") return 0 + SEND_SOUND(world, sound('sound/misc/notice2.ogg')) reset() obfuscated = hideresults //CIT CHANGE - adds obfuscated votes switch(vote_type) @@ -465,6 +487,8 @@ SUBSYSTEM_DEF(vote) if(targetmap.max_round_search_span && count_occurences_of_value(lastmaps, M, targetmap.max_round_search_span) >= targetmap.max_rounds_played) continue choices |= M + if("transfer") // austation begin -- Crew autotranfer vote + choices.Add("Initiate Crew Transfer","Continue Playing") // austation end if("roundtype") //CIT CHANGE - adds the roundstart secret/extended vote choices.Add("secret", "extended") if("mode tiers") @@ -496,7 +520,7 @@ SUBSYSTEM_DEF(vote) else return 0 mode = vote_type - initiator = initiator_key + initiator = initiator_key ? initiator_key : "the Server" // austation -- Crew autotransfer vote started_time = world.time var/text = "[capitalize(mode)] vote started by [initiator]." if(mode == "custom") diff --git a/config/config.txt b/config/config.txt index 0ab0cc911e..cc9ede5ef2 100644 --- a/config/config.txt +++ b/config/config.txt @@ -184,6 +184,12 @@ VOTE_DELAY 6000 ## time period (deciseconds) which voting session will last (default 1 minute) VOTE_PERIOD 600 +## autovote initial delay (deciseconds) before first automatic transfer vote call (default 120 minutes) +VOTE_AUTOTRANSFER_INITIAL 72000 + +##autovote delay (deciseconds) before sequential automatic transfer votes are called (default 30 minutes) +VOTE_AUTOTRANSFER_INTERVAL 18000 + ## prevents dead players from voting or starting votes # NO_DEAD_VOTE From 35a070fc5736f4d8aee2770869093a87cb26cb30 Mon Sep 17 00:00:00 2001 From: Hatterhat Date: Sun, 16 Feb 2020 01:29:06 -0600 Subject: [PATCH 2/9] oh shit oh jesus is this working --- tgstation.dme | 1 + 1 file changed, 1 insertion(+) diff --git a/tgstation.dme b/tgstation.dme index 28f469ac25..3591fa59b5 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -242,6 +242,7 @@ #include "code\controllers\subsystem\assets.dm" #include "code\controllers\subsystem\atoms.dm" #include "code\controllers\subsystem\augury.dm" +#include "code\controllers\subsystem\autotransfer.dm" #include "code\controllers\subsystem\blackbox.dm" #include "code\controllers\subsystem\chat.dm" #include "code\controllers\subsystem\communications.dm" From f05a88d36f661bc93cd3e2b0539211e19ad73cd6 Mon Sep 17 00:00:00 2001 From: Hatterhat Date: Sun, 16 Feb 2020 02:24:41 -0600 Subject: [PATCH 3/9] it compiles now ghom --- code/controllers/subsystem/vote.dm | 38 +++++++++++++++--------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/code/controllers/subsystem/vote.dm b/code/controllers/subsystem/vote.dm index 10d1cbb3d0..9ddd8d9123 100644 --- a/code/controllers/subsystem/vote.dm +++ b/code/controllers/subsystem/vote.dm @@ -90,19 +90,19 @@ SUBSYSTEM_DEF(vote) if(choices[GLOB.master_mode] >= greatest_votes) greatest_votes = choices[GLOB.master_mode] else if(mode == "transfer") // austation begin -- Crew autotransfer vote - var/factor = 1 - switch(world.time / (1 MINUTES )) - if(0 to 60) - factor = 0.5 - if(61 to 120) - factor = 0.8 - if(121 to 240) - factor = 1 - if(241 to 300) - factor = 1.2 - else - factor = 1.4 - choices["Initiate Crew Transfer"] += round(non_voters.len * factor) // austation end + var/factor = 1 + switch(world.time / (1 MINUTES)) + if(0 to 60) + factor = 0.5 + if(61 to 120) + factor = 0.8 + if(121 to 240) + factor = 1 + if(241 to 300) + factor = 1.2 + else + factor = 1.4 + choices["Initiate Crew Transfer"] += round(non_voters.len * factor) // austation end //get all options with that many votes and return them in a list . = list() if(greatest_votes) @@ -380,12 +380,12 @@ SUBSYSTEM_DEF(vote) if(SSmapping.changemap(config.maplist[.])) to_chat(world, "The map vote has chosen [VM.map_name] for next round!") if("transfer") // austation begin -- Crew autotransfer vote - if(. == "Initiate Crew Transfer") - //TODO find a cleaner way to do this - SSshuttle.requestEvac(null,"Crew transfer requested.") - var/obj/machinery/computer/communications/C = locate() in GLOB.machines - if(C) - C.post_status("shuttle") // austation end + if(. == "Initiate Crew Transfer") + //TODO find a cleaner way to do this + SSshuttle.requestEvac(null,"Crew transfer requested.") + var/obj/machinery/computer/communications/C = locate() in GLOB.machines + if(C) + C.post_status("shuttle") // austation end if(restart) var/active_admins = 0 for(var/client/C in GLOB.admins) From 0ad49f9004d9537b2b3a39e51f516665182bb504 Mon Sep 17 00:00:00 2001 From: Hatterhat Date: Wed, 19 Feb 2020 17:18:51 -0600 Subject: [PATCH 4/9] shit dude i hope this works lmao --- code/controllers/configuration/entries/general.dm | 6 ++++-- code/controllers/subsystem/autotransfer.dm | 14 +++++++++++--- code/controllers/subsystem/vote.dm | 3 +-- config/config.txt | 5 ++++- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/code/controllers/configuration/entries/general.dm b/code/controllers/configuration/entries/general.dm index b5e7137374..2d9264adf5 100644 --- a/code/controllers/configuration/entries/general.dm +++ b/code/controllers/configuration/entries/general.dm @@ -84,12 +84,14 @@ /datum/config_entry/number/vote_autotransfer_initial //length of time before the first autotransfer vote is called (deciseconds, default 2 hours) config_entry_value = 72000 - integer = FALSE min_val = 0 /datum/config_entry/number/vote_autotransfer_interval //length of time to wait before subsequent autotransfer votes (deciseconds, default 30 minutes) config_entry_value = 18000 - integer = FALSE + min_val = 0 + +/datum/config_entry/number/vote_autotransfer_maximum // maximum extensions until the round autoends + config_entry_value = 4 min_val = 0 /datum/config_entry/flag/default_no_vote // vote does not default to nochange/norestart diff --git a/code/controllers/subsystem/autotransfer.dm b/code/controllers/subsystem/autotransfer.dm index 05ef3127c1..00c3f85543 100644 --- a/code/controllers/subsystem/autotransfer.dm +++ b/code/controllers/subsystem/autotransfer.dm @@ -5,13 +5,21 @@ SUBSYSTEM_DEF(autotransfer) var/starttime var/targettime + var/maxvotes + var/curvotes /datum/controller/subsystem/autotransfer/Initialize(timeofday) starttime = world.time targettime = starttime + CONFIG_GET(number/vote_autotransfer_initial) + maxvotes = CONFIG_GET(number/vote_autotransfer_maximum) + curvotes = 0 return ..() /datum/controller/subsystem/autotransfer/fire() - 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) + if(maxvotes > votes) + 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) + votes += 1 + else + SSshuttle.autoEnd() diff --git a/code/controllers/subsystem/vote.dm b/code/controllers/subsystem/vote.dm index 9ddd8d9123..9f974595fd 100644 --- a/code/controllers/subsystem/vote.dm +++ b/code/controllers/subsystem/vote.dm @@ -381,8 +381,7 @@ SUBSYSTEM_DEF(vote) to_chat(world, "The map vote has chosen [VM.map_name] for next round!") if("transfer") // austation begin -- Crew autotransfer vote if(. == "Initiate Crew Transfer") - //TODO find a cleaner way to do this - SSshuttle.requestEvac(null,"Crew transfer requested.") + SSshuttle.autoEnd() var/obj/machinery/computer/communications/C = locate() in GLOB.machines if(C) C.post_status("shuttle") // austation end diff --git a/config/config.txt b/config/config.txt index cc9ede5ef2..1d987070dd 100644 --- a/config/config.txt +++ b/config/config.txt @@ -187,9 +187,12 @@ VOTE_PERIOD 600 ## autovote initial delay (deciseconds) before first automatic transfer vote call (default 120 minutes) VOTE_AUTOTRANSFER_INITIAL 72000 -##autovote delay (deciseconds) before sequential automatic transfer votes are called (default 30 minutes) +## autovote delay (deciseconds) before sequential automatic transfer votes are called (default 30 minutes) VOTE_AUTOTRANSFER_INTERVAL 18000 +## autovote maximum votes until automatic transfer call (default 4) +VOTE_AUTOTRANSFER_MAXIMUM 4 + ## prevents dead players from voting or starting votes # NO_DEAD_VOTE From 362ebbcf8fa89e4bf946e1c4595e7d59d7dd12e0 Mon Sep 17 00:00:00 2001 From: Hatterhat Date: Wed, 19 Feb 2020 21:14:13 -0600 Subject: [PATCH 5/9] shit --- code/controllers/subsystem/autotransfer.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/controllers/subsystem/autotransfer.dm b/code/controllers/subsystem/autotransfer.dm index 00c3f85543..b80211c354 100644 --- a/code/controllers/subsystem/autotransfer.dm +++ b/code/controllers/subsystem/autotransfer.dm @@ -16,10 +16,10 @@ SUBSYSTEM_DEF(autotransfer) return ..() /datum/controller/subsystem/autotransfer/fire() - if(maxvotes > votes) + 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) - votes += 1 + curvotes += 1 else SSshuttle.autoEnd() From 07222cfd9af04b8600099b6cf4218a4fa3b6e0bd Mon Sep 17 00:00:00 2001 From: Hatterhat Date: Thu, 20 Feb 2020 22:21:25 -0600 Subject: [PATCH 6/9] *snap --- code/controllers/subsystem/shuttle.dm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm index 7eff8b9e3c..5952c77298 100644 --- a/code/controllers/subsystem/shuttle.dm +++ b/code/controllers/subsystem/shuttle.dm @@ -55,7 +55,6 @@ SUBSYSTEM_DEF(shuttle) var/lockdown = FALSE //disallow transit after nuke goes off - var/auto_call = 72000 //CIT CHANGE - time before in deciseconds in which the shuttle is auto called. Default is 2ish hours plus 15 for the shuttle. So total is 3. var/realtimeofstart = 0 /datum/controller/subsystem/shuttle/Initialize(timeofday) @@ -78,7 +77,6 @@ SUBSYSTEM_DEF(shuttle) if(!supply) WARNING("No /obj/docking_port/mobile/supply placed on the map!") realtimeofstart = world.realtime - auto_call = CONFIG_GET(number/auto_transfer_delay) return ..() /datum/controller/subsystem/shuttle/proc/initial_load() @@ -643,10 +641,10 @@ SUBSYSTEM_DEF(shuttle) QDEL_LIST(remove_images) -/datum/controller/subsystem/shuttle/proc/autoEnd() //CIT CHANGE - allows shift to end after 2 hours have passed. - if((world.realtime - SSshuttle.realtimeofstart) > auto_call && EMERGENCY_IDLE_OR_RECALLED) //2 hours +/datum/controller/subsystem/shuttle/proc/autoEnd() //CIT CHANGE - allows shift to end without being a proper shuttle call? + if(EMERGENCY_IDLE_OR_RECALLED) SSshuttle.emergency.request(silent = TRUE) priority_announce("The shift has come to an end and the shuttle called. [seclevel2num(get_security_level()) == SEC_LEVEL_RED ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [emergency.timeLeft(600)] minutes.", null, "shuttlecalled", "Priority") - log_game("Round time limit reached. Shuttle has been auto-called.") - message_admins("Round time limit reached. Shuttle called.") + log_game("Round end vote passed. Shuttle has been auto-called.") + message_admins("Round end vote passed. Shuttle has been auto-called.") emergencyNoRecall = TRUE From 6dbd58b5df84aba1720a451b914c5330a211e3e0 Mon Sep 17 00:00:00 2001 From: Hatterhat Date: Fri, 21 Feb 2020 16:07:41 -0600 Subject: [PATCH 7/9] i really fucked this up please advise --- code/controllers/subsystem/shuttle.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm index 5952c77298..5929e7e113 100644 --- a/code/controllers/subsystem/shuttle.dm +++ b/code/controllers/subsystem/shuttle.dm @@ -55,6 +55,8 @@ SUBSYSTEM_DEF(shuttle) var/lockdown = FALSE //disallow transit after nuke goes off + var/extendvote_passed = FALSE + var/realtimeofstart = 0 /datum/controller/subsystem/shuttle/Initialize(timeofday) @@ -648,3 +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 From b89a2314a2cc552e6a4261b58674464b2431c456 Mon Sep 17 00:00:00 2001 From: Hatterhat Date: Sat, 22 Feb 2020 16:17:51 -0600 Subject: [PATCH 8/9] 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") From 19ae30ea5b85f06dcdf64f2c3d1dad3e36a7b291 Mon Sep 17 00:00:00 2001 From: Hatterhat <31829017+Hatterhat@users.noreply.github.com> Date: Sun, 23 Feb 2020 21:20:57 -0600 Subject: [PATCH 9/9] alright ghom i hope this works Co-Authored-By: Ghom <42542238+Ghommie@users.noreply.github.com> --- code/controllers/subsystem/shuttle.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm index ff64732317..bcbe2bb49b 100644 --- a/code/controllers/subsystem/shuttle.dm +++ b/code/controllers/subsystem/shuttle.dm @@ -649,5 +649,5 @@ SUBSYSTEM_DEF(shuttle) priority_announce("The shift has come to an end and the shuttle called. [seclevel2num(get_security_level()) == SEC_LEVEL_RED ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [emergency.timeLeft(600)] minutes.", null, "shuttlecalled", "Priority") log_game("Round end vote passed. Shuttle has been auto-called.") message_admins("Round end vote passed. Shuttle has been auto-called.") - emergencyNoRecall = TRUE - endvote_passed = TRUE + emergencyNoRecall = TRUE + endvote_passed = TRUE