mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-16 17:38:37 +01:00
Adds turf fires (ported from Baystation, which ported them from Shiptest), which are now used instead of ZAS fires for fuel decals and flamethrowers. They also supplement ZAS fires in especially bad atmos fires. This makes flamethrowers and related objects more suitable for AOE denial, rather than cooking the room (including yourself). They still do the latter, but less so than a gaseous fire. To make flamethrowers actually useful against them, simple mobs now take brute damage when on fire. ### Asset Licenses The following assets that **have not** been created by myself are included in this PR: | Path | Original Author | License | | --- | --- | --- | | sound/weapons/flamethrower/flamethrower1.ogg | [rye-rice](https://github.com/rye-rice) (Shiptest) | CC-BY-SA 3.0 | | sound/weapons/flamethrower/flamethrower2.ogg | [rye-rice](https://github.com/rye-rice) (Shiptest) | CC-BY-SA 3.0 | | sound/weapons/flamethrower/flamethrower3.ogg | [rye-rice](https://github.com/rye-rice) (Shiptest) | CC-BY-SA 3.0 | | sound/weapons/flamethrower/flamethrower_empty.ogg | [rye-rice](https://github.com/rye-rice) (Shiptest) | CC-BY-SA 3.0 | | icons/effects/particles/smoke.dmi | [rye-rice](https://github.com/shiptest-ss13/Shiptest/commits?author=rye-rice) (Shiptest) | CC-BY-SA 3.0 | | icons/effects/turf_fire.dmi | CM Dev (cmss13) | CC-BY-SA 3.0 |
142 lines
4.3 KiB
Plaintext
142 lines
4.3 KiB
Plaintext
/obj/effect/decal/cleanable/liquid_fuel
|
|
//Liquid fuel is used for things that used to rely on volatile fuels or phoron being contained to a couple tiles.
|
|
name = "liquid fuel"
|
|
desc = "Some kind of sticky, flammable liquid."
|
|
icon = 'icons/effects/effects.dmi'
|
|
icon_state = "fuel"
|
|
layer = BLOOD_LAYER
|
|
anchored = 1
|
|
var/amount = 1
|
|
|
|
/obj/effect/decal/cleanable/liquid_fuel/Initialize(mapload, amt = 1, nologs = 0)
|
|
. = ..()
|
|
if(!nologs && !mapload)
|
|
log_and_message_admins("spilled liquid fuel", user = usr, location = get_turf(src))
|
|
src.amount = amt
|
|
|
|
var/has_spread = 0
|
|
//Be absorbed by any other liquid fuel in the tile.
|
|
for(var/obj/effect/decal/cleanable/liquid_fuel/other in loc)
|
|
if(other != src)
|
|
other.amount += src.amount
|
|
other.Spread()
|
|
has_spread = 1
|
|
break
|
|
|
|
if(!has_spread)
|
|
Spread()
|
|
else
|
|
qdel(src)
|
|
|
|
/obj/effect/decal/cleanable/liquid_fuel/proc/Spread(exclude=list())
|
|
//Allows liquid fuels to sometimes flow into other tiles.
|
|
if(amount < 15) return //lets suppose welder fuel is fairly thick and sticky. For something like water, 5 or less would be more appropriate.
|
|
var/turf/simulated/S = loc
|
|
if(!istype(S)) return
|
|
for(var/d in GLOB.cardinals)
|
|
var/turf/simulated/target = get_step(src,d)
|
|
var/turf/simulated/origin = get_turf(src)
|
|
if(origin.CanPass(null, target, 0, 0) && target.CanPass(null, origin, 0, 0))
|
|
var/obj/effect/decal/cleanable/liquid_fuel/other_fuel = locate() in target
|
|
if(other_fuel)
|
|
other_fuel.amount += amount*0.25
|
|
if(!(other_fuel in exclude))
|
|
exclude += src
|
|
other_fuel.Spread(exclude)
|
|
else
|
|
new/obj/effect/decal/cleanable/liquid_fuel(target, amount*0.25,1)
|
|
amount *= 0.75
|
|
|
|
|
|
/obj/effect/decal/cleanable/liquid_fuel/napalm
|
|
name = "napalm gel"
|
|
|
|
/obj/effect/decal/cleanable/liquid_fuel/napalm/Initialize(mapload, amt = 1, nologs = 0)
|
|
. = ..()
|
|
START_PROCESSING(SSprocessing, src)
|
|
|
|
/obj/effect/decal/cleanable/liquid_fuel/napalm/Destroy()
|
|
STOP_PROCESSING(SSprocessing, src)
|
|
return ..()
|
|
|
|
/obj/effect/decal/cleanable/liquid_fuel/napalm/Spread()
|
|
if(amount < 100)
|
|
return
|
|
var/turf/simulated/S = loc
|
|
if(!istype(S))
|
|
return
|
|
for(var/d in GLOB.cardinals)
|
|
var/turf/simulated/target = get_step(src,d)
|
|
var/turf/simulated/origin = get_turf(src)
|
|
if(origin.CanPass(null, target, 0, 0) && target.CanPass(null, origin, 0, 0))
|
|
var/obj/effect/decal/cleanable/liquid_fuel/napalm/other_fuel = locate() in target
|
|
if(other_fuel)
|
|
other_fuel.amount += amount*0.5
|
|
target.hotspot_expose(2000, 400)
|
|
else
|
|
new/obj/effect/decal/cleanable/liquid_fuel/napalm(target, amount*0.5,1)
|
|
target.hotspot_expose(2000, 400)
|
|
amount *= 0.5
|
|
origin.hotspot_expose(2000, 400) //immediately ignite. its napalm bitch
|
|
|
|
/obj/effect/decal/cleanable/liquid_fuel/napalm/process()
|
|
for(var/mob/living/L in get_turf(src))
|
|
var/sticky = min(rand(5,25), amount)
|
|
if(sticky > 1)
|
|
L.adjust_fire_stacks(sticky)
|
|
amount = max(1, amount - sticky)
|
|
|
|
/obj/effect/decal/cleanable/foam //Copied from liquid fuel
|
|
name = "foam"
|
|
desc = "Some kind of extinguishing foam."
|
|
gender = PLURAL
|
|
density = 0
|
|
anchored = 1
|
|
icon = 'icons/effects/effects.dmi'
|
|
icon_state = "white_foam"
|
|
var/amount = 1
|
|
|
|
/obj/effect/decal/cleanable/foam/Initialize(mapload, amt = 1, nologs = 0)
|
|
SHOULD_CALL_PARENT(FALSE)
|
|
|
|
if(flags_1 & INITIALIZED_1)
|
|
stack_trace("Warning: [src]([type]) initialized multiple times!")
|
|
flags_1 |= INITIALIZED_1
|
|
|
|
src.amount = amt
|
|
|
|
var/has_spread = 0
|
|
//Be absorbed by any other liquid fuel in the tile.
|
|
for(var/obj/effect/decal/cleanable/foam/other in loc)
|
|
if(other != src)
|
|
other.amount += src.amount
|
|
other.Spread()
|
|
has_spread = 1
|
|
break
|
|
|
|
if(!has_spread)
|
|
Spread()
|
|
QDEL_IN(src, 2 MINUTES)
|
|
return INITIALIZE_HINT_NORMAL
|
|
else
|
|
return INITIALIZE_HINT_QDEL
|
|
|
|
|
|
/obj/effect/decal/cleanable/foam/proc/Spread(exclude=list())
|
|
if(amount < 15) return
|
|
var/turf/simulated/S = loc
|
|
if(!istype(S)) return
|
|
for(var/d in GLOB.cardinals)
|
|
var/turf/simulated/target = get_step(src,d)
|
|
var/turf/simulated/origin = get_turf(src)
|
|
if(origin.CanPass(null, target, 0, 0) && target.CanPass(null, origin, 0, 0))
|
|
var/obj/effect/decal/cleanable/foam/other_foam = locate() in target
|
|
if(other_foam)
|
|
other_foam.amount += amount*0.25
|
|
if(!(other_foam in exclude))
|
|
exclude += src
|
|
other_foam.Spread(exclude)
|
|
else
|
|
new/obj/effect/decal/cleanable/foam(target, amount*0.25,1)
|
|
amount *= 0.75
|