Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flames remove snow ! #6001

Merged
merged 10 commits into from
Apr 7, 2024
15 changes: 15 additions & 0 deletions code/game/turfs/auto_turf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,20 @@
if(bleed_layer)
addtimer(CALLBACK(src, PROC_REF(changing_layer), 0), 1)

/turf/open/auto_turf/scorch(heat_level)
if(bleed_layer == 0)
cuberound marked this conversation as resolved.
Show resolved Hide resolved
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)

cuberound marked this conversation as resolved.
Show resolved Hide resolved
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 +160,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
18 changes: 18 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,23 @@
bleed_layer = 0
update_icon(1, 0)

//Flames act
/turf/open/snow/scorch(heat_level)
if(bleed_layer == 0)
cuberound marked this conversation as resolved.
Show resolved Hide resolved
return
switch(heat_level)
if(1 to 19)
bleed_layer--
update_icon(TRUE, FALSE)

if(20 to 39)
bleed_layer = max(bleed_layer - 2, 0)
update_icon(TRUE, FALSE)
if(40 to INFINITY)
bleed_layer = 0
update_icon(TRUE, FALSE)
cuberound marked this conversation as resolved.
Show resolved Hide resolved


//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
Loading