From 8d221669410811767b8ae755512e5ad5b3797948 Mon Sep 17 00:00:00 2001 From: Cael_Aislinn Date: Thu, 25 Oct 2012 00:08:58 +1000 Subject: [PATCH] - tweaked lplasma spills and fire spawning - oxygen content is no longer counted towards % spawn chance. - to spawn a turf fire (at default ignition level) atmos zones now require at least 17 moles of ignitable material (note that flamethrower fuel counts 15x more than other ignitables) the relevant code seems weird and all over the place, but this seems to work in testing so i'm committing it for now Signed-off-by: Cael_Aislinn --- code/ZAS/Fire.dm | 11 ++++++++--- code/modules/reagents/Chemistry-Reagents.dm | 4 ++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/code/ZAS/Fire.dm b/code/ZAS/Fire.dm index 9501d4222e7..04c505dc38b 100644 --- a/code/ZAS/Fire.dm +++ b/code/ZAS/Fire.dm @@ -219,7 +219,7 @@ datum/gas_mixture/proc/zburn(obj/effect/decal/cleanable/liquid_fuel/liquid) temperature = max( 1700*log(0.4*firelevel + 1.23) , temperature ) //Consume some gas. - var/consumed_gas = min(oxygen,0.05*firelevel,total_fuel) / fuel_sources + var/consumed_gas = min(oxygen,firelevel,total_fuel) / fuel_sources oxygen = max(0,oxygen-consumed_gas) @@ -245,14 +245,19 @@ datum/gas_mixture/proc/calculate_firelevel(obj/effect/decal/cleanable/liquid_fue var datum/gas/volatile_fuel/fuel = locate() in trace_gases liquid_concentration = 0 + fuel_concentration = 0 oxy_concentration = oxygen / volume tox_concentration = toxins / volume - fuel_concentration = 0 if(fuel) fuel_concentration = (fuel.moles) / volume if(liquid) liquid_concentration = (liquid.amount*15) / volume - return (oxy_concentration + tox_concentration + liquid_concentration + fuel_concentration)*100 + + var/final = tox_concentration + liquid_concentration + fuel_concentration + if(final > oxy_concentration) + final = oxy_concentration + + return final * 100 /mob/living/carbon/human/proc/FireBurn(mx as num) //Burns mobs due to fire. Respects heat transfer coefficients on various body parts. diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 84e6c484060..2854975d497 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -1126,14 +1126,14 @@ datum var/turf/the_turf = get_turf(O) var/datum/gas_mixture/napalm = new var/datum/gas/volatile_fuel/fuel = new - fuel.moles = 5 + fuel.moles = volume napalm.trace_gases += fuel the_turf.assume_air(napalm) reaction_turf(var/turf/T, var/volume) src = null var/datum/gas_mixture/napalm = new var/datum/gas/volatile_fuel/fuel = new - fuel.moles = 5 + fuel.moles = volume napalm.trace_gases += fuel T.assume_air(napalm) return