From 95bc2006e0666b46a0b16c1020d83554f657dff6 Mon Sep 17 00:00:00 2001 From: DeltaFire <46569814+DeltaFire15@users.noreply.github.com> Date: Sat, 2 Dec 2023 03:41:51 +0100 Subject: [PATCH] fixes pylons (again) fixes another thing that could break with pylons when shutting the drive down, namely them getting stuck shutdown in other words woo I finally reproduced the cause. --- nsv13/code/modules/overmap/FTL/components/drive.dm | 2 ++ nsv13/code/modules/overmap/FTL/components/drive_pylon.dm | 9 +-------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/nsv13/code/modules/overmap/FTL/components/drive.dm b/nsv13/code/modules/overmap/FTL/components/drive.dm index 35323a02579..a1880a21904 100644 --- a/nsv13/code/modules/overmap/FTL/components/drive.dm +++ b/nsv13/code/modules/overmap/FTL/components/drive.dm @@ -363,6 +363,8 @@ Preset classes of FTL drive with pre-programmed behaviours jump_speed_pylon = initial(jump_speed_pylon) if(shutdown_pylons) for(var/obj/machinery/atmospherics/components/binary/drive_pylon/P as() in pylons) + if(P.pylon_state == PYLON_STATE_OFFLINE || P.pylon_state == PYLON_STATE_SHUTDOWN) + continue P.set_state(PYLON_STATE_SHUTDOWN) cooldown = TRUE addtimer(CALLBACK(src, PROC_REF(post_cooldown), auto_spool_enabled), FTL_COOLDOWN) diff --git a/nsv13/code/modules/overmap/FTL/components/drive_pylon.dm b/nsv13/code/modules/overmap/FTL/components/drive_pylon.dm index aefbebf3fc6..f779618c35d 100644 --- a/nsv13/code/modules/overmap/FTL/components/drive_pylon.dm +++ b/nsv13/code/modules/overmap/FTL/components/drive_pylon.dm @@ -387,16 +387,9 @@ else to_chat(user, "You don't think it would be wise to touch this right now.") - -#undef PYLON_STATE_OFFLINE -#undef PYLON_STATE_STARTING -#undef PYLON_STATE_WARMUP -#undef PYLON_STATE_SPOOLING -#undef PYLON_STATE_ACTIVE -#undef PYLON_STATE_SHUTDOWN - #undef MAX_WASTE_OUTPUT_PRESSURE #undef MAX_WASTE_STORAGE_PRESSURE +#undef WASTE_GAS_HEAT #undef PYLON_ACTIVE_EXPONENT #undef POWER_FAIL_TOLERANCE