diff --git a/code/controllers/autotransfer.dm b/code/controllers/autotransfer.dm index e06b2ccd308..b40fd1e2ef3 100644 --- a/code/controllers/autotransfer.dm +++ b/code/controllers/autotransfer.dm @@ -5,6 +5,7 @@ var/datum/controller/transfer_controller/transfer_controller var/currenttick = 0 var/shift_hard_end = 0 //VOREStation Edit var/shift_last_vote = 0 //VOREStation Edit + /datum/controller/transfer_controller/New() 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. @@ -29,3 +30,14 @@ var/datum/controller/transfer_controller/transfer_controller 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) + 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) + return + + var/calculated_end = new_shift_end * 600 + + shift_hard_end = calculated_end + shift_last_vote = calculated_end diff --git a/code/modules/admin/admin_verb_lists_vr.dm b/code/modules/admin/admin_verb_lists_vr.dm index af8b77506e2..51a93b12480 100644 --- a/code/modules/admin/admin_verb_lists_vr.dm +++ b/code/modules/admin/admin_verb_lists_vr.dm @@ -124,6 +124,7 @@ var/list/admin_verbs_admin = list( /client/proc/removetickets, /client/proc/delbook, /client/proc/toggle_spawning_with_recolour, + /client/proc/modify_shift_end, /client/proc/start_vote, /client/proc/hide_motion_tracker_feedback ) @@ -562,6 +563,7 @@ var/list/admin_verbs_event_manager = list( /client/proc/toggle_random_events, /client/proc/modify_server_news, /client/proc/toggle_spawning_with_recolour, + /client/proc/modify_shift_end, /client/proc/start_vote, /client/proc/AdminCreateVirus, /client/proc/ReleaseVirus, diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index df21bafd527..32d2a08bd97 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -709,3 +709,13 @@ if("Simple Mob") CONFIG_SET(flag/allow_simple_mob_recolor, !CONFIG_GET(flag/allow_simple_mob_recolor)) to_chat(usr, "You have [CONFIG_GET(flag/allow_simple_mob_recolor) ? "enabled" : "disabled"] newly spawned simple mobs to spawn with the recolour verb") + +/client/proc/modify_shift_end() + set name = "Modify Shift End" + set desc = "Modifies the hard shift end time." + set category = "Server.Game" + + if(!check_rights_for(src, R_ADMIN|R_EVENT|R_SERVER)) + return + + transfer_controller.modify_hard_end(src)