This commit is contained in:
Fox-McCloud
2016-04-18 22:53:31 -04:00
parent 2954aa88ea
commit 8ff32f4566
8 changed files with 69 additions and 10 deletions
+3
View File
@@ -1,6 +1,8 @@
/datum/event/abductor
/datum/event/abductor/start()
//spawn abductor team
processing = 0 //so it won't fire again in next tick
if(!makeAbductorTeam())
message_admins("Abductor event failed to find players. Retrying in 30s.")
spawn(300)
@@ -44,6 +46,7 @@
if(ticker.mode.config_tag != "abduction")
ticker.mode.abductors |= temp.abductors
processing = 1 //So it will get gc'd
return 1
else
return 0
+4
View File
@@ -48,6 +48,7 @@
return 0*/
/datum/event //NOTE: Times are measured in master controller ticks!
var/processing = 1
var/startWhen = 0 //When in the lifetime to call start().
var/announceWhen = 0 //When in the lifetime to call announce().
var/endWhen = 0 //When in the lifetime the event should end.
@@ -105,6 +106,9 @@
//Do not override this proc, instead use the appropiate procs.
//This proc will handle the calls to the appropiate procs.
/datum/event/proc/process()
if(!processing)
return
if(activeFor > startWhen && activeFor < endWhen || noAutoEnd)
tick()