Event manager tweaks.

Moves the event manager processing into the process itself.
Ensures the last_object var is properly set in case of issues.
Also fixes a potential risk of the camera damage event looping forever.
This commit is contained in:
PsiOmegaDelta
2016-01-10 21:07:24 +01:00
parent 6cc4c26560
commit b1fea3b090
3 changed files with 11 additions and 10 deletions
+10 -1
View File
@@ -3,4 +3,13 @@
schedule_interval = 20 // every 2 seconds
/datum/controller/process/event/doWork()
event_manager.process()
for(last_object in event_manager.active_events)
var/datum/event/E = last_object
E.process()
SCHECK
for(var/i = EVENT_LEVEL_MUNDANE to EVENT_LEVEL_MAJOR)
last_object = event_manager.event_containers[i]
var/list/datum/event_container/EC = last_object
EC.process()
SCHECK