rid of old span macros

This commit is contained in:
Kashargul
2024-10-01 23:51:48 +02:00
parent ded60639bc
commit e0d694e8ac
205 changed files with 862 additions and 868 deletions
+1 -1
View File
@@ -877,7 +877,7 @@
if(!reason)
return
to_chat(M, span("filter_system critical", "You have been kicked from the server: [reason]"))
to_chat(M, span_filter_system(span_critical("You have been kicked from the server: [reason]")))
log_admin("[key_name(usr)] booted [key_name(M)] for reason: '[reason]'.")
message_admins(span_blue("[key_name_admin(usr)] booted [key_name_admin(M)] for reason '[reason]'."), 1)
//M.client = null
+18 -18
View File
@@ -521,13 +521,13 @@
var/datum/ai_holder/AI = L.ai_holder
if(stance == STANCE_SLEEP)
AI.go_wake()
to_chat(user, span("notice", "\The [L]'s AI has been enabled."))
to_chat(user, span_notice("\The [L]'s AI has been enabled."))
else
AI.go_sleep()
to_chat(user, span("notice", "\The [L]'s AI has been disabled."))
to_chat(user, span_notice("\The [L]'s AI has been disabled."))
return
else
to_chat(user, span("warning", "\The [L] is not AI controlled."))
to_chat(user, span_warning("\The [L] is not AI controlled."))
return
// Toggle hostility
@@ -535,28 +535,28 @@
if(!isnull(L.get_AI_stance()))
var/datum/ai_holder/AI = L.ai_holder
AI.hostile = !AI.hostile
to_chat(user, span("notice", "\The [L] is now [AI.hostile ? "hostile" : "passive"]."))
to_chat(user, span_notice("\The [L] is now [AI.hostile ? "hostile" : "passive"]."))
else
to_chat(user, span("warning", "\The [L] is not AI controlled."))
to_chat(user, span_warning("\The [L] is not AI controlled."))
return
// Copy faction
if(pa.Find("ctrl"))
holder.copied_faction = L.faction
to_chat(user, span("notice", "Copied faction '[holder.copied_faction]'."))
to_chat(user, span_notice("Copied faction '[holder.copied_faction]'."))
return
// Select/Deselect
if(!isnull(L.get_AI_stance()))
if(L in holder.selected_mobs)
holder.deselect_AI_mob(user.client, L)
to_chat(user, span("notice", "Deselected \the [L]."))
to_chat(user, span_notice("Deselected \the [L]."))
else
holder.select_AI_mob(user.client, L)
to_chat(user, span("notice", "Selected \the [L]."))
to_chat(user, span_notice("Selected \the [L]."))
return
else
to_chat(user, span("warning", "\The [L] is not AI controlled."))
to_chat(user, span_warning("\The [L] is not AI controlled."))
return
else //Not living
for(var/mob/living/unit in holder.selected_mobs)
@@ -564,17 +564,17 @@
if(pa.Find("middle"))
if(pa.Find("shift"))
to_chat(user, SPAN_NOTICE("All selected mobs set to wander"))
to_chat(user, span_notice("All selected mobs set to wander"))
for(var/mob/living/unit in holder.selected_mobs)
var/datum/ai_holder/AI = unit.ai_holder
AI.wander = TRUE
if(pa.Find("ctrl"))
to_chat(user, SPAN_NOTICE("Setting mobs set to NOT wander"))
to_chat(user, span_notice("Setting mobs set to NOT wander"))
for(var/mob/living/unit in holder.selected_mobs)
var/datum/ai_holder/AI = unit.ai_holder
AI.wander = FALSE
if(pa.Find("alt") && isatom(object))
to_chat(user, SPAN_NOTICE("Adding [object] to Entity Narrate List!"))
to_chat(user, span_notice("Adding [object] to Entity Narrate List!"))
user.client.add_mob_for_narration(object)
@@ -582,12 +582,12 @@
// Paste faction
if(pa.Find("ctrl") && isliving(object))
if(!holder.copied_faction)
to_chat(user, span("warning", "LMB+Shift a mob to copy their faction before pasting."))
to_chat(user, span_warning("LMB+Shift a mob to copy their faction before pasting."))
return
else
var/mob/living/L = object
L.faction = holder.copied_faction
to_chat(user, span("notice", "Pasted faction '[holder.copied_faction]'."))
to_chat(user, span_notice("Pasted faction '[holder.copied_faction]'."))
return
if(istype(object, /atom)) // Force attack.
@@ -599,7 +599,7 @@
var/datum/ai_holder/AI = unit.ai_holder
AI.give_target(A)
i++
to_chat(user, span("notice", "Commanded [i] mob\s to attack \the [A]."))
to_chat(user, span_notice("Commanded [i] mob\s to attack \the [A]."))
var/image/orderimage = image(buildmode_hud,A,"ai_targetorder")
orderimage.plane = PLANE_BUILDMODE
flick_overlay(orderimage, list(user.client), 8, TRUE)
@@ -626,7 +626,7 @@
message += "."
if(j)
message += "[j] mob\s to follow \the [L]."
to_chat(user, span("notice", message))
to_chat(user, span_notice(message))
var/image/orderimage = image(buildmode_hud,L,"ai_targetorder")
orderimage.plane = PLANE_BUILDMODE
flick_overlay(orderimage, list(user.client), 8, TRUE)
@@ -645,7 +645,7 @@
else
AI.give_destination(T, 1, pa.Find("shift")) // If shift is held, the mobs will not stop moving to attack a visible enemy.
told++
to_chat(user, span("notice", "Commanded [told] mob\s to move to \the [T], and manually placed [forced] of them."))
to_chat(user, span_notice("Commanded [told] mob\s to move to \the [T], and manually placed [forced] of them."))
var/image/orderimage = image(buildmode_hud,T,"ai_turforder")
orderimage.plane = PLANE_BUILDMODE
flick_overlay(orderimage, list(user.client), 8, TRUE)
@@ -708,7 +708,7 @@
holder.select_AI_mob(user, L)
i++
to_chat(user, span("notice", "Band-selected [i] mobs."))
to_chat(user, span_notice("Band-selected [i] mobs."))
return
/obj/effect/bmode/buildmode/proc/get_path_from_partial_text(default_path)
+6 -6
View File
@@ -587,17 +587,17 @@
switch(tgui_input_list(usr, "Which list?", "List Choice", list("Players","Admins","Mobs","Living Mobs","Dead Mobs", "Clients")))
if("Players")
to_chat(usr, span("filter_debuglogs", jointext(player_list,",")))
to_chat(usr, span_filter_debuglogs(jointext(player_list,",")))
if("Admins")
to_chat(usr, span("filter_debuglogs", jointext(GLOB.admins,",")))
to_chat(usr, span_filter_debuglogs(jointext(GLOB.admins,",")))
if("Mobs")
to_chat(usr, span("filter_debuglogs", jointext(mob_list,",")))
to_chat(usr, span_filter_debuglogs(jointext(mob_list,",")))
if("Living Mobs")
to_chat(usr, span("filter_debuglogs", jointext(living_mob_list,",")))
to_chat(usr, span_filter_debuglogs(jointext(living_mob_list,",")))
if("Dead Mobs")
to_chat(usr, span("filter_debuglogs", jointext(dead_mob_list,",")))
to_chat(usr, span_filter_debuglogs(jointext(dead_mob_list,",")))
if("Clients")
to_chat(usr, span("filter_debuglogs", jointext(GLOB.clients,",")))
to_chat(usr, span_filter_debuglogs(jointext(GLOB.clients,",")))
/client/proc/cmd_debug_using_map()
set category = "Debug"
+12 -12
View File
@@ -40,20 +40,20 @@
//Since we extended to include all atoms, we're shutting things down with a guard clause for ghosts
if(istype(E, /mob/observer))
to_chat(usr, SPAN_NOTICE("Ghosts shouldn't be narrated! If you want a ghost, make it a subtype of mob/living!"))
to_chat(usr, span_notice("Ghosts shouldn't be narrated! If you want a ghost, make it a subtype of mob/living!"))
return
//We require a static mob/living type to check for .client and also later on, to use the unique .say mechanics for stuttering and language
if(istype(E, /mob/living))
var/mob/living/L = E
if(L.client)
to_chat(usr, SPAN_NOTICE("[L.name] is a player. All attempts to speak through them \
to_chat(usr, span_notice("[L.name] is a player. All attempts to speak through them \
gets logged in case of abuse."))
log_and_message_admins("has added [L.ckey]'s mob to their entity narrate list", usr)
return
var/unique_name = sanitize(tgui_input_text(usr, "Please give the entity a unique name to track internally. \
This doesn't override how it appears in game", "tracker", L.name))
if(unique_name in holder.entity_names)
to_chat(usr, SPAN_NOTICE("[unique_name] is not unique! Pick another!"))
to_chat(usr, span_notice("[unique_name] is not unique! Pick another!"))
add_mob_for_narration(L) //Recursively calling ourselves until cancelled or a unique name is given.
return
holder.entity_names += unique_name
@@ -66,7 +66,7 @@
var/unique_name = sanitize(tgui_input_text(usr, "Please give the entity a unique name to track internally. \
This doesn't override how it appears in game", "tracker", A.name))
if(unique_name in holder.entity_names)
to_chat(usr, SPAN_NOTICE("[unique_name] is not unique! Pick another!"))
to_chat(usr, span_notice("[unique_name] is not unique! Pick another!"))
add_mob_for_narration(A)
return
holder.entity_names += unique_name
@@ -157,17 +157,17 @@
mode = sanitize(mode)
if(!(mode in list("Speak", "Emote")))
to_chat(usr, SPAN_NOTICE("Valid modes are 'Speak' and 'Emote'."))
to_chat(usr, span_notice("Valid modes are 'Speak' and 'Emote'."))
return
if(!holder.entity_refs[name])
to_chat(usr, SPAN_NOTICE("[name] not in saved references!"))
to_chat(usr, span_notice("[name] not in saved references!"))
//Separate definition for mob/living and /obj due to .say() code allowing us to engage with languages, stuttering etc
//We also need this so we can check for .client
var/datum/weakref/wref = holder.entity_refs[name]
var/selection = wref.resolve()
if(!selection)
to_chat(usr, SPAN_NOTICE("[name] has invalid reference, deleting"))
to_chat(usr, span_notice("[name] has invalid reference, deleting"))
holder.entity_names -= name
holder.entity_refs -= name
if(istype(selection, /mob/living))
@@ -260,7 +260,7 @@
var/datum/weakref/wref = entity_refs[tgui_selected_id]
tgui_selected_refs = wref.resolve()
if(!tgui_selected_refs)
to_chat(usr, SPAN_NOTICE("[tgui_selected_id] has invalid reference, deleting"))
to_chat(usr, span_notice("[tgui_selected_id] has invalid reference, deleting"))
entity_names -= tgui_selected_id
entity_refs -= tgui_selected_id
tgui_selected_id = ""
@@ -281,9 +281,9 @@
tgui_selected_name = A.name
if("narrate")
if(world.time < (tgui_last_message + 0.5 SECONDS))
to_chat(usr, SPAN_NOTICE("You can't messages that quickly! Wait at least half a second"))
to_chat(usr, span_notice("You can't messages that quickly! Wait at least half a second"))
else
to_chat(usr, SPAN_NOTICE("Message successfully sent!"))
to_chat(usr, span_notice("Message successfully sent!"))
tgui_last_message = world.time
var/message = params["message"] //Sanitizing before speaking it
if(tgui_selection_mode)
@@ -291,7 +291,7 @@
var/datum/weakref/wref = entity_refs[entity]
var/ref = wref.resolve()
if(!ref)
to_chat(usr, SPAN_NOTICE("[entity] has invalid reference, deleting"))
to_chat(usr, span_notice("[entity] has invalid reference, deleting"))
entity_names -= entity
entity_refs -= entity
tgui_selected_id_multi -= entity
@@ -308,7 +308,7 @@
var/datum/weakref/wref = entity_refs[tgui_selected_id]
var/ref = wref.resolve()
if(!ref)
to_chat(usr, SPAN_NOTICE("[tgui_selected_id] has invalid reference, deleting"))
to_chat(usr, span_notice("[tgui_selected_id] has invalid reference, deleting"))
entity_names -= tgui_selected_id
entity_refs -= tgui_selected_id
tgui_selected_id = ""
+2 -2
View File
@@ -35,7 +35,7 @@ Eventkit verb to be used to spawn the obj/effect/landmarks defined under code\ga
if("Manage Personal Triggers")
var/personal_list = event_triggers[src.ckey]
if(!LAZYLEN(personal_list))
to_chat(src, SPAN_NOTICE("You don't have any landmarks to manage!"))
to_chat(src, span_notice("You don't have any landmarks to manage!"))
return
personal_list |= list("Cancel", "Delete All")
var/choice = tgui_input_list(src, "Select a landmark to choose between teleporting to it or deleting it, select delete all to clear them.", \
@@ -70,7 +70,7 @@ Eventkit verb to be used to spawn the obj/effect/landmarks defined under code\ga
var/other_ckey = sanitize(tgui_input_text(src, "input trigger owner's ckey", "CKEY", ""))
var/others_list = event_triggers[other_ckey]
if(!LAZYLEN(others_list))
to_chat(src, SPAN_NOTICE("[other_ckey] doesn't have any landmarks to manage!"))
to_chat(src, span_notice("[other_ckey] doesn't have any landmarks to manage!"))
return
others_list |= list("Cancel", "Delete All")
var/choice = tgui_input_list(src, "Select a landmark to choose between teleporting to it or deleting it, select delete all to clear them.", \
@@ -41,6 +41,6 @@
message += "#### Over all, there are [players] eligible players, of which [inactives] were hidden due to inactivity. ####"
to_chat(usr, SPAN_NOTICE(message))
to_chat(usr, span_notice(message))
#undef INACTIVITY_CAP
+1 -1
View File
@@ -93,7 +93,7 @@
if(iscarbon(L))
var/mob/living/carbon/C = L
C.ear_deaf += 10
to_chat(L, span("danger", "Lightning struck nearby, and the thunderclap is deafening!"))
to_chat(L, span_danger("Lightning struck nearby, and the thunderclap is deafening!"))
#undef LIGHTNING_REDIRECT_RANGE
#undef LIGHTNING_ZAP_RANGE