From db875f67ece4e7837158013970e393e8f6c8d989 Mon Sep 17 00:00:00 2001 From: Cameron653 Date: Sat, 26 Aug 2017 22:39:25 -0400 Subject: [PATCH] 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 +