mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
fix this shit
This commit is contained in:
@@ -303,8 +303,8 @@
|
||||
air_contents = null
|
||||
air_contents = new(50) //liters
|
||||
air_contents.set_temperature(T20C)
|
||||
air_contents.set_moles(/datum/gas/oxygen, (ONE_ATMOSPHERE*50)/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD)
|
||||
air_contents.set_moles(/datum/gas/nitrous_oxide, (ONE_ATMOSPHERE*50)/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD)
|
||||
air_contents.set_moles(GAS_O2, (ONE_ATMOSPHERE*50)/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD)
|
||||
air_contents.set_moles(GAS_NITROUS, (ONE_ATMOSPHERE*50)/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD)
|
||||
|
||||
/obj/structure/closet/body_bag/environmental/prisoner/syndicate/Destroy()
|
||||
if(air_contents)
|
||||
|
||||
@@ -46,12 +46,20 @@
|
||||
var/turf/T = get_step_multiz(src, direction)
|
||||
if(!istype(T))
|
||||
continue
|
||||
var/opp_dir = REVERSE_DIR(direction)
|
||||
|
||||
var/src_contains_firelock = 1
|
||||
if(locate(/obj/machinery/door/firedoor) in src)
|
||||
src_contains_firelock |= 2
|
||||
|
||||
var/other_contains_firelock = 1
|
||||
if(locate(/obj/machinery/door/firedoor) in T)
|
||||
other_contains_firelock |= 2
|
||||
|
||||
if(isopenturf(T) && !(blocks_air || T.blocks_air) && ((direction & (UP|DOWN))? (canvpass && CANVERTICALATMOSPASS(T, src)) : (canpass && CANATMOSPASS(T, src))) )
|
||||
LAZYINITLIST(atmos_adjacent_turfs)
|
||||
LAZYINITLIST(T.atmos_adjacent_turfs)
|
||||
atmos_adjacent_turfs[T] = direction
|
||||
T.atmos_adjacent_turfs[src] = opp_dir
|
||||
atmos_adjacent_turfs[T] = other_contains_firelock
|
||||
T.atmos_adjacent_turfs[src] = src_contains_firelock
|
||||
else
|
||||
if (atmos_adjacent_turfs)
|
||||
atmos_adjacent_turfs -= T
|
||||
|
||||
@@ -240,19 +240,19 @@ nobliumformation = 1001
|
||||
/datum/gas_reaction/n2odecomp/init_reqs()
|
||||
min_requirements = list(
|
||||
"TEMP" = N2O_DECOMPOSITION_MIN_HEAT,
|
||||
/datum/gas/nitrous_oxide = MINIMUM_MOLE_COUNT*2
|
||||
GAS_NITROUS = MINIMUM_MOLE_COUNT*2
|
||||
)
|
||||
|
||||
/datum/gas_reaction/n2odecomp/react(datum/gas_mixture/air, datum/holder)
|
||||
var/old_heat_capacity = air.heat_capacity()
|
||||
var/temperature = air.return_temperature()
|
||||
var/nitrous = air.get_moles(/datum/gas/nitrous_oxide)
|
||||
var/nitrous = air.get_moles(GAS_NITROUS)
|
||||
|
||||
var/burned_fuel = min(N2O_DECOMPOSITION_RATE*nitrous*temperature*(temperature-N2O_DECOMPOSITION_MAX_HEAT)/((-1/4)*(N2O_DECOMPOSITION_MAX_HEAT**2)), nitrous)
|
||||
if(burned_fuel>0)
|
||||
air.set_moles(/datum/gas/nitrous_oxide, QUANTIZE(nitrous - burned_fuel))
|
||||
air.set_moles(/datum/gas/nitrogen, QUANTIZE(air.get_moles(/datum/gas/nitrogen) + burned_fuel))
|
||||
air.set_moles(/datum/gas/oxygen, QUANTIZE(air.get_moles(/datum/gas/oxygen) + burned_fuel/2))
|
||||
air.set_moles(GAS_NITROUS, QUANTIZE(nitrous - burned_fuel))
|
||||
air.set_moles(GAS_N2, QUANTIZE(air.get_moles(GAS_N2) + burned_fuel))
|
||||
air.set_moles(GAS_O2, QUANTIZE(air.get_moles(GAS_O2) + burned_fuel/2))
|
||||
var/new_heat_capacity = air.heat_capacity()
|
||||
if(new_heat_capacity > MINIMUM_HEAT_CAPACITY)
|
||||
air.set_temperature((temperature*old_heat_capacity + burned_fuel*N2O_DECOMPOSITION_ENERGY)/new_heat_capacity)
|
||||
|
||||
@@ -299,9 +299,8 @@
|
||||
else
|
||||
requirements = list("To create [selected_recipe.name] you will need:")
|
||||
for(var/gas_type in selected_recipe.requirements)
|
||||
var/datum/gas/gas_required = gas_type
|
||||
var/amount_consumed = selected_recipe.requirements[gas_type]
|
||||
requirements += "-[amount_consumed] moles of [initial(gas_required.name)]"
|
||||
requirements += "-[amount_consumed] moles of [initial(gas_type)]"
|
||||
requirements += "In a temperature range between [selected_recipe.min_temp] K and [selected_recipe.max_temp] K"
|
||||
requirements += "The crystallization reaction will be [selected_recipe.reaction_type]"
|
||||
data["requirements"] = requirements.Join("\n")
|
||||
|
||||
@@ -79,9 +79,9 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/regalrat/handle_environment(datum/gas_mixture/environment)
|
||||
. = ..()
|
||||
if(stat == DEAD || !environment || !environment.get_moles(/datum/gas/miasma))
|
||||
if(stat == DEAD || !environment || !environment.get_moles(GAS_MIASMA))
|
||||
return
|
||||
var/miasma_percentage = environment.get_moles(/datum/gas/miasma)/environment.total_moles()
|
||||
var/miasma_percentage = environment.get_moles(GAS_MIASMA)/environment.total_moles()
|
||||
if(miasma_percentage>=0.25)
|
||||
heal_bodypart_damage(1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user