mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-21 12:56:10 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user