Skip to content

Commit

Permalink
flames remove snow ! (#6001)
Browse files Browse the repository at this point in the history
# 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
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl:
balance: flames melt the snow 
/:cl:

---------

Co-authored-by: vincibrv <[email protected]>
Co-authored-by: Drathek <[email protected]>
Co-authored-by: Zonespace <[email protected]>
  • Loading branch information
4 people authored Apr 7, 2024
1 parent dc69315 commit e95d34a
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 9 deletions.
14 changes: 14 additions & 0 deletions code/game/turfs/auto_turf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"
Expand Down
17 changes: 17 additions & 0 deletions code/game/turfs/snow.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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"
Expand Down
10 changes: 1 addition & 9 deletions code/modules/projectiles/guns/flamer/flamer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e95d34a

Please sign in to comment.