mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
Thermite tweak (#21950)
* thermite now melts different walls for different times, using its reagent volume * Update code/game/turfs/simulated/walls.dm Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com> * review fixes --------- Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
This commit is contained in:
@@ -3,8 +3,6 @@
|
||||
name = "station"
|
||||
var/wet = 0
|
||||
var/image/wet_overlay = null
|
||||
|
||||
var/thermite = 0
|
||||
oxygen = MOLES_O2STANDARD
|
||||
nitrogen = MOLES_N2STANDARD
|
||||
var/to_be_destroyed = 0 //Used for fire, if a melting temperature was reached, it will be destroyed
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
var/damage_cap = 100 //Wall will break down to girders if damage reaches this point
|
||||
|
||||
var/global/damage_overlays[8]
|
||||
var/melting = FALSE //TRUE if wall is currently being melted with thermite
|
||||
|
||||
opacity = TRUE
|
||||
density = TRUE
|
||||
@@ -246,9 +247,8 @@
|
||||
ChangeTurf(/turf/simulated/floor)
|
||||
|
||||
/turf/simulated/wall/proc/thermitemelt(mob/user as mob, speed)
|
||||
var/wait = 20 SECONDS
|
||||
if(speed)
|
||||
wait = speed
|
||||
if(melting)
|
||||
return
|
||||
if(istype(sheet_type, /obj/item/stack/sheet/mineral/diamond))
|
||||
return
|
||||
|
||||
@@ -261,16 +261,39 @@
|
||||
O.density = TRUE
|
||||
O.layer = 5
|
||||
|
||||
src.ChangeTurf(/turf/simulated/floor/plating)
|
||||
|
||||
var/turf/simulated/floor/F = src
|
||||
F.burn_tile()
|
||||
F.icon_state = "plating"
|
||||
if(user)
|
||||
to_chat(user, "<span class='warning'>The thermite starts melting through the wall.</span>")
|
||||
|
||||
spawn(wait)
|
||||
if(speed)
|
||||
melting = TRUE
|
||||
while(speed > 0)
|
||||
playsound(src, 'sound/items/welder.ogg', 100, TRUE)
|
||||
speed = max(0, speed - 1 SECONDS)
|
||||
sleep(1)
|
||||
burn_down()
|
||||
var/turf/simulated/floor/F = src
|
||||
F.burn_tile()
|
||||
F.icon_state = "plating"
|
||||
if(O) qdel(O)
|
||||
return
|
||||
|
||||
melting = TRUE
|
||||
while(reagents.get_reagent_amount("thermite") > 0)
|
||||
reagents.remove_reagent("thermite", 5)
|
||||
if(damage_cap - damage <= 30)
|
||||
burn_down()
|
||||
|
||||
var/turf/simulated/floor/F = src
|
||||
F.burn_tile()
|
||||
F.icon_state = "plating"
|
||||
break
|
||||
take_damage(30)
|
||||
playsound(src, 'sound/items/welder.ogg', 100, TRUE)
|
||||
sleep(1 SECONDS)
|
||||
if(iswallturf(src))
|
||||
melting = FALSE
|
||||
if(O)
|
||||
qdel(O)
|
||||
return
|
||||
|
||||
//Interactions
|
||||
@@ -345,7 +368,7 @@
|
||||
|
||||
/turf/simulated/wall/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(thermite && I.use_tool(src, user, volume = I.tool_volume))
|
||||
if(reagents.get_reagent_amount("thermite") && I.use_tool(src, user, volume = I.tool_volume))
|
||||
thermitemelt(user)
|
||||
return
|
||||
if(rotting)
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
return ..()
|
||||
|
||||
/turf/simulated/wall/r_wall/welder_act(mob/user, obj/item/I)
|
||||
if(thermite && I.use_tool(src, user, volume = I.tool_volume))
|
||||
if(reagents.get_reagent_amount("thermite") && I.use_tool(src, user, volume = I.tool_volume))
|
||||
thermitemelt(user)
|
||||
return TRUE
|
||||
if(!(d_state in list(RWALL_COVER, RWALL_SUPPORT_RODS, RWALL_CUT_COVER)))
|
||||
|
||||
@@ -209,7 +209,6 @@
|
||||
if(!S.reagents)
|
||||
S.create_reagents(volume)
|
||||
S.reagents.add_reagent("thermite", volume)
|
||||
S.thermite = TRUE
|
||||
if(S.active_hotspot)
|
||||
S.reagents.temperature_reagents(S.active_hotspot.temperature, 10, 300)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user