mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-10 23:54:14 +01:00
21b4095dfd
Upstream 04/17/2026 fixes https://github.com/Bubberstation/Bubberstation/issues/5549 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: tgstation-ci[bot] <179393467+tgstation-ci[bot]@users.noreply.github.com> Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com> Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com> Co-authored-by: rageguy505 <54517726+rageguy505@users.noreply.github.com> Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> Co-authored-by: Aliceee2ch <160794176+Aliceee2ch@users.noreply.github.com> Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com> Co-authored-by: Tsar-Salat <62388554+Tsar-Salat@users.noreply.github.com> Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Co-authored-by: Maxipat <108554989+Maxipat112@users.noreply.github.com> Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com> Co-authored-by: SimplyLogan <47579821+loganuk@users.noreply.github.com> Co-authored-by: loganuk <fakeemail123@aol.com> Co-authored-by: Leland Kemble <70413276+lelandkemble@users.noreply.github.com> Co-authored-by: FalloutFalcon <86381784+FalloutFalcon@users.noreply.github.com> Co-authored-by: Roxy <75404941+TealSeer@users.noreply.github.com> Co-authored-by: Lucy <lucy@absolucy.moe> Co-authored-by: siliconOpossum <138069572+siliconOpossum@users.noreply.github.com> Co-authored-by: Isratosh <Isratosh@hotmail.com> Co-authored-by: TheRyeGuyWhoWillNowDie <70169560+TheRyeGuyWhoWillNowDie@users.noreply.github.com> Co-authored-by: Neocloudy <88008002+Neocloudy@users.noreply.github.com> Co-authored-by: Alexander V. <volas@ya.ru> Co-authored-by: ElGitificador <168473461+ElGitificador@users.noreply.github.com> Co-authored-by: Twaticus <46540570+Twaticus@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com> Co-authored-by: Cameron Lennox <killer65311@gmail.com> Co-authored-by: Tim <timothymtorres@gmail.com> Co-authored-by: Iamgoofball <iamgoofball@gmail.com> Co-authored-by: Layzu666 <121319428+Layzu666@users.noreply.github.com> Co-authored-by: Arturlang <24881678+Arturlang@users.noreply.github.com> Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com> Co-authored-by: mrmanlikesbt <99309552+mrmanlikesbt@users.noreply.github.com> Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com> Co-authored-by: John F. Kennedy <54908920+MacaroniCritter@users.noreply.github.com> Co-authored-by: Cursor <102828457+theselfish@users.noreply.github.com> Co-authored-by: Josh <josh.adam.powell@gmail.com> Co-authored-by: Josh Powell <josh.powell@softwire.com> Co-authored-by: Yobrocharlie <Charliemiller5617@gmail.com> Co-authored-by: Hardly3D <66234359+Hardly3D@users.noreply.github.com> Co-authored-by: shayoki <96078776+shayoki@users.noreply.github.com> Co-authored-by: LT3 <83487515+lessthnthree@users.noreply.github.com>
115 lines
3.9 KiB
Plaintext
115 lines
3.9 KiB
Plaintext
/obj/effect/decal/cleanable/fuel_pool
|
|
name = "pool of fuel"
|
|
desc = "A pool of flammable fuel. Its probably wise to clean this off before something ignites it..."
|
|
icon_state = "fuel_pool"
|
|
beauty = -50
|
|
clean_type = CLEAN_TYPE_BLOOD
|
|
mouse_opacity = MOUSE_OPACITY_OPAQUE
|
|
resistance_flags = UNACIDABLE | ACID_PROOF | FIRE_PROOF | FLAMMABLE //gross way of doing this but would need to disassemble fire_act call stack otherwise
|
|
/// Maximum amount of hotspots this pool can create before deleting itself
|
|
var/burn_amount = 3
|
|
/// Is this fuel pool currently burning?
|
|
var/burning = FALSE
|
|
/// Type of hotspot fuel pool spawns upon being ignited
|
|
var/hotspot_type = /obj/effect/hotspot
|
|
|
|
/obj/effect/decal/cleanable/fuel_pool/Initialize(mapload, burn_stacks)
|
|
. = ..()
|
|
var/static/list/loc_connections = list(
|
|
COMSIG_TURF_MOVABLE_THROW_LANDED = PROC_REF(ignition_trigger),
|
|
COMSIG_ATOM_ENTERED = PROC_REF(on_entered)
|
|
)
|
|
AddElement(/datum/element/connect_loc, loc_connections)
|
|
for(var/obj/effect/decal/cleanable/fuel_pool/pool in get_turf(src)) //Can't use locate because we also belong to that turf
|
|
if(pool == src)
|
|
continue
|
|
pool.burn_amount = max(min(pool.burn_amount + burn_stacks, 10), 1)
|
|
return INITIALIZE_HINT_QDEL
|
|
|
|
if(burn_stacks)
|
|
burn_amount = max(min(burn_stacks, 10), 1)
|
|
|
|
return INITIALIZE_HINT_LATELOAD
|
|
|
|
// Just in case of fires, do this after mapload.
|
|
/obj/effect/decal/cleanable/fuel_pool/LateInitialize()
|
|
// We don't want to burn down the create_and_destroy test area
|
|
#ifndef UNIT_TESTS
|
|
RegisterSignal(src, COMSIG_ATOM_TOUCHED_SPARKS, PROC_REF(ignition_trigger))
|
|
#endif
|
|
|
|
/obj/effect/decal/cleanable/fuel_pool/fire_act(exposed_temperature, exposed_volume)
|
|
. = ..()
|
|
ignite()
|
|
|
|
/**
|
|
* Ignites the fuel pool. This should be the only way to ignite fuel pools.
|
|
*/
|
|
/obj/effect/decal/cleanable/fuel_pool/proc/ignite()
|
|
if(burning)
|
|
return
|
|
burning = TRUE
|
|
burn_process()
|
|
|
|
/**
|
|
* Spends 1 burn_amount and spawns a hotspot. If burn_amount is equal to 0, deletes the fuel pool.
|
|
* Else, queues another call of this proc upon hotspot getting deleted and ignites other fuel pools around itself after 0.5 seconds.
|
|
* THIS SHOULD NOT BE CALLED DIRECTLY.
|
|
*/
|
|
/obj/effect/decal/cleanable/fuel_pool/proc/burn_process()
|
|
SIGNAL_HANDLER
|
|
|
|
burn_amount -= 1
|
|
var/obj/effect/hotspot/hotspot = new hotspot_type(get_turf(src))
|
|
addtimer(CALLBACK(src, PROC_REF(ignite_others)), 0.5 SECONDS)
|
|
|
|
if(!burn_amount)
|
|
qdel(src)
|
|
return
|
|
|
|
RegisterSignal(hotspot, COMSIG_QDELETING, PROC_REF(burn_process))
|
|
|
|
/**
|
|
* Ignites other oil pools around itself.
|
|
*/
|
|
/obj/effect/decal/cleanable/fuel_pool/proc/ignite_others()
|
|
for(var/obj/effect/decal/cleanable/fuel_pool/oil in range(1, get_turf(src)))
|
|
oil.ignite()
|
|
|
|
/obj/effect/decal/cleanable/fuel_pool/bullet_act(obj/projectile/hit_proj)
|
|
. = ..()
|
|
if(hit_proj.damage > 0)
|
|
ignite()
|
|
log_combat(hit_proj.firer, src, "used [hit_proj] to ignite")
|
|
|
|
/obj/effect/decal/cleanable/fuel_pool/attackby(obj/item/item, mob/user, list/modifiers, list/attack_modifiers)
|
|
if(item.ignition_effect(src, user))
|
|
ignite()
|
|
log_combat(user, src, "used [item] to ignite")
|
|
return ..()
|
|
|
|
/obj/effect/decal/cleanable/fuel_pool/proc/on_entered(datum/source, atom/movable/entered_atom)
|
|
SIGNAL_HANDLER
|
|
|
|
if(!entered_atom.throwing) // don't light from things being thrown over us, we handle that somewhere else
|
|
ignition_trigger(source = src, enflammable_atom = entered_atom)
|
|
|
|
/obj/effect/decal/cleanable/fuel_pool/proc/ignition_trigger(datum/source, atom/movable/enflammable_atom)
|
|
SIGNAL_HANDLER
|
|
|
|
if(isitem(enflammable_atom))
|
|
var/obj/item/enflamed_item = enflammable_atom
|
|
if(enflamed_item.get_temperature() >= FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
|
|
ignite()
|
|
return
|
|
else if(isliving(enflammable_atom))
|
|
var/mob/living/enflamed_liver = enflammable_atom
|
|
if(enflamed_liver.on_fire)
|
|
ignite()
|
|
else if(istype(enflammable_atom, /obj/effect/particle_effect/sparks))
|
|
ignite()
|
|
|
|
|
|
/obj/effect/decal/cleanable/fuel_pool/hivis
|
|
icon_state = "fuel_pool_hivis"
|