mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
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:
co-authored by
AffectedArc07
parent
ead6e898a3
commit
01da8413de
@@ -179,6 +179,7 @@
|
||||
to_chat(usr, "<span class='notice'>You detach [assembly] from [src]</span>")
|
||||
usr.put_in_hands(assembly)
|
||||
assembly = null
|
||||
qdel(GetComponent(/datum/component/proximity_monitor))
|
||||
update_icon()
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>There is no assembly to remove.</span>")
|
||||
@@ -194,7 +195,9 @@
|
||||
return ..()
|
||||
assembly = W
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
W.forceMove(src)
|
||||
if(assembly.has_prox_sensors())
|
||||
AddComponent(/datum/component/proximity_monitor)
|
||||
overlays += "assembly"
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -126,6 +126,7 @@
|
||||
usr.visible_message("<span class='notice'>[usr] detaches [rig] from [src].</span>", "<span class='notice'>You detach [rig] from [src].</span>")
|
||||
rig.forceMove(get_turf(usr))
|
||||
rig = null
|
||||
qdel(GetComponent(/datum/component/proximity_monitor))
|
||||
lastrigger = null
|
||||
overlays.Cut()
|
||||
|
||||
@@ -148,7 +149,8 @@
|
||||
rig = H
|
||||
user.drop_item()
|
||||
H.forceMove(src)
|
||||
|
||||
if(rig.has_prox_sensors())
|
||||
AddComponent(/datum/component/proximity_monitor)
|
||||
var/icon/test = getFlatIcon(H)
|
||||
test.Shift(NORTH, 1)
|
||||
test.Shift(EAST, 6)
|
||||
|
||||
Reference in New Issue
Block a user