shit dude i hope this works lmao

This commit is contained in:
Hatterhat
2020-02-19 17:18:51 -06:00
parent f05a88d36f
commit 0ad49f9004
4 changed files with 20 additions and 8 deletions
+11 -3
View File
@@ -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()
+1 -2
View File
@@ -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