mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-14 08:35:39 +01:00
refactors most spans
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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]")
|
||||
|
||||
@@ -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.")
|
||||
*/
|
||||
*/
|
||||
|
||||
@@ -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>")]"))
|
||||
|
||||
Reference in New Issue
Block a user