mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-13 09:05:11 +01:00
Finally fixed the proximity runtime (#22950)
* Finally fixed the proximity runtime Also fixed some misue of Move(d)s and destroys * Fixed remove_from_proximity_list * Fine, we'll do it your way * Should sense/update loc here as well * Assume deez nuts
This commit is contained in:
@@ -73,7 +73,7 @@
|
||||
timing = 0
|
||||
toggle_scan(1)
|
||||
time = initial(time)
|
||||
handle_move(get_turf(loc))
|
||||
handle_move(loc)
|
||||
|
||||
/obj/item/device/assembly/prox_sensor/dropped()
|
||||
..()
|
||||
@@ -81,7 +81,8 @@
|
||||
addtimer(CALLBACK(src, .proc/sense), 0)
|
||||
|
||||
/obj/item/device/assembly/prox_sensor/Destroy()
|
||||
remove_from_proximity_list(src, sensitivity)
|
||||
if(scanning)
|
||||
remove_from_proximity_list(src, sensitivity, oldloc)
|
||||
return ..()
|
||||
|
||||
/obj/item/device/assembly/prox_sensor/toggle_scan(scan)
|
||||
@@ -98,7 +99,9 @@
|
||||
/obj/item/device/assembly/prox_sensor/proc/sensitivity_change(value)
|
||||
var/sense = min(max(sensitivity + value, 0), 5)
|
||||
if(scanning)
|
||||
shift_proximity(src, oldloc, sensitivity, loc, sense)
|
||||
if(shift_proximity(src, oldloc, sensitivity, loc, sense))
|
||||
sense()
|
||||
oldloc = loc
|
||||
sensitivity = sense
|
||||
|
||||
/obj/item/device/assembly/prox_sensor/update_icon()
|
||||
@@ -116,13 +119,13 @@
|
||||
|
||||
/obj/item/device/assembly/prox_sensor/proc/handle_move(atom/newloc)
|
||||
if(scanning)
|
||||
if(shift_proximity(src, oldloc, sensitivity, newloc, sensitivity))
|
||||
if(shift_proximity(src, oldloc, sensitivity, newloc, sensitivity) || newloc != oldloc)
|
||||
sense()
|
||||
oldloc = newloc
|
||||
|
||||
/obj/item/device/assembly/prox_sensor/Move(newloc)
|
||||
/obj/item/device/assembly/prox_sensor/Moved()
|
||||
..()
|
||||
handle_move(newloc)
|
||||
handle_move(loc)
|
||||
|
||||
|
||||
/obj/item/device/assembly/prox_sensor/interact(mob/user)//TODO: Change this to the wires thingy
|
||||
|
||||
Reference in New Issue
Block a user