mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 04:57:57 +01:00
Refactors move procs to support multitle objects (#59658)
Enter(), Entered(), Exit() and Exited() all passed the old loc forward, but everything except a single a case cared about the direction of the movement more than about the specific source. Since moving multi-tile objects will have multiple sources of movement but a single direction, this change makes it easier to track their movement. Cleaned up a lot of code around and made proc inputs compatible. I'll add opacity support for multi-tile objects in a different PR after this is merged, as this has grown large enough and I don't want to compromise the reviewability. Tested this locally and as expected it didn't impair movement nor produced any runtimes.
This commit is contained in:
@@ -47,11 +47,11 @@
|
||||
else
|
||||
to_chat(user, span_notice("There are no modifications currently installed."))
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/Exited(atom/A)
|
||||
if(modkits.len && (A in modkits))
|
||||
var/obj/item/borg/upgrade/modkit/MK = A
|
||||
/obj/item/gun/energy/kinetic_accelerator/Exited(atom/movable/gone, direction)
|
||||
if(gone in modkits)
|
||||
var/obj/item/borg/upgrade/modkit/MK = gone
|
||||
MK.uninstall(src)
|
||||
. = ..()
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/borg/upgrade/modkit))
|
||||
|
||||
Reference in New Issue
Block a user