mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
22 lines
580 B
Plaintext
22 lines
580 B
Plaintext
// Observer Pattern Implementation: Area Power Change
|
|
// Registration type: /area
|
|
//
|
|
// Raised when: An /area has a power change (the APC powers up/down or some channels are enabled/disabled)
|
|
//
|
|
// Arguments that the called proc should expect:
|
|
// /area: The area experiencing the power change
|
|
|
|
GLOBAL_DATUM_INIT(apc_event, /decl/observ/area_power_change, new)
|
|
|
|
/decl/observ/area_power_change
|
|
name = "Area Power Change"
|
|
expected_type = /area
|
|
|
|
/********************
|
|
* Movement Handling *
|
|
********************/
|
|
|
|
/area/power_change()
|
|
. = ..()
|
|
GLOB.apc_event.raise_event(src)
|