mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Adds Multi-Z Test Map
This commit is contained in:
28
code/datums/observation/turf_changed.dm
Normal file
28
code/datums/observation/turf_changed.dm
Normal file
@@ -0,0 +1,28 @@
|
||||
// Observer Pattern Implementation: Turf Changed
|
||||
// Registration type: /turf
|
||||
//
|
||||
// Raised when: A turf has been changed using the ChangeTurf proc.
|
||||
//
|
||||
// Arguments that the called proc should expect:
|
||||
// /turf/affected: The turf that has changed
|
||||
// /old_density: Density before the change
|
||||
// /new_density: Density after the change
|
||||
// /old_opacity: Opacity before the change
|
||||
// /new_opacity: Opacity after the change
|
||||
|
||||
var/decl/observ/turf_changed/turf_changed_event = new()
|
||||
|
||||
/decl/observ/turf_changed
|
||||
name = "Turf Changed"
|
||||
expected_type = /turf
|
||||
|
||||
/************************
|
||||
* Turf Changed Handling *
|
||||
************************/
|
||||
|
||||
/turf/ChangeTurf()
|
||||
var/old_density = density
|
||||
var/old_opacity = opacity
|
||||
. = ..()
|
||||
if(.)
|
||||
turf_changed_event.raise_event(src, old_density, density, old_opacity, opacity)
|
||||
Reference in New Issue
Block a user