[MIRROR] refactors most spans (#9139)

Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com>
Co-authored-by: Kashargul <KashL@t-online.de>
This commit is contained in:
CHOMPStation2
2024-10-04 06:00:17 -07:00
committed by GitHub
parent 43ee646816
commit ab154b48b2
1511 changed files with 12497 additions and 12357 deletions

View File

@@ -1,16 +1,16 @@
/obj/proc/analyze_gases(var/atom/A, var/mob/user)
if(src != A)
user.visible_message("<span class='notice'>\The [user] has used \an [src] on \the [A]</span>")
user.visible_message(span_notice("\The [user] has used \an [src] on \the [A]"))
A.add_fingerprint(user)
var/list/result = A.atmosanalyze(user)
if(result && result.len)
to_chat(user, "<span class='notice'>Results of the analysis[src == A ? "" : " of \the [A]"]</span>")
to_chat(user, span_notice("Results of the analysis[src == A ? "" : " of \the [A]"]"))
for(var/line in result)
to_chat(user, "<span class='notice'>[line]</span>")
to_chat(user, span_notice("[line]"))
return 1
to_chat(user, "<span class='warning'>Your [src] flashes a red light as it fails to analyze \the [A].</span>")
to_chat(user, span_warning("Your [src] flashes a red light as it fails to analyze \the [A]."))
return 0
/proc/atmosanalyzer_scan(var/atom/target, var/datum/gas_mixture/mixture, var/mob/user)
@@ -19,13 +19,13 @@
if (mixture && mixture.total_moles > 0)
var/pressure = mixture.return_pressure()
var/total_moles = mixture.total_moles
results += "<span class='notice'>Pressure: [round(pressure,0.1)] kPa</span>"
results += span_notice("Pressure: [round(pressure,0.1)] kPa")
for(var/mix in mixture.gas)
results += "<span class='notice'>[gas_data.name[mix]]: [round((mixture.gas[mix] / total_moles) * 100)]% ([round(mixture.gas[mix], 0.01)] moles)</span>"
results += "<span class='notice'>Temperature: [round(mixture.temperature-T0C)]&deg;C</span>"
results += "<span class='notice'>Heat Capacity: [round(mixture.heat_capacity(),0.1)]</span>"
results += span_notice("[gas_data.name[mix]]: [round((mixture.gas[mix] / total_moles) * 100)]% ([round(mixture.gas[mix], 0.01)] moles)")
results += span_notice("Temperature: [round(mixture.temperature-T0C)]&deg;C")
results += span_notice("Heat Capacity: [round(mixture.heat_capacity(),0.1)]")
else
results += "<span class='notice'>\The [target] is empty!</span>"
results += span_notice("\The [target] is empty!")
return results
@@ -55,16 +55,16 @@
/obj/machinery/atmospherics/trinary/atmos_filter/atmosanalyze(var/mob/user)
return atmosanalyzer_scan(src, src.air1, user)
/obj/machinery/atmospherics/trinary/mixer/atmosanalyze(var/mob/user)
return atmosanalyzer_scan(src, src.air3, user)
/obj/machinery/atmospherics/omni/atmos_filter/atmosanalyze(var/mob/user)
return atmosanalyzer_scan(src, src.input.air, user)
/obj/machinery/atmospherics/omni/mixer/atmosanalyze(var/mob/user)
return atmosanalyzer_scan(src, src.output.air, user)
/obj/machinery/meter/atmosanalyze(var/mob/user)
var/datum/gas_mixture/mixture = null
if(src.target)