Adds the proximity monitor component. Performance improvement for turf/Entered (#14196)

* proximity monitor

* Update code/__HELPERS/unsorted.dm

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>

* farie review tweaks

* actually I need this

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
This commit is contained in:
SteelSlayer
2020-09-20 13:31:16 -04:00
committed by GitHub
co-authored by AffectedArc07
parent ead6e898a3
commit 01da8413de
19 changed files with 252 additions and 24 deletions
+2
View File
@@ -280,12 +280,14 @@
/obj/structure/alien/egg/proc/Grow()
icon_state = "egg"
status = GROWN
AddComponent(/datum/component/proximity_monitor)
/obj/structure/alien/egg/proc/Burst(kill = TRUE) //drops and kills the hugger if any is remaining
if(status == GROWN || status == GROWING)
icon_state = "egg_hatched"
flick("egg_opening", src)
status = BURSTING
qdel(GetComponent(/datum/component/proximity_monitor))
spawn(15)
status = BURST
var/obj/item/clothing/mask/facehugger/child = GetFacehugger()