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
+10 -10
View File
@@ -70,7 +70,7 @@
if(href_list["irc_msg"])
if(!holder && received_irc_pm < world.time - 6000) //Worse they can do is spam IRC for 10 minutes
to_chat(usr, "<span class='warning'>You are no longer able to use this, it's been more than 10 minutes since an admin on IRC has responded to you</span>")
to_chat(usr, span_warning("You are no longer able to use this, it's been more than 10 minutes since an admin on IRC has responded to you"))
return
if(mute_irc)
to_chat(usr, "<span class='warning'You cannot use this as your client has been muted from sending messages to the admins on IRC</span>")
@@ -90,26 +90,26 @@
GLOB.pending_discord_registrations -= list(L)
var/time = L["time"]
if((world.realtime - time) > 10 MINUTES)
to_chat(src, "<span class='warning'>Sorry, that link has expired. Please request another on Discord.</span>")
to_chat(src, span_warning("Sorry, that link has expired. Please request another on Discord."))
return
sane = TRUE
break
if(!sane)
to_chat(src, "<span class='warning'>Sorry, that link doesn't appear to be valid. Please try again.</span>")
to_chat(src, span_warning("Sorry, that link doesn't appear to be valid. Please try again."))
return
var/sql_discord = sql_sanitize_text(their_id)
var/sql_ckey = sql_sanitize_text(ckey)
var/DBQuery/query = dbcon.NewQuery("UPDATE erro_player SET discord_id = '[sql_discord]' WHERE ckey = '[sql_ckey]'")
if(query.Execute())
to_chat(src, "<span class='notice'>Registration complete! Thank you for taking the time to register your Discord ID.</span>")
to_chat(src, span_notice("Registration complete! Thank you for taking the time to register your Discord ID."))
log_and_message_admins("[ckey] has registered their Discord ID to obtain the Crew Member role. Their Discord snowflake ID is: [their_id]")
admin_chat_message(message = "[ckey] has registered their Discord ID to obtain the Crew Member role. Their Discord is: <@[their_id]>", color = "#4eff22")
notes_add(ckey, "Discord ID: [their_id]")
world.VgsAddMemberRole(their_id)
else
to_chat(src, "<span class='warning'>There was an error registering your Discord ID in the database. Contact an administrator.</span>")
to_chat(src, span_warning("There was an error registering your Discord ID in the database. Contact an administrator."))
log_and_message_admins("[ckey] failed to register their Discord ID. Their Discord snowflake ID is: [their_id]. Is the database connected?")
return
//VOREStation Add End
@@ -120,7 +120,7 @@
//byond bug ID:2256651
if (asset_cache_job && (asset_cache_job in completed_asset_jobs))
to_chat(src, "<span class='danger'>An error has been detected in how your client is receiving resources. Attempting to correct.... (If you keep seeing these messages you might want to close byond and reconnect)</span>")
to_chat(src, span_danger("An error has been detected in how your client is receiving resources. Attempting to correct.... (If you keep seeing these messages you might want to close byond and reconnect)"))
src << browse("...", "window=asset_cache_browser")
return
if (href_list["asset_cache_preload_data"])
@@ -229,11 +229,11 @@
if(custom_event_msg && custom_event_msg != "")
to_chat(src, "<h1 class='alert'>Custom Event</h1>")
to_chat(src, "<h2 class='alert'>A custom event is taking place. OOC Info:</h2>")
to_chat(src, "<span class='alert'>[custom_event_msg]</span>")
to_chat(src, span_alert("[custom_event_msg]"))
to_chat(src, "<br>")
if(!winexists(src, "asset_cache_browser")) // The client is using a custom skin, tell them.
to_chat(src, "<span class='warning'>Unable to access asset cache browser, if you are using a custom skin file, please allow DS to download the updated version, if you are not, then make a bug report. This is not a critical issue but can cause issues with resource downloading, as it is impossible to know when extra resources arrived to you.</span>")
to_chat(src, span_warning("Unable to access asset cache browser, if you are using a custom skin file, please allow DS to download the updated version, if you are not, then make a bug report. This is not a critical issue but can cause issues with resource downloading, as it is impossible to know when extra resources arrived to you."))
if(holder)
add_admin_verbs()
@@ -258,7 +258,7 @@
//disabled because we don't use the ingame changelog system any more
/*
if((prefs.lastchangelog != changelog_hash) && isnewplayer(src.mob)) //bolds the changelog button on the interface so we know there are updates.
to_chat(src, "<span class='info'>You have unread updates in the changelog.</span>")
to_chat(src, span_info("You have unread updates in the changelog."))
winset(src, "rpane.changelog", "background-color=#eaeaea;font-style=bold")
if(config.aggressive_changelog)
src.changes()
@@ -393,7 +393,7 @@
if (isnum(player_age) && player_age == 0) //first connection
if (config.panic_bunker && !holder && !deadmin_holder)
log_adminwarn("Failed Login: [key] - New account attempting to connect during panic bunker")
message_admins("<span class='adminnotice'>Failed Login: [key] - New account attempting to connect during panic bunker</span>")
message_admins(span_adminnotice("Failed Login: [key] - New account attempting to connect during panic bunker"))
disconnect_with_message("Sorry but the server is currently not accepting connections from never before seen players.")
return 0
@@ -106,7 +106,7 @@
pref.real_name = new_name
return TOPIC_REFRESH
else
to_chat(user, "<span class='warning'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</span>")
to_chat(user, span_warning("Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and ."))
return TOPIC_NOACTION
else if(href_list["random_name"])
@@ -125,7 +125,7 @@
pref.nickname = new_nickname
return TOPIC_REFRESH
else
to_chat(user, "<span class='warning'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</span>")
to_chat(user, span_warning("Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and ."))
return TOPIC_NOACTION
else if(href_list["reset_nickname"])
@@ -1155,7 +1155,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
organ = O_STOMACH
if("Brain")
if(pref.organ_data[BP_HEAD] != "cyborg")
to_chat(user, "<span class='warning'>You may only select a cybernetic or synthetic brain if you have a full prosthetic body.</span>")
to_chat(user, span_warning("You may only select a cybernetic or synthetic brain if you have a full prosthetic body."))
return
organ = "brain"
@@ -33,7 +33,7 @@
if(player_to_ignore)
player_to_ignore = sanitize(ckey(player_to_ignore))
if(player_to_ignore == user.ckey)
to_chat(user, "<span class='notice'>You can't ignore yourself.</span>")
to_chat(user, span_notice("You can't ignore yourself."))
return TOPIC_REFRESH
pref.ignored_players |= player_to_ignore
return TOPIC_REFRESH
@@ -109,16 +109,16 @@ var/list/gear_datums = list()
var/total_cost = 0
for(var/gear_name in pref.gear)
if(!gear_datums[gear_name])
to_chat(preference_mob, "<span class='warning'>You cannot have more than one of the \the [gear_name]</span>")
to_chat(preference_mob, span_warning("You cannot have more than one of the \the [gear_name]"))
pref.gear -= gear_name
else if(!(gear_name in valid_gear_choices()))
to_chat(preference_mob, "<span class='warning'>You cannot take \the [gear_name] as you are not whitelisted for the species or item.</span>") //Vorestation Edit
to_chat(preference_mob, span_warning("You cannot take \the [gear_name] as you are not whitelisted for the species or item.")) //Vorestation Edit
pref.gear -= gear_name
else
var/datum/gear/G = gear_datums[gear_name]
if(total_cost + G.cost > MAX_GEAR_COST)
pref.gear -= gear_name
to_chat(preference_mob, "<span class='warning'>You cannot afford to take \the [gear_name]</span>")
to_chat(preference_mob, span_warning("You cannot afford to take \the [gear_name]"))
else
total_cost += G.cost
@@ -107,19 +107,19 @@ var/list/trait_categories = list() // The categories available for the trait men
for(var/trait_name in pref.traits)
if(!trait_datums[trait_name])
to_chat(preference_mob, "<span class='warning'>You cannot have more than one of trait: [trait_name]</span>")
to_chat(preference_mob, span_warning("You cannot have more than one of trait: [trait_name]"))
pref.traits -= trait_name
else
var/datum/trait/T = trait_datums[trait_name]
var/invalidity = T.test_for_invalidity(src)
if(invalidity)
pref.traits -= trait_name
to_chat(preference_mob, "<span class='warning'>You cannot take the [trait_name] trait. Reason: [invalidity]</span>")
to_chat(preference_mob, span_warning("You cannot take the [trait_name] trait. Reason: [invalidity]"))
var/conflicts = T.test_for_trait_conflict(pref.traits)
if(conflicts)
pref.traits -= trait_name
to_chat(preference_mob, "<span class='warning'>The [trait_name] trait is mutually exclusive with [conflicts].</span>")
to_chat(preference_mob, span_warning("The [trait_name] trait is mutually exclusive with [conflicts]."))
/datum/category_item/player_setup_item/traits/OnTopic(href, href_list, user)
if(href_list["toggle_trait"])
@@ -129,12 +129,12 @@ var/list/trait_categories = list() // The categories available for the trait men
else
var/invalidity = T.test_for_invalidity(src)
if(invalidity)
to_chat(user, "<span class='warning'>You cannot take the [T.name] trait. Reason: [invalidity]</span>")
to_chat(user, span_warning("You cannot take the [T.name] trait. Reason: [invalidity]"))
return TOPIC_NOACTION
var/conflicts = T.test_for_trait_conflict(pref.traits)
if(conflicts)
to_chat(user, "<span class='warning'>The [T.name] trait is mutually exclusive with [conflicts].</span>")
to_chat(user, span_warning("The [T.name] trait is mutually exclusive with [conflicts]."))
return TOPIC_NOACTION
pref.traits += T.name
@@ -118,7 +118,7 @@
var/new_size = tgui_input_number(user, "Choose your character's size, ranging from 25% to 200%", "Set Size", null, 200, 25)
if (!ISINRANGE(new_size,25,200))
pref.size_multiplier = 1
to_chat(user, "<span class='notice'>Invalid size.</span>")
to_chat(user, span_notice("Invalid size."))
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(new_size)
pref.size_multiplier = (new_size/100)
+4 -4
View File
@@ -284,7 +284,7 @@ var/list/preferences_datums = list()
if(!user || !user.client) return
if(!get_mob_by_key(client_ckey))
to_chat(user, "<span class='danger'>No mob exists for the given client!</span>")
to_chat(user, span_danger("No mob exists for the given client!"))
return
if(!char_render_holders)
@@ -375,7 +375,7 @@ var/list/preferences_datums = list()
if(config.forumurl)
user << link(config.forumurl)
else
to_chat(user, "<span class='danger'>The forum URL is not set in the server configuration.</span>")
to_chat(user, span_danger("The forum URL is not set in the server configuration."))
return
ShowChoices(usr)
return 1
@@ -452,7 +452,7 @@ var/list/preferences_datums = list()
/datum/preferences/proc/open_load_dialog(mob/user)
if(selecting_slots)
to_chat(user, "<span class='warning'>You already have a slot selection dialog open!</span>")
to_chat(user, span_warning("You already have a slot selection dialog open!"))
return
if(!savefile)
return
@@ -494,7 +494,7 @@ var/list/preferences_datums = list()
/datum/preferences/proc/open_copy_dialog(mob/user)
if(selecting_slots)
to_chat(user, "<span class='warning'>You already have a slot selection dialog open!</span>")
to_chat(user, span_warning("You already have a slot selection dialog open!"))
return
if(!savefile)
return
@@ -34,13 +34,13 @@
prefs.examine_text_mode %= EXAMINE_MODE_MAX // This cycles through them because if you're already specifically being routed to the examine panel, you probably don't need to have the extra text printed to chat
switch(prefs.examine_text_mode) // ... And I only wanted to add one verb
if(EXAMINE_MODE_DEFAULT)
to_chat(src, "<span class='filter_system'>Examining things will only output the base examine text, and you will not be redirected to the examine panel automatically.</span>")
to_chat(src, span_filter_system("Examining things will only output the base examine text, and you will not be redirected to the examine panel automatically."))
if(EXAMINE_MODE_INCLUDE_USAGE)
to_chat(src, "<span class='filter_system'>Examining things will also print any extra usage information normally included in the examine panel to the chat.</span>")
to_chat(src, span_filter_system("Examining things will also print any extra usage information normally included in the examine panel to the chat."))
if(EXAMINE_MODE_SWITCH_TO_PANEL)
to_chat(src, "<span class='filter_system'>Examining things will direct you to the examine panel, where you can view extended information about the thing.</span>")
to_chat(src, span_filter_system("Examining things will direct you to the examine panel, where you can view extended information about the thing."))
/client/verb/toggle_multilingual_mode()
set name = "Toggle Multilingual Mode"
@@ -51,10 +51,10 @@
prefs.multilingual_mode %= MULTILINGUAL_MODE_MAX // Cycles through the various options
switch(prefs.multilingual_mode)
if(MULTILINGUAL_DEFAULT)
to_chat(src, "<span class='filter_system'>Multilingual parsing will only check for the delimiter-key combination (,0galcom-2tradeband).</span>")
to_chat(src, span_filter_system("Multilingual parsing will only check for the delimiter-key combination (,0galcom-2tradeband)."))
if(MULTILINGUAL_SPACE)
to_chat(src, "<span class='filter_system'>Multilingual parsing will enforce a space after the delimiter-key combination (,0 galcom -2still galcom). The extra space will be consumed by the pattern-matching.</span>")
to_chat(src, span_filter_system("Multilingual parsing will enforce a space after the delimiter-key combination (,0 galcom -2still galcom). The extra space will be consumed by the pattern-matching."))
if(MULTILINGUAL_DOUBLE_DELIMITER)
to_chat(src, "<span class='filter_system'>Multilingual parsing will enforce the a language delimiter after the delimiter-key combination (,0,galcom -2 still galcom). The extra delimiter will be consumed by the pattern-matching.</span>")
to_chat(src, span_filter_system("Multilingual parsing will enforce the a language delimiter after the delimiter-key combination (,0,galcom -2 still galcom). The extra delimiter will be consumed by the pattern-matching."))
if(MULTILINGUAL_OFF)
to_chat(src, "<span class='filter_system'>Multilingual parsing is now disabled. Entire messages will be in the language specified at the start of the message.</span>")
to_chat(src, span_filter_system("Multilingual parsing is now disabled. Entire messages will be in the language specified at the start of the message."))
+15 -15
View File
@@ -61,7 +61,7 @@
return
if(istype(user) && Adjacent(user))
if(inoperable() || panel_open)
to_chat(user, "<span class='warning'>\The [src] seems to be nonfunctional...</span>")
to_chat(user, span_warning("\The [src] seems to be nonfunctional..."))
else
start_using(user)
@@ -69,7 +69,7 @@
if(!ishuman(user))
return
if(busy_bank)
to_chat(user, "<span class='warning'>\The [src] is already in use.</span>")
to_chat(user, span_warning("\The [src] is already in use."))
return
busy_bank = TRUE
var/I = persist_item_savefile_load(user, "type")
@@ -79,15 +79,15 @@
busy_bank = FALSE
return
else if(choice == "Check contents" && I)
to_chat(user, "<span class='notice'>\The [src] has \the [Iname] for you!</span>")
to_chat(user, span_notice("\The [src] has \the [Iname] for you!"))
busy_bank = FALSE
else if(choice == "Retrieve item" && I)
if(user.hands_are_full())
to_chat(user,"<span class='notice'>Your hands are full!</span>")
to_chat(user,span_notice("Your hands are full!"))
busy_bank = FALSE
return
if(user.ckey in item_takers)
to_chat(user, "<span class='warning'>You have already taken something out of \the [src] this shift.</span>")
to_chat(user, span_warning("You have already taken something out of \the [src] this shift."))
busy_bank = FALSE
return
choice = tgui_alert(user, "If you remove this item from the bank, it will be unable to be stored again. Do you still want to remove it?", "[src]", list("No", "Yes"), timeout = 10 SECONDS)
@@ -102,7 +102,7 @@
return
var/obj/N = new I(get_turf(src))
log_admin("[key_name_admin(user)] retrieved [N] from the item bank.")
visible_message("<span class='notice'>\The [src] dispenses the [N] to \the [user].</span>")
visible_message(span_notice("\The [src] dispenses the [N] to \the [user]."))
user.put_in_hands(N)
N.persist_storable = FALSE
var/path = src.persist_item_savefile_path(user)
@@ -114,24 +114,24 @@
busy_bank = FALSE
icon_state = "item_bank"
else if(choice == "Info")
to_chat(user, "<span class='notice'>\The [src] can store a single item for you between shifts! Anything that has been retrieved from the bank cannot be stored again in the same shift. Anyone can withdraw from the bank one time per shift. Some items are not able to be accepted by the bank.</span>")
to_chat(user, span_notice("\The [src] can store a single item for you between shifts! Anything that has been retrieved from the bank cannot be stored again in the same shift. Anyone can withdraw from the bank one time per shift. Some items are not able to be accepted by the bank."))
busy_bank = FALSE
return
else if(!I)
to_chat(user, "<span class='warning'>\The [src] doesn't seem to have anything for you...</span>")
to_chat(user, span_warning("\The [src] doesn't seem to have anything for you..."))
busy_bank = FALSE
/obj/machinery/item_bank/attackby(obj/item/O, mob/living/user)
if(!ishuman(user))
return
if(busy_bank)
to_chat(user, "<span class='warning'>\The [src] is already in use.</span>")
to_chat(user, span_warning("\The [src] is already in use."))
return
busy_bank = TRUE
var/I = persist_item_savefile_load(user, "type")
if(!istool(O) && O.persist_storable)
if(ispath(I))
to_chat(user, "<span class='warning'>You cannot store \the [O]. You already have something stored.</span>")
to_chat(user, span_warning("You cannot store \the [O]. You already have something stored."))
busy_bank = FALSE
return
var/choice = tgui_alert(user, "If you store \the [O], anything it contains may be lost to \the [src]. Are you sure?", "[src]", list("Store", "Cancel"), timeout = 10 SECONDS)
@@ -140,23 +140,23 @@
return
for(var/obj/check in O.contents)
if(!check.persist_storable)
to_chat(user, "<span class='warning'>\The [src] buzzes. \The [O] contains [check], which cannot be stored. Please remove this item before attempting to store \the [O]. As a reminder, any contents of \the [O] will be lost if you store it with contents.</span>")
to_chat(user, span_warning("\The [src] buzzes. \The [O] contains [check], which cannot be stored. Please remove this item before attempting to store \the [O]. As a reminder, any contents of \the [O] will be lost if you store it with contents."))
busy_bank = FALSE
return
user.visible_message("<span class='notice'>\The [user] begins storing \the [O] in \the [src].</span>","<span class='notice'>You begin storing \the [O] in \the [src].</span>")
user.visible_message(span_notice("\The [user] begins storing \the [O] in \the [src]."),span_notice("You begin storing \the [O] in \the [src]."))
icon_state = "item_bank_o"
if(!do_after(user, 10 SECONDS, src, exclusive = TASK_ALL_EXCLUSIVE) || inoperable())
busy_bank = FALSE
icon_state = "item_bank"
return
src.persist_item_savefile_save(user, O)
user.visible_message("<span class='notice'>\The [user] stores \the [O] in \the [src].</span>","<span class='notice'>You stored \the [O] in \the [src].</span>")
user.visible_message(span_notice("\The [user] stores \the [O] in \the [src]."),span_notice("You stored \the [O] in \the [src]."))
log_admin("[key_name_admin(user)] stored [O] in the item bank.")
qdel(O)
busy_bank = FALSE
icon_state = "item_bank"
else
to_chat(user, "<span class='warning'>You cannot store \the [O]. \The [src] either does not accept that, or it has already been retrieved from storage this shift.</span>")
to_chat(user, span_warning("You cannot store \the [O]. \The [src] either does not accept that, or it has already been retrieved from storage this shift."))
busy_bank = FALSE
/////STORABLE ITEMS AND ALL THAT JAZZ/////
@@ -255,4 +255,4 @@
/obj/item/spacecasinocash
persist_storable = FALSE
/obj/item/personal_shield_generator
persist_storable = FALSE
persist_storable = FALSE
+1 -1
View File
@@ -42,7 +42,7 @@ var/global/list/all_tooltip_styles = list(
if(!ishuman(usr))
if(!isrobot(usr))
to_chat(usr, "<span class='warning'>You must be a human or a robot to use this verb.</span>")
to_chat(usr, span_warning("You must be a human or a robot to use this verb."))
return
var/UI_style_new = tgui_input_list(usr, "Select a style. White is recommended for customization", "UI Style Choice", all_ui_styles)
+8 -8
View File
@@ -18,23 +18,23 @@
if(C.mob.real_name)
switch(C.mob.stat)
if(UNCONSCIOUS)
entry += "<span class='darkgray'><b>Unconscious</b></span>" // these are literally all spans so I can apply .inverted to them because black on dark grey isn't legible
entry += span_darkgray("<b>Unconscious</b>") // these are literally all spans so I can apply .inverted to them because black on dark grey isn't legible
if(DEAD)
if(isobserver(C.mob))
var/mob/observer/dead/O = C.mob
if(O.started_as_observer)
entry += "<span class='gray'>Observing</span>"
entry += span_gray("Observing")
else
entry += "<span class='black'><b>Died</b></span>"
entry += span_black("<b>Died</b>")
else
entry += "<span class='green'>Playing</span>"
entry += span_green("Playing")
entry += " as [C.mob.real_name]"
else if(isnewplayer(C.mob))
entry += "<span class='blue'><b>In lobby</b></span>"
entry += span_blue("<b>In lobby</b>")
entry += "</td><td>"
@@ -45,9 +45,9 @@
age = 0
if(age <= 1)
age = "<span class='red'><b>[age]</b></span>"
age = span_red("<b>[age]</b>")
else if(age < 10)
age = "<span class='orange'><b>[age]</b></span>"
age = span_orange("<b>[age]</b>")
entry += "Age: [age]"
entry += "</td><td>"
@@ -93,5 +93,5 @@
msg += "[line]"
msg += "</table>"
msg += "<b>Total Players: [length(Lines)]</b>"
msg = "<span class='filter_notice'>" + msg + "</span>"
msg = span_filter_notice("" + msg + "")
to_chat(src, msg)
@@ -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")
+7 -7
View File
@@ -8,15 +8,15 @@
key_to_ignore = ckey(sanitize(key_to_ignore))
if(prefs && prefs.ignored_players)
if(key_to_ignore in prefs.ignored_players)
to_chat(usr, "<span class='warning'>[key_to_ignore] is already being ignored.</span>")
to_chat(usr, span_warning("[key_to_ignore] is already being ignored."))
return
if(key_to_ignore == usr.ckey)
to_chat(usr, "<span class='notice'>You can't ignore yourself.</span>")
to_chat(usr, span_notice("You can't ignore yourself."))
return
prefs.ignored_players |= key_to_ignore
SScharacter_setup.queue_preferences_save(prefs)
to_chat(usr, "<span class='notice'>Now ignoring <b>[key_to_ignore]</b>.</span>")
to_chat(usr, span_notice("Now ignoring <b>[key_to_ignore]</b>."))
/client/verb/unignore()
set name = "Unignore"
@@ -24,11 +24,11 @@
set desc = "Reverts your ignoring of a specific player."
if(!prefs)
to_chat(usr, "<span class='warning'>Preferences not found.</span>")
to_chat(usr, span_warning("Preferences not found."))
return
if(!prefs.ignored_players?.len)
to_chat(usr, "<span class='warning'>You aren't ignoring any players.</span>")
to_chat(usr, span_warning("You aren't ignoring any players."))
return
var/key_to_unignore = tgui_input_list(usr, "Ignored players", "Unignore", prefs.ignored_players)
@@ -36,11 +36,11 @@
return
key_to_unignore = ckey(sanitize(key_to_unignore))
if(!(key_to_unignore in prefs.ignored_players))
to_chat(usr, "<span class='warning'>[key_to_unignore] isn't being ignored.</span>")
to_chat(usr, span_warning("[key_to_unignore] isn't being ignored."))
return
prefs.ignored_players -= key_to_unignore
SScharacter_setup.queue_preferences_save(prefs)
to_chat(usr, "<span class='notice'>Reverted ignore on <b>[key_to_unignore]</b>.</span>")
to_chat(usr, span_notice("Reverted ignore on <b>[key_to_unignore]</b>."))
/mob/proc/is_key_ignored(var/key_to_check)
if(client)
+16 -16
View File
@@ -4,7 +4,7 @@
set category = "OOC"
if(say_disabled) //This is here to try to identify lag problems
to_chat(usr, "<span class='warning'>Speech is currently admin-disabled.</span>")
to_chat(usr, span_warning("Speech is currently admin-disabled."))
return
if(!mob) return
@@ -16,18 +16,18 @@
if(!msg) return
if(!prefs?.read_preference(/datum/preference/toggle/show_ooc))
to_chat(src, "<span class='warning'>You have OOC muted.</span>")
to_chat(src, span_warning("You have OOC muted."))
return
if(!holder)
if(!config.ooc_allowed)
to_chat(src, "<span class='danger'>OOC is globally muted.</span>")
to_chat(src, span_danger("OOC is globally muted."))
return
if(!config.dooc_allowed && (mob.stat == DEAD))
to_chat(usr, "<span class='danger'>OOC for dead mobs has been turned off.</span>")
to_chat(usr, span_danger("OOC for dead mobs has been turned off."))
return
if(prefs.muted & MUTE_OOC)
to_chat(src, "<span class='danger'>You cannot use OOC (muted).</span>")
to_chat(src, span_danger("You cannot use OOC (muted)."))
return
if(findtext(msg, "byond://") && !config.allow_byond_links)
to_chat(src, "<B>Advertising other servers is not allowed.</B>")
@@ -63,7 +63,7 @@
if(holder.rights & R_ADMIN && holder.rights & R_BAN) //Admins
ooc_style = "admin"
msg = GLOB.is_valid_url.Replace(msg,"<span class='linkify'>$1</span>")
msg = GLOB.is_valid_url.Replace(msg,span_linkify("$1"))
for(var/client/target in GLOB.clients)
if(target.prefs?.read_preference(/datum/preference/toggle/show_ooc))
@@ -77,9 +77,9 @@
else
display_name = holder.fakekey
if(holder && !holder.fakekey && (holder.rights & R_ADMIN|R_FUN|R_EVENT) && config.allow_admin_ooccolor && (src.prefs.ooccolor != initial(src.prefs.ooccolor))) // keeping this for the badmins
to_chat(target, "<span class='ooc'><font color='[src.prefs.ooccolor]'>" + create_text_tag("ooc", "OOC:", target) + " <EM>[display_name]:</EM> <span class='message'>[msg]</span></font></span>")
to_chat(target, span_ooc("<font color='[src.prefs.ooccolor]'>" + create_text_tag("ooc", "OOC:", target) + " <EM>[display_name]:</EM> [span_message(msg)]</font>"))
else
to_chat(target, "<span class='ooc'><span class='[ooc_style]'>" + create_text_tag("ooc", "OOC:", target) + " <EM>[display_name]:</EM> <span class='message'>[msg]</span></span></span>")
to_chat(target, span_ooc("<span class='[ooc_style]'>" + create_text_tag("ooc", "OOC:", target) + " <EM>[display_name]:</EM> " + span_message(msg)))
/client/verb/looc(msg as text)
set name = "LOOC"
@@ -87,7 +87,7 @@
set category = "OOC"
if(say_disabled) //This is here to try to identify lag problems
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
to_chat(usr, span_danger("Speech is currently admin-disabled."))
return
if(!mob)
@@ -102,18 +102,18 @@
return
if(!prefs?.read_preference(/datum/preference/toggle/show_looc))
to_chat(src, "<span class='danger'>You have LOOC muted.</span>")
to_chat(src, span_danger("You have LOOC muted."))
return
if(!holder)
if(!config.looc_allowed)
to_chat(src, "<span class='danger'>LOOC is globally muted.</span>")
to_chat(src, span_danger("LOOC is globally muted."))
return
if(!config.dooc_allowed && (mob.stat == DEAD))
to_chat(usr, "<span class='danger'>OOC for dead mobs has been turned off.</span>")
to_chat(usr, span_danger("OOC for dead mobs has been turned off."))
return
if(prefs.muted & MUTE_LOOC)
to_chat(src, "<span class='danger'>You cannot use OOC (muted).</span>")
to_chat(src, span_danger("You cannot use OOC (muted)."))
return
if(findtext(msg, "byond://") && !config.allow_byond_links)
to_chat(src, "<B>Advertising other servers is not allowed.</B>")
@@ -172,7 +172,7 @@
if(check_rights(R_SERVER, FALSE, admin)) //Stop rLOOC showing for retired staff
r_receivers |= admin
msg = GLOB.is_valid_url.Replace(msg,"<span class='linkify'>$1</span>")
msg = GLOB.is_valid_url.Replace(msg,span_linkify("$1"))
// Send a message
for(var/client/target in receivers)
@@ -181,12 +181,12 @@
if(target in GLOB.admins)
admin_stuff += "/([key])"
to_chat(target, "<span class='looc'>" + create_text_tag("looc", "LOOC:", target) + " <EM>[display_name][admin_stuff]:</EM> <span class='message'>[msg]</span></span>")
to_chat(target, span_looc("" + create_text_tag("looc", "LOOC:", target) + " <EM>[display_name][admin_stuff]:</EM> <span class='message'>[msg]</span>"))
for(var/client/target in r_receivers)
var/admin_stuff = "/([key])([admin_jump_link(mob, target.holder)])"
to_chat(target, "<span class='rlooc'>" + create_text_tag("looc", "LOOC:", target) + " <span class='prefix'>(R)</span><EM>[display_name][admin_stuff]:</EM> <span class='message'>[msg]</span></span>")
to_chat(target, span_rlooc("" + create_text_tag("looc", "LOOC:", target) + " <span class='prefix'>(R)</span><EM>[display_name][admin_stuff]:</EM> <span class='message'>[msg]</span>"))
/mob/proc/get_looc_source()
return src
+2 -2
View File
@@ -4,9 +4,9 @@
/client/verb/display_ping(time as num)
set instant = TRUE
set name = ".display_ping"
to_chat(src, "<span class='notice'>Round trip ping took [round(pingfromtime(time),1)]ms</span>")
to_chat(src, span_notice("Round trip ping took [round(pingfromtime(time),1)]ms"))
/client/verb/ping()
set name = "Ping"
set category = "OOC"
winset(src, null, "command=.display_ping+[world.time+world.tick_lag*world.tick_usage/100]")
winset(src, null, "command=.display_ping+[world.time+world.tick_lag*world.tick_usage/100]")
+7 -7
View File
@@ -10,8 +10,8 @@
if (!ticker)
to_chat(src, "You can't commit suicide before the game starts!")
return
to_chat(src, "<span class='warning'>No. Adminhelp if there is a legitimate reason, and please review our server rules.</span>")
to_chat(src, span_warning("No. Adminhelp if there is a legitimate reason, and please review our server rules."))
message_admins("[ckey] has tried to trigger the suicide verb as human, but it is currently disabled.")
/mob/living/carbon/brain/verb/suicide()
@@ -33,7 +33,7 @@
if(confirm == "Yes")
suiciding = 1
to_chat(viewers(loc),"<span class='danger'>[src]'s brain is growing dull and lifeless. It looks like it's lost the will to live.</span>")
to_chat(viewers(loc),span_danger("[src]'s brain is growing dull and lifeless. It looks like it's lost the will to live."))
spawn(50)
death(0)
suiciding = 0
@@ -53,7 +53,7 @@
if(confirm == "Yes")
suiciding = 1
to_chat(viewers(src),"<span class='danger'>[src] is powering down. It looks like they're trying to commit suicide.</span>")
to_chat(viewers(src),span_danger("[src] is powering down. It looks like they're trying to commit suicide."))
//put em at -175
adjustOxyLoss(max(getMaxHealth() * 2 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
updatehealth()
@@ -73,7 +73,7 @@
if(confirm == "Yes")
suiciding = 1
to_chat(viewers(src),"<span class='danger'>[src] is powering down. It looks like they're trying to commit suicide.</span>")
to_chat(viewers(src),span_danger("[src] is powering down. It looks like they're trying to commit suicide."))
//put em at -175
adjustOxyLoss(max(getMaxHealth() * 2 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
updatehealth()
@@ -89,8 +89,8 @@
card.removePersonality()
var/turf/T = get_turf_or_move(card.loc)
for (var/mob/M in viewers(T))
M.show_message("<span class='notice'>[src] flashes a message across its screen, \"Wiping core files. Please acquire a new personality to continue using pAI device functions.\"</span>", 3, "<span class='notice'>[src] bleeps electronically.</span>", 2)
M.show_message(span_notice("[src] flashes a message across its screen, \"Wiping core files. Please acquire a new personality to continue using pAI device functions.\""), 3, span_notice("[src] bleeps electronically."), 2)
death(0)
else
to_chat(src, "Aborting suicide attempt.")
*/
*/
+2 -2
View File
@@ -51,7 +51,7 @@
msg += "[line]\n"
msg += "<b>Total Players: [length(Lines)]</b>"
msg = "<span class='filter_notice'>[jointext(msg, "<br>")]</span>"
msg = span_filter_notice("[jointext(msg, "<br>")]")
to_chat(src,msg)
/client/verb/staffwho()
@@ -146,4 +146,4 @@
msg += "\n<span class='info'>Adminhelps are also sent to Discord. If no admins are available in game try anyway and an admin on Discord may see it and respond.</span>"
to_chat(src,"<span class='filter_notice'>[jointext(msg, "<br>")]</span>")
to_chat(src,span_filter_notice("[jointext(msg, "<br>")]"))