[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)

View File

@@ -50,7 +50,7 @@
if(C.prefs?.read_preference(/datum/preference/toggle/show_debug_logs))
to_chat(C,
type = MESSAGE_TYPE_DEBUG,
html = "<span class='filter_debuglog'>DEBUG: [text]</span>")
html = span_filter_debuglogs("DEBUG: [text]"))
/proc/log_game(text)
if (CONFIG_GET(flag/log_game)) // CHOMPEdit
@@ -288,7 +288,7 @@
WRITE_LOG(diary, "ASSET: [text]")
/proc/report_progress(var/progress_message)
admin_notice("<span class='boldannounce'>[progress_message]</span>", R_DEBUG)
admin_notice(span_boldannounce("[progress_message]"), R_DEBUG)
to_world_log(progress_message)
//pretty print a direction bitflag, can be useful for debugging.

View File

@@ -200,10 +200,10 @@ Proc for attack log creation, because really why not
if(!time)
return TRUE //Done!
if(user.status_flags & DOING_TASK)
to_chat(user, "<span class='warning'>You're in the middle of doing something else already.</span>")
to_chat(user, span_warning("You're in the middle of doing something else already."))
return FALSE //Performing an exclusive do_after or do_mob already
if(target?.flags & IS_BUSY)
to_chat(user, "<span class='warning'>Someone is already doing something with \the [target].</span>")
to_chat(user, span_warning("Someone is already doing something with \the [target]."))
return FALSE
var/user_loc = user.loc
var/target_loc = target.loc
@@ -266,10 +266,10 @@ Proc for attack log creation, because really why not
if(!delay)
return TRUE //Okay. Done.
if(user.status_flags & DOING_TASK)
to_chat(user, "<span class='warning'>You're in the middle of doing something else already.</span>")
to_chat(user, span_warning("You're in the middle of doing something else already."))
return FALSE //Performing an exclusive do_after or do_mob already
if(target?.flags & IS_BUSY)
to_chat(user, "<span class='warning'>Someone is already doing something with \the [target].</span>")
to_chat(user, span_warning("Someone is already doing something with \the [target]."))
return FALSE
var/atom/target_loc = null
@@ -375,6 +375,6 @@ Proc for attack log creation, because really why not
/proc/not_has_ooc_text(mob/user)
if (CONFIG_GET(flag/allow_metadata) && (!user.client?.prefs?.metadata || length(user.client.prefs.metadata) < 15)) // CHOMPEdit
to_chat(user, "<span class='warning'>Please set informative OOC notes related to RP/ERP preferences. Set them using the 'OOC Notes' button on the 'General' tab in character setup.</span>")
to_chat(user, span_warning("Please set informative OOC notes related to RP/ERP preferences. Set them using the 'OOC Notes' button on the 'General' tab in character setup."))
return TRUE
return FALSE