mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 20:45:28 +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:
@@ -310,11 +310,11 @@ have ways of interacting with a specific mob and control it.
|
||||
var/mob/living/carbon/human/H = thrown_by
|
||||
retaliate(H)
|
||||
|
||||
/datum/ai_controller/monkey/proc/on_entered(datum/source, atom/movable/AM)
|
||||
/datum/ai_controller/monkey/proc/on_entered(datum/source, atom/movable/arrived, direction)
|
||||
SIGNAL_HANDLER
|
||||
var/mob/living/living_pawn = pawn
|
||||
if(!IS_DEAD_OR_INCAP(living_pawn) && ismob(AM))
|
||||
var/mob/living/in_the_way_mob = AM
|
||||
if(!IS_DEAD_OR_INCAP(living_pawn) && isliving(arrived))
|
||||
var/mob/living/in_the_way_mob = arrived
|
||||
in_the_way_mob.knockOver(living_pawn)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user