Obsolete the PROXMOVE flag and uses

This commit is contained in:
Aronai Sieyes
2020-05-18 13:01:25 -04:00
parent 0adea12715
commit e3b5d24c8b
20 changed files with 125 additions and 78 deletions

View File

@@ -3,7 +3,6 @@
icon = 'icons/obj/assemblies/new_assemblies.dmi'
icon_state = "holder"
item_state = "assembly"
flags = PROXMOVE
throwforce = 5
w_class = ITEMSIZE_SMALL
throw_speed = 3
@@ -64,11 +63,18 @@
else
. += "\The [src] can be attached!"
/obj/item/device/assembly_holder/HasProximity(atom/movable/AM as mob|obj)
/obj/item/device/assembly_holder/Moved(atom/old_loc, direction, forced = FALSE)
. = ..()
if(isturf(old_loc))
unsense_proximity(callback = .HasProximity, center = old_loc)
if(isturf(loc))
sense_proximity(callback = .HasProximity)
/obj/item/device/assembly_holder/HasProximity(turf/T, atom/movable/AM, old_loc)
if(a_left)
a_left.HasProximity(AM)
a_left.HasProximity(T, AM, old_loc)
if(a_right)
a_right.HasProximity(AM)
a_right.HasProximity(T, AM, old_loc)
/obj/item/device/assembly_holder/Crossed(atom/movable/AM as mob|obj)
if(AM.is_incorporeal())

View File

@@ -4,7 +4,6 @@
icon_state = "prox"
origin_tech = list(TECH_MAGNET = 1)
matter = list(DEFAULT_WALL_MATERIAL = 800, "glass" = 200, "waste" = 50)
flags = PROXMOVE
wires = WIRE_PULSE
secured = 0
@@ -33,7 +32,7 @@
update_icon()
return secured
/obj/item/device/assembly/prox_sensor/HasProximity(atom/movable/AM as mob|obj)
/obj/item/device/assembly/prox_sensor/HasProximity(turf/T, atom/movable/AM, old_loc)
if(!istype(AM))
log_debug("DEBUG: HasProximity called with [AM] on [src] ([usr]).")
return
@@ -90,6 +89,10 @@
/obj/item/device/assembly/prox_sensor/Moved(atom/old_loc, direction, forced = FALSE)
. = ..()
if(isturf(old_loc))
unsense_proximity(range = range, callback = .HasProximity, center = old_loc)
if(isturf(loc))
sense_proximity(range = range, callback = .HasProximity)
sense()
/obj/item/device/assembly/prox_sensor/interact(mob/user as mob)//TODO: Change this to the wires thingy