From f781e0dce6cc73fdbe4bd2e90c0b220e06d9c4fc Mon Sep 17 00:00:00 2001 From: Tim Date: Sat, 23 Nov 2024 06:34:55 -0600 Subject: [PATCH] Fix fireplace particles runtimes (#88114) ## About The Pull Request Caused by: - https://github.com/tgstation/tgstation/pull/88048 Trying to use the fireplace would result in runtimes and the smoke particles not triggering. Even though the runtime is fixed, the new particle changes in #88048 broke the pixel offsets. While I was testing, anytime I tried switching a pixel offset it would update all fireplaces. I tried to limit it to add the shared particle id to `"fireplace_[dir]"` so that it would only apply to the objects in that direction but I couldn't get it to work. I would guess this also affects a lot of other objects that have particle pixel offsets. Runtime is fixed. Particle offsets are still broken. ## Why It's Good For The Game Fireplaces no more runtime. ## Changelog :cl: fix: Fix fireplace particles runtimes. /:cl: --- code/game/objects/structures/fireplace.dm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/code/game/objects/structures/fireplace.dm b/code/game/objects/structures/fireplace.dm index 7e94805045f..f1505cd1b50 100644 --- a/code/game/objects/structures/fireplace.dm +++ b/code/game/objects/structures/fireplace.dm @@ -30,6 +30,7 @@ /obj/structure/fireplace/Destroy() STOP_PROCESSING(SSobj, src) QDEL_NULL(burning_loop) + remove_shared_particles(/particles/smoke/burning) . = ..() /obj/structure/fireplace/setDir(newdir) @@ -166,17 +167,17 @@ fuel_added = 0 update_appearance() adjust_light() - add_shared_particles(/particles/smoke/burning) + var/obj/effect/abstract/shared_particle_holder/smoke_particles = add_shared_particles(/particles/smoke/burning) switch(dir) if(SOUTH) - particles.position = list(0, 29, 0) + smoke_particles.particles.position = list(0, 29, 0) if(EAST) - particles.position = list(-20, 9, 0) + smoke_particles.particles.position = list(-20, 9, 0) if(WEST) - particles.position = list(20, 9, 0) + smoke_particles.particles.position = list(20, 9, 0) if(NORTH) // there is no icon state for SOUTH - QDEL_NULL(particles) + remove_shared_particles(/particles/smoke/burning) /obj/structure/fireplace/proc/put_out() STOP_PROCESSING(SSobj, src)