refactors most spans

This commit is contained in:
Kashargul
2024-10-02 21:10:31 +02:00
parent 5417c7772c
commit a2c673ab7a
1517 changed files with 12436 additions and 12347 deletions
+3 -3
View File
@@ -25,13 +25,13 @@
/mob/living/silicon/ai/ClickOn(var/atom/A, params)
if(!checkClickCooldown())
return
setClickCooldown(1)
if(client.buildmode) // comes after object.Click to allow buildmode gui objects to be clicked
build_click(src, client.buildmode, params, A)
return
if(multicam_on)
var/turf/T = get_turf(A)
if(T)
@@ -173,7 +173,7 @@
to_chat(user, "The bolt lights wire is cut - The door bolt lights are permanently disabled.")
return
lights = !lights
to_chat(user, "<span class='notice'>Lights are now [lights ? "on." : "off."]</span>")
to_chat(user, span_notice("Lights are now [lights ? "on." : "off."]"))
update_icon()
return TRUE
+1 -1
View File
@@ -337,7 +337,7 @@
nutrition = max(nutrition - rand(1,5),0)
handle_regular_hud_updates()
else
to_chat(src, "<span class='warning'>You're out of energy! You need food!</span>")
to_chat(src, span_warning("You're out of energy! You need food!"))
// Simple helper to face what you clicked on, in case it should be needed in more than one place
/mob/proc/face_atom(var/atom/A)
+1 -1
View File
@@ -46,7 +46,7 @@
if(is_component_functioning("camera"))
aiCamera.captureimage(A, usr)
else
to_chat(src, "<span class='userdanger'>Your camera isn't functional.</span>")
to_chat(src, span_userdanger("Your camera isn't functional."))
return
/*
+1 -1
View File
@@ -290,7 +290,7 @@
if(!mob)
return // Paranoid.
if(isnull(slot) || !isnum(slot))
to_chat(src, "<span class='warning'>.activate_ability requires a number as input, corrisponding to the slot you wish to use.</span>")
to_chat(src, span_warning(".activate_ability requires a number as input, corrisponding to the slot you wish to use."))
return // Bad input.
if(!mob.ability_master)
return // No abilities.
+1 -1
View File
@@ -468,7 +468,7 @@ so as to remain in compliance with the most up-to-date laws."
return
var/paramslist = params2list(params)
if(paramslist["shift"]) // screen objects don't do the normal Click() stuff so we'll cheat
to_chat(usr,"<span class='boldnotice'>[name]</span> - <span class='info'>[desc]</span>")
to_chat(usr,span_boldnotice("[name]</span> - <span class='info'>[desc]"))
return
if(master)
return usr.client.Click(master, location, control, params)
+1 -1
View File
@@ -362,7 +362,7 @@ var/list/global_huds = list(
set hidden = 1
if(!hud_used)
to_chat(usr, "<span class='warning'>This mob type does not use a HUD.</span>")
to_chat(usr, span_warning("This mob type does not use a HUD."))
return FALSE
if(!client)
return FALSE
+2 -2
View File
@@ -282,11 +282,11 @@ var/obj/screen/robot_inventory
//r.client.screen += robot_inventory //"store" icon
if(!r.module)
to_chat(usr, "<span class='danger'>No module selected</span>")
to_chat(usr, span_danger("No module selected"))
return
if(!r.module.modules)
to_chat(usr, "<span class='danger'>Selected module has no modules to select</span>")
to_chat(usr, span_danger("Selected module has no modules to select"))
return
if(!r.robot_modules_background)
+6 -6
View File
@@ -290,7 +290,7 @@
if(iscarbon(usr))
var/mob/living/carbon/C = usr
if(C.legcuffed)
to_chat(C, "<span class='notice'>You are legcuffed! You cannot run until you get [C.legcuffed] removed!</span>")
to_chat(C, span_notice("You are legcuffed! You cannot run until you get [C.legcuffed] removed!"))
C.m_intent = "walk" //Just incase
C.hud_used.move_intent.icon_state = "walking"
return 1
@@ -330,7 +330,7 @@
if(!C.stat && !C.stunned && !C.paralysis && !C.restrained())
if(C.internal)
C.internal = null
to_chat(C, "<span class='notice'>No longer running on internals.</span>")
to_chat(C, span_notice("No longer running on internals."))
if(C.internals)
C.internals.icon_state = "internal0"
else
@@ -342,7 +342,7 @@
no_mask = 1
if(no_mask)
to_chat(C, "<span class='notice'>You are not wearing a suitable mask or helmet.</span>")
to_chat(C, span_notice("You are not wearing a suitable mask or helmet."))
return 1
else
var/list/nicename = null
@@ -423,7 +423,7 @@
//We've determined the best container now we set it as our internals
if(best)
to_chat(C, "<span class='notice'>You are now running on internals from [tankcheck[best]] [from] your [nicename[best]].</span>")
to_chat(C, span_notice("You are now running on internals from [tankcheck[best]] [from] your [nicename[best]]."))
C.internal = tankcheck[best]
@@ -431,7 +431,7 @@
if(C.internals)
C.internals.icon_state = "internal1"
else
to_chat(C, "<span class='notice'>You don't have a[breathes=="oxygen" ? "n oxygen" : addtext(" ",breathes)] tank.</span>")
to_chat(C, span_notice("You don't have a[breathes=="oxygen" ? "n oxygen" : addtext(" ",breathes)] tank."))
if("act_intent")
usr.a_intent_change("right")
if(I_HELP)
@@ -497,7 +497,7 @@
if(i)
s.can_use(u,i)
else
to_chat(usr, "<span class='notice'>You're not holding anything to use. You need to have something in your active hand to use it.</span>")
to_chat(usr, span_notice("You're not holding anything to use. You need to have something in your active hand to use it."))
if("module")
if(isrobot(usr))
+19 -19
View File
@@ -6,63 +6,63 @@
if("darkness")
var/turf/T = get_turf(usr)
var/darkness = round(1 - T.get_lumcount(),0.1)
to_chat(usr,"<span class='notice'><b>Darkness:</b> [darkness]</span>")
to_chat(usr,span_notice("<b>Darkness:</b> [darkness]"))
if("energy")
var/mob/living/simple_mob/shadekin/SK = usr
if(istype(SK))
to_chat(usr,"<span class='notice'><b>Energy:</b> [SK.energy] ([SK.dark_gains])</span>")
to_chat(usr,span_notice("<b>Energy:</b> [SK.energy] ([SK.dark_gains])"))
if("shadekin status")
var/turf/T = get_turf(usr)
if(T)
var/darkness = round(1 - T.get_lumcount(),0.1)
to_chat(usr,"<span class='notice'><b>Darkness:</b> [darkness]</span>")
to_chat(usr,span_notice("<b>Darkness:</b> [darkness]"))
var/mob/living/carbon/human/H = usr
if(istype(H) && istype(H.species, /datum/species/shadekin))
to_chat(usr,"<span class='notice'><b>Energy:</b> [H.shadekin_get_energy(H)]</span>")
to_chat(usr,span_notice("<b>Energy:</b> [H.shadekin_get_energy(H)]"))
if("glamour")
var/mob/living/carbon/human/H = usr
if(istype(H))
to_chat(usr,"<span class='notice'><b>Energy:</b> [H.species.lleill_energy]/[H.species.lleill_energy_max]</span>")
to_chat(usr,span_notice("<b>Energy:</b> [H.species.lleill_energy]/[H.species.lleill_energy_max]"))
if("danger level")
var/mob/living/carbon/human/H = usr
if(istype(H) && istype(H.species, /datum/species/xenochimera))
if(H.feral > 50)
to_chat(usr, "<span class='warning'>You are currently <b>completely feral.</b></span>")
to_chat(usr, span_warning("You are currently <b>completely feral.</b>"))
else if(H.feral > 10)
to_chat(usr, "<span class='warning'>You are currently <b>crazed and confused.</b></span>")
to_chat(usr, span_warning("You are currently <b>crazed and confused.</b>"))
else if(H.feral > 0)
to_chat(usr, "<span class='warning'>You are currently <b>acting on instinct.</b></span>")
to_chat(usr, span_warning("You are currently <b>acting on instinct.</b>"))
else
to_chat(usr, "<span class='notice'>You are currently <b>calm and collected.</b></span>")
to_chat(usr, span_notice("You are currently <b>calm and collected.</b>"))
if(H.feral > 0)
var/feral_passing = TRUE
if(H.traumatic_shock > min(60, H.nutrition/10))
to_chat(usr, "<span class='warning'>Your pain prevents you from regaining focus.</span>")
to_chat(usr, span_warning("Your pain prevents you from regaining focus."))
feral_passing = FALSE
if(H.feral + H.nutrition < 150)
to_chat(usr, "<span class='warning'>Your hunger prevents you from regaining focus.</span>")
to_chat(usr, span_warning("Your hunger prevents you from regaining focus."))
feral_passing = FALSE
if(H.jitteriness >= 100)
to_chat(usr, "<span class='warning'>Your jitterness prevents you from regaining focus.</span>")
to_chat(usr, span_warning("Your jitterness prevents you from regaining focus."))
feral_passing = FALSE
if(feral_passing)
var/turf/T = get_turf(H)
if(T.get_lumcount() <= 0.1)
to_chat(usr, "<span class='notice'>You are slowly calming down in darkness' safety...</span>")
to_chat(usr, span_notice("You are slowly calming down in darkness' safety..."))
else if(isbelly(H.loc)) // Safety message for if inside a belly.
to_chat(usr, "<span class='notice'>You are slowly calming down within the darkness of something's belly, listening to their body as it moves around you. ...safe...</span>")
to_chat(usr, span_notice("You are slowly calming down within the darkness of something's belly, listening to their body as it moves around you. ...safe..."))
else
to_chat(usr, "<span class='notice'>You are slowly calming down... But safety of darkness is much preferred.</span>")
to_chat(usr, span_notice("You are slowly calming down... But safety of darkness is much preferred."))
else
if(H.nutrition < 150)
to_chat(usr, "<span class='warning'>Your hunger is slowly making you unstable.</span>")
to_chat(usr, span_warning("Your hunger is slowly making you unstable."))
if("Reconstructing Form") // Allow Viewing Reconstruction Timer + Hatching for 'chimera
var/mob/living/carbon/human/H = usr
if(istype(H) && istype(H.species, /datum/species/xenochimera)) // If you're somehow able to click this while not a chimera, this should prevent weird runtimes. Will need changing if regeneration is ever opened to non-chimera using the same alert.
if(H.revive_ready == REVIVING_NOW)
to_chat(usr, "<span class='notice'>We are currently reviving, and will be done in [round((H.revive_finished - world.time) / 10)] seconds, or [round(((H.revive_finished - world.time) * 0.1) / 60)] minutes.</span>")
to_chat(usr, span_notice("We are currently reviving, and will be done in [round((H.revive_finished - world.time) / 10)] seconds, or [round(((H.revive_finished - world.time) * 0.1) / 60)] minutes."))
else if(H.revive_ready == REVIVING_DONE)
to_chat(usr, "<span class='warning'>You should have a notification + alert for this! Bug report that this is still here!</span>")
to_chat(usr, span_warning("You should have a notification + alert for this! Bug report that this is still here!"))
if("Ready to Hatch") // Allow Viewing Reconstruction Timer + Hatching for 'chimera
var/mob/living/carbon/human/H = usr
@@ -73,4 +73,4 @@
else
return 0
return 1
return 1
+2 -2
View File
@@ -6,9 +6,9 @@
if(!client) return
client.inquisitive_ghost = !client.inquisitive_ghost
if(client.inquisitive_ghost)
to_chat(src, "<span class='notice'>You will now examine everything you click on.</span>")
to_chat(src, span_notice("You will now examine everything you click on."))
else
to_chat(src, "<span class='notice'>You will no longer examine things you click on.</span>")
to_chat(src, span_notice("You will no longer examine things you click on."))
/mob/observer/dead/DblClickOn(var/atom/A, var/params)
if(client.buildmode)
+1 -1
View File
@@ -110,7 +110,7 @@ var/const/tk_maxrange = 15
if(focus)
d = max(d, get_dist(user, focus)) // whichever is further
if(d > tk_maxrange)
to_chat(user, "<span class='notice'>Your mind won't reach that far.</span>")
to_chat(user, span_notice("Your mind won't reach that far."))
return
if(!focus)