shit dude i hope this works lmao
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user