From 5a2becfa67c6c03c85761657fb09f946903d05ef Mon Sep 17 00:00:00 2001 From: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Date: Tue, 5 Aug 2025 04:49:54 +0200 Subject: [PATCH] Fixes random runtimes from RPD usage (#92246) ## About The Pull Request SSair inits some pipes for its directional cache when RPD is used which runtimes when atmos components try to update their icon due to assuming they have a loc while being nullspaced. ## Changelog :cl: fix: Fixed RPD causing runtimes when placing atmos components for the first time. /:cl: --------- Co-authored-by: Lucy (cherry picked from commit 99797151d79098cf3a9446a137cb7d12b9f3915f) --- .../atmospherics/machinery/components/components_base.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/atmospherics/machinery/components/components_base.dm b/code/modules/atmospherics/machinery/components/components_base.dm index 74bbfca0bdf..23babb68c96 100644 --- a/code/modules/atmospherics/machinery/components/components_base.dm +++ b/code/modules/atmospherics/machinery/components/components_base.dm @@ -71,7 +71,7 @@ underlays.Cut() color = null - var/uncovered_turf = HAS_TRAIT(loc, TRAIT_UNCOVERED_TURF) + var/uncovered_turf = loc && HAS_TRAIT(loc, TRAIT_UNCOVERED_TURF) SET_PLANE_IMPLICIT(src, (underfloor_state == UNDERFLOOR_INTERACTABLE && !uncovered_turf) ? GAME_PLANE : FLOOR_PLANE) // Layer is handled in update_layer() @@ -112,7 +112,7 @@ /obj/machinery/atmospherics/components/get_pipe_image(iconfile, iconstate, direction, color, piping_layer, trinary) var/mutable_appearance/pipe_appearance = ..() - if (underfloor_state == UNDERFLOOR_VISIBLE || HAS_TRAIT(loc, TRAIT_UNCOVERED_TURF)) + if (underfloor_state == UNDERFLOOR_VISIBLE || (loc && HAS_TRAIT(loc, TRAIT_UNCOVERED_TURF))) pipe_appearance.layer = BELOW_CATWALK_LAYER + get_pipe_layer_offset() SET_PLANE_EXPLICIT(pipe_appearance, FLOOR_PLANE, src) return pipe_appearance