From e300cf9bbf0c20e3823594ce8bdfecd299cfd422 Mon Sep 17 00:00:00 2001 From: Cody Brittain <1779662+Generalcamo@users.noreply.github.com> Date: Wed, 14 Jan 2026 01:57:47 -0500 Subject: [PATCH] Repaired several effects. (#21711) Fully fixes #21686, as well as other assorted issues caused by #21458. ![dreamseeker_ACcsHOw9m3](https://github.com/user-attachments/assets/cceb66b8-a067-4aba-aa41-5bfd4784a37a) ![dreamseeker_ihjvvcZmzH](https://github.com/user-attachments/assets/abaecb2e-d156-47af-8482-c7ad85a49cf4) --- code/ZAS/Fire.dm | 2 + code/__DEFINES/atmos.dm | 2 +- code/__DEFINES/layers.dm | 9 ++- .../effects/particles/native_particles.dm | 66 +++++++++++++++++++ .../heavy_vehicle/equipment/utility.dm | 4 +- code/modules/rendering/plane_master.dm | 36 ++++++++++ code/modules/rendering/render_plate.dm | 2 + code/modules/xgm/xgm_gas_data.dm | 5 +- html/changelogs/GeneralCamo - Layer Fixes.yml | 60 +++++++++++++++++ 9 files changed, 180 insertions(+), 6 deletions(-) create mode 100644 html/changelogs/GeneralCamo - Layer Fixes.yml diff --git a/code/ZAS/Fire.dm b/code/ZAS/Fire.dm index 6c926260c9d..2b607b5b626 100644 --- a/code/ZAS/Fire.dm +++ b/code/ZAS/Fire.dm @@ -128,11 +128,13 @@ If it gains pressure too slowly, it may leak or just rupture instead of explodin return 0 +// Future low-quality heat effect /obj/heat icon = 'icons/effects/fire.dmi' icon_state = "3" appearance_flags = PIXEL_SCALE | NO_CLIENT_COLOR mouse_opacity = MOUSE_OPACITY_TRANSPARENT + render_target = HEAT_EFFECT_PLATE_RENDER_TARGET /obj/fire //Icon for fire on turfs. diff --git a/code/__DEFINES/atmos.dm b/code/__DEFINES/atmos.dm index 2e37835ad17..b2cf2f5ad11 100644 --- a/code/__DEFINES/atmos.dm +++ b/code/__DEFINES/atmos.dm @@ -50,7 +50,7 @@ #define CARBON_LIFEFORM_FIRE_DAMAGE 4 #define FOGGING_TEMPERATURE (T0C + 5) -#define MAX_FOG_TEMPERATURE (T0C - 50) +#define MAX_FOG_TEMPERATURE (T0C - 70) // Phoron fire properties. #define PHORON_MINIMUM_BURN_TEMPERATURE (T0C + 126) //400 K - autoignite temperature in tanks and canisters - enclosed environments I guess diff --git a/code/__DEFINES/layers.dm b/code/__DEFINES/layers.dm index ab11c972e6d..27f16fa2ce1 100644 --- a/code/__DEFINES/layers.dm +++ b/code/__DEFINES/layers.dm @@ -38,8 +38,13 @@ #define OPEN_SPACE_PLANE_END -70 #define OPENTURF_MAX_DEPTH 10 // The maxiumum number of planes deep we'll go before we just dump everything on the same plane. -#define HEAT_EFFECT_PLANE -8 -#define WARP_EFFECT_PLANE -7 +#define HEAT_EFFECT_PLANE 3 +#define HEAT_EFFECT_PLATE_RENDER_TARGET "*HEAT_EFFECT_PLATE_RENDER_TARGET" +#define HEAT_EFFECT_COMPOSITE_RENDER_TARGET "*HEAT_EFFECT_COMPOSITE_RENDER_TARGET" +#define COLD_EFFECT_PLATE_RENDER_TARGET "*COLD_EFFECT_PLATE_RENDER_TARGET" +#define COLD_EFFECT_BACK_PLATE_RENDER_TARGET "*COLD_EFFECT_BACK_PLATE_RENDER_TARGET" +#define WARP_EFFECT_PLANE 2 +#define WARP_EFFECT_PLATE_RENDER_TARGET "*WARP_EFFECT_PLATE_RENDER_TARGET" /// Game Plane, where most of the game objects reside #define GAME_PLANE -6 diff --git a/code/modules/effects/particles/native_particles.dm b/code/modules/effects/particles/native_particles.dm index 21816440dd5..f9cd7b9557a 100644 --- a/code/modules/effects/particles/native_particles.dm +++ b/code/modules/effects/particles/native_particles.dm @@ -45,6 +45,14 @@ friction = 0.2 grow = 0.0015 +/particles/mist/back + name = "mist_back" + spawning = 7 + position = generator("box", list(-20, -1), list(20, 20), UNIFORM_RAND) + lifespan = 6 SECONDS + fadein = 1.5 SECONDS + + /particles/heat name = "heat" width = 500 @@ -82,3 +90,61 @@ layer = BELOW_TABLE_LAYER alpha = 128 +/obj/particle_emitter + name = "" + anchored = TRUE + mouse_opacity = 0 + appearance_flags = PIXEL_SCALE + var/particle_type = null + +/obj/particle_emitter/Initialize(mapload, time, _color) + . = ..() + if (particle_type) + particles = GLOB.all_particles[particle_type] + + if (time > 0) + QDEL_IN(src, time) + color = _color + +// Future medium-quality heat effect +/obj/particle_emitter/heat + particle_type = "heat" + render_target = HEAT_EFFECT_PLATE_RENDER_TARGET + appearance_flags = PIXEL_SCALE | NO_CLIENT_COLOR + + +/obj/particle_emitter/heat/Initialize() + . = ..() + add_filter("heat_blur", 1, gauss_blur_filter(1)) + +// High-quality heat effect +/obj/particle_emitter/heat/high + particle_type = "high heat" + + +// Medium/High-quality cold effect +/obj/particle_emitter/mist + particle_type = "mist" + layer = FIRE_LAYER + +/obj/particle_emitter/mist/back + particle_type = "mist_back" + layer = BELOW_OBJ_LAYER + + +/obj/particle_emitter/mist/back/gas + render_target = COLD_EFFECT_BACK_PLATE_RENDER_TARGET + +/obj/particle_emitter/mist/back/gas/Initialize(mapload, time, _color) + . = ..() + add_filter("cold_alpha", 1, alpha_mask_filter(render_source = COLD_EFFECT_PLATE_RENDER_TARGET, flags = MASK_INVERSE)) + +//for cold gas effect +/obj/particle_emitter/mist/gas + render_target = COLD_EFFECT_PLATE_RENDER_TARGET + var/obj/particle_emitter/mist/back/b = /obj/particle_emitter/mist/back/gas + +/obj/particle_emitter/mist/gas/Initialize(mapload, time, _color) + . = ..() + b = new b(null) + add_vis_contents(b) diff --git a/code/modules/heavy_vehicle/equipment/utility.dm b/code/modules/heavy_vehicle/equipment/utility.dm index 9473125aa97..4fe6af8cecf 100644 --- a/code/modules/heavy_vehicle/equipment/utility.dm +++ b/code/modules/heavy_vehicle/equipment/utility.dm @@ -279,14 +279,14 @@ ///For when targetting a single object, will create a warp beam var/datum/beam = null var/max_dist = 6 - var/obj/effect/effect/warp/small/warpeffect = null + var/obj/effect/warp/small/warpeffect = null /obj/effect/ebeam/warp plane = WARP_EFFECT_PLANE appearance_flags = DEFAULT_APPEARANCE_FLAGS | TILE_BOUND | NO_CLIENT_COLOR z_flags = ZMM_IGNORE -/obj/effect/effect/warp/small +/obj/effect/warp/small plane = WARP_EFFECT_PLANE appearance_flags = PIXEL_SCALE | NO_CLIENT_COLOR icon = 'icons/effects/96x96.dmi' diff --git a/code/modules/rendering/plane_master.dm b/code/modules/rendering/plane_master.dm index 351826e2620..c2aa6efa30d 100644 --- a/code/modules/rendering/plane_master.dm +++ b/code/modules/rendering/plane_master.dm @@ -175,11 +175,47 @@ /atom/movable/screen/plane_master/displacement name = "displacement plane" + blend_mode = BLEND_ADD mouse_opacity = MOUSE_OPACITY_TRANSPARENT plane = DISPLACEMENT_PLATE_RENDER_LAYER render_target = DISPLACEMENT_PLATE_RENDER_TARGET render_relay_plane = null +/atom/movable/screen/plane_master/warp + name = "warp plane" + blend_mode = BLEND_ADD + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + plane = WARP_EFFECT_PLANE + render_target = WARP_EFFECT_PLATE_RENDER_TARGET + render_relay_plane = null + +/atom/movable/screen/plane_master/heat + name = "heat haze plane" + blend_mode = BLEND_ADD + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + plane = HEAT_EFFECT_PLANE + render_target = HEAT_EFFECT_COMPOSITE_RENDER_TARGET + render_relay_plane = null + + var/gas_heat_object + //Not actually handled in this plane, we just use this to spawn the particle emitter so byond's rendering system will source it. + var/gas_cold_object + +/atom/movable/screen/plane_master/heat/Initialize() + . = ..() + setup() + +/atom/movable/screen/plane_master/heat/proc/setup() + //TODO: Add graphical options. If players don't like heat haze, replace particles with icons + if (gas_heat_object) + remove_vis_contents(gas_heat_object) + if (gas_cold_object) + remove_vis_contents(gas_cold_object) + gas_heat_object = new /obj/particle_emitter/heat/high + gas_cold_object = new /obj/particle_emitter/mist/gas + add_vis_contents(gas_heat_object) + add_vis_contents(gas_cold_object) + /atom/movable/screen/plane_master/open_space name = "open space plane" plane = OPEN_SPACE_PLANE_END //aurora snowflake: our openspace system works bottom up, not top down like CM's diff --git a/code/modules/rendering/render_plate.dm b/code/modules/rendering/render_plate.dm index 24ab4484588..f549da43dd6 100644 --- a/code/modules/rendering/render_plate.dm +++ b/code/modules/rendering/render_plate.dm @@ -42,6 +42,8 @@ /atom/movable/screen/plane_master/rendering_plate/game_world/Initialize(mapload, datum/hud/hud_owner) . = ..() add_filter("displacer", 1, displacement_map_filter(render_source = DISPLACEMENT_PLATE_RENDER_TARGET, size = 10)) + add_filter("warp", 1, displacement_map_filter(render_source = WARP_EFFECT_PLATE_RENDER_TARGET, size = 5)) + add_filter("heat_haze", 1, displacement_map_filter(render_source = HEAT_EFFECT_COMPOSITE_RENDER_TARGET, size = 2.5)) ///render plate for OOC stuff like ghosts, hud-screen effects, etc /atom/movable/screen/plane_master/rendering_plate/non_game diff --git a/code/modules/xgm/xgm_gas_data.dm b/code/modules/xgm/xgm_gas_data.dm index d8d932bb5f5..8f527cf559f 100644 --- a/code/modules/xgm/xgm_gas_data.dm +++ b/code/modules/xgm/xgm_gas_data.dm @@ -79,6 +79,7 @@ var/global/datum/xgm_gas_data/gas_data desc = "You shouldn't be clicking this." plane = HEAT_EFFECT_PLANE gas_id = GAS_HEAT + render_source = HEAT_EFFECT_PLATE_RENDER_TARGET /obj/gas_overlay/heat/Initialize(mapload, gas) . = ..() @@ -88,16 +89,18 @@ var/global/datum/xgm_gas_data/gas_data /obj/effect/gas_cold_back plane = GAME_PLANE layer = BELOW_OBJ_LAYER + render_source = COLD_EFFECT_BACK_PLATE_RENDER_TARGET /obj/gas_overlay/cold name = "gas" desc = "You shouldn't be clicking this." gas_id = GAS_COLD var/obj/effect/gas_cold_back/b = null + render_source = COLD_EFFECT_PLATE_RENDER_TARGET /obj/gas_overlay/cold/Initialize(mapload, gas) . = ..() icon = null icon_state = null b = new() - vis_contents += b + add_vis_contents(b) diff --git a/html/changelogs/GeneralCamo - Layer Fixes.yml b/html/changelogs/GeneralCamo - Layer Fixes.yml new file mode 100644 index 00000000000..9157aed6dba --- /dev/null +++ b/html/changelogs/GeneralCamo - Layer Fixes.yml @@ -0,0 +1,60 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# - (fixes bugs) +# wip +# - (work in progress) +# qol +# - (quality of life) +# soundadd +# - (adds a sound) +# sounddel +# - (removes a sound) +# rscadd +# - (adds a feature) +# rscdel +# - (removes a feature) +# imageadd +# - (adds an image or sprite) +# imagedel +# - (removes an image or sprite) +# spellcheck +# - (fixes spelling or grammar) +# experiment +# - (experimental change) +# balance +# - (balance changes) +# code_imp +# - (misc internal code change) +# refactor +# - (refactors code) +# config +# - (makes a change to the config files) +# admin +# - (makes changes to administrator tools) +# server +# - (miscellaneous changes to server) +################################# + +# Your name. +author: GeneralCamo + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Repaired atmos heat effect." + - bugfix: "Repaited atmos cold effect." + - bugfix: "Repaired gravity catapult effect."