From e95d34acbd693ef3a05d2e2168abedbc3ac18192 Mon Sep 17 00:00:00 2001 From: cuberound <122645057+cuberound@users.noreply.github.com> Date: Sun, 7 Apr 2024 18:42:04 +0200 Subject: [PATCH] flames remove snow ! (#6001) # About the pull request makes snow scortchable and implements behavior for it ( thank you kugamo for making the LV grass scortchable so that the basework for it exists). intensity numbers might need tweeking if maintainers feel like it, but other than that it works. # Explain why it's good for the game removing snow is pain in ass and even more so for marines, explosions can already remove snow and it only makes sance for flames to melt the snow. only bluefire can remove the deapest snow in one use, green and red flames remove abut two layers # Testing Photographs and Procedure
Screenshots & Videos Put screenshots and videos here with an empty line between the screenshots and the `
` tags.
# Changelog :cl: balance: flames melt the snow /:cl: --------- Co-authored-by: vincibrv Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com> Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com> --- code/game/turfs/auto_turf.dm | 14 ++++++++++++++ code/game/turfs/snow.dm | 17 +++++++++++++++++ code/modules/projectiles/guns/flamer/flamer.dm | 10 +--------- 3 files changed, 32 insertions(+), 9 deletions(-) diff --git a/code/game/turfs/auto_turf.dm b/code/game/turfs/auto_turf.dm index b1a956abf756..8edd13f58612 100644 --- a/code/game/turfs/auto_turf.dm +++ b/code/game/turfs/auto_turf.dm @@ -75,6 +75,19 @@ if(bleed_layer) addtimer(CALLBACK(src, PROC_REF(changing_layer), 0), 1) +/turf/open/auto_turf/scorch(heat_level) + if(bleed_layer <= 0) + return + switch(heat_level) + if(1 to 19) + var/new_bleed_layer = min(0, bleed_layer - 1) + addtimer(CALLBACK(src, PROC_REF(changing_layer), new_bleed_layer), 1) + if(20 to 39) + var/new_bleed_layer = max(bleed_layer - 2, 0) + addtimer(CALLBACK(src, PROC_REF(changing_layer), new_bleed_layer), 1) + if(40 to INFINITY) + addtimer(CALLBACK(src, PROC_REF(changing_layer), 0), 1) + //Actual auto-turfs now @@ -146,6 +159,7 @@ //Ice colony snow /turf/open/auto_turf/snow + scorchable = TRUE name = "auto-snow" icon = 'icons/turf/floors/snow2.dmi' icon_state = "snow_0" diff --git a/code/game/turfs/snow.dm b/code/game/turfs/snow.dm index f7fb746cfbbc..c8afd734e862 100644 --- a/code/game/turfs/snow.dm +++ b/code/game/turfs/snow.dm @@ -8,6 +8,7 @@ icon = 'icons/turf/floors/snow2.dmi' icon_state = "snow_0" is_groundmap_turf = TRUE + scorchable = TRUE //PLACING/REMOVING/BUILDING /turf/open/snow/attackby(obj/item/I, mob/user) @@ -132,6 +133,22 @@ bleed_layer = 0 update_icon(1, 0) +//Flames act +/turf/open/snow/scorch(heat_level) + if(bleed_layer <= 0) + return + switch(heat_level) + if(1 to 19) + bleed_layer-- + update_icon(update_full = TRUE, skip_sides = FALSE) + if(20 to 39) + bleed_layer = max(bleed_layer - 2, 0) + update_icon(update_full = TRUE, skip_sides = FALSE) + if(40 to INFINITY) + bleed_layer = 0 + update_icon(update_full = TRUE, skip_sides = FALSE) + + //SNOW LAYERS-----------------------------------// /turf/open/snow/layer0 icon_state = "snow_0" diff --git a/code/modules/projectiles/guns/flamer/flamer.dm b/code/modules/projectiles/guns/flamer/flamer.dm index 62e37e4f7c3b..5daef0bdff74 100644 --- a/code/modules/projectiles/guns/flamer/flamer.dm +++ b/code/modules/projectiles/guns/flamer/flamer.dm @@ -478,15 +478,7 @@ INVOKE_ASYNC(FS, TYPE_PROC_REF(/datum/flameshape, handle_fire_spread), src, fire_spread_amount, burn_dam, fuel_pressure) //Apply fire effects onto everyone in the fire - // Melt a single layer of snow - if (istype(loc, /turf/open/snow)) - var/turf/open/snow/S = loc - - if (S.bleed_layer > 0) - S.bleed_layer-- - S.update_icon(1, 0) - - //scorch mah grass HNNGGG + //scorch mah grass HNNGGG and muh SNOW hhhhGGG if (istype(loc, /turf/open)) var/turf/open/scorch_turf_target = loc if(scorch_turf_target.scorchable)