transfer to subsystem (#19323)

* transfer to subsystem

* ,

* .

* .
This commit is contained in:
Kashargul
2026-03-26 23:30:32 +01:00
committed by GitHub
parent 5f3a037d77
commit a0c5678533
5 changed files with 18 additions and 22 deletions
-1
View File
@@ -81,7 +81,6 @@ ADMIN_VERB(debug_controller, R_DEBUG, "Debug Controller", "Debug the various per
options["LEGACY: job_master"] = GLOB.job_master
options["LEGACY: emergency_shuttle"] = GLOB.emergency_shuttle
options["LEGACY: cameranet"] = GLOB.cameranet
options["LEGACY: transfer_controller"] = GLOB.transfer_controller
var/pick = tgui_input_list(user, "Choose a controller to debug/view variables of.", "VV controller:", options)
if(!pick)
-1
View File
@@ -36,7 +36,6 @@ GLOBAL_DATUM(master_controller, /datum/controller/game_controller) //Set in worl
// setupgenetics() Moved to SSatoms
// SetupXenoarch() - Moved to SSxenoarch
GLOB.transfer_controller = new
admin_notice(span_danger("Initializations complete."), R_DEBUG)
// #if UNIT_TESTS
@@ -1,24 +1,23 @@
GLOBAL_DATUM(transfer_controller, /datum/controller/transfer_controller)
SUBSYSTEM_DEF(transfer)
name = "Transfer"
wait = 1 SECOND
runlevels = RUNLEVEL_GAME
init_stage = INITSTAGE_LAST
flags = SS_KEEP_TIMING
/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
VAR_PRIVATE/timerbuffer = 0 //buffer for time check
VAR_PRIVATE/currenttick = 0
VAR_PRIVATE/shift_hard_end = 0
VAR_PRIVATE/shift_last_vote = 0
/datum/controller/transfer_controller/New()
/datum/controller/subsystem/transfer/Initialize()
timerbuffer = CONFIG_GET(number/vote_autotransfer_initial)
shift_hard_end = CONFIG_GET(number/vote_autotransfer_initial) + (CONFIG_GET(number/vote_autotransfer_interval) * 0) //VOREStation Edit //Change this "1" to how many extend votes you want there to be.
shift_last_vote = shift_hard_end - CONFIG_GET(number/vote_autotransfer_interval) //VOREStation Edit
START_PROCESSING(SSprocessing, src)
shift_hard_end = CONFIG_GET(number/vote_autotransfer_initial) + (CONFIG_GET(number/vote_autotransfer_interval) * 0) //Change this "1" to how many extend votes you want there to be.
shift_last_vote = shift_hard_end - CONFIG_GET(number/vote_autotransfer_interval)
return SS_INIT_SUCCESS
/datum/controller/transfer_controller/Destroy()
STOP_PROCESSING(SSprocessing, src)
. = ..()
/datum/controller/transfer_controller/process()
/datum/controller/subsystem/transfer/fire(resumed)
currenttick = currenttick + 1
//VOREStation Edit START
if (round_duration_in_ds >= shift_last_vote - 2 MINUTES)
shift_last_vote = 99999999 //Setting to a stupidly high number since it'll be not used again.
to_chat(world, span_world(span_notice("Warning: You have one hour left in the shift. Wrap up your scenes in the next 60 minutes before the transfer is called."))) //VOREStation Edit
@@ -28,10 +27,9 @@ GLOBAL_DATUM(transfer_controller, /datum/controller/transfer_controller)
timerbuffer = timerbuffer + CONFIG_GET(number/vote_autotransfer_interval) //Just to make sure a vote doesn't occur immediately afterwords.
else if (round_duration_in_ds >= timerbuffer - 1 MINUTE)
SSvote.start_vote(new /datum/vote/crew_transfer)
//VOREStation Edit END
timerbuffer = timerbuffer + CONFIG_GET(number/vote_autotransfer_interval)
/datum/controller/transfer_controller/proc/modify_hard_end(client/user)
/datum/controller/subsystem/transfer/proc/modify_hard_end(client/user)
var/new_shift_end = tgui_input_number(user, "Modify the shift end timer (Input in Minutes)", "Shift End", shift_hard_end / 600)
if(!new_shift_end)