Merge pull request #11078 from Fox-McCloud/goonchem-reagent-temperature

[Goonchem] Reagent Temperature and Pyrotechnics
This commit is contained in:
variableundefined
2019-03-24 17:50:07 +08:00
committed by GitHub
84 changed files with 744 additions and 343 deletions
+1
View File
@@ -684,6 +684,7 @@
wither()
/obj/structure/spacevine/temperature_expose(null, temp, volume)
..()
var/override = 0
for(var/datum/spacevine_mutation/SM in mutations)
override += SM.process_temperature(src, temp, volume)
@@ -106,17 +106,6 @@
return FALSE
/obj/item/reagent_containers/food/drinks/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/clothing/mask/cigarette)) //ciggies are weird
return FALSE
if(is_hot(I))
if(reagents)
reagents.chem_temp += 15
to_chat(user, "<span class='notice'>You heat [src] with [I].</span>")
reagents.handle_reactions()
else
return ..()
/obj/item/reagent_containers/food/drinks/examine(mob/user)
if(!..(user, 1))
return
@@ -27,7 +27,7 @@
else
..()
/obj/item/reagent_containers/food/drinks/drinkingglass/fire_act()
/obj/item/reagent_containers/food/drinks/drinkingglass/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
if(!reagents.total_volume)
return
..()
@@ -51,7 +51,7 @@
if(A.volume >= 5 && A.alcohol_perc >= 0.35) //Only an approximation to if something's flammable but it will do
return TRUE
/obj/item/reagent_containers/food/drinks/drinkingglass/shotglass/fire_act(global_overlay = FALSE)
/obj/item/reagent_containers/food/drinks/drinkingglass/shotglass/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = FALSE)
if(!isShotFlammable() || burn_state == ON_FIRE) //You can't light a shot that's not flammable!
return
..()
+1 -2
View File
@@ -151,5 +151,4 @@
/obj/item/reagent_containers/food/snacks/grown/cherry_bomb/proc/prime()
icon_state = "cherry_bomb_lit"
playsound(src, 'sound/goonstation/misc/fuse.ogg', seed.potency, 0)
reagents.chem_temp = 1000 //Sets off the black powder
reagents.handle_reactions()
reagents.set_reagent_temp(1000) //Sets off the black powder
+2 -1
View File
@@ -153,7 +153,8 @@
Burn()
processing_objects.Add(src)
/obj/structure/bonfire/fire_act(exposed_temperature, exposed_volume)
/obj/structure/bonfire/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
..()
StartBurning()
/obj/structure/bonfire/Crossed(atom/movable/AM)
+1 -1
View File
@@ -52,7 +52,7 @@
F.attackby(OB, AM)
return ..()
/obj/item/stack/ore/fire_act()
/obj/item/stack/ore/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
..()
if(isnull(refined_type))
return
+1 -1
View File
@@ -4,7 +4,7 @@
#define HEAT_DAMAGE_LEVEL_1 2 //Amount of damage applied when your body temperature just passes the 360.15k safety point
#define HEAT_DAMAGE_LEVEL_2 3 //Amount of damage applied when your body temperature passes the 400K point
#define HEAT_DAMAGE_LEVEL_3 10 //Amount of damage applied when your body temperature passes the 1000K point
#define HEAT_DAMAGE_LEVEL_3 5 //Amount of damage applied when your body temperature passes the 1000K point
#define COLD_DAMAGE_LEVEL_1 0.5 //Amount of damage applied when your body temperature just passes the 260.15k safety point
#define COLD_DAMAGE_LEVEL_2 1.5 //Amount of damage applied when your body temperature passes the 200K point
@@ -65,9 +65,9 @@ var/const/MAX_ACTIVE_TIME = 400
return
/obj/item/clothing/mask/facehugger/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
..()
if(exposed_temperature > 300)
Die()
return
/obj/item/clothing/mask/facehugger/equipped(mob/M)
Attach(M)
@@ -513,3 +513,12 @@ emp_act
return TRUE
if(check_mask && wear_mask && (wear_mask.flags_cover & MASKCOVERSMOUTH))
return TRUE
/mob/living/carbon/human/proc/reagent_safety_check(hot = TRUE)
if(wear_mask)
to_chat(src, "<span class='danger'>Your [wear_mask.name] protects you from the [hot ? "hot" : "cold"] liquid!</span>")
return FALSE
if(head)
to_chat(src, "<span class='danger'>Your [head.name] protects you from the [hot ? "hot" : "cold"] liquid!</span>")
return FALSE
return TRUE
+2 -1
View File
@@ -179,7 +179,8 @@
var/turf/location = get_turf(src)
location.hotspot_expose(700, 50, 1)
/mob/living/fire_act()
/mob/living/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
..()
adjust_fire_stacks(3)
IgniteMob()
@@ -230,7 +230,7 @@
if(on_fire)
overlays += image("icon"='icons/mob/OnFire.dmi', "icon_state"="Generic_mob_burning")
/mob/living/silicon/robot/fire_act()
/mob/living/silicon/robot/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
if(!on_fire) //Silicons don't gain stacks from hotspots, but hotspots can ignite them
IgniteMob()
+1 -1
View File
@@ -401,7 +401,7 @@
add_fingerprint(user)
/obj/item/paper/fire_act()
/obj/item/paper/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
..()
if(burn_state >= FLAMMABLE) //Only render paper that's burnable to be hard to read.
info = "[stars(info)]"
+1 -1
View File
@@ -12,7 +12,7 @@
var/amount = 30 //How much paper is in the bin.
var/list/papers = list() //List of papers put in the bin for reference.
/obj/item/paper_bin/fire_act()
/obj/item/paper_bin/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
if(!amount)
return
..()
+1
View File
@@ -586,6 +586,7 @@
// called when on fire
/obj/machinery/light/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
..()
if(prob(max(0, exposed_temperature - 673))) //0% at <400C, 100% at >500C
broken()
+1 -2
View File
@@ -25,8 +25,7 @@
for(var/datum/reagents/R in reactants)
R.trans_to(splash_holder, R.total_volume, threatscale, 1, 1)
total_temp += R.chem_temp
splash_holder.chem_temp = (total_temp/reactants.len) + extra_heat // Average temperature of reagents + extra heat.
splash_holder.handle_reactions() // React them now.
splash_holder.set_reagent_temp((total_temp / reactants.len) + extra_heat) // Average temperature of reagents + extra heat.
if(splash_holder.total_volume && affected_range >= 0) //The possible reactions didnt use up all reagents, so we spread it around.
var/datum/effect_system/steam_spread/steam = new /datum/effect_system/steam_spread()
+59 -5
View File
@@ -9,7 +9,7 @@ var/const/INGEST = 2
var/total_volume = 0
var/maximum_volume = 100
var/atom/my_atom = null
var/chem_temp = 300
var/chem_temp = T20C
var/list/datum/reagent/addiction_list = new/list()
var/flags
@@ -166,6 +166,30 @@ var/const/INGEST = 2
handle_reactions()
return amount
/datum/reagents/proc/set_reagent_temp(new_temp = T0C, react = TRUE)
chem_temp = new_temp
if(react)
temperature_react()
handle_reactions()
/datum/reagents/proc/temperature_react() //Calls the temperature reaction procs without changing the temp.
for(var/datum/reagent/current_reagent in reagent_list)
current_reagent.reaction_temperature(chem_temp, 100)
/datum/reagents/proc/temperature_reagents(exposed_temperature, divisor = 35, change_cap = 15) //This is what you use to change the temp of a reagent holder.
//Do not manually change the reagent unless you know what youre doing.
var/difference = abs(chem_temp - exposed_temperature)
var/change = min(max((difference / divisor), 1), change_cap)
if(exposed_temperature > chem_temp)
chem_temp += change
else if(exposed_temperature < chem_temp)
chem_temp -= change
chem_temp = max(min(chem_temp, 10000), 0) //Cap for the moment.
temperature_react()
handle_reactions()
/datum/reagents/proc/trans_id_to(obj/target, reagent, amount=1, preserve_data=1)//Not sure why this proc didn't exist before. It does now! /N
if(!target)
return
@@ -194,8 +218,7 @@ var/const/INGEST = 2
/datum/reagents/proc/metabolize(mob/living/M)
if(M)
chem_temp = M.bodytemperature
handle_reactions()
set_reagent_temp(M.bodytemperature)
// a bitfield filled in by each reagent's `on_mob_life` to find out which states to update
var/update_flags = STATUS_UPDATE_NONE
@@ -531,6 +554,35 @@ var/const/INGEST = 2
react_type = "OBJ"
else
return
if(react_type == "LIVING" && ishuman(A))
var/mob/living/carbon/human/H = A
if(method == TOUCH)
var/obj/item/organ/external/head/affecting = H.get_organ("head")
if(affecting)
if(chem_temp > H.dna.species.heat_level_1)
if(H.reagent_safety_check())
to_chat(H, "<span class='danger'>You are scalded by the hot chemicals!</span>")
affecting.receive_damage(0, round(log(chem_temp / 50) * 10))
H.emote("scream")
H.adjust_bodytemperature(min(max((chem_temp - T0C) - 20, 5), 500))
else if(chem_temp < H.dna.species.cold_level_1)
if(H.reagent_safety_check(FALSE))
to_chat(H, "<span class='danger'>You are frostbitten by the freezing cold chemicals!</span>")
affecting.receive_damage(0, round(log(T0C - chem_temp / 50) * 10))
H.emote("scream")
H.adjust_bodytemperature(- min(max(T0C - chem_temp - 20, 5), 500))
if(method == INGEST)
if(chem_temp > H.dna.species.heat_level_1)
to_chat(H, "<span class='danger'>You scald yourself trying to consume the boiling hot substance!</span>")
H.adjustFireLoss(7)
H.adjust_bodytemperature(min(max((chem_temp - T0C) - 20, 5), 700))
else if(chem_temp < H.dna.species.cold_level_1)
to_chat(H, "<span class='danger'>You frostburn yourself trying to consume the freezing cold substance!</span>")
H.adjustFireLoss(7)
H.adjust_bodytemperature(- min(max((T0C - chem_temp) - 20, 5), 700))
for(var/datum/reagent/R in reagent_list)
switch(react_type)
if("LIVING")
@@ -548,14 +600,14 @@ var/const/INGEST = 2
var/amt = list_reagents[r_id]
add_reagent(r_id, amt, data)
/datum/reagents/proc/add_reagent(reagent, amount, list/data=null, reagtemp = 300, no_react = 0)
/datum/reagents/proc/add_reagent(reagent, amount, list/data=null, reagtemp = T20C, no_react = 0)
if(!isnum(amount))
return 1
update_total()
if(total_volume + amount > maximum_volume) amount = (maximum_volume - total_volume) //Doesnt fit in. Make it disappear. Shouldnt happen. Will happen.
if(amount <= 0)
return 0
chem_temp = round(((amount * reagtemp) + (total_volume * chem_temp)) / (total_volume + amount)) //equalize with new chems
chem_temp = (chem_temp * total_volume + reagtemp * amount) / (total_volume + amount) //equalize with new chems
for(var/A in reagent_list)
@@ -567,6 +619,7 @@ var/const/INGEST = 2
my_atom.on_reagent_change()
R.on_merge(data)
if(!no_react)
temperature_react()
handle_reactions()
return 0
@@ -585,6 +638,7 @@ var/const/INGEST = 2
if(my_atom)
my_atom.on_reagent_change()
if(!no_react)
temperature_react()
handle_reactions()
return 0
else
@@ -7,8 +7,7 @@
use_power = IDLE_POWER_USE
idle_power_usage = 40
var/obj/item/reagent_containers/beaker = null
var/desired_temp = 300
var/heater_coefficient = 0.03
var/desired_temp = T0C
var/on = FALSE
/obj/machinery/chem_heater/New()
@@ -19,34 +18,22 @@
component_parts += new /obj/item/stock_parts/console_screen(null)
RefreshParts()
/obj/machinery/chem_heater/upgraded/New()
..()
component_parts = list()
component_parts += new /obj/item/circuitboard/chem_heater(null)
component_parts += new /obj/item/stock_parts/micro_laser/ultra(null)
component_parts += new /obj/item/stock_parts/console_screen(null)
RefreshParts()
/obj/machinery/chem_heater/RefreshParts()
heater_coefficient = 0.03
for(var/obj/item/stock_parts/micro_laser/M in component_parts)
heater_coefficient *= M.rating
/obj/machinery/chem_heater/process()
..()
if(stat & NOPOWER)
return
var/state_change = 0
var/state_change = FALSE
if(on)
if(beaker)
if(beaker.reagents.chem_temp > desired_temp)
beaker.reagents.chem_temp += min(-1, max((desired_temp - beaker.reagents.chem_temp) * heater_coefficient, -15))
if(beaker.reagents.chem_temp < desired_temp)
beaker.reagents.chem_temp += max(1, min((desired_temp - beaker.reagents.chem_temp) * heater_coefficient, 15))
beaker.reagents.chem_temp = round(beaker.reagents.chem_temp) //stops stuff like 456.12312312302
beaker.reagents.handle_reactions()
state_change = 1
if(!beaker.reagents.total_volume)
on = FALSE
SSnanoui.update_uis(src)
return
beaker.reagents.temperature_reagents(desired_temp)
beaker.reagents.temperature_reagents(desired_temp)
if(abs(beaker.reagents.chem_temp - desired_temp) <= 3)
on = FALSE
state_change = TRUE
if(state_change)
SSnanoui.update_uis(src)
@@ -54,7 +41,6 @@
/obj/machinery/chem_heater/proc/eject_beaker()
if(beaker)
beaker.forceMove(get_turf(src))
beaker.reagents.handle_reactions()
beaker = null
icon_state = "mixer0b"
on = FALSE
@@ -108,9 +94,11 @@
/obj/machinery/chem_heater/Topic(href, href_list)
if(..())
return 0
return FALSE
if(href_list["toggle_on"])
if(!beaker.reagents.total_volume)
return FALSE
on = !on
. = 1
@@ -122,7 +110,7 @@
var/target = input("Please input the target temperature", name) as num
desired_temp = Clamp(target, 0, 1000)
else
return 0
return FALSE
. = 1
if(href_list["eject_beaker"])
@@ -33,6 +33,9 @@
. = ..()
holder = null
/datum/reagent/proc/reaction_temperature(exposed_temperature, exposed_volume) //By default we do nothing.
return
/datum/reagent/proc/reaction_mob(mob/living/M, method = TOUCH, volume) //Some reagents transfer on touch, others don't; dependent on if they penetrate the skin or not.
if(holder) //for catching rare runtimes
if(method == TOUCH && penetrates_skin)
@@ -1126,7 +1126,7 @@
/datum/reagent/consumable/ethanol/dragons_breath/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == INGEST && prob(20))
if(M.on_fire)
M.adjust_fire_stacks(3)
M.adjust_fire_stacks(6)
/datum/reagent/consumable/ethanol/dragons_breath/on_mob_life(mob/living/M)
var/update_flags = STATUS_UPDATE_NONE
@@ -1148,7 +1148,7 @@
if(prob(2 * volume))
to_chat(M, "<span class='userdanger'>OH GOD OH GOD PLEASE NO!!</b></span>")
if(M.on_fire)
M.adjust_fire_stacks(5)
M.adjust_fire_stacks(20)
if(prob(50))
to_chat(M, "<span class='userdanger'>IT BURNS!!!!</span>")
M.visible_message("<span class='danger'>[M] is consumed in flames!</span>")
@@ -205,6 +205,18 @@
taste_message = "motor oil"
process_flags = ORGANIC | SYNTHETIC
/datum/reagent/oil/reaction_temperature(exposed_temperature, exposed_volume)
if(exposed_temperature > T0C + 600)
var/turf/T = get_turf(holder.my_atom)
holder.my_atom.visible_message("<b>The oil burns!</b>")
fireflash(T, min(max(0, volume / 40), 8))
var/datum/effect_system/smoke_spread/bad/BS = new
BS.set_up(1, 0, T)
BS.start()
if(holder)
holder.add_reagent("ash", round(volume * 0.5))
holder.del_reagent(id)
/datum/reagent/oil/reaction_turf(turf/T, volume)
if(volume >= 3 && !isspaceturf(T) && !locate(/obj/effect/decal/cleanable/blood/oil) in T)
new /obj/effect/decal/cleanable/blood/oil(T)
@@ -29,7 +29,7 @@
/datum/reagent/consumable/drink/apple_pocalypse/on_mob_life(mob/living/M)
if(prob(1))
var/turf/simulated/T = get_turf(M)
goonchem_vortex(T, 0, 2, 1)
goonchem_vortex(T, 1, 0)
to_chat(M, "<span class='notice'>You briefly feel super-massive, like a black hole. Probably just your imagination...</span>")
..()
@@ -119,7 +119,7 @@
/datum/reagent/consumable/drink/grape_granade/on_mob_life(mob/living/M)
if(prob(1))
var/turf/simulated/T = get_turf(M)
goonchem_vortex(T, 1, 1, 2)
goonchem_vortex(T, 0, 0)
M.emote("burp")
to_chat(M, "<span class='notice'>You feel ready to burst! Oh wait, just a burp...</span>")
else if(prob(25))
@@ -1,3 +1,80 @@
/datum/reagent/phlogiston
name = "phlogiston"
id = "phlogiston"
description = "It appears to be liquid fire."
reagent_state = LIQUID
color = "#FFAF00"
process_flags = ORGANIC | SYNTHETIC
var/temp_fire = 4000
var/temp_deviance = 1000
var/size_divisor = 40
var/mob_burning = 6.6 // 33
/datum/reagent/phlogiston/reaction_turf(turf/T, volume)
if(holder.chem_temp <= T0C - 50)
return
var/radius = min(max(0, volume / size_divisor), 8)
fireflash_sm(T, radius, rand(temp_fire - temp_deviance, temp_fire + temp_deviance), 500)
/datum/reagent/phlogiston/reaction_mob(mob/living/M, method = TOUCH, volume)
if(holder.chem_temp <= T0C - 50)
return
M.adjust_fire_stacks(mob_burning)
M.IgniteMob()
if(method == INGEST)
M.adjustFireLoss(min(max(15, volume * 3), 45))
to_chat(M, "<span class='warning'>It burns!</span>")
M.emote("scream")
/datum/reagent/phlogiston/on_mob_life(mob/living/M)
if(holder.chem_temp <= T0C - 50)
return
M.adjust_fire_stacks(0.4)
M.IgniteMob()
return ..()
/datum/reagent/phlogiston/firedust
name = "phlogiston dust"
id = "phlogiston_dust"
description = "And this is solid fire. However that works."
temp_fire = 1500
temp_deviance = 500
size_divisor = 80
mob_burning = 3 // 15
/datum/reagent/napalm
name = "napalm"
id = "napalm"
description = "A highly flammable jellied fuel."
reagent_state = LIQUID
process_flags = ORGANIC | SYNTHETIC
color = "#C86432"
/datum/reagent/napalm/reaction_temperature(exposed_temperature, exposed_volume)
if(exposed_temperature > T0C + 100)
var/radius = min(max(0, volume * 0.15), 8)
fireflash_sm(get_turf(holder.my_atom), radius, rand(3000, 6000), 500)
if(holder)
holder.del_reagent(id)
/datum/reagent/napalm/reaction_turf(turf/T, volume)
if(isspaceturf(T))
return
if(!T.reagents)
T.create_reagents(volume)
T.reagents.add_reagent("napalm", volume)
/datum/reagent/napalm/reaction_mob(mob/living/M, method = TOUCH, volume)
if(method == TOUCH)
if(M.on_fire)
M.adjust_fire_stacks(14)
M.emote("scream")
/datum/reagent/napalm/on_mob_life(mob/living/M)
if(M.on_fire)
M.adjust_fire_stacks(2)
return ..()
/datum/reagent/fuel
name = "Welding fuel"
id = "fuel"
@@ -8,12 +85,54 @@
drink_name = "Glass of welder fuel"
drink_desc = "Unless you are an industrial tool, this is probably not safe for consumption."
taste_message = "mistakes"
process_flags = ORGANIC | SYNTHETIC
var/max_radius = 7
var/min_radius = 0
var/volume_radius_modifier = -0.15
var/volume_radius_multiplier = 0.09
var/explosion_threshold = 100
var/min_explosion_radius = 0
var/max_explosion_radius = 4
var/volume_explosion_radius_multiplier = 0.005
var/volume_explosion_radius_modifier = 0
var/combustion_temp = T0C + 200
/datum/reagent/fuel/on_mob_life(mob/living/M)
if(M.on_fire)
M.adjust_fire_stacks(0.4)
return ..()
/datum/reagent/fuel/reaction_temperature(exposed_temperature, exposed_volume)
if(exposed_temperature > combustion_temp)
if(volume < 1)
if(holder)
holder.del_reagent(id)
return
var/turf/T = get_turf(holder.my_atom)
var/radius = min(max(min_radius, volume * volume_radius_multiplier + volume_radius_modifier), max_radius)
fireflash_sm(T, radius, 2200 + radius * 250, radius * 50)
if(holder && volume >= explosion_threshold)
if(holder.my_atom)
holder.my_atom.visible_message("<span class='danger'>[holder.my_atom] explodes!</span>")
message_admins("Fuel explosion ([holder.my_atom], reagent type: [id]) at [COORD(holder.my_atom.loc)]. Last touched by: [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"].")
log_game("Fuel explosion ([holder.my_atom], reagent type: [id]) at [COORD(holder.my_atom.loc)]. Last touched by: [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"].")
holder.my_atom.investigate_log("A fuel explosion, last touched by [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"], triggered at [COORD(holder.my_atom.loc)].", INVESTIGATE_BOMB)
var/boomrange = min(max(min_explosion_radius, round(volume * volume_explosion_radius_multiplier + volume_explosion_radius_modifier)), max_explosion_radius)
explosion(T, -1, -1, boomrange, 1)
if(holder)
holder.del_reagent(id)
/datum/reagent/fuel/reaction_turf(turf/T, volume) //Don't spill the fuel, or you'll regret it
if(isspaceturf(T))
return
if(!T.reagents)
T.create_reagents(50)
T.reagents.add_reagent("fuel", volume)
/datum/reagent/fuel/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with welding fuel to make them easy to ignite!
if(method == TOUCH)
M.adjust_fire_stacks(volume / 10)
return
..()
if(M.on_fire)
M.adjust_fire_stacks(6)
/datum/reagent/plasma
name = "Plasma"
@@ -23,6 +142,12 @@
color = "#7A2B94"
taste_message = "corporate assets going to waste"
/datum/reagent/plasma/reaction_temperature(exposed_temperature, exposed_volume)
if(exposed_temperature >= T0C + 100)
fireflash(get_turf(holder.my_atom), min(max(0, volume / 10), 8))
if(holder)
holder.del_reagent(id)
/datum/reagent/plasma/on_mob_life(mob/living/M)
var/update_flags = STATUS_UPDATE_NONE
update_flags |= M.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER, FALSE)
@@ -33,10 +158,10 @@
C.adjustPlasma(10)
return ..() | update_flags
/datum/reagent/plasma/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with plasma is stronger than fuel!
/datum/reagent/plasma/reaction_mob(mob/living/M, method = TOUCH, volume)//Splashing people with plasma is stronger than fuel!
if(method == TOUCH)
M.adjust_fire_stacks(volume / 5)
..()
if(M.on_fire)
M.adjust_fire_stacks(6)
/datum/reagent/thermite
@@ -48,11 +173,32 @@
process_flags = ORGANIC | SYNTHETIC
taste_message = "rust"
/datum/reagent/thermite/reaction_turf(turf/simulated/wall/W, volume)
if(volume >= 5 && istype(W))
W.thermite = 1
W.overlays.Cut()
W.overlays = image('icons/effects/effects.dmi', icon_state = "thermite")
/datum/reagent/thermite/reaction_mob(mob/living/M, method= TOUCH, volume)
if(method == TOUCH)
if(M.on_fire)
M.adjust_fire_stacks(20)
/datum/reagent/thermite/reaction_temperature(exposed_temperature, exposed_volume)
var/turf/simulated/S = holder.my_atom
if(!istype(S))
return
if(exposed_temperature >= T0C + 100)
var/datum/reagents/Holder = holder
var/Id = id
var/Volume = volume
Holder.del_reagent(Id)
fireflash_sm(S, 0, rand(20000, 25000) + Volume * 2500, 0, 0, 1)
/datum/reagent/thermite/reaction_turf(turf/simulated/S, volume)
if(istype(S))
if(!S.reagents)
S.create_reagents(volume)
S.reagents.add_reagent("thermite", volume)
S.overlays.Cut()
S.overlays = image('icons/effects/effects.dmi', icon_state = "thermite")
if(S.active_hotspot)
S.reagents.temperature_reagents(S.active_hotspot.temperature, 10, 300)
/datum/reagent/glycerol
name = "Glycerol"
@@ -81,33 +227,24 @@
taste_message = null
/datum/reagent/clf3/on_mob_life(mob/living/M)
var/update_flags = STATUS_UPDATE_NONE
M.adjust_fire_stacks(2)
var/burndmg = max(0.3*M.fire_stacks, 0.3)
update_flags |= M.adjustFireLoss(burndmg, FALSE)
return ..() | update_flags
if(M.on_fire)
M.adjust_fire_stacks(1)
return ..()
/datum/reagent/clf3/reaction_turf(turf/simulated/T, volume)
if(prob(1) && istype(T, /turf/simulated/floor/plating))
var/turf/simulated/floor/plating/F = T
F.ChangeTurf(/turf/space)
if(istype(T, /turf/simulated/floor))
var/turf/simulated/floor/F = T
if(prob(volume/10))
F.make_plating()
if(istype(F, /turf/simulated/floor))
new /obj/effect/hotspot(F)
if(prob(volume/10) && istype(T, /turf/simulated/wall))
var/turf/simulated/wall/W = T
W.ChangeTurf(/turf/simulated/floor)
if(istype(T, /turf/simulated/shuttle))
new /obj/effect/hotspot(T)
/datum/reagent/clf3/reaction_turf(turf/T, volume)
if(volume < 3)
return
var/radius = min((volume - 3) * 0.15, 3)
fireflash_sm(T, radius, 4500 + volume * 500, 350)
/datum/reagent/clf3/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == TOUCH)
M.adjust_fire_stacks(min(volume/5, 10))
/datum/reagent/clf3/reaction_mob(mob/living/M, method = TOUCH, volume)
if(method == TOUCH || method == INGEST)
M.adjust_fire_stacks(10)
M.IgniteMob()
M.bodytemperature += 30
if(method == INGEST)
M.adjustFireLoss(min(max(30, volume * 6), 90))
to_chat(M, "<span class='warning'>It burns!</span>")
M.emote("scream")
/datum/reagent/sorium
name = "Sorium"
@@ -116,6 +253,15 @@
reagent_state = LIQUID
color = "#FFA500"
/datum/reagent/sorium/reaction_turf(turf/T, volume) // oh no
if(prob(75))
return
if(isspaceturf(T))
return
if(!T.reagents)
T.create_reagents(50)
T.reagents.add_reagent("sorium", 5)
/datum/reagent/sorium_vortex
name = "sorium_vortex"
id = "sorium_vortex"
@@ -130,6 +276,15 @@
color = "#800080"
taste_message = "the end of the world"
/datum/reagent/liquid_dark_matter/reaction_turf(turf/T, volume) //Oh gosh, why
if(prob(75))
return
if(isspaceturf(T))
return
if(!T.reagents)
T.create_reagents(50)
T.reagents.add_reagent("liquid_dark_matter", 5)
/datum/reagent/ldm_vortex
name = "LDM Vortex"
id = "ldm_vortex"
@@ -157,6 +312,7 @@
description = "Makes a very bright flash."
reagent_state = LIQUID
color = "#FFFF00"
penetrates_skin = TRUE
/datum/reagent/smoke_powder
name = "Smoke Powder"
@@ -171,42 +327,7 @@
description = "Makes a deafening noise."
reagent_state = LIQUID
color = "#0000FF"
/datum/reagent/phlogiston
name = "Phlogiston"
id = "phlogiston"
description = "Catches you on fire and makes you ignite."
reagent_state = LIQUID
color = "#FF9999"
process_flags = ORGANIC | SYNTHETIC
/datum/reagent/phlogiston/on_mob_life(mob/living/M)
var/update_flags = STATUS_UPDATE_NONE
M.adjust_fire_stacks(1)
var/burndmg = max(0.3*M.fire_stacks, 0.3)
update_flags |= M.adjustFireLoss(burndmg, FALSE)
return ..() | update_flags
/datum/reagent/phlogiston/reaction_mob(mob/living/M, method=TOUCH, volume)
M.adjust_fire_stacks(1)
M.IgniteMob()
..()
/datum/reagent/napalm
name = "Napalm"
id = "napalm"
description = "Very flammable."
reagent_state = LIQUID
color = "#FF9999"
process_flags = ORGANIC | SYNTHETIC
/datum/reagent/napalm/on_mob_life(mob/living/M)
M.adjust_fire_stacks(1)
return ..()
/datum/reagent/napalm/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == TOUCH)
M.adjust_fire_stacks(min(volume/4, 20))
penetrates_skin = TRUE
/datum/reagent/cryostylane
name = "Cryostylane"
@@ -223,11 +344,16 @@
/datum/reagent/cryostylane/on_tick()
if(holder.has_reagent("oxygen"))
holder.remove_reagent("oxygen", 1)
holder.chem_temp -= 10
holder.handle_reactions()
holder.remove_reagent("oxygen", 2)
holder.remove_reagent("cryostylane", 2)
holder.temperature_reagents(holder.chem_temp - 200)
holder.temperature_reagents(holder.chem_temp - 200)
..()
/datum/reagent/cryostylane/reaction_mob(mob/living/M, method = TOUCH, volume)
if(method == TOUCH)
M.ExtinguishMob()
/datum/reagent/cryostylane/reaction_turf(turf/T, volume)
if(volume >= 5)
for(var/mob/living/carbon/slime/M in T)
@@ -248,9 +374,10 @@
/datum/reagent/pyrosium/on_tick()
if(holder.has_reagent("oxygen"))
holder.remove_reagent("oxygen", 1)
holder.chem_temp += 10
holder.handle_reactions()
holder.remove_reagent("oxygen", 2)
holder.remove_reagent("pyrosium", 2)
holder.temperature_reagents(holder.chem_temp + 200)
holder.temperature_reagents(holder.chem_temp + 200)
..()
/datum/reagent/firefighting_foam
@@ -264,8 +391,7 @@
/datum/reagent/firefighting_foam/reaction_mob(mob/living/M, method=TOUCH, volume)
// Put out fire
if(method == TOUCH)
M.adjust_fire_stacks(-(volume / 5)) // more effective than water
M.ExtinguishMob()
M.adjust_fire_stacks(-10) // more effective than water
/datum/reagent/firefighting_foam/reaction_obj(obj/O, volume)
O.extinguish()
@@ -290,6 +416,12 @@
color = "#500064" // rgb: 80, 0, 100
taste_message = "corporate assets going to waste"
/datum/reagent/plasma_dust/reaction_temperature(exposed_temperature, exposed_volume)
if(exposed_temperature >= T0C + 100)
fireflash(get_turf(holder.my_atom), min(max(0, volume / 10), 8))
if(holder)
holder.del_reagent(id)
/datum/reagent/plasma_dust/on_mob_life(mob/living/M)
var/update_flags = STATUS_UPDATE_NONE
update_flags |= M.adjustToxLoss(3, FALSE)
@@ -23,8 +23,7 @@
/datum/reagent/water/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == TOUCH)
// Put out fire
M.adjust_fire_stacks(-(volume / 10))
M.ExtinguishMob()
M.adjust_fire_stacks(-(volume * 0.2))
if(ishuman(M))
var/mob/living/carbon/human/H = M
+13 -12
View File
@@ -65,17 +65,18 @@ var/list/chemical_mob_spawn_nicecritters = list() // and possible friendly mobs
for(var/j = 1, j <= rand(1, 3), j++)
step(C, pick(NORTH,SOUTH,EAST,WEST))
/proc/goonchem_vortex(turf/simulated/T, setting_type, range, pull_times)
for(var/atom/movable/X in orange(range, T))
/proc/goonchem_vortex(turf/T, setting_type, volume)
if(setting_type)
new /obj/effect/temp_visual/implosion(T)
playsound(T, 'sound/effects/whoosh.ogg', 25, 1) //credit to Robinhood76 of Freesound.org for this.
else
new /obj/effect/temp_visual/shockwave(T)
playsound(T, 'sound/effects/bang.ogg', 25, 1)
for(var/atom/movable/X in view(2 + setting_type + (volume > 30 ? 1 : 0), T))
if(istype(X, /obj/effect))
continue //stop pulling smoke and hotspots please
if(istype(X, /atom/movable))
if((X) && !X.anchored && X.move_resist <= MOVE_FORCE_DEFAULT)
if(setting_type)
playsound(T, 'sound/effects/bang.ogg', 25, 1)
for(var/i = 0, i < pull_times, i++)
step_away(X,T)
else
playsound(T, 'sound/effects/whoosh.ogg', 25, 1) //credit to Robinhood76 of Freesound.org for this.
for(var/i = 0, i < pull_times, i++)
step_towards(X,T)
if(X && !X.anchored && X.move_resist <= MOVE_FORCE_DEFAULT)
if(setting_type)
X.throw_at(T, 20 + round(volume * 2), 1 + round(volume / 10))
else
X.throw_at(get_edge_target_turf(T, get_dir(T, X)), 20 + round(volume * 2), 1 + round(volume / 10))
@@ -229,7 +229,7 @@
id = "flamingmoe"
result = "flamingmoe"
required_reagents = list("vodka" = 1, "gin" = 1, "cognac" = 1, "tequila" = 1, "salglu_solution" = 1) //Close enough
min_temp = 374 //Fire makes it good!
min_temp = T0C + 100 //Fire makes it good!
result_amount = 5
mix_sound = 'sound/goonstation/misc/drinkfizz.ogg'
mix_message = "The concoction bursts into flame!"
@@ -701,7 +701,7 @@
id = "applejack"
result = "applejack"
required_reagents = list("cider" = 2)
max_temp = 270
max_temp = T0C
result_amount = 1
mix_message = "The drink darkens as the water freezes, leaving the concentrated cider behind."
mix_sound = null
@@ -15,13 +15,12 @@
result_amount = 5
mix_message = "The mixture violently reacts, leaving behind a few crystalline shards."
mix_sound = 'sound/goonstation/effects/crystalshatter.ogg'
min_temp = 390
min_temp = T0C + 100
/datum/chemical_reaction/crank/on_reaction(datum/reagents/holder, created_volume)
var/turf/T = get_turf(holder.my_atom)
for(var/turf/turf in range(1,T))
new /obj/effect/hotspot(turf)
explosion(T,0,0,2)
fireflash(holder.my_atom, 1)
explosion(T, 0, 0, 2)
/datum/chemical_reaction/krokodil
name = "Krokodil"
@@ -30,7 +29,7 @@
required_reagents = list("diphenhydramine" = 1, "morphine" = 1, "cleaner" = 1, "potassium" = 1, "phosphorus" = 1, "fuel" = 1)
result_amount = 6
mix_message = "The mixture dries into a pale blue powder."
min_temp = 380
min_temp = T0C + 100
mix_sound = 'sound/goonstation/misc/fuse.ogg'
/datum/chemical_reaction/methamphetamine
@@ -39,7 +38,7 @@
result = "methamphetamine"
required_reagents = list("ephedrine" = 1, "iodine" = 1, "phosphorus" = 1, "hydrogen" = 1)
result_amount = 4
min_temp = 374
min_temp = T0C + 100
/datum/chemical_reaction/methamphetamine/on_reaction(datum/reagents/holder)
var/turf/T = get_turf(holder.my_atom)
@@ -57,7 +56,7 @@
result = "bath_salts"
required_reagents = list("????" = 1, "saltpetre" = 1, "msg" = 1, "cleaner" = 1, "enzyme" = 1, "mugwort" = 1, "mercury" = 1)
result_amount = 6
min_temp = 374
min_temp = T0C + 100
mix_message = "Tiny cubic crystals precipitate out of the mixture. Huh."
mix_sound = 'sound/goonstation/misc/fuse.ogg'
@@ -124,7 +124,7 @@
result = "corn_syrup"
required_reagents = list("corn_starch" = 1, "sacid" = 1)
result_amount = 2
min_temp = 374
min_temp = T0C + 100
mix_message = "The mixture forms a viscous, clear fluid!"
/datum/chemical_reaction/vhfcs
@@ -176,7 +176,7 @@
result = "hydrogenated_soybeanoil"
required_reagents = list("soybeanoil" = 1, "hydrogen" = 1)
result_amount = 2
min_temp = 520
min_temp = T0C + 250
mix_message = "The mixture emits a burnt, oily smell."
/datum/chemical_reaction/meatslurry
@@ -194,7 +194,7 @@
result = "gravy"
required_reagents = list("porktonium" = 1, "corn_starch" = 1, "milk" = 1)
result_amount = 3
min_temp = 374
min_temp = T0C + 100
mix_message = "The substance thickens and takes on a meaty odor."
/datum/chemical_reaction/beff
@@ -221,7 +221,7 @@
result = "enzyme"
required_reagents = list("vomit" = 1, "sugar" = 1)
result_amount = 2
min_temp = 750
min_temp = T0C + 480
mix_message = "The mixture emits a horrible smell as you heat up the contents. Luckily, enzymes don't stink."
mix_sound = 'sound/goonstation/misc/fuse.ogg'
@@ -231,6 +231,6 @@
result = "enzyme"
required_reagents = list("green_vomit" = 1, "sugar" = 1)
result_amount = 2
min_temp = 750
min_temp = T0C + 480
mix_message = "The mixture emits a horrible smell as you heat up the contents. Luckily, enzymes don't stink."
mix_sound = 'sound/goonstation/misc/fuse.ogg'
@@ -50,7 +50,7 @@
required_reagents = list("ash" = 1, "sodiumchloride" = 1)
result_amount = 2
mix_message = "The mixture yields a fine black powder."
min_temp = 380
min_temp = T0C + 100
mix_sound = 'sound/goonstation/misc/fuse.ogg'
/datum/chemical_reaction/silver_sulfadiazine
@@ -92,7 +92,7 @@
result = "calomel"
required_reagents = list("mercury" = 1, "chlorine" = 1)
result_amount = 2
min_temp = 374
min_temp = T0C + 100
mix_message = "Stinging vapors rise from the solution."
/datum/chemical_reaction/potass_iodide
@@ -135,7 +135,7 @@
result = "perfluorodecalin"
required_reagents = list("hydrogen" = 1, "fluorine" = 1, "oil" = 1)
result_amount = 3
min_temp = 370
min_temp = T0C + 100
mix_message = "The mixture rapidly turns into a dense pink liquid."
mix_sound = 'sound/goonstation/misc/drinkfizz.ogg'
@@ -195,7 +195,7 @@
result = null
required_reagents = list("strange_reagent" = 1, "synthflesh" = 1, "blood" = 1)
result_amount = 3
min_temp = 374
min_temp = T0C + 100
/datum/chemical_reaction/life/on_reaction(datum/reagents/holder, created_volume)
chemical_mob_spawn(holder, 1, "Life")
@@ -263,7 +263,7 @@
result = "liquid_solder"
required_reagents = list("ethanol" = 1, "copper" = 1, "silver" = 1)
result_amount = 3
min_temp = 370
min_temp = T0C + 100
mix_message = "The solution gently swirls with a metallic sheen."
/datum/chemical_reaction/corazone
@@ -74,7 +74,7 @@
result = "diethylamine"
required_reagents = list ("ammonia" = 1, "ethanol" = 1)
result_amount = 2
min_temp = 374
min_temp = T0C + 100
mix_message = "A horrible smell pours forth from the mixture."
/datum/chemical_reaction/space_cleaner
@@ -98,7 +98,7 @@
id = "plastic_polymers"
result = null
required_reagents = list("oil" = 5, "sacid" = 2, "ash" = 3)
min_temp = 374
min_temp = T0C + 100
result_amount = 1
/datum/chemical_reaction/plastic_polymers/on_reaction(datum/reagents/holder, created_volume)
@@ -171,16 +171,6 @@
mix_message = "The mixture bubbles and gives off an unpleasant medicinal odor."
mix_sound = 'sound/goonstation/misc/drinkfizz.ogg'
/datum/chemical_reaction/ash
name = "Ash"
id = "ash"
result = "ash"
required_reagents = list("oil" = 1)
result_amount = 0.5
min_temp = 480
mix_sound = null
no_message = 1
/datum/chemical_reaction/colorful_reagent
name = "colorful_reagent"
id = "colorful_reagent"
@@ -195,7 +185,7 @@
result = null
required_reagents = list("nutriment" = 1, "colorful_reagent" = 1, "strange_reagent" = 1, "blood" = 1)
result_amount = 3
min_temp = 374
min_temp = T0C + 100
/datum/chemical_reaction/corgium/on_reaction(datum/reagents/holder, created_volume)
var/location = get_turf(holder.my_atom)
@@ -208,7 +198,7 @@
result = null
required_reagents = list("egg" = 1, "colorful_reagent" = 1, "chicken_soup" = 1, "strange_reagent" = 1, "blood" = 1)
result_amount = 5
min_temp = 374
min_temp = T0C + 100
mix_message = "The substance turns an airy sky-blue and foams up into a new shape."
/datum/chemical_reaction/flaptonium/on_reaction(datum/reagents/holder, created_volume)
@@ -244,7 +234,7 @@
id = "soapification"
result = null
required_reagents = list("liquidgibs" = 10, "lye" = 10) // requires two scooped gib tiles
min_temp = 374
min_temp = T0C + 100
result_amount = 1
@@ -257,7 +247,7 @@
id = "candlefication"
result = null
required_reagents = list("liquidgibs" = 5, "oxygen" = 5) //
min_temp = 374
min_temp = T0C + 100
result_amount = 1
/datum/chemical_reaction/candlefication/on_reaction(datum/reagents/holder, created_volume)
@@ -295,7 +285,7 @@
id = "jestosterone"
result = "jestosterone"
required_reagents = list("blood" = 1, "sodiumchloride" = 1, "banana" = 1, "lube" = 1, "space_drugs" = 1) //Or one freshly-squeezed clown
min_temp = 374
min_temp = T0C + 100
result_amount = 5
mix_message = "The substance quickly shifts colour, cycling from red, to yellow, to green, to blue, and finally settles at a vibrant fuchsia."
@@ -338,7 +328,7 @@
result = "ice"
required_reagents = list("water" = 1)
result_amount = 1
max_temp = 273
max_temp = T0C
mix_message = "Ice forms as the water freezes."
mix_sound = null
@@ -348,7 +338,7 @@
result = "water"
required_reagents = list("ice" = 1)
result_amount = 1
min_temp = 301 // In Space.....ice melts at 82F...don't ask
min_temp = T0C + 29 // In Space.....ice melts at 82F...don't ask
mix_message = "Water pools as the ice melts."
mix_sound = null
@@ -80,12 +80,10 @@
result = "clf3"
required_reagents = list("chlorine" = 1, "fluorine" = 3)
result_amount = 2
min_temp = 424
min_temp = T0C + 150
/datum/chemical_reaction/clf3/on_reaction(datum/reagents/holder, created_volume)
var/turf/T = get_turf(holder.my_atom)
for(var/turf/turf in range(1,T))
new /obj/effect/hotspot(turf)
fireflash(holder.my_atom, 1, 7000)
/datum/chemical_reaction/sorium
name = "Sorium"
@@ -98,7 +96,7 @@
if(holder.has_reagent("stabilizing_agent"))
return
var/turf/simulated/T = get_turf(holder.my_atom)
goonchem_vortex(T, 1, min(10, created_volume), min(11, created_volume + 1))
goonchem_vortex(T, 0, created_volume)
holder.remove_reagent("sorium", created_volume)
/datum/chemical_reaction/sorium_vortex
@@ -107,11 +105,11 @@
result = "sorium_vortex"
required_reagents = list("sorium" = 1)
result_amount = 1
min_temp = 474
min_temp = T0C + 200
/datum/chemical_reaction/sorium_vortex/on_reaction(datum/reagents/holder, created_volume)
var/turf/simulated/T = get_turf(holder.my_atom)
goonchem_vortex(T, 1, min(10, created_volume), min(11, created_volume + 1))
goonchem_vortex(T, 0, created_volume)
holder.remove_reagent("sorium_vortex", created_volume)
/datum/chemical_reaction/liquid_dark_matter
@@ -125,7 +123,7 @@
if(holder.has_reagent("stabilizing_agent"))
return
var/turf/simulated/T = get_turf(holder.my_atom)
goonchem_vortex(T, 0, min(10, created_volume), min(11, created_volume + 1))
goonchem_vortex(T, 1, created_volume)
holder.remove_reagent("liquid_dark_matter", created_volume)
/datum/chemical_reaction/ldm_vortex
@@ -134,11 +132,11 @@
result = "ldm_vortex"
required_reagents = list("liquid_dark_matter" = 1)
result_amount = 1
min_temp = 474
min_temp = T0C + 200
/datum/chemical_reaction/ldm_vortex/on_reaction(datum/reagents/holder, created_volume)
var/turf/simulated/T = get_turf(holder.my_atom)
goonchem_vortex(T, 0, min(10, created_volume), min(11, created_volume + 1))
goonchem_vortex(T, 1, created_volume)
holder.remove_reagent("ldm_vortex", created_volume)
/datum/chemical_reaction/blackpowder
@@ -155,23 +153,23 @@
result = null
required_reagents = list("blackpowder" = 1)
result_amount = 1
min_temp = 474
min_temp = T0C + 200
no_message = 1
mix_sound = null
/datum/chemical_reaction/blackpowder_explosion/on_reaction(datum/reagents/holder, created_volume)
var/location = get_turf(holder.my_atom)
do_sparks(2, 1, location)
sleep(rand(20,30))
blackpowder_detonate(holder, created_volume)
spawn(rand(5, 15))
blackpowder_detonate(holder, created_volume)
/proc/blackpowder_detonate(datum/reagents/holder, created_volume)
var/turf/simulated/T = get_turf(holder.my_atom)
var/turf/T = get_turf(holder.my_atom)
var/ex_severe = round(created_volume / 100)
var/ex_heavy = round(created_volume / 42)
var/ex_light = round(created_volume / 20)
var/ex_flash = round(created_volume / 8)
explosion(T,ex_severe,ex_heavy,ex_light,ex_flash, 1)
explosion(T, ex_severe, ex_heavy,ex_light, ex_flash, 1)
// If this black powder is in a decal, remove the decal, because it just exploded
if(istype(holder.my_atom, /obj/effect/decal/cleanable/dirt/blackpowder))
spawn(0)
@@ -202,7 +200,7 @@ datum/chemical_reaction/flash_powder
id = "flash_powder_flash"
result = null
required_reagents = list("flash_powder" = 1)
min_temp = 374
min_temp = T0C + 100
/datum/chemical_reaction/flash_powder_flash/on_reaction(datum/reagents/holder, created_volume)
var/location = get_turf(holder.my_atom)
@@ -214,6 +212,40 @@ datum/chemical_reaction/flash_powder
continue
C.Stun(5)
/datum/chemical_reaction/phlogiston
name = "Phlogiston"
id = "phlogiston"
result = "phlogiston"
required_reagents = list("phosphorus" = 1, "plasma" = 1, "sacid" = 1, "stabilizing_agent" = 1)
result_amount = 4
mix_message = "The substance becomes sticky and extremely warm."
/datum/chemical_reaction/phlogiston_dust
name = "Phlogiston Dust"
id = "phlogiston_dust"
result = "phlogiston_dust"
required_reagents = list("phlogiston" = 1, "charcoal" = 1, "phosphorus" = 1, "sulfur" = 1)
result_amount = 2
mix_message = "The substance becomes a pile of burning dust."
/datum/chemical_reaction/phlogiston_fire //This MUST be above the smoke recipe.
name = "Phlogiston Fire"
id = "phlogiston_fire"
result = "phlogiston"
required_reagents = list("phosphorus" = 1, "plasma" = 1, "sacid" = 1)
mix_message = "The substance erupts into wild flames."
/datum/chemical_reaction/phlogiston_fire/on_reaction(datum/reagents/holder, created_volume)
fireflash(get_turf(holder.my_atom), min(max(2, round(created_volume / 10)), 8))
/datum/chemical_reaction/napalm
name = "Napalm"
id = "napalm"
result = "napalm"
required_reagents = list("fuel" = 1, "sugar" = 1, "ethanol" = 1)
result_amount = 3
mix_message = "The mixture congeals into a sticky gel."
/datum/chemical_reaction/smoke_powder
name = "smoke_powder"
id = "smoke_powder"
@@ -254,7 +286,7 @@ datum/chemical_reaction/flash_powder
name = "smoke_powder_smoke"
id = "smoke_powder_smoke"
required_reagents = list("smoke_powder" = 1)
min_temp = 374
min_temp = T0C + 100
secondary = 1
result_amount = 1
forbidden_reagents = list("stimulants")
@@ -305,7 +337,7 @@ datum/chemical_reaction/flash_powder
id = "sonic_powder_deafen"
result = null
required_reagents = list("sonic_powder" = 1)
min_temp = 374
min_temp = T0C + 100
/datum/chemical_reaction/sonic_powder_deafen/on_reaction(datum/reagents/holder, created_volume)
var/location = get_turf(holder.my_atom)
@@ -337,28 +369,6 @@ datum/chemical_reaction/flash_powder
if(ears.ear_damage >= 5)
to_chat(M, "<span class='warning'>Your ears start to ring!</span>")
/datum/chemical_reaction/phlogiston
name = "phlogiston"
id = "phlogiston"
result = "phlogiston"
required_reagents = list("phosphorus" = 1, "sacid" = 1, "plasma" = 1)
result_amount = 3
/datum/chemical_reaction/phlogiston/on_reaction(datum/reagents/holder, created_volume)
if(holder.has_reagent("stabilizing_agent"))
return
var/turf/simulated/T = get_turf(holder.my_atom)
for(var/turf/simulated/turf in range(min(created_volume/10,4),T))
new /obj/effect/hotspot(turf)
/datum/chemical_reaction/napalm
name = "Napalm"
id = "napalm"
result = "napalm"
required_reagents = list("sugar" = 1, "fuel" = 1, "ethanol" = 1 )
result_amount = 1
/datum/chemical_reaction/cryostylane
name = "cryostylane"
id = "cryostylane"
@@ -4,7 +4,7 @@
result = "formaldehyde"
required_reagents = list("ethanol" = 1, "oxygen" = 1, "silver" = 1)
result_amount = 3
min_temp = 420
min_temp = T0C + 150
mix_message = "Ugh, it smells like the morgue in here."
/datum/chemical_reaction/neurotoxin2
@@ -13,7 +13,7 @@
result = "neurotoxin2"
required_reagents = list("space_drugs" = 1)
result_amount = 1
min_temp = 674
min_temp = T0C + 400
mix_sound = null
no_message = 1
@@ -23,7 +23,7 @@
result = "cyanide"
required_reagents = list("oil" = 1, "ammonia" = 1, "oxygen" = 1)
result_amount = 3
min_temp = 380
min_temp = T0C + 100
mix_message = "The mixture gives off a faint scent of almonds."
mix_sound = 'sound/goonstation/misc/drinkfizz.ogg'
@@ -49,7 +49,7 @@
result = "facid"
required_reagents = list("sacid" = 1, "fluorine" = 1, "hydrogen" = 1, "potassium" = 1)
result_amount = 4
min_temp = 380
min_temp = T0C + 100
mix_message = "The mixture deepens to a dark blue, and slowly begins to corrode its container."
/datum/chemical_reaction/initropidril
@@ -83,7 +83,7 @@
required_reagents = list("chlorine" = 1, "fuel" = 1, "oxygen" = 1, "phosphorus" = 1, "fluorine" = 1, "hydrogen" = 1, "acetone" = 1, "atrazine" = 1)
result_amount = 3
mix_message = "The mixture yields a colorless, odorless liquid."
min_temp = 374
min_temp = T0C + 100
mix_sound = 'sound/goonstation/misc/drinkfizz.ogg'
/datum/chemical_reaction/sarin/on_reaction(datum/reagents/holder)
@@ -139,7 +139,7 @@
required_reagents = list("plasma" = 1, "silver" = 1, "blackpowder" = 1)
result_amount = 3
mix_message = "<span class='danger'>A jet of sparks flies from the mixture as it merges into a flickering slurry.</span>"
min_temp = 400
min_temp = T0C + 130
mix_sound = null
/datum/chemical_reaction/teslium/on_reaction(datum/reagents/holder, created_volume)
@@ -44,11 +44,6 @@
R.on_ex_act()
..()
/obj/item/reagent_containers/fire_act()
reagents.chem_temp += 30
reagents.handle_reactions()
..()
/obj/item/reagent_containers/attack_self(mob/user)
if(has_lid)
if(is_open_container())
@@ -124,13 +124,6 @@
/obj/item/reagent_containers/glass/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/clothing/mask/cigarette)) //ciggies are weird
return
if(is_hot(I))
if(reagents)
reagents.chem_temp += 15
to_chat(user, "<span class='notice'>You heat [src] with [I].</span>")
reagents.handle_reactions()
if(istype(I, /obj/item/pen) || istype(I, /obj/item/flashlight/pen))
var/tmp_label = sanitize(input(user, "Enter a label for [name]","Label",label_text))
if(length(tmp_label) > MAX_NAME_LEN)
@@ -210,8 +203,7 @@
/obj/item/reagent_containers/glass/beaker/proc/heat_beaker()
if(reagents)
reagents.chem_temp += 30
reagents.handle_reactions()
reagents.temperature_reagents(4000)
/obj/item/reagent_containers/glass/beaker/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/assembly_holder) && can_assembly)
+20 -10
View File
@@ -22,6 +22,13 @@
reagents.add_reagent(reagent_id, tank_volume)
..()
/obj/structure/reagent_dispensers/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
..()
if(reagents)
for(var/i in 1 to 8)
if(reagents)
reagents.temperature_reagents(exposed_temperature)
/obj/structure/reagent_dispensers/proc/boom()
visible_message("<span class='danger'>[src] ruptures!</span>")
chem_splash(loc, 5, list(reagents))
@@ -68,6 +75,7 @@
desc = "A tank full of industrial welding fuel. Do not consume."
icon_state = "fuel"
reagent_id = "fuel"
tank_volume = 4000
var/obj/item/assembly_holder/rig = null
var/accepts_rig = 1
@@ -84,14 +92,14 @@
investigate_log("[key_name(P.firer)] triggered a fueltank explosion with [P.name] at [COORD(loc)]", INVESTIGATE_BOMB)
boom()
/obj/structure/reagent_dispensers/fueltank/boom(var/rigtrigger = FALSE) // Prevent case where someone who rigged the tank is blamed for the explosion when the rig isn't what triggered the explosion
if(reagents.has_reagent("fuel"))
if(rigtrigger == TRUE) // If the explosion is triggered by an assembly holder
message_admins("A fueltank, last rigged by [lastrigger], exploded at [COORD(loc)]") // Then admin is informed of the last person who rigged the fuel tank
log_game("A fueltank, last rigged by [lastrigger], exploded at [COORD(loc)]")
investigate_log("A fueltank, last rigged by [lastrigger], exploded at [COORD(loc)]", INVESTIGATE_BOMB)
explosion(loc, 0, 1, 5, 7, 10, flame_range = 5)
qdel(src)
/obj/structure/reagent_dispensers/fueltank/boom(rigtrigger = FALSE) // Prevent case where someone who rigged the tank is blamed for the explosion when the rig isn't what triggered the explosion
if(rigtrigger) // If the explosion is triggered by an assembly holder
message_admins("A fueltank, last rigged by [lastrigger], was triggered at [COORD(loc)]") // Then admin is informed of the last person who rigged the fuel tank
log_game("A fueltank, last rigged by [lastrigger], triggered at [COORD(loc)]")
investigate_log("A fueltank, last rigged by [lastrigger], triggered at [COORD(loc)]", INVESTIGATE_BOMB)
if(reagents)
reagents.set_reagent_temp(1000) //uh-oh
qdel(src)
/obj/structure/reagent_dispensers/fueltank/blob_act()
boom()
@@ -99,7 +107,8 @@
/obj/structure/reagent_dispensers/fueltank/ex_act()
boom()
/obj/structure/reagent_dispensers/fueltank/fire_act()
/obj/structure/reagent_dispensers/fueltank/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
..()
boom()
/obj/structure/reagent_dispensers/fueltank/tesla_act()
@@ -167,7 +176,7 @@
investigate_log("[key_name(user)] triggered a fueltank explosion at [COORD(loc)]", INVESTIGATE_BOMB)
boom()
else
..()
return ..()
/obj/structure/reagent_dispensers/fueltank/Move()
..()
@@ -295,3 +304,4 @@
anchored = 1
density = 0
accepts_rig = 0
tank_volume = 1000