shit dude i hope this works lmao
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -381,8 +381,7 @@ SUBSYSTEM_DEF(vote)
|
||||
to_chat(world, "<span class='boldannounce'>The map vote has chosen [VM.map_name] for next round!</span>")
|
||||
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
|
||||
|
||||
+4
-1
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user