Buffs atmospheric analyzers to show mole count, volume and higher degrees of precision (#37631)

add: Analyzers can now scan all kinds of atmospheric machinery - unary, binary, ternary, quaternary, you name it. This means stuff like gas pumps, gas mixers, vents and so forth can be analyzed.

tweak: Analyzers now show temperature in kelvin as well as celsius.

tweak: Analyzers now show total mole count, volume, and mole count of all gases.

tweak: Analyzers show everything at slightly higher degrees of precision.


More accurate and advanced analyzers have been something that I think atmos and toxins mains have been wanting for a while now (including myself). It's always a pain to have to manually add 273.15 to every celsius temperature, or have to use outside tools or VV (which isnt usable in actual games) to calculate mole count for a gas mixture. Not to mention, the ability to analyze things like volume pumps and gas filters makes it easier to manage larger atmos setups. This is just a QoL change for people in any of those jobs. In fact, most players probably don't even know what the fuck is a mole is so adding mole readout to analyzers is a good way to get people to understand atmospherics better.
This commit is contained in:
cyclowns
2018-05-22 18:38:59 -07:00
committed by letterjay
parent 292c5dfa96
commit f37865ee6c
18 changed files with 102 additions and 94 deletions
@@ -152,3 +152,10 @@ UI Stuff
return ..()
to_chat(user, "<span class='danger'>Access denied.</span>")
return UI_CLOSE
/*
Tool acts
*/
/obj/machinery/atmospherics/components/analyzer_act(mob/living/user, obj/item/I)
atmosanalyzer_scan(airs, user, src)
@@ -19,12 +19,6 @@
update_icon()
..(intact)
/obj/machinery/atmospherics/components/unary/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/analyzer))
atmosanalyzer_scan(airs[1], user)
else
return ..()
/obj/machinery/atmospherics/components/unary/proc/assign_uid_vents()
uid = num2text(gl_uid++)
return uid
@@ -63,8 +63,6 @@
return parent.air.remove(amount)
/obj/machinery/atmospherics/pipe/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/analyzer))
atmosanalyzer_scan(parent.air, user)
if(istype(W, /obj/item/pipe_meter))
var/obj/item/pipe_meter/meter = W
user.dropItemToGround(meter)
@@ -72,6 +70,9 @@
else
return ..()
/obj/machinery/atmospherics/pipe/analyzer_act(mob/living/user, obj/item/I)
atmosanalyzer_scan(parent.air, user, src)
/obj/machinery/atmospherics/pipe/returnPipenet()
return parent
@@ -138,11 +138,12 @@
"<span class='notice'>You fasten [src] to the port.</span>", \
"<span class='italics'>You hear a ratchet.</span>")
update_icon()
else if(istype(W, /obj/item/analyzer) && Adjacent(user))
atmosanalyzer_scan(air_contents, user)
else
return ..()
/obj/machinery/portable_atmospherics/analyzer_act(mob/living/user, obj/item/I)
atmosanalyzer_scan(air_contents, user, src)
/obj/machinery/portable_atmospherics/attacked_by(obj/item/I, mob/user)
if(I.force < 10 && !(stat & BROKEN))
take_damage(0)