From db875f67ece4e7837158013970e393e8f6c8d989 Mon Sep 17 00:00:00 2001 From: Cameron653 Date: Sat, 26 Aug 2017 22:39:25 -0400 Subject: [PATCH 1/6] Update autotransfer.dm --- code/controllers/autotransfer.dm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/code/controllers/autotransfer.dm b/code/controllers/autotransfer.dm index afd1435ffaf..11788d0fff4 100644 --- a/code/controllers/autotransfer.dm +++ b/code/controllers/autotransfer.dm @@ -3,6 +3,7 @@ var/datum/controller/transfer_controller/transfer_controller datum/controller/transfer_controller var/timerbuffer = 0 //buffer for time check var/currenttick = 0 + var/shift_hard_end = vote_autotransfer_initial + vote_autotransfer_interval //VOREStation Edit datum/controller/transfer_controller/New() timerbuffer = config.vote_autotransfer_initial processing_objects += src @@ -12,6 +13,11 @@ datum/controller/transfer_controller/Destroy() datum/controller/transfer_controller/proc/process() currenttick = currenttick + 1 - if (round_duration_in_ticks >= timerbuffer - 1 MINUTE) + if (round_duration_in_ticks >= shift_hard_end - 1 MINUTE)//VOREStation Edit START + init_shift_change(null, 1) + shift_hard_end = timerbuffer + config.vote_autotransfer_interval //If shuttle somehow gets recalled, let's do this. + timerbuffer = timerbuffer + config.vote_autotransfer_interval //Just to make sure a vote doesn't occur immediately afterwords. + else if (round_duration_in_ticks >= timerbuffer - 1 MINUTE) //VOREStation Edit END vote.autotransfer() timerbuffer = timerbuffer + config.vote_autotransfer_interval + From 55a9cf7de9a38c9f5ea141f4a48ad287b1115045 Mon Sep 17 00:00:00 2001 From: killer653 Date: Sat, 26 Aug 2017 22:50:11 -0400 Subject: [PATCH 2/6] Correct way. --- code/controllers/autotransfer.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/controllers/autotransfer.dm b/code/controllers/autotransfer.dm index 11788d0fff4..60a6c3440eb 100644 --- a/code/controllers/autotransfer.dm +++ b/code/controllers/autotransfer.dm @@ -3,9 +3,10 @@ var/datum/controller/transfer_controller/transfer_controller datum/controller/transfer_controller var/timerbuffer = 0 //buffer for time check var/currenttick = 0 - var/shift_hard_end = vote_autotransfer_initial + vote_autotransfer_interval //VOREStation Edit + var/shift_hard_end = 0 //VOREStation Edit datum/controller/transfer_controller/New() timerbuffer = config.vote_autotransfer_initial + shift_hard_end = config.vote_autotransfer_initial + config.vote_autotransfer_interval //VOREStation Edit processing_objects += src datum/controller/transfer_controller/Destroy() @@ -20,4 +21,3 @@ datum/controller/transfer_controller/proc/process() else if (round_duration_in_ticks >= timerbuffer - 1 MINUTE) //VOREStation Edit END vote.autotransfer() timerbuffer = timerbuffer + config.vote_autotransfer_interval - From d896a030f850238f71f6d1c66dec3b170936e4a6 Mon Sep 17 00:00:00 2001 From: Cameron653 Date: Sun, 27 Aug 2017 19:31:23 -0400 Subject: [PATCH 3/6] Adds global announcemment --- code/controllers/autotransfer.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/controllers/autotransfer.dm b/code/controllers/autotransfer.dm index 60a6c3440eb..47921faf75c 100644 --- a/code/controllers/autotransfer.dm +++ b/code/controllers/autotransfer.dm @@ -21,3 +21,4 @@ datum/controller/transfer_controller/proc/process() else if (round_duration_in_ticks >= timerbuffer - 1 MINUTE) //VOREStation Edit END vote.autotransfer() timerbuffer = timerbuffer + config.vote_autotransfer_interval + world << "Warning: If the extend vote passes, the round will not be extended again. Wrap up your scenes in the next 60 minutes if the vote succeeds." From 45edf4cb022a41782bc2d46f063c49a8a1da3d13 Mon Sep 17 00:00:00 2001 From: Cameron653 Date: Sun, 27 Aug 2017 19:42:59 -0400 Subject: [PATCH 4/6] Update autotransfer.dm --- code/controllers/autotransfer.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/controllers/autotransfer.dm b/code/controllers/autotransfer.dm index 47921faf75c..8ee21687575 100644 --- a/code/controllers/autotransfer.dm +++ b/code/controllers/autotransfer.dm @@ -21,4 +21,4 @@ datum/controller/transfer_controller/proc/process() else if (round_duration_in_ticks >= timerbuffer - 1 MINUTE) //VOREStation Edit END vote.autotransfer() timerbuffer = timerbuffer + config.vote_autotransfer_interval - world << "Warning: If the extend vote passes, the round will not be extended again. Wrap up your scenes in the next 60 minutes if the vote succeeds." + world << "Warning: If the extend vote passes, the round will not be extended again. Wrap up your scenes in the next 60 minutes if the vote succeeds." //VOREStation Edit From fa780f8f7121e7e64df4cf8312ddf8e78b93927e Mon Sep 17 00:00:00 2001 From: Cameron653 Date: Mon, 28 Aug 2017 17:09:06 -0400 Subject: [PATCH 5/6] Update autotransfer.dm --- code/controllers/autotransfer.dm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/code/controllers/autotransfer.dm b/code/controllers/autotransfer.dm index 8ee21687575..b3378e2dacd 100644 --- a/code/controllers/autotransfer.dm +++ b/code/controllers/autotransfer.dm @@ -4,9 +4,11 @@ datum/controller/transfer_controller var/timerbuffer = 0 //buffer for time check var/currenttick = 0 var/shift_hard_end = 0 //VOREStation Edit + var/shift_last_vote = 0 //VOREStation Edit datum/controller/transfer_controller/New() timerbuffer = config.vote_autotransfer_initial - shift_hard_end = config.vote_autotransfer_initial + config.vote_autotransfer_interval //VOREStation Edit + shift_hard_end = config.vote_autotransfer_initial + (config.vote_autotransfer_interval * 1) //VOREStation Edit //Change this "1" to how many extend votes you want there to be. + shift_last_vote = shift_hard_end - config.vote_autotransfer_interval processing_objects += src datum/controller/transfer_controller/Destroy() @@ -14,11 +16,13 @@ datum/controller/transfer_controller/Destroy() datum/controller/transfer_controller/proc/process() currenttick = currenttick + 1 - if (round_duration_in_ticks >= shift_hard_end - 1 MINUTE)//VOREStation Edit START + if (round_duration_in_ticks >= shift_last_vote - 2 MINUTES) //VOREStation Edit START + shift_last_vote = 999999999999 //Setting to a stupidly high number since it'll be not used again. + world << "Warning: This upcoming extend vote will be your LAST extend vote. Wrap up your scenes in the next 60 minutes if the vote succeeds." //VOREStation Edit + if (round_duration_in_ticks >= shift_hard_end - 1 MINUTE) init_shift_change(null, 1) - shift_hard_end = timerbuffer + config.vote_autotransfer_interval //If shuttle somehow gets recalled, let's do this. + shift_hard_end = timerbuffer + config.vote_autotransfer_interval //If shuttle somehow gets recalled, let's force it to call again next time a vote would occur. timerbuffer = timerbuffer + config.vote_autotransfer_interval //Just to make sure a vote doesn't occur immediately afterwords. else if (round_duration_in_ticks >= timerbuffer - 1 MINUTE) //VOREStation Edit END vote.autotransfer() timerbuffer = timerbuffer + config.vote_autotransfer_interval - world << "Warning: If the extend vote passes, the round will not be extended again. Wrap up your scenes in the next 60 minutes if the vote succeeds." //VOREStation Edit From 3adaac4d91b147c720337faa112bc1aa0c51fb3a Mon Sep 17 00:00:00 2001 From: Cameron653 Date: Mon, 28 Aug 2017 17:09:41 -0400 Subject: [PATCH 6/6] Update autotransfer.dm --- code/controllers/autotransfer.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/controllers/autotransfer.dm b/code/controllers/autotransfer.dm index b3378e2dacd..bdb5c6d39c8 100644 --- a/code/controllers/autotransfer.dm +++ b/code/controllers/autotransfer.dm @@ -8,7 +8,7 @@ datum/controller/transfer_controller datum/controller/transfer_controller/New() timerbuffer = config.vote_autotransfer_initial shift_hard_end = config.vote_autotransfer_initial + (config.vote_autotransfer_interval * 1) //VOREStation Edit //Change this "1" to how many extend votes you want there to be. - shift_last_vote = shift_hard_end - config.vote_autotransfer_interval + shift_last_vote = shift_hard_end - config.vote_autotransfer_interval //VOREStation Edit processing_objects += src datum/controller/transfer_controller/Destroy()