Merge pull request #6848 from Citadel-Station-13/upstream-merge-37631
[MIRROR] Buffs atmospheric analyzers to show mole count, volume and higher degrees of precision
This commit is contained in:
@@ -882,28 +882,6 @@ GLOBAL_LIST_INIT(WALLITEMS_INVERSE, typecacheof(list(
|
||||
/proc/format_text(text)
|
||||
return replacetext(replacetext(text,"\proper ",""),"\improper ","")
|
||||
|
||||
/obj/proc/atmosanalyzer_scan(datum/gas_mixture/air_contents, mob/user, obj/target = src)
|
||||
var/obj/icon = target
|
||||
user.visible_message("[user] has used the analyzer on [icon2html(icon, viewers(src))] [target].", "<span class='notice'>You use the analyzer on [icon2html(icon, user)] [target].</span>")
|
||||
var/pressure = air_contents.return_pressure()
|
||||
var/total_moles = air_contents.total_moles()
|
||||
|
||||
to_chat(user, "<span class='notice'>Results of analysis of [icon2html(icon, user)] [target].</span>")
|
||||
if(total_moles>0)
|
||||
to_chat(user, "<span class='notice'>Pressure: [round(pressure,0.1)] kPa</span>")
|
||||
|
||||
var/list/cached_gases = air_contents.gases
|
||||
|
||||
for(var/id in cached_gases)
|
||||
var/gas_concentration = cached_gases[id][MOLES]/total_moles
|
||||
if((id in GLOB.hardcoded_gases) || gas_concentration > 0.001) //ensures the four primary gases are always shown.
|
||||
to_chat(user, "<span class='notice'>[cached_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_concentration*100, 0.01)] %</span>")
|
||||
|
||||
to_chat(user, "<span class='notice'>Temperature: [round(air_contents.temperature-T0C)] °C</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[target] is empty!</span>")
|
||||
return
|
||||
|
||||
/proc/check_target_facings(mob/living/initator, mob/living/target)
|
||||
/*This can be used to add additional effects on interactions between mobs depending on how the mobs are facing each other, such as adding a crit damage to blows to the back of a guy's head.
|
||||
Given how click code currently works (Nov '13), the initiating mob will be facing the target mob most of the time
|
||||
|
||||
Reference in New Issue
Block a user