Merge pull request #13991 from Putnam3145/auxtools-atmos

Replaces extools with auxtools; atmos overhaul
This commit is contained in:
silicons
2021-06-27 11:01:32 -07:00
committed by GitHub
154 changed files with 2336 additions and 2232 deletions
@@ -40,8 +40,8 @@
if(hotspot && istype(T) && T.air)
qdel(hotspot)
var/datum/gas_mixture/G = T.air
var/plas_amt = min(30,G.get_moles(/datum/gas/plasma)) //Absorb some plasma
G.adjust_moles(/datum/gas/plasma,-plas_amt)
var/plas_amt = min(30,G.get_moles(GAS_PLASMA)) //Absorb some plasma
G.adjust_moles(GAS_PLASMA,-plas_amt)
absorbed_plasma += plas_amt
if(G.return_temperature() > T20C)
G.set_temperature(max(G.return_temperature()/2,T20C))
@@ -322,7 +322,7 @@
for(var/obj/effect/hotspot/H in O)
qdel(H)
for(var/I in G.get_gases())
if(I == /datum/gas/oxygen || I == /datum/gas/nitrogen)
if(I == GAS_O2 || I == GAS_N2)
continue
G.set_moles(I, 0)
O.air_update_turf()
@@ -341,7 +341,7 @@
return TRUE
. = ..()
/obj/structure/foamedmetal/resin/BlockSuperconductivity()
/obj/structure/foamedmetal/resin/BlockThermalConductivity()
return TRUE
#undef ALUMINUM_FOAM
@@ -170,9 +170,9 @@
T.air_update_turf()
for(var/obj/effect/hotspot/H in T)
qdel(H)
if(G.get_moles(/datum/gas/plasma))
G.adjust_moles(/datum/gas/nitrogen, G.get_moles(/datum/gas/plasma))
G.set_moles(/datum/gas/plasma, 0)
if(G.get_moles(GAS_PLASMA))
G.adjust_moles(GAS_N2, G.get_moles(GAS_PLASMA))
G.set_moles(GAS_PLASMA, 0)
if (weldvents)
for(var/obj/machinery/atmospherics/components/unary/U in T)
if(!isnull(U.welded) && !U.welded) //must be an unwelded vent pump or vent scrubber.
@@ -1,6 +1,6 @@
#define CELSIUS_TO_KELVIN(T_K) ((T_K) + T0C)
#define OPTIMAL_TEMP_K_PLA_BURN_SCALE(PRESSURE_P,PRESSURE_O,TEMP_O) (((PRESSURE_P) * GLOB.meta_gas_specific_heats[/datum/gas/plasma]) / (((PRESSURE_P) * GLOB.meta_gas_specific_heats[/datum/gas/plasma] + (PRESSURE_O) * GLOB.meta_gas_specific_heats[/datum/gas/oxygen]) / PLASMA_UPPER_TEMPERATURE - (PRESSURE_O) * GLOB.meta_gas_specific_heats[/datum/gas/oxygen] / CELSIUS_TO_KELVIN(TEMP_O)))
#define OPTIMAL_TEMP_K_PLA_BURN_SCALE(PRESSURE_P,PRESSURE_O,TEMP_O) (((PRESSURE_P) * GLOB.gas_data.specific_heats[GAS_PLASMA]) / (((PRESSURE_P) * GLOB.gas_data.specific_heats[GAS_PLASMA] + (PRESSURE_O) * GLOB.gas_data.specific_heats[GAS_O2]) / PLASMA_UPPER_TEMPERATURE - (PRESSURE_O) * GLOB.gas_data.specific_heats[GAS_O2] / CELSIUS_TO_KELVIN(TEMP_O)))
#define OPTIMAL_TEMP_K_PLA_BURN_RATIO(PRESSURE_P,PRESSURE_O,TEMP_O) (CELSIUS_TO_KELVIN(TEMP_O) * PLASMA_OXYGEN_FULLBURN * (PRESSURE_P) / (PRESSURE_O))
/obj/effect/spawner/newbomb
@@ -19,10 +19,10 @@
var/obj/item/tank/internals/plasma/PT = new(V)
var/obj/item/tank/internals/oxygen/OT = new(V)
PT.air_contents.set_moles(/datum/gas/plasma, pressure_p*PT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_p)))
PT.air_contents.set_moles(GAS_PLASMA, pressure_p*PT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_p)))
PT.air_contents.set_temperature(CELSIUS_TO_KELVIN(temp_p))
OT.air_contents.set_moles(/datum/gas/oxygen, pressure_o*OT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_o)))
OT.air_contents.set_moles(GAS_O2, pressure_o*OT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_o)))
OT.air_contents.set_temperature(CELSIUS_TO_KELVIN(temp_o))
V.tank_one = PT
+9 -3
View File
@@ -242,12 +242,18 @@
return BULLET_ACT_HIT
/obj/effect/chrono_field/assume_air()
return 0
return null
/obj/effect/chrono_field/assume_air_moles()
return null
/obj/effect/chrono_field/assume_air_ratio()
return null
/obj/effect/chrono_field/return_air() //we always have nominal air and temperature
var/datum/gas_mixture/GM = new
GM.set_moles(/datum/gas/oxygen, MOLES_O2STANDARD)
GM.set_moles(/datum/gas/nitrogen, MOLES_N2STANDARD)
GM.set_moles(GAS_O2, MOLES_O2STANDARD)
GM.set_moles(GAS_N2, MOLES_N2STANDARD)
GM.set_temperature(T20C)
return GM
+1 -1
View File
@@ -447,7 +447,7 @@ GLOBAL_LIST_EMPTY(PDAs)
for(var/id in environment.get_gases())
var/gas_level = environment.get_moles(id)/total_moles
if(gas_level > 0)
dat += "[GLOB.meta_gas_names[id]]: [round(gas_level*100, 0.01)]%<br>"
dat += "[GLOB.gas_data.names[id]]: [round(gas_level*100, 0.01)]%<br>"
dat += "Temperature: [round(environment.return_temperature()-T0C)]&deg;C<br>"
dat += "<br>"
+15 -15
View File
@@ -708,7 +708,7 @@ GENETICS SCANNER
for(var/id in air_contents.get_gases())
if(air_contents.get_moles(id) >= 0.005)
var/gas_concentration = air_contents.get_moles(id)/total_moles
to_chat(user, "<span class='notice'>[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(air_contents.get_moles(id), 0.01)] mol)</span>")
to_chat(user, "<span class='notice'>[GLOB.gas_data.names[id]]: [round(gas_concentration*100, 0.01)] % ([round(air_contents.get_moles(id), 0.01)] mol)</span>")
to_chat(user, "<span class='notice'>Temperature: [round(temperature - T0C,0.01)] &deg;C ([round(temperature, 0.01)] K)</span>")
else
@@ -721,7 +721,7 @@ GENETICS SCANNER
var/instability = round(cached_scan_results["fusion"], 0.01)
var/tier = instability2text(instability)
to_chat(user, "<span class='boldnotice'>Large amounts of free neutrons detected in the air indicate that a fusion reaction took place.</span>")
to_chat(user, "<span class='notice'>Instability of the last fusion reaction: [instability]\n This indicates it was [tier].</span>")
to_chat(user, "<span class='notice'>Instability of the last fusion reaction: [instability]\n This indicates it was [tier]</span>")
return
/obj/item/analyzer/proc/scan_turf(mob/user, turf/location)
@@ -739,36 +739,36 @@ GENETICS SCANNER
to_chat(user, "<span class='alert'>Pressure: [round(pressure, 0.01)] kPa</span>")
if(total_moles)
var/o2_concentration = environment.get_moles(/datum/gas/oxygen)/total_moles
var/n2_concentration = environment.get_moles(/datum/gas/nitrogen)/total_moles
var/co2_concentration = environment.get_moles(/datum/gas/carbon_dioxide)/total_moles
var/plasma_concentration = environment.get_moles(/datum/gas/plasma)/total_moles
var/o2_concentration = environment.get_moles(GAS_O2)/total_moles
var/n2_concentration = environment.get_moles(GAS_N2)/total_moles
var/co2_concentration = environment.get_moles(GAS_CO2)/total_moles
var/plasma_concentration = environment.get_moles(GAS_PLASMA)/total_moles
if(abs(n2_concentration - N2STANDARD) < 20)
to_chat(user, "<span class='info'>Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/nitrogen), 0.01)] mol)</span>")
to_chat(user, "<span class='info'>Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(environment.get_moles(GAS_N2), 0.01)] mol)</span>")
else
to_chat(user, "<span class='alert'>Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/nitrogen), 0.01)] mol)</span>")
to_chat(user, "<span class='alert'>Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(environment.get_moles(GAS_N2), 0.01)] mol)</span>")
if(abs(o2_concentration - O2STANDARD) < 2)
to_chat(user, "<span class='info'>Oxygen: [round(o2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/oxygen), 0.01)] mol)</span>")
to_chat(user, "<span class='info'>Oxygen: [round(o2_concentration*100, 0.01)] % ([round(environment.get_moles(GAS_O2), 0.01)] mol)</span>")
else
to_chat(user, "<span class='alert'>Oxygen: [round(o2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/oxygen), 0.01)] mol)</span>")
to_chat(user, "<span class='alert'>Oxygen: [round(o2_concentration*100, 0.01)] % ([round(environment.get_moles(GAS_O2), 0.01)] mol)</span>")
if(co2_concentration > 0.01)
to_chat(user, "<span class='alert'>CO2: [round(co2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/carbon_dioxide), 0.01)] mol)</span>")
to_chat(user, "<span class='alert'>CO2: [round(co2_concentration*100, 0.01)] % ([round(environment.get_moles(GAS_CO2), 0.01)] mol)</span>")
else
to_chat(user, "<span class='info'>CO2: [round(co2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/carbon_dioxide), 0.01)] mol)</span>")
to_chat(user, "<span class='info'>CO2: [round(co2_concentration*100, 0.01)] % ([round(environment.get_moles(GAS_CO2), 0.01)] mol)</span>")
if(plasma_concentration > 0.005)
to_chat(user, "<span class='alert'>Plasma: [round(plasma_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/plasma), 0.01)] mol)</span>")
to_chat(user, "<span class='alert'>Plasma: [round(plasma_concentration*100, 0.01)] % ([round(environment.get_moles(GAS_PLASMA), 0.01)] mol)</span>")
else
to_chat(user, "<span class='info'>Plasma: [round(plasma_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/plasma), 0.01)] mol)</span>")
to_chat(user, "<span class='info'>Plasma: [round(plasma_concentration*100, 0.01)] % ([round(environment.get_moles(GAS_PLASMA), 0.01)] mol)</span>")
for(var/id in environment.get_gases())
if(id in GLOB.hardcoded_gases)
continue
var/gas_concentration = environment.get_moles(id)/total_moles
to_chat(user, "<span class='alert'>[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(environment.get_moles(id), 0.01)] mol)</span>")
to_chat(user, "<span class='alert'>[GLOB.gas_data.names[id]]: [round(gas_concentration*100, 0.01)] % ([round(environment.get_moles(id), 0.01)] mol)</span>")
to_chat(user, "<span class='info'>Temperature: [round(environment.return_temperature()-T0C, 0.01)] &deg;C ([round(environment.return_temperature(), 0.01)] K)</span>")
if(cached_scan_results && cached_scan_results["fusion"]) //notify the user if a fusion reaction was detected
@@ -172,20 +172,15 @@
if(!target_self)
target.set_volume(target.return_volume() + tank_two.volume)
target.set_volume(target.return_volume() + tank_one.air_contents.return_volume())
var/datum/gas_mixture/temp
temp = tank_one.air_contents.remove_ratio(1)
target.merge(temp)
tank_one.air_contents.transfer_ratio_to(target, 1)
if(!target_self)
temp = tank_two.air_contents.remove_ratio(1)
target.merge(temp)
tank_two.air_contents.transfer_ratio_to(target, 1)
/obj/item/transfer_valve/proc/split_gases()
if (!valve_open || !tank_one || !tank_two)
return
var/ratio1 = tank_one.air_contents.return_volume()/tank_two.air_contents.return_volume()
var/datum/gas_mixture/temp
temp = tank_two.air_contents.remove_ratio(ratio1)
tank_one.air_contents.merge(temp)
tank_two.air_contents.transfer_ratio_to(tank_one.air_contents, ratio1)
tank_two.air_contents.set_volume(tank_two.air_contents.return_volume() - tank_one.air_contents.return_volume())
/*
+1 -3
View File
@@ -210,13 +210,11 @@
//TODO: DEFERRED Consider checking to make sure tank pressure is high enough before doing this...
//Transfer 5% of current tank air contents to turf
var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(release_amount)
air_transfer.set_moles(/datum/gas/plasma, air_transfer.get_moles(/datum/gas/plasma) * 5)
air_transfer.set_moles(GAS_PLASMA, air_transfer.get_moles(GAS_PLASMA) * 5)
target.assume_air(air_transfer)
//Burn it based on transfered gas
target.hotspot_expose((ptank.air_contents.return_temperature()*2) + 380,500)
//location.hotspot_expose(1000,500,1)
SSair.add_to_active(target, 0)
/obj/item/flamethrower/Initialize(mapload)
. = ..()
+1 -1
View File
@@ -307,7 +307,7 @@
if(isanimal(occupant))
var/mob/living/simple_animal/animal = occupant
occupant_gas_supply[/datum/gas/oxygen] = 0.0064 //make sure it has some gas in so it isn't depressurized
occupant_gas_supply[GAS_O2] = 0.0064 //make sure it has some gas in so it isn't depressurized
occupant_gas_supply.set_temperature(animal.minbodytemp) //simple animals only care about temperature/pressure when their turf isnt a location
if(ishuman(occupant)) //humans require resistance to cold/heat and living in no air while inside, and lose this when outside
+5 -5
View File
@@ -79,27 +79,27 @@
var/weight = getweight(user, STAM_COST_ATTACK_MOB_MULT)
if(!user.UseStaminaBuffer(weight, warn = TRUE))
return FALSE
var/datum/gas_mixture/gasused = tank.air_contents.remove(gasperfist * fisto_setting)
var/turf/T = get_turf(src)
if(!T)
return FALSE
var/totalitemdamage = target.pre_attacked_by(src, user)
T.assume_air(gasused)
T.air_update_turf()
if(!gasused)
var/moles_used = gasperfist * fisto_setting
if(!moles_used)
to_chat(user, "<span class='warning'>\The [src]'s tank is empty!</span>")
target.apply_damage((totalitemdamage / 5), BRUTE)
playsound(loc, 'sound/weapons/punch1.ogg', 50, 1)
target.visible_message("<span class='danger'>[user]'s powerfist lets out a dull thunk as [user.p_they()] punch[user.p_es()] [target.name]!</span>", \
"<span class='userdanger'>[user]'s punches you!</span>")
return
if(gasused.total_moles() < gasperfist * fisto_setting)
if(tank.air_contents.total_moles() < moles_used)
to_chat(user, "<span class='warning'>\The [src]'s piston-ram lets out a weak hiss, it needs more gas!</span>")
playsound(loc, 'sound/weapons/punch4.ogg', 50, 1)
target.apply_damage((totalitemdamage / 2), BRUTE)
target.visible_message("<span class='danger'>[user]'s powerfist lets out a weak hiss as [user.p_they()] punch[user.p_es()] [target.name]!</span>", \
"<span class='userdanger'>[user]'s punch strikes with force!</span>")
return
T.assume_air_moles(tank.air_contents, gasperfist * fisto_setting)
T.air_update_turf()
target.apply_damage(totalitemdamage * fisto_setting, BRUTE, wound_bonus = -25*fisto_setting**2)
target.visible_message("<span class='danger'>[user]'s powerfist lets out a loud hiss as [user.p_they()] punch[user.p_es()] [target.name]!</span>", \
"<span class='userdanger'>You cry out in pain as [user]'s punch flings you backwards!</span>")
+4 -16
View File
@@ -8,7 +8,7 @@
w_class = WEIGHT_CLASS_BULKY
distribute_pressure = ONE_ATMOSPHERE * O2STANDARD
actions_types = list(/datum/action/item_action/set_internals, /datum/action/item_action/toggle_jetpack, /datum/action/item_action/jetpack_stabilization)
var/gas_type = /datum/gas/oxygen
var/gas_type = GAS_O2
var/on = FALSE
var/stabilizers = FALSE
var/full_speed = TRUE // If the jetpack will have a speedboost in space/nograv or not
@@ -77,13 +77,7 @@
turn_off(user)
return
var/datum/gas_mixture/removed = air_contents.remove(num)
if(removed.total_moles() < 0.005)
turn_off(user)
return
var/turf/T = get_turf(user)
T.assume_air(removed)
assume_air_moles(air_contents, num)
return TRUE
@@ -116,13 +110,7 @@
turn_off(user)
return
var/datum/gas_mixture/removed = air_contents.remove(num)
if(removed.total_moles() < 0.005)
turn_off(user)
return
var/turf/T = get_turf(user)
T.assume_air(removed)
assume_air_moles(air_contents, num)
return TRUE
@@ -171,7 +159,7 @@
icon_state = "jetpack-black"
item_state = "jetpack-black"
distribute_pressure = 0
gas_type = /datum/gas/carbon_dioxide
gas_type = GAS_CO2
/obj/item/tank/jetpack/carbondioxide/eva
name = "surplus jetpack (carbon dioxide)"
+13 -13
View File
@@ -20,7 +20,7 @@
/obj/item/tank/internals/oxygen/populate_gas()
air_contents.set_moles(/datum/gas/oxygen, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
air_contents.set_moles(GAS_O2, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
return
@@ -48,8 +48,8 @@
force = 10
/obj/item/tank/internals/anesthetic/populate_gas()
air_contents.set_moles(/datum/gas/oxygen, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD)
air_contents.set_moles(/datum/gas/nitrous_oxide, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD)
air_contents.set_moles(GAS_O2, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD)
air_contents.set_moles(GAS_NITROUS, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD)
return
/*
@@ -63,8 +63,8 @@
dog_fashion = /datum/dog_fashion/back
/obj/item/tank/internals/air/populate_gas()
air_contents.set_moles(/datum/gas/oxygen, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD)
air_contents.set_moles(/datum/gas/nitrogen, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD)
air_contents.set_moles(GAS_O2, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD)
air_contents.set_moles(GAS_N2, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD)
return
@@ -81,7 +81,7 @@
/obj/item/tank/internals/plasma/populate_gas()
air_contents.set_moles(/datum/gas/plasma, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
air_contents.set_moles(GAS_PLASMA, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
return
/obj/item/tank/internals/plasma/attackby(obj/item/W, mob/user, params)
@@ -98,14 +98,14 @@
return ..()
/obj/item/tank/internals/plasma/full/populate_gas()
air_contents.set_moles(/datum/gas/plasma, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
air_contents.set_moles(GAS_PLASMA, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
//Makes empty oxygen tanks spawn without gas
/obj/item/tank/internals/plasma/empty/populate_gas()
return
/obj/item/tank/internals/plasma/full/populate_gas()
air_contents.set_moles(/datum/gas/plasma, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
air_contents.set_moles(GAS_PLASMA, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
/*
* Plasmaman Plasma Tank
@@ -120,11 +120,11 @@
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
/obj/item/tank/internals/plasmaman/populate_gas()
air_contents.set_moles(/datum/gas/plasma, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
air_contents.set_moles(GAS_PLASMA, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
return
/obj/item/tank/internals/plasmaman/full/populate_gas()
air_contents.set_moles(/datum/gas/plasma, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
air_contents.set_moles(GAS_PLASMA, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
return
@@ -137,7 +137,7 @@
w_class = WEIGHT_CLASS_SMALL //thanks i forgot this
/obj/item/tank/internals/plasmaman/belt/full/populate_gas()
air_contents.set_moles(/datum/gas/plasma, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
air_contents.set_moles(GAS_PLASMA, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
return
//makes empty plasma tanks spawn without gas.
@@ -160,7 +160,7 @@
/obj/item/tank/internals/emergency_oxygen/populate_gas()
air_contents.set_moles(/datum/gas/oxygen, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
air_contents.set_moles(GAS_O2, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
return
/obj/item/tank/internals/emergency_oxygen/empty/populate_gas()
@@ -196,5 +196,5 @@
volume = 10
/obj/item/tank/internals/methyl_bromide/populate_gas()
air_contents.set_moles(/datum/gas/methyl_bromide, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
air_contents.set_moles(GAS_METHYL_BROMIDE, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
return
+15 -1
View File
@@ -83,7 +83,6 @@
if(istype(location))
location.assume_air(air_contents)
air_contents.clear()
SSair.add_to_active(location)
visible_message("<span class='warning'[src] leaks gas!")
/obj/item/tank/Destroy()
@@ -235,6 +234,9 @@
/obj/item/tank/remove_air(amount)
return air_contents.remove(amount)
/obj/item/tank/remove_air_ratio(ratio)
return air_contents.remove_ratio(ratio)
/obj/item/tank/return_air()
return air_contents
@@ -247,6 +249,18 @@
check_status()
return 1
/obj/item/tank/assume_air_moles(datum/gas_mixture/giver, moles)
giver.transfer_to(air_contents, moles)
check_status()
return 1
/obj/item/tank/assume_air_ratio(datum/gas_mixture/giver, ratio)
giver.transfer_ratio_to(air_contents, ratio)
check_status()
return 1
/obj/item/tank/proc/remove_air_volume(volume_to_return)
if(!air_contents)
return null
+32 -2
View File
@@ -96,12 +96,43 @@
else
return null
/obj/assume_air_moles(datum/gas_mixture/giver, moles)
if(loc)
return loc.assume_air_moles(giver, moles)
else
return null
/obj/assume_air_ratio(datum/gas_mixture/giver, ratio)
if(loc)
return loc.assume_air_ratio(giver, ratio)
else
return null
/obj/transfer_air(datum/gas_mixture/taker, moles)
if(loc)
return loc.transfer_air(taker, moles)
else
return null
/obj/transfer_air_ratio(datum/gas_mixture/taker, ratio)
if(loc)
return loc.transfer_air_ratio(taker, ratio)
else
return null
/obj/remove_air(amount)
if(loc)
return loc.remove_air(amount)
else
return null
/obj/remove_air_ratio(ratio)
if(loc)
return loc.remove_air_ratio(ratio)
else
return null
/obj/return_air()
if(loc)
return loc.return_air()
@@ -116,8 +147,7 @@
if(breath_request>0)
var/datum/gas_mixture/environment = return_air()
var/breath_percentage = BREATH_VOLUME / environment.return_volume()
return remove_air(environment.total_moles() * breath_percentage)
return remove_air_ratio(BREATH_VOLUME / environment.return_volume())
else
return null
+2 -2
View File
@@ -81,8 +81,8 @@
resintype = "wall"
canSmoothWith = list(/obj/structure/alien/resin/wall, /obj/structure/alien/resin/membrane)
/obj/structure/alien/resin/wall/BlockSuperconductivity()
return 1
/obj/structure/alien/resin/wall/BlockThermalConductivity()
return TRUE
/obj/structure/alien/resin/membrane
name = "resin membrane"
+2 -2
View File
@@ -95,7 +95,7 @@
alpha = 150
resistance_flags = FIRE_PROOF
/obj/structure/holosign/barrier/firelock/BlockSuperconductivity()
/obj/structure/holosign/barrier/firelock/BlockThermalConductivity()
return TRUE
/obj/structure/holosign/barrier/firelock/Initialize()
@@ -115,7 +115,7 @@
CanAtmosPass = ATMOS_PASS_NO
resistance_flags = FIRE_PROOF
/obj/structure/holosign/barrier/combifan/BlockSuperconductivity()
/obj/structure/holosign/barrier/combifan/BlockThermalConductivity()
return TRUE
/obj/structure/holosign/barrier/combifan/Initialize()
@@ -149,9 +149,7 @@
pod_moving = 0
if(!QDELETED(pod))
var/datum/gas_mixture/floor_mixture = loc.return_air()
floor_mixture.archive()
pod.air_contents.archive()
pod.air_contents.share(floor_mixture, 1) //mix the pod's gas mixture with the tile it's on
equalize_all_gases_in_list(list(pod.air_contents,floor_mixture))
air_update_turf()
/obj/structure/transit_tube/station/init_tube_dirs()
@@ -10,8 +10,8 @@
/obj/structure/transit_tube_pod/Initialize()
. = ..()
air_contents.set_moles(/datum/gas/oxygen, MOLES_O2STANDARD)
air_contents.set_moles(/datum/gas/nitrogen, MOLES_N2STANDARD)
air_contents.set_moles(GAS_O2, MOLES_O2STANDARD)
air_contents.set_moles(GAS_N2, MOLES_N2STANDARD)
air_contents.set_temperature(T20C)
@@ -153,9 +153,25 @@
/obj/structure/transit_tube_pod/assume_air(datum/gas_mixture/giver)
return air_contents.merge(giver)
/obj/structure/transit_tube_pod/assume_air_moles(datum/gas_mixture/giver, moles)
return giver.transfer_to(air_contents, moles)
/obj/structure/transit_tube_pod/assume_air_ratio(datum/gas_mixture/giver, ratio)
return giver.transfer_ratio_to(air_contents, ratio)
/obj/structure/transit_tube_pod/remove_air(amount)
return air_contents.remove(amount)
/obj/structure/transit_tube_pod/remove_air_ratio(ratio)
return air_contents.remove_ratio(ratio)
/obj/structure/transit_tube_pod/transfer_air(datum/gas_mixture/taker, moles)
return air_contents.transfer_to(taker, moles)
/obj/structure/transit_tube_pod/transfer_air_ratio(datum/gas_mixture/taker, ratio)
return air_contents.transfer_ratio_to(taker, ratio)
/obj/structure/transit_tube_pod/relaymove(mob/mob, direction)
if(istype(mob) && mob.client)
if(!moving)
+1 -1
View File
@@ -674,7 +674,7 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
/obj/structure/window/plasma/reinforced/unanchored
anchored = FALSE
/obj/structure/window/plasma/reinforced/BlockSuperconductivity()
/obj/structure/window/plasma/reinforced/BlockThermalConductivity()
return TRUE
/obj/structure/window/reinforced/tinted