Stops shuttles from bringing background turfs with them. (#15580)

This commit is contained in:
Matt Atlas
2023-01-20 14:52:01 +01:00
committed by GitHub
parent 7caa069c9b
commit 25fd3ba098
91 changed files with 230 additions and 90 deletions
+24
View File
@@ -0,0 +1,24 @@
var/singleton/observ/stat_set/stat_set_event = new()
// Observer Pattern Implementation: Stat Set
// Registration type: /mob/living
//
// Raised when: A /mob/living changes stat, using the set_stat() proc
//
// Arguments that the called proc should expect:
// /mob/living/stat_mob: The mob whose stat changed
// /old_stat: Status before the change.
// /new_stat: Status after the change.
/singleton/observ/stat_set
name = "Stat Set"
expected_type = /mob/living
/****************
* Stat Handling *
****************/
/mob/living/set_stat(var/new_stat)
var/old_stat = stat
. = ..()
if(stat != old_stat)
stat_set_event.raise_event(src, old_stat, new_stat)