Remove non-global references to SSgameMaster and SSevent_ticker

- Best practice to avoid holding onto references to the subsystem instances aside from the global variables. (In case of restart/recover etc).
- The reference to GM was entirely unused by any event or meta-event.  /datum/game_master would work fine using the global refs.
This commit is contained in:
Leshana
2020-04-06 17:22:53 -04:00
parent 8a8cd93db5
commit 31c634e334
5 changed files with 9 additions and 23 deletions
+1 -11
View File
@@ -35,25 +35,15 @@
// Can be used to make event repeats discouraged but not forbidden by adjusting the weight based on it.
var/times_ran = 0
// A reference to the system that initialized us.
var/datum/controller/subsystem/game_master/GM = null
// The type path to the event associated with this meta object.
// When the GM chooses this event, a new instance is made.
// Seperate instances allow for multiple concurrent events without sharing state, e.g. two blobs.
var/event_type = null
/datum/event2/meta/New(datum/controller/subsystem/game_master/new_gm)
GM = new_gm
/datum/event2/meta/Destroy()
GM = null
return ..()
// Called by the GM system to actually start an event.
/datum/event2/meta/proc/make_event()
var/datum/event2/event/E = new event_type(GM)
var/datum/event2/event/E = new event_type()
E.execute()
return E