diff --git a/code/ZAS/Fire.dm b/code/ZAS/Fire.dm index 1cef691f933..11207ca8ce3 100644 --- a/code/ZAS/Fire.dm +++ b/code/ZAS/Fire.dm @@ -9,12 +9,26 @@ Fill rest with super hot gas from separated canisters, they should be about 125C Attach to transfer valve and open. BOOM. */ +/atom + var/autoignition_temperature = 0 // In Kelvin. 0 = Not flammable + var/on_fire=0 + var/fire_dmi = 'icons/effects/fire.dmi' + var/fire_sprite = "fire" + var/ashtype = /obj/effect/decal/cleanable/ash +/atom/proc/ignite(var/temperature) + on_fire=1 + visible_message("\The [src] bursts into flame!") + overlays += image(fire_dmi,fire_sprite) + spawn(rand(3,10) SECONDS) + if(!on_fire) + return + new ashtype(src.loc) + qdel(src) -//Some legacy definitions so fires can be started. -atom/proc/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) - return null - +/atom/proc/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) + if(autoignition_temperature && !on_fire && exposed_temperature > autoignition_temperature) + ignite(exposed_temperature) turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 16551c819d9..ce7506770ad 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -240,9 +240,6 @@ its easier to just keep the beam vertical. /atom/proc/blob_act() return -/atom/proc/fire_act() - return - /atom/proc/hitby(atom/movable/AM as mob|obj) if (density) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 1dd45d4063b..cf8ae5220d9 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -227,13 +227,10 @@ icon = 'icons/obj/doors/Doorplasma.dmi' mineral = "plasma" -/obj/machinery/door/airlock/plasma/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) - if(exposed_temperature > 300) - PlasmaBurn(exposed_temperature) + autoignition_temperature = 300 -/obj/machinery/door/airlock/plasma/proc/ignite(exposed_temperature) - if(exposed_temperature > 300) - PlasmaBurn(exposed_temperature) +/obj/machinery/door/airlock/plasma/ignite(temperature) + PlasmaBurn(temperature) /obj/machinery/door/airlock/plasma/proc/PlasmaBurn(temperature) for(var/turf/simulated/floor/target_tile in range(2,loc)) diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm index 817a3603e84..7aba3dc25f1 100755 --- a/code/game/machinery/igniter.dm +++ b/code/game/machinery/igniter.dm @@ -89,11 +89,11 @@ /obj/machinery/sparker/attack_ai() if (src.anchored) - return src.ignite() + return src.spark() else return -/obj/machinery/sparker/proc/ignite() +/obj/machinery/sparker/proc/spark() if (!(powered())) return @@ -116,7 +116,7 @@ if(stat & (BROKEN|NOPOWER)) ..(severity) return - ignite() + spark() ..(severity) /obj/machinery/ignition_switch/attack_ai(mob/user as mob) @@ -143,7 +143,7 @@ for(var/obj/machinery/sparker/M in world) if (M.id == src.id) spawn( 0 ) - M.ignite() + M.spark() for(var/obj/machinery/igniter/M in world) if(M.id == src.id) diff --git a/code/game/objects/items/weapons/storage/bible.dm b/code/game/objects/items/weapons/storage/bible.dm index 36eb8ca8115..aa98d59ead6 100644 --- a/code/game/objects/items/weapons/storage/bible.dm +++ b/code/game/objects/items/weapons/storage/bible.dm @@ -9,11 +9,20 @@ var/mob/affecting = null var/deity_name = "Christ" + autoignition_temperature = 522 // Kelvin + + suicide_act(mob/user) + viewers(user) << "\red [user] is farting lightly on the [src.name]! It looks like \he's trying to commit suicide!" + return (user.death(1)) + + /obj/item/weapon/storage/bible/booze name = "bible" desc = "To be applied to the head repeatedly." icon_state ="bible" + autoignition_temperature = 0 // Not actually paper + /obj/item/weapon/storage/bible/booze/New() ..() new /obj/item/weapon/reagent_containers/food/drinks/cans/beer(src) diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index 544875d6018..a4feda4b747 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -26,6 +26,9 @@ item_state = "syringe_kit" foldable = /obj/item/stack/sheet/cardboard //BubbleWrap + autoignition_temperature = 522 // Kelvin + + /obj/item/weapon/storage/box/large name = "large box" desc = "You could build a fort with this." @@ -36,8 +39,10 @@ storage_slots = 21 max_combined_w_class = 42 // 21*2 + autoignition_temperature = 530 // Kelvin -/obj/item/weapon/storage/box/surveillance/ + +/obj/item/weapon/storage/box/surveillance name = "\improper DromedaryCo packet" desc = "A packet of six imported DromedaryCo cancer sticks. A label on the packaging reads, \"Wouldn't a slow death make a change?\"" icon = 'icons/obj/cigarettes.dmi' @@ -52,7 +57,7 @@ for(var/i = 1 to 5) new /obj/item/device/camera_bug(src) -/obj/item/weapon/storage/box/survival/ +/obj/item/weapon/storage/box/survival New() ..() contents = list() diff --git a/code/game/objects/structures/fullwindow.dm b/code/game/objects/structures/fullwindow.dm index 163247c4d02..fe77eaabc29 100644 --- a/code/game/objects/structures/fullwindow.dm +++ b/code/game/objects/structures/fullwindow.dm @@ -56,10 +56,6 @@ shardtype = /obj/item/weapon/shard/plasma health = 120 -/obj/structure/window/full/plasmabasic/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) - if(exposed_temperature > T0C + 32000) - hit(round(exposed_volume / 1000), 0) - ..() /obj/structure/window/full/plasmareinforced name = "reinforced plasma window" @@ -70,8 +66,6 @@ reinf = 1 health = 160 -/obj/structure/window/full/plasmareinforced/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) - return /obj/structure/window/full/reinforced name = "reinforced window" diff --git a/code/game/turfs/simulated/walls_mineral.dm b/code/game/turfs/simulated/walls_mineral.dm index c07b803399c..e6052dec862 100644 --- a/code/game/turfs/simulated/walls_mineral.dm +++ b/code/game/turfs/simulated/walls_mineral.dm @@ -118,7 +118,7 @@ if(exposed_temperature > 300) PlasmaBurn(exposed_temperature) -/turf/simulated/wall/mineral/plasma/proc/ignite(exposed_temperature) +/turf/simulated/wall/mineral/plasma/ignite(exposed_temperature) if(exposed_temperature > 300) PlasmaBurn(exposed_temperature) diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm index 325d2709ea0..c8d2c29e92c 100644 --- a/code/modules/assembly/bomb.dm +++ b/code/modules/assembly/bomb.dm @@ -65,7 +65,7 @@ if(!src) return if(status) - bombtank.ignite() //if its not a dud, boom (or not boom if you made shitty mix) the ignite proc is below, in this file + bombtank.detonate() //if its not a dud, boom (or not boom if you made shitty mix) the ignite proc is below, in this file else bombtank.release() @@ -112,7 +112,7 @@ R.update_icon() return -/obj/item/weapon/tank/proc/ignite() //This happens when a bomb is told to explode +/obj/item/weapon/tank/proc/detonate() //This happens when a bomb is told to explode var/fuel_moles = air_contents.toxins + air_contents.oxygen/6 var/strength = 1 diff --git a/code/modules/events/tgevents/spacevine.dm b/code/modules/events/tgevents/spacevine.dm index 4400e787bf1..2ebf4f12d26 100644 --- a/code/modules/events/tgevents/spacevine.dm +++ b/code/modules/events/tgevents/spacevine.dm @@ -263,6 +263,4 @@ return return -/obj/effect/spacevine/temperature_expose(null, temp, volume) //hotspots kill vines - del src diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index b9c95fc6486..ec39b53741e 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -20,6 +20,8 @@ opacity = 1 var/health = 50 + autoignition_temperature = AUTOIGNITION_WOOD + /obj/structure/bookcase/initialize() for(var/obj/item/I in loc) if(istype(I, /obj/item/weapon/book)) @@ -149,6 +151,9 @@ w_class = 3 //upped to three because books are, y'know, pretty big. (and you could hide them inside eachother recursively forever) flags = FPRINT | TABLEPASS attack_verb = list("bashed", "whacked", "educated") + + autoignition_temperature = AUTOIGNITION_PAPER + var/dat // Actual page content var/due_date = 0 // Game time in 1/10th seconds var/author // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index 317e4695c9c..5d5e12c35f7 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -37,7 +37,7 @@ var/tod = null // Time of death var/update_slimes = 1 - var/on_fire = 0 //The "Are we on fire?" var + on_fire = 0 //The "Are we on fire?" var var/fire_stacks = 0 //Tracks how many stacks of fire we have on, max is usually 20 var/specialsauce = 0 //Has this person consumed enough special sauce? IF so they're a ticking time bomb of death. var/implanting = 0 //Used for the mind-slave implant diff --git a/code/modules/paperwork/folders.dm b/code/modules/paperwork/folders.dm index 379377072bc..69edffb495b 100644 --- a/code/modules/paperwork/folders.dm +++ b/code/modules/paperwork/folders.dm @@ -6,6 +6,8 @@ w_class = 2 pressure_resistance = 2 + autoignition_temperature = 522 // Kelvin + /obj/item/weapon/folder/blue desc = "A blue folder." icon_state = "folder_blue" diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index c8f1d14a5e0..ba54ef5c0f1 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -16,7 +16,8 @@ pressure_resistance = 1 slot_flags = SLOT_HEAD body_parts_covered = HEAD - attack_verb = list("") + attack_verb = list("slapped") + autoignition_temperature = AUTOIGNITION_PAPER var/info //What's actually written on the paper. var/info_links //A different version of the paper which includes html links at fields and EOF diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index 2ead39a559a..7ee5d21beb2 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -11,6 +11,19 @@ var/amount = 30 //How much paper is in the bin. var/list/papers = new/list() //List of papers put in the bin for reference. + autoignition_temperature = 519.15 // Kelvin + +/obj/item/weapon/paper_bin/ignite(var/temperature) + on_fire=1 + visible_message("\The [src]'s paper bursts into flame!") + overlays += fire_sprite + spawn(rand(3,10) SECONDS) + if(!on_fire) + return + new ashtype(src.loc) + papers=0 + amount=0 + update_icon() /obj/item/weapon/paper_bin/MouseDrop(mob/user as mob) if((user == usr && (!( usr.restrained() ) && (!( usr.stat ) && (usr.contents.Find(src) || in_range(src, usr)))))) diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 8e7eb00513c..c48bd80ccbe 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -27,8 +27,11 @@ icon_state = "photo" item_state = "paper" w_class = 1.0 - var/icon/img //Big photo image - var/scribble //Scribble on the back. + var/icon/img //Big photo image + var/scribble //Scribble on the back. + + autoignition_temperature = 530 // Kelvin + /obj/item/weapon/photo/attack_self(mob/user as mob) examine() diff --git a/code/setup.dm b/code/setup.dm index c63f0c9bc2d..64568ac149c 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -13,6 +13,9 @@ #define O2STANDARD 0.21 #define N2STANDARD 0.79 +#define AUTOIGNITION_WOOD 573.15 +#define AUTOIGNITION_PAPER 519.15 + #define MOLES_O2STANDARD MOLES_CELLSTANDARD*O2STANDARD // O2 standard value (21%) #define MOLES_N2STANDARD MOLES_CELLSTANDARD*N2STANDARD // N2 standard value (79%) @@ -906,3 +909,4 @@ var/list/RESTRICTED_CAMERA_NETWORKS = list( //Those networks can only be accesse #define IS_VOX 2 #define IS_SKRELL 3 #define IS_UNATHI 4 +