Adds an atom event for when a turf is changed

This commit is contained in:
Cyberboss
2017-03-30 14:03:59 -04:00
parent d17aacc8cd
commit 65f20cdb9a
2 changed files with 8 additions and 0 deletions
+6
View File
@@ -457,6 +457,12 @@ var/list/blood_splatter_icons = list()
//This proc is called on the location of an atom when the atom is Destroy()'d
/atom/proc/handle_atom_del(atom/A)
//called when the turf the atom resides on is ChangeTurfed
/atom/proc/HandleTurfChange(turf/T)
for(var/a in src)
var/atom/A = a
A.HandleTurfChange(T)
// Byond seemingly calls stat, each tick.
// Calling things each tick can get expensive real quick.
// So we slow this down a little.
+2
View File
@@ -249,6 +249,8 @@
queue_smooth_neighbors(src)
HandleTurfChange(src)
/turf/open/AfterChange(ignore_air)
..()
RemoveLattice()