mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
LINDA -> MILLA (#25328)
* LINDA -> MILLA * Tiles now change their atmos mode properly. * Fixed a bug that made walls generate supercold air when deconstructed/destroyed. * Apply suggestions from code review Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Co-authored-by: GDN <96800819+GDNgit@users.noreply.github.com> Signed-off-by: Charlie Nolan <funnyman3595@gmail.com> * Begone, var! * MILLA -> milla * Lint. * More lint. * Prevent negative/NaN atmos from spreading. * Made fires start more reliably. * Undef what the rest should not see. * Enums are nice. * Match LINDA better. * Debugging verbs. * Debug verb fixes. * Labelled more lavaland stuff with ATMOS_MODE_LAVALAND * Block superconductivity on a couple more things for Lavaland. * Updated milla.dll * Lavaland map fixes. * Missed a spot. * Begone, var! (again) * Add libmilla_ci.so for continuous integration tests. * Install/contributing instructions for MILLA. * Directional plasmaglass windows on shuttles shouldn't stop protecting from heat after moving. * Banish bad naming. * Better naming and debug stats for SSair. * Apply suggestions from code review Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Signed-off-by: Charlie Nolan <funnyman3595@gmail.com> * Magic numbers and formatting. * Don't screw up the temperature during reactions. * Efficiency and readability. * Fix hotspots. * Removed redundant safety (MILLA will already output an error) * Optimizations. * oops * TGS build script update. * Change API of gas_mixture and how you get one from a turf. * Get in there. * so many vars * MILLA binary updates. * Lint * Made MT cost more honest. * Gave MILLA a read-only mode. * More read-only vs synchronized mode work. * Even more. * Synchronize disposals. * Updated a bunch of stuff to use SSair.synchronize or GM.synchronize. * MILLA <3 Tracy * lint * cargo fmt * more lint * Test needed MILLA sync. * Silence atmos machinery that's behaving as intended, but continue objecting to other potential failures to synchronize. * Push new MILLA DLL * Build MILLA * Update PR instructions for MILLA. * Add some fancy plasmaglass windows to the Lifebringers' ship. * The golems remembered that they should insulate *all* their engines. * First round of TM bugfixes. * Build MILLA * fix two lavaland ruin turf types * bunch more maps * fixes milla ci and makes the interesting turf verb better * Solid turfs can no longer conduct heat (for now...) * Made indoor tiles in beach and winter biodomes not lavaland air. * Re-added random IT teleport, adjusted warning message * Fixed a tinted window on Lavaland to be a plasglass window instead. * Made firelocks and holofans heatproof * Made RPD auto-wrench pipes if you have a wrench in your offhand. * Runtime fixes. * Made visuals update more reliably. * Lint * Update .github/CONTRIBUTING.md Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Signed-off-by: Charlie Nolan <funnyman3595@gmail.com> * Build MILLA * The Syndicate have installed tiny fans on their research base. * The syndicate have figured out how to make plastitanium windows heatproof. * This is getting out of hand. Now there are two of them. * Un-break the auto-wrenching that I broke before committing. * Build MILLA * Build MILLA * Massive MILLA refactor, assorted bugfixes. * Build MILLA * Explicit typing. * Less sleeping/blocking. * Build MILLA * Yes, yes, this part can sleep. * Build MILLA * SSair reporting improvements. * Build MILLA * Please do not dock twice and splat yourself. * Build MILLA * Pls to not make SM go nuts. * Build MILLA * Build MILLA * Added stricter lower bounds on plasmafire, fixing perpetually-burning SM. * Build MILLA * Lint * Temporary logging, begone. * Build MILLA * Prevent hotspot strobing. * Add in radiate_to_spess behavior. * Build MILLA * progress * Compiling is good. * bugfixes * Progress. * Ruins update. * This one exists. * Fixup temporary hotspots to last longer than one tick. * Add/fix comments. * Cut the slash. * Fix test. * No sleep for you. * Build MILLA * Prevent nested MILLA safety from runtiming. * Build MILLA * Runtime fix. * Build MILLA * Fix canisters not updating icon when gas contents change. * Build MILLA * Build MILLA * Fixed an issue that made mechs very cold on environment air. * Build MILLA * oops * Build MILLA * Walls can make loud noises again. * Build MILLA * Fixes a rare runtime. * Build MILLA * Update .github/DOWNLOADING.md Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Signed-off-by: Charlie Nolan <funnyman3595@gmail.com> * Review suggestions * Lint * Build MILLA * bound_mixtures now only contains mixtures that can be written * Build MILLA * Apply suggestions from code review Co-authored-by: Matt <116982774+Burzah@users.noreply.github.com> Signed-off-by: Charlie Nolan <funnyman3595@gmail.com> * Build MILLA * Restore the original async behavior of pyro anomalies. * Build MILLA * Build MILLA * Make the safety assertion in /datum/milla_safe safer. * Build MILLA --------- Signed-off-by: Charlie Nolan <funnyman3595@gmail.com> Co-authored-by: FunnyMan3595 (Charlie Nolan) <funnyman@google.com> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Co-authored-by: GDN <96800819+GDNgit@users.noreply.github.com> Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Co-authored-by: paradisess13[bot] <165046124+paradisess13[bot]@users.noreply.github.com> Co-authored-by: warriorstar-orion <orion@snowfrost.garden> Co-authored-by: GDN <Roanrichards1@Gmail.com>
This commit is contained in:
co-authored by
Burzah
GDN
AffectedArc07
FunnyMan3595
paradisess13[bot] <165046124+paradisess13[bot]@users.noreply.github.com>
warriorstar-orion
GDN
parent
56b4da8ffc
commit
d3584b1d1c
@@ -599,8 +599,17 @@ SLIME SCANNER
|
||||
* Outputs a message to the user describing the target's gasmixes.
|
||||
* Used in chat-based gas scans.
|
||||
*/
|
||||
/proc/atmos_scan(mob/user, atom/target, silent = FALSE, print = TRUE)
|
||||
var/mixture = target.return_analyzable_air()
|
||||
/proc/atmos_scan(mob/user, atom/target, silent = FALSE, print = TRUE, milla_turf_details = FALSE)
|
||||
var/mixture
|
||||
var/list/milla = null
|
||||
if(milla_turf_details)
|
||||
milla = new/list(MILLA_TILE_SIZE)
|
||||
get_tile_atmos(target, milla)
|
||||
var/datum/gas_mixture/GM = new()
|
||||
GM.copy_from_milla(milla)
|
||||
mixture = GM
|
||||
else
|
||||
mixture = target.return_analyzable_air()
|
||||
if(!mixture)
|
||||
return FALSE
|
||||
|
||||
@@ -628,19 +637,19 @@ SLIME SCANNER
|
||||
|
||||
if(total_moles)
|
||||
message += "<span class='info'>Total: [round(total_moles, 0.01)] moles</span>"
|
||||
if(air.oxygen && air.oxygen / total_moles > 0.01)
|
||||
message += " <span class='oxygen'>Oxygen: [round(air.oxygen, 0.01)] moles ([round(air.oxygen / total_moles * 100, 0.01)] %)</span>"
|
||||
if(air.nitrogen && air.nitrogen / total_moles > 0.01)
|
||||
message += " <span class='nitrogen'>Nitrogen: [round(air.nitrogen, 0.01)] moles ([round(air.nitrogen / total_moles * 100, 0.01)] %)</span>"
|
||||
if(air.carbon_dioxide && air.carbon_dioxide / total_moles > 0.01)
|
||||
message += " <span class='carbon_dioxide'>Carbon Dioxide: [round(air.carbon_dioxide, 0.01)] moles ([round(air.carbon_dioxide / total_moles * 100, 0.01)] %)</span>"
|
||||
if(air.toxins && air.toxins / total_moles > 0.01)
|
||||
message += " <span class='plasma'>Plasma: [round(air.toxins, 0.01)] moles ([round(air.toxins / total_moles * 100, 0.01)] %)</span>"
|
||||
if(air.sleeping_agent && air.sleeping_agent / total_moles > 0.01)
|
||||
message += " <span class='sleeping_agent'>Nitrous Oxide: [round(air.sleeping_agent, 0.01)] moles ([round(air.sleeping_agent / total_moles * 100, 0.01)] %)</span>"
|
||||
if(air.agent_b && air.agent_b / total_moles > 0.01)
|
||||
message += " <span class='agent_b'>Agent B: [round(air.agent_b, 0.01)] moles ([round(air.agent_b / total_moles * 100, 0.01)] %)</span>"
|
||||
message += "<span class='info'>Temperature: [round(air.temperature-T0C)] °C ([round(air.temperature)] K)</span>"
|
||||
if(air.oxygen() && (milla_turf_details || air.oxygen() / total_moles > 0.01))
|
||||
message += " <span class='oxygen'>Oxygen: [round(air.oxygen(), 0.01)] moles ([round(air.oxygen() / total_moles * 100, 0.01)] %)</span>"
|
||||
if(air.nitrogen() && (milla_turf_details || air.nitrogen() / total_moles > 0.01))
|
||||
message += " <span class='nitrogen'>Nitrogen: [round(air.nitrogen(), 0.01)] moles ([round(air.nitrogen() / total_moles * 100, 0.01)] %)</span>"
|
||||
if(air.carbon_dioxide() && (milla_turf_details || air.carbon_dioxide() / total_moles > 0.01))
|
||||
message += " <span class='carbon_dioxide'>Carbon Dioxide: [round(air.carbon_dioxide(), 0.01)] moles ([round(air.carbon_dioxide() / total_moles * 100, 0.01)] %)</span>"
|
||||
if(air.toxins() && (milla_turf_details || air.toxins() / total_moles > 0.01))
|
||||
message += " <span class='plasma'>Plasma: [round(air.toxins(), 0.01)] moles ([round(air.toxins() / total_moles * 100, 0.01)] %)</span>"
|
||||
if(air.sleeping_agent() && (milla_turf_details || air.sleeping_agent() / total_moles > 0.01))
|
||||
message += " <span class='sleeping_agent'>Nitrous Oxide: [round(air.sleeping_agent(), 0.01)] moles ([round(air.sleeping_agent() / total_moles * 100, 0.01)] %)</span>"
|
||||
if(air.agent_b() && (milla_turf_details || air.agent_b() / total_moles > 0.01))
|
||||
message += " <span class='agent_b'>Agent B: [round(air.agent_b(), 0.01)] moles ([round(air.agent_b() / total_moles * 100, 0.01)] %)</span>"
|
||||
message += "<span class='info'>Temperature: [round(air.temperature()-T0C)] °C ([round(air.temperature())] K)</span>"
|
||||
message += "<span class='info'>Volume: [round(volume)] Liters</span>"
|
||||
message += "<span class='info'>Pressure: [round(pressure, 0.1)] kPa</span>"
|
||||
message += "<span class='info'>Heat Capacity: [DisplayJoules(heat_capacity)] / K</span>"
|
||||
@@ -649,6 +658,28 @@ SLIME SCANNER
|
||||
message += length(airs) > 1 ? "<span class='info'>This node is empty!</span>" : "<span class='info'>[target] is empty!</span>"
|
||||
message += "<span class='info'>Volume: [round(volume)] Liters</span>" // don't want to change the order volume appears in, suck it
|
||||
|
||||
if(milla)
|
||||
// Values from milla/src/lib.rs, +1 due to array indexing difference.
|
||||
message += "<span class='info'>Airtight North: [(milla[MILLA_INDEX_AIRTIGHT_DIRECTIONS] & MILLA_NORTH) ? "yes" : "no"]</span>"
|
||||
message += "<span class='info'>Airtight East: [(milla[MILLA_INDEX_AIRTIGHT_DIRECTIONS] & MILLA_EAST) ? "yes" : "no"]</span>"
|
||||
message += "<span class='info'>Airtight South: [(milla[MILLA_INDEX_AIRTIGHT_DIRECTIONS] & MILLA_SOUTH) ? "yes" : "no"]</span>"
|
||||
message += "<span class='info'>Airtight West: [(milla[MILLA_INDEX_AIRTIGHT_DIRECTIONS] & MILLA_WEST) ? "yes" : "no"]</span>"
|
||||
switch(milla[MILLA_INDEX_ATMOS_MODE])
|
||||
// These are enum values, so they don't get increased.
|
||||
if(0)
|
||||
message += "<span class='info'>Atmos Mode: Space</span>"
|
||||
if(1)
|
||||
message += "<span class='info'>Atmos Mode: Sealed</span>"
|
||||
if(2)
|
||||
message += "<span class='info'>Atmos Mode: Exposed to Environment (ID: [milla[MILLA_INDEX_ENVIRONMENT_ID]])</span>"
|
||||
else
|
||||
message += "<span class='info'>Atmos Mode: Unknown ([milla[MILLA_INDEX_ATMOS_MODE]]), contact a coder.</span>"
|
||||
message += "<span class='info'>Superconductivity North: [milla[MILLA_INDEX_SUPERCONDUCTIVITY_NORTH]]</span>"
|
||||
message += "<span class='info'>Superconductivity East: [milla[MILLA_INDEX_SUPERCONDUCTIVITY_EAST]]</span>"
|
||||
message += "<span class='info'>Superconductivity South: [milla[MILLA_INDEX_SUPERCONDUCTIVITY_SOUTH]]</span>"
|
||||
message += "<span class='info'>Superconductivity West: [milla[MILLA_INDEX_SUPERCONDUCTIVITY_WEST]]</span>"
|
||||
message += "<span class='info'>Turf's Innate Heat Capacity: [milla[MILLA_INDEX_INNATE_HEAT_CAPACITY]]</span>"
|
||||
|
||||
to_chat(user, chat_box_examine(message.Join("\n")))
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
var/mob/living/user = loc
|
||||
user.update_inv_r_hand()
|
||||
user.update_inv_l_hand()
|
||||
loc.assume_air(air_contents)
|
||||
var/turf/T = get_turf(src)
|
||||
T.blind_release_air(air_contents)
|
||||
|
||||
/obj/item/latexballon/ex_act(severity)
|
||||
burst()
|
||||
|
||||
@@ -239,15 +239,13 @@
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/structure/chrono_field/assume_air()
|
||||
return 0
|
||||
|
||||
/obj/structure/chrono_field/return_air() //we always have nominal air and temperature
|
||||
/obj/structure/chrono_field/return_obj_air()
|
||||
//we always have nominal air and temperature
|
||||
RETURN_TYPE(/datum/gas_mixture)
|
||||
var/datum/gas_mixture/GM = new
|
||||
GM.oxygen = MOLES_O2STANDARD
|
||||
GM.nitrogen = MOLES_N2STANDARD
|
||||
GM.temperature = T20C
|
||||
GM.set_oxygen(MOLES_O2STANDARD)
|
||||
GM.set_nitrogen(MOLES_N2STANDARD)
|
||||
GM.set_temperature(T20C)
|
||||
return GM
|
||||
|
||||
/obj/structure/chrono_field/Move()
|
||||
|
||||
@@ -207,11 +207,11 @@
|
||||
operating = TRUE
|
||||
var/turf/previousturf = get_turf(src)
|
||||
for(var/turf/simulated/T in turflist)
|
||||
if(!T.air)
|
||||
if(T.blocks_air)
|
||||
break
|
||||
if(T == previousturf)
|
||||
continue //so we don't burn the tile we be standin on
|
||||
if(!T.CanAtmosPass(previousturf))
|
||||
if(!T.CanAtmosPass(get_dir(T, previousturf)) || !previousturf.CanAtmosPass(get_dir(previousturf, T)))
|
||||
break
|
||||
if(igniter)
|
||||
igniter.ignite_turf(src, T)
|
||||
@@ -229,13 +229,10 @@
|
||||
//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)
|
||||
if(air_transfer.toxins)
|
||||
air_transfer.toxins = air_transfer.toxins * 5
|
||||
target.assume_air(air_transfer)
|
||||
//Burn it based on transfered gas
|
||||
target.hotspot_expose((ptank.air_contents.temperature*2) + 380, 500)
|
||||
//location.hotspot_expose(1000,500,1)
|
||||
SSair.add_to_active(target, 0)
|
||||
if(air_transfer.toxins())
|
||||
air_transfer.set_toxins(air_transfer.toxins() * 5)
|
||||
target.blind_release_air(air_transfer)
|
||||
target.hotspot_expose((ptank.air_contents.temperature() * 2) + 380, 500)
|
||||
|
||||
|
||||
/obj/item/flamethrower/Initialize(mapload)
|
||||
|
||||
@@ -12,7 +12,13 @@
|
||||
var/turf/simulated/target_turf = get_turf(src)
|
||||
if(istype(target_turf))
|
||||
target_turf.atmos_spawn_air(spawn_contents, spawn_amount)
|
||||
target_turf.air_update_turf()
|
||||
|
||||
/obj/item/grenade/gas/proc/release_air(turf/simulated/target_turf)
|
||||
// Any proc that wants MILLA to be synchronous should not sleep.
|
||||
SHOULD_NOT_SLEEP(TRUE)
|
||||
|
||||
target_turf.atmos_spawn_air(spawn_contents, spawn_amount)
|
||||
|
||||
qdel(src)
|
||||
|
||||
/obj/item/grenade/gas/plasma
|
||||
|
||||
@@ -61,8 +61,8 @@
|
||||
var/ear_safety = M.check_ear_prot()
|
||||
//Atmosphere affects sound
|
||||
var/pressure_factor = 1
|
||||
var/datum/gas_mixture/hearer_env = source_turf.return_air()
|
||||
var/datum/gas_mixture/source_env = T.return_air()
|
||||
var/datum/gas_mixture/hearer_env = source_turf.get_readonly_air()
|
||||
var/datum/gas_mixture/source_env = T.get_readonly_air()
|
||||
|
||||
if(hearer_env && source_env)
|
||||
var/pressure = min(hearer_env.return_pressure(), source_env.return_pressure())
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
if(!tank)
|
||||
to_chat(user, "<span class='warning'>[src] can't operate without a source of gas!</span>")
|
||||
return
|
||||
if(tank && !tank.air_contents.boolean_remove(((gasperfist * fisto_setting) * tank.air_contents.return_volume()) / (R_IDEAL_GAS_EQUATION * tank.air_contents.return_temperature())))
|
||||
if(tank && !tank.air_contents.boolean_remove(((gasperfist * fisto_setting) * tank.air_contents.return_volume()) / (R_IDEAL_GAS_EQUATION * tank.air_contents.temperature())))
|
||||
to_chat(user, "<span class='warning'>[src]'s piston-ram lets out a weak hiss, it needs more gas!</span>")
|
||||
playsound(loc, 'sound/effects/refill.ogg', 50, 1)
|
||||
return
|
||||
|
||||
@@ -114,6 +114,8 @@
|
||||
else if(!iconrotation) //If user selected a rotation
|
||||
P.dir = user.dir
|
||||
to_chat(user, "<span class='notice'>[src] rapidly dispenses [P]!</span>")
|
||||
if(istype(user.get_inactive_hand(), /obj/item/wrench) && (user.can_reach(P, user.get_inactive_hand())))
|
||||
P.wrench_act(user, user.get_inactive_hand())
|
||||
activate_rpd(TRUE)
|
||||
|
||||
/obj/item/rpd/proc/create_disposals_pipe(mob/user, turf/T) //Make a disposals pipe / construct
|
||||
@@ -125,6 +127,8 @@
|
||||
if(!iconrotation && whatdpipe != PIPE_DISPOSALS_JUNCTION_RIGHT) //Disposals pipes are in the opposite direction to atmos pipes, so we need to flip them. Junctions don't have this quirk though
|
||||
P.flip()
|
||||
to_chat(user, "<span class='notice'>[src] rapidly dispenses [P]!</span>")
|
||||
if(istype(user.get_inactive_hand(), /obj/item/wrench) && (user.can_reach(P, user.get_inactive_hand())))
|
||||
P.attackby(user.get_inactive_hand(), user)
|
||||
activate_rpd(TRUE)
|
||||
|
||||
/obj/item/rpd/proc/create_transit_tube(mob/user, turf/dest)
|
||||
@@ -140,6 +144,8 @@
|
||||
S.dir = iconrotation ? iconrotation : user.dir
|
||||
|
||||
to_chat(user, "<span class='notice'>[src] rapidly dispenses [S]!</span>")
|
||||
if(istype(user.get_inactive_hand(), /obj/item/wrench) && (user.can_reach(S, user.get_inactive_hand())))
|
||||
S.wrench_act(user, user.get_inactive_hand())
|
||||
activate_rpd(TRUE)
|
||||
|
||||
/obj/item/rpd/proc/rotate_all_pipes(mob/user, turf/T) //Rotate all pipes on a turf
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
if(gas_type)
|
||||
switch(gas_type)
|
||||
if("oxygen")
|
||||
air_contents.oxygen = ((6 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C))
|
||||
air_contents.set_oxygen(((6 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C)))
|
||||
if("carbon dioxide")
|
||||
air_contents.carbon_dioxide = ((6 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C))
|
||||
air_contents.set_carbon_dioxide(((6 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C)))
|
||||
|
||||
/obj/item/tank/jetpack/on_mob_move(direction, mob/user)
|
||||
if(on)
|
||||
@@ -77,7 +77,7 @@
|
||||
return 0
|
||||
|
||||
var/turf/T = get_turf(user)
|
||||
T.assume_air(removed)
|
||||
T.blind_release_air(removed)
|
||||
return 1
|
||||
|
||||
/obj/item/tank/jetpack/improvised
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
dog_fashion = /datum/dog_fashion/back
|
||||
|
||||
/obj/item/tank/internals/oxygen/populate_gas()
|
||||
air_contents.oxygen = (6 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C)
|
||||
air_contents.set_oxygen((6 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C))
|
||||
|
||||
/obj/item/tank/internals/oxygen/yellow
|
||||
desc = "A tank of oxygen, this one is yellow."
|
||||
@@ -46,8 +46,8 @@
|
||||
force = 10
|
||||
|
||||
/obj/item/tank/internals/anesthetic/populate_gas()
|
||||
air_contents.oxygen = (3 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C) * O2STANDARD
|
||||
air_contents.sleeping_agent = (3 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C) * N2STANDARD
|
||||
air_contents.set_oxygen((3 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C) * O2STANDARD)
|
||||
air_contents.set_sleeping_agent((3 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C) * N2STANDARD)
|
||||
|
||||
/*
|
||||
* Plasma
|
||||
@@ -61,7 +61,7 @@
|
||||
force = 8
|
||||
|
||||
/obj/item/tank/internals/plasma/populate_gas()
|
||||
air_contents.toxins = (3 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C)
|
||||
air_contents.set_toxins((3 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C))
|
||||
|
||||
/obj/item/tank/internals/plasma/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/flamethrower))
|
||||
@@ -77,7 +77,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/tank/internals/plasma/full/populate_gas()
|
||||
air_contents.toxins = (10 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C)
|
||||
air_contents.set_toxins((10 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C))
|
||||
|
||||
/obj/item/tank/internals/plasma/empty/populate_gas()
|
||||
return
|
||||
@@ -94,10 +94,10 @@
|
||||
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
|
||||
|
||||
/obj/item/tank/internals/plasmaman/populate_gas()
|
||||
air_contents.toxins = (3 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C)
|
||||
air_contents.set_toxins((3 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C))
|
||||
|
||||
/obj/item/tank/internals/plasmaman/full/populate_gas()
|
||||
air_contents.toxins = (10 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C)
|
||||
air_contents.set_toxins((10 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C))
|
||||
|
||||
|
||||
/obj/item/tank/internals/plasmaman/belt
|
||||
@@ -110,7 +110,7 @@
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
/obj/item/tank/internals/plasmaman/belt/full/populate_gas()
|
||||
air_contents.toxins = (10 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C)
|
||||
air_contents.set_toxins((10 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C))
|
||||
|
||||
/obj/item/tank/internals/plasmaman/belt/empty/populate_gas()
|
||||
return
|
||||
@@ -121,7 +121,7 @@
|
||||
icon_state = "emergency_p"
|
||||
|
||||
/obj/item/tank/internals/emergency_oxygen/plasma/populate_gas()
|
||||
air_contents.toxins = (10 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C)
|
||||
air_contents.set_toxins((10 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C))
|
||||
|
||||
/*
|
||||
* Emergency Oxygen
|
||||
@@ -139,7 +139,7 @@
|
||||
volume = 3 //Tiny. Real life equivalents only have 21 breaths of oxygen in them. They're EMERGENCY tanks anyway -errorage (dangercon 2011)
|
||||
|
||||
/obj/item/tank/internals/emergency_oxygen/populate_gas()
|
||||
air_contents.oxygen = (10 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C)
|
||||
air_contents.set_oxygen((10 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C))
|
||||
|
||||
/obj/item/tank/internals/emergency_oxygen/empty/populate_gas()
|
||||
return
|
||||
@@ -175,7 +175,7 @@
|
||||
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
|
||||
|
||||
/obj/item/tank/internals/nitrogen/populate_gas()
|
||||
air_contents.nitrogen = (6 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C)
|
||||
air_contents.set_nitrogen((6 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C))
|
||||
|
||||
/obj/item/tank/internals/emergency_oxygen/nitrogen
|
||||
name = "emergency nitrogen tank"
|
||||
@@ -183,7 +183,7 @@
|
||||
icon_state = "emergency_nitrogen"
|
||||
|
||||
/obj/item/tank/internals/emergency_oxygen/nitrogen/populate_gas()
|
||||
air_contents.nitrogen = (10 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C)
|
||||
air_contents.set_nitrogen((10 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C))
|
||||
|
||||
/obj/item/tank/internals/emergency_oxygen/double/vox
|
||||
name = "vox specialized nitrogen tank"
|
||||
@@ -192,7 +192,7 @@
|
||||
volume = 35
|
||||
|
||||
/obj/item/tank/internals/emergency_oxygen/double/vox/populate_gas()
|
||||
air_contents.nitrogen = (10 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C)
|
||||
air_contents.set_nitrogen((10 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C))
|
||||
|
||||
/*
|
||||
* Air Mix
|
||||
@@ -205,8 +205,8 @@
|
||||
distribute_pressure = ONE_ATMOSPHERE
|
||||
|
||||
/obj/item/tank/internals/air/populate_gas()
|
||||
air_contents.oxygen = (3 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C) * O2STANDARD
|
||||
air_contents.nitrogen = (3 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C) * N2STANDARD
|
||||
air_contents.set_oxygen((3 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C) * O2STANDARD)
|
||||
air_contents.set_nitrogen((3 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C) * N2STANDARD)
|
||||
|
||||
/*
|
||||
* Generic
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
air_contents = new /datum/gas_mixture()
|
||||
air_contents.volume = volume //liters
|
||||
air_contents.temperature = T20C
|
||||
air_contents.set_temperature(T20C)
|
||||
|
||||
populate_gas()
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
. += "<span class='notice'>It's [p_a()] [bicon(icon)] [name]! If you want any more information you'll need to get closer.</span>"
|
||||
return
|
||||
|
||||
var/celsius_temperature = air_contents.temperature - T0C
|
||||
var/celsius_temperature = air_contents.temperature() - T0C
|
||||
var/descriptive
|
||||
|
||||
if(celsius_temperature < 20)
|
||||
@@ -111,7 +111,7 @@
|
||||
qdel(src)
|
||||
|
||||
if(air_contents)
|
||||
location.assume_air(air_contents)
|
||||
location.blind_release_air(air_contents)
|
||||
|
||||
qdel(src)
|
||||
|
||||
@@ -133,8 +133,7 @@
|
||||
if(!disassembled)
|
||||
var/turf/T = get_turf(src)
|
||||
if(T)
|
||||
T.assume_air(air_contents)
|
||||
air_update_turf()
|
||||
T.blind_release_air(air_contents)
|
||||
playsound(src.loc, 'sound/effects/spray.ogg', 10, TRUE, -3)
|
||||
qdel(src)
|
||||
|
||||
@@ -205,22 +204,13 @@
|
||||
if(.)
|
||||
add_fingerprint(usr)
|
||||
|
||||
/obj/item/tank/remove_air(amount)
|
||||
return air_contents.remove(amount)
|
||||
|
||||
/obj/item/tank/return_air()
|
||||
/obj/item/tank/return_obj_air()
|
||||
RETURN_TYPE(/datum/gas_mixture)
|
||||
return air_contents
|
||||
|
||||
/obj/item/tank/return_analyzable_air()
|
||||
return air_contents
|
||||
|
||||
/obj/item/tank/assume_air(datum/gas_mixture/giver)
|
||||
air_contents.merge(giver)
|
||||
|
||||
check_status()
|
||||
return 1
|
||||
|
||||
/obj/item/tank/proc/remove_air_volume(volume_to_return)
|
||||
if(!air_contents)
|
||||
return null
|
||||
@@ -228,9 +218,9 @@
|
||||
var/tank_pressure = air_contents.return_pressure()
|
||||
var/actual_distribute_pressure = clamp(tank_pressure, 0, distribute_pressure)
|
||||
|
||||
var/moles_needed = actual_distribute_pressure * volume_to_return / (R_IDEAL_GAS_EQUATION * air_contents.temperature)
|
||||
var/moles_needed = actual_distribute_pressure * volume_to_return / (R_IDEAL_GAS_EQUATION * air_contents.temperature())
|
||||
|
||||
return remove_air(moles_needed)
|
||||
return air_contents.remove(moles_needed)
|
||||
|
||||
/obj/item/tank/process()
|
||||
//Allow for reactions
|
||||
@@ -272,8 +262,8 @@
|
||||
var/turf/simulated/T = get_turf(src)
|
||||
if(!T)
|
||||
return
|
||||
T.assume_air(air_contents)
|
||||
playsound(loc, 'sound/effects/spray.ogg', 10, 1, -3)
|
||||
T.blind_release_air(air_contents)
|
||||
playsound(loc, 'sound/effects/spray.ogg', 10, TRUE, -3)
|
||||
qdel(src)
|
||||
else
|
||||
integrity--
|
||||
@@ -285,7 +275,7 @@
|
||||
if(!T)
|
||||
return
|
||||
var/datum/gas_mixture/leaked_gas = air_contents.remove_ratio(0.25)
|
||||
T.assume_air(leaked_gas)
|
||||
T.blind_release_air(leaked_gas)
|
||||
else
|
||||
integrity--
|
||||
|
||||
|
||||
Reference in New Issue
Block a user