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
@@ -7,7 +7,7 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
// This is primarily to stop malicious users from trying to lag the server by spamming this verb
if(!usr.checkMoveCooldown())
to_chat(usr, "<span class='warning'>Don't spam character directory refresh.</span>")
to_chat(usr, span_warning("Don't spam character directory refresh."))
return
usr.setMoveCooldown(10)
@@ -137,7 +137,7 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
if(action == "refresh")
// This is primarily to stop malicious users from trying to lag the server by spamming this verb
if(!usr.checkMoveCooldown())
to_chat(usr, "<span class='warning'>Don't spam character directory refresh.</span>")
to_chat(usr, span_warning("Don't spam character directory refresh."))
return
usr.setMoveCooldown(10)
update_tgui_static_data(usr, ui)
@@ -152,7 +152,7 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
var/can_set_mind = !!user.mind
if (!can_set_prefs && !can_set_mind)
if (!overwrite_prefs && !!user.client.prefs)
to_chat(user, "<span class='warning'>You cannot change these settings if you don't have a mind to save them to. Enable overwriting prefs and switch to a slot you're fine with overwriting.</span>")
to_chat(user, span_warning("You cannot change these settings if you don't have a mind to save them to. Enable overwriting prefs and switch to a slot you're fine with overwriting."))
return
switch(action)
if ("setTag")
@@ -171,7 +171,7 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
visible = user.mind.show_in_directory
else if (can_set_prefs)
visible = user.client.prefs.show_in_directory
to_chat(usr, "<span class='notice'>You are now [!visible ? "shown" : "not shown"] in the directory.</span>")
to_chat(usr, span_notice("You are now [!visible ? "shown" : "not shown"] in the directory."))
return set_for_mind_or_prefs(user, action, !visible, can_set_prefs, can_set_mind)
if ("editAd")
var/current_ad = (can_set_mind ? usr.mind.directory_ad : null) || (can_set_prefs ? usr.client.prefs.directory_ad : null)
@@ -184,7 +184,7 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
can_set_prefs &&= !!user.client.prefs
can_set_mind &&= !!user.mind
if (!can_set_prefs && !can_set_mind)
to_chat(user, "<span class='warning'>You seem to have lost either your mind, or your current preferences, while changing the values.[action == "editAd" ? " Here is your ad that you wrote. [new_value]" : null]</span>")
to_chat(user, span_warning("You seem to have lost either your mind, or your current preferences, while changing the values.[action == "editAd" ? " Here is your ad that you wrote. [new_value]" : null]"))
return
switch(action)
if ("setTag")