Pathfinder Module no longer pathfinds (#94261)

## About The Pull Request


![dreamseeker_9pYVx5xTE0](https://github.com/user-attachments/assets/86695b34-deb1-4307-83c8-ecd81b1b6b28)

Removes the "pathfinding through the halls" function of the MODsuit
pathfinder module in favour of having it "fly" to your location in the
same manner as cargo pods (by getting inside an invisible cargo pod).

If it's inside a locked crate or locker when this happens it will break
the door on the way out, so be careful where you leave it.

## Why It's Good For The Game

Mostly because nobody uses the pathfinder module.
Pathfinding through the corridors is _cool_ on a conceptual level but
it's not very practical, _especially_ because it means that it has a
good chance of not functioning at all if you are on a station with Z
levels.
This method means that it will always arrive in the same amount of time
(quite fast, but not fast enough that it will arrive before someone can
shoot you) regardless of where you are when you suddenly realise that
you need spaceproofing rather than drip.

Also Fikou asked me to do it.

## Changelog

🆑
balance: The Captain's MODSuit pathfinder module now flies it directly
to their location rather than physically traversing the halls of the
station.
/🆑
This commit is contained in:
Jacquerel
2025-12-03 13:37:35 -07:00
committed by GitHub
parent a9bbc6304c
commit 7a994fffba
8 changed files with 105 additions and 117 deletions
+30 -6
View File
@@ -71,6 +71,19 @@
bluespace = TRUE
explosionSize = list(0,0,0,0)
/// Quick setup for if you want a pod that transports a specific object somewhere and makes it look like it is flying away
/obj/structure/closet/supplypod/transport
style = /datum/pod_style/seethrough
specialised = TRUE
explosionSize = list(0,0,0,0)
reversing = TRUE
delays = list(POD_TRANSIT = 0, POD_FALLING = 0, POD_OPENING = 0, POD_LEAVING = 0)
reverse_delays = list(POD_TRANSIT = 15, POD_FALLING = 10, POD_OPENING = 0, POD_LEAVING = 0)
custom_rev_delay = TRUE
effectQuiet = TRUE
close_sound = null
pod_flags = FIRST_SOUNDS
/obj/structure/closet/supplypod/podspawn/deathmatch
desc = "A blood-red styled drop pod."
specialised = TRUE
@@ -300,6 +313,7 @@
if (custom_rev_delay)
delays = reverse_delays
backToNonReverseIcon()
SEND_SIGNAL(src, COMSIG_SUPPLYPOD_RETURNING)
var/turf/return_turf = locate(reverse_dropoff_coords[1], reverse_dropoff_coords[2], reverse_dropoff_coords[3])
new /obj/effect/pod_landingzone(return_turf, src)
@@ -308,9 +322,9 @@
var/list/boom = explosionSize
resistance_flags = initial(resistance_flags)
set_density(TRUE) //Density is originally false so the pod doesn't block anything while it's still falling through the air
AddComponent(/datum/component/pellet_cloud, projectile_type=shrapnel_type, magnitude=shrapnel_magnitude)
if(effectShrapnel)
SEND_SIGNAL(src, COMSIG_SUPPLYPOD_LANDED)
AddComponent(/datum/component/pellet_cloud, projectile_type=shrapnel_type, magnitude=shrapnel_magnitude)
SEND_SIGNAL(src, COMSIG_SUPPLYPOD_LANDED)
for (var/mob/living/target_living in turf_underneath)
if (iscarbon(target_living)) //If effectLimb is true (which means we pop limbs off when we hit people):
if (effectLimb)
@@ -364,6 +378,7 @@
moveToNullspace()
addtimer(CALLBACK(src, PROC_REF(open_pod), benis), delays[POD_OPENING]) //After the opening delay passes, we use the open proc from this supplyprod while referencing the contents of the "holder", in this case the gondolapod mob
else if (ispath(style, /datum/pod_style/seethrough))
transform = matrix()
open_pod(src)
else
addtimer(CALLBACK(src, PROC_REF(open_pod), src), delays[POD_OPENING]) //After the opening delay passes, we use the open proc from this supplypod, while referencing this supplypod's contents
@@ -415,7 +430,8 @@
if (!holder)
return
take_contents(holder)
playsound(holder, close_sound, soundVolume*0.75, TRUE, -3)
if (close_sound)
playsound(holder, close_sound, soundVolume*0.75, TRUE, -3)
holder.setClosed()
addtimer(CALLBACK(src, PROC_REF(preReturn), holder), delays[POD_LEAVING] * 0.2) //Start to leave a bit after closing for cinematic effect
@@ -658,7 +674,11 @@
stack_trace("Pod landingzone effect created with no pod")
return INITIALIZE_HINT_QDEL
transform = matrix() * 1.5
animate(src, transform = matrix()*0.01, time = pod.delays[POD_TRANSIT]+pod.delays[POD_FALLING])
var/arrival_time = pod.delays[POD_TRANSIT] + pod.delays[POD_FALLING]
if (arrival_time > 0)
animate(src, transform = matrix()*0.01, time = arrival_time)
else
alpha = 0
/obj/effect/pod_landingzone //This is the object that forceMoves the supplypod to its location
name = "Landing Zone Indicator"
@@ -685,7 +705,11 @@
if (!pod.effectStealth)
helper = new (drop_location(), pod)
alpha = 255
animate(src, transform = matrix().Turn(90), time = pod.delays[POD_TRANSIT]+pod.delays[POD_FALLING])
var/arrival_time = pod.delays[POD_TRANSIT] + pod.delays[POD_FALLING]
if (arrival_time > 0)
animate(src, transform = matrix().Turn(90), time = arrival_time)
else
alpha = 0
if (single_order)
if (istype(single_order, /datum/supply_order))
var/datum/supply_order/SO = single_order
@@ -701,7 +725,7 @@
if(pod.effectStun) //If effectStun is true, stun any mobs caught on this pod_landingzone until the pod gets a chance to hit them
for (var/mob/living/target_living in get_turf(src))
target_living.Stun(pod.delays[POD_TRANSIT]+10, ignore_canstun = TRUE)//you ain't goin nowhere, kid.
if (pod.delays[POD_TRANSIT] + pod.delays[POD_FALLING] < pod.fallingSoundLength)
if (arrival_time < pod.fallingSoundLength)
pod.fallingSoundLength = 3 //The default falling sound is a little long, so if the landing time is shorter than the default falling sound, use a special, shorter default falling sound
pod.fallingSound = 'sound/items/weapons/mortar_whistle.ogg'
var/soundStartTime = pod.delays[POD_TRANSIT] - pod.fallingSoundLength + pod.delays[POD_FALLING]