Replace all modular HTML spans with defines spans

In total:
- Adds span defines for `reallybig hypnophrase`, `big warning`, `header`
- Fixes a missing apostrophe for hypno stare
- Makes a special exception for cuddling.dm, which uses an irregular span
- Puts the spans file back
This commit is contained in:
Darius
2023-01-16 04:05:27 -05:00
parent 41e15dd097
commit ad0239b5de
108 changed files with 779 additions and 773 deletions
+13 -13
View File
@@ -100,7 +100,7 @@ GLOBAL_LIST_INIT(jobban_panel_data, list(
if("Temporary")
var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num|null
if(mins <= 0)
to_chat(usr, "<span class='danger'>[mins] is not a valid duration.</span>")
to_chat(usr, span_danger("[mins] is not a valid duration."))
return
reason = input(usr,"Please State Reason For Banning [M.key].","Reason") as message|null
if(!reason)
@@ -111,7 +111,7 @@ GLOBAL_LIST_INIT(jobban_panel_data, list(
var/msg
for(var/job in notbannedlist)
if(!DB_ban_record(BANTYPE_JOB_TEMP, M, mins, reason, job))
to_chat(usr, "<span class='danger'>Failed to apply ban.</span>")
to_chat(usr, span_danger("Failed to apply ban."))
return
if(M.client)
jobban_buildcache(M.client)
@@ -122,10 +122,10 @@ GLOBAL_LIST_INIT(jobban_panel_data, list(
else
msg += ", [job]"
create_message("note", M.key, null, "Banned from [msg] - [reason]", null, null, 0, 0, null, 0, severity)
message_admins("<span class='adminnotice'>[key_name_admin(usr)] banned [key_name_admin(M)] from [msg] for [mins] minutes.</span>")
to_chat(M, "<span class='boldannounce'><BIG>You have been [((msg == "ooc") || (msg == "appearance") || (msg == "pacifist")) ? "banned" : "jobbanned"] by [usr.client.key] from: [msg == "pacifist" ? "using violence" : msg].</BIG></span>")
to_chat(M, "<span class='boldannounce'>The reason is: [reason]</span>")
to_chat(M, "<span class='danger'>This jobban will be lifted in [mins] minutes.</span>")
message_admins(span_adminnotice("[key_name_admin(usr)] banned [key_name_admin(M)] from [msg] for [mins] minutes."))
to_chat(M, span_boldannounce("<BIG>You have been [((msg == "ooc") || (msg == "appearance") || (msg == "pacifist")) ? "banned" : "jobbanned"] by [usr.client.key] from: [msg == "pacifist" ? "using violence" : msg].</BIG>"))
to_chat(M, span_boldannounce("The reason is: [reason]"))
to_chat(M, span_danger("This jobban will be lifted in [mins] minutes."))
if("Permanent")
reason = input(usr,"Please State Reason For Banning [M.key].","Reason") as message|null
@@ -138,7 +138,7 @@ GLOBAL_LIST_INIT(jobban_panel_data, list(
var/msg
for(var/job in notbannedlist)
if(!DB_ban_record(BANTYPE_JOB_PERMA, M, -1, reason, job))
to_chat(usr, "<span class='danger'>Failed to apply ban.</span>")
to_chat(usr, span_danger("Failed to apply ban."))
return
if(M.client)
jobban_buildcache(M.client)
@@ -149,10 +149,10 @@ GLOBAL_LIST_INIT(jobban_panel_data, list(
else
msg += ", [job]"
create_message("note", M.key, null, "Banned from [msg] - [reason]", null, null, 0, 0, null, 0, severity)
message_admins("<span class='adminnotice'>[key_name_admin(usr)] banned [key_name_admin(M)] from [msg].</span>")
to_chat(M, "<span class='boldannounce'><BIG>You have been [((msg == "ooc") || (msg == "appearance") || (msg == "pacifist")) ? "banned" : "jobbanned"] by [usr.client.key] from: [msg == "pacifist" ? "using violence" : msg].</BIG></span>")
to_chat(M, "<span class='boldannounce'>The reason is: [reason]</span>")
to_chat(M, "<span class='danger'>This jobban can be lifted only upon request.</span>")
message_admins(span_adminnotice("[key_name_admin(usr)] banned [key_name_admin(M)] from [msg]."))
to_chat(M, span_boldannounce("<BIG>You have been [((msg == "ooc") || (msg == "appearance") || (msg == "pacifist")) ? "banned" : "jobbanned"] by [usr.client.key] from: [msg == "pacifist" ? "using violence" : msg].</BIG>"))
to_chat(M, span_boldannounce("The reason is: [reason]"))
to_chat(M, span_danger("This jobban can be lifted only upon request."))
// notbannedlist is just a list of strings of the job titles you want to unban.
/datum/admins/proc/UnJobban(mob/M, list/bannedlist)
@@ -175,5 +175,5 @@ GLOBAL_LIST_INIT(jobban_panel_data, list(
else
msg += ", [job]"
if(msg)
message_admins("<span class='adminnotice'>[key_name_admin(usr)] unbanned [key_name_admin(M)] from [msg].</span>")
to_chat(M, "<span class='boldannounce'><BIG>You have been un-jobbanned by [usr.client.key] from [msg].</BIG></span>")
message_admins(span_adminnotice("[key_name_admin(usr)] unbanned [key_name_admin(M)] from [msg]."))
to_chat(M, span_boldannounce("<BIG>You have been un-jobbanned by [usr.client.key] from [msg].</BIG>"))
+4 -4
View File
@@ -1,13 +1,13 @@
/datum/admins/proc/kick(mob/M)
if (!ismob(M) || !M.client)
to_chat(usr, "<span class='danger'>Error: [M] has no client!</span>")
to_chat(usr, span_danger("Error: [M] has no client!"))
return
if(!check_if_greater_rights_than(M.client))
to_chat(usr, "<span class='danger'>Error: They have more rights than you do.</span>")
to_chat(usr, span_danger("Error: They have more rights than you do."))
return
to_chat(M, "<span class='danger'>You have been kicked from the server by [usr.client.holder.fakekey ? "an Administrator" : "[usr.client.key]"].</span>")
to_chat(M, span_danger("You have been kicked from the server by [usr.client.holder.fakekey ? "an Administrator" : "[usr.client.key]"]."))
log_admin("[key_name(usr)] kicked [key_name(M)].")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] kicked [key_name_admin(M)].</span>")
message_admins(span_adminnotice("[key_name_admin(usr)] kicked [key_name_admin(M)]."))
qdel(M.client)
+15 -15
View File
@@ -4,36 +4,36 @@
// var/mob/M = mob_to_ban
if(!ismob(M) || !M.client)
to_chat(usr, "<span class='danger'>Error: [M] has no client!</span>")
to_chat(usr, span_danger("Error: [M] has no client!"))
return
if(M.client && M.client.holder)
to_chat(usr, "<span class='danger'>Error: You cannot ban admins!</span>")
to_chat(usr, span_danger("Error: You cannot ban admins!"))
return //admins cannot be banned. Even if they could, the ban doesn't affect them anyway
switch(tgui_alert(usr, "Ban type", buttons = list("Temporary", "Permanent", "Cancel")))
if("Temporary")
var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num|null
if(mins <= 0)
to_chat(usr, "<span class='danger'>[mins] is not a valid duration.</span>")
to_chat(usr, span_danger("[mins] is not a valid duration."))
return
var/reason = input(usr,"Please State Reason For Banning [M.key].","Reason") as message|null
if(!reason)
return
if(!DB_ban_record(BANTYPE_TEMP, M, mins, reason))
to_chat(usr, "<span class='danger'>Failed to apply ban.</span>")
to_chat(usr, span_danger("Failed to apply ban."))
return
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 1, mins)
ban_unban_log_save("[key_name(usr)] has banned [key_name(M)]. - Reason: [reason] - This will be removed in [mins] minutes.")
to_chat(M, "<span class='boldannounce'><BIG>You have been banned by [usr.client.key].\nReason: [reason]</BIG></span>")
to_chat(M, "<span class='danger'>This is a temporary ban, it will be removed in [mins] minutes. The round ID is [GLOB.round_id].</span>")
to_chat(M, span_boldannounce("<BIG>You have been banned by [usr.client.key].\nReason: [reason]</BIG>"))
to_chat(M, span_danger("This is a temporary ban, it will be removed in [mins] minutes. The round ID is [GLOB.round_id]."))
var/bran = CONFIG_GET(string/banappeals)
if(bran)
to_chat(M, "<span class='danger'>To try to resolve this matter head to [bran]</span>")
to_chat(M, span_danger("To try to resolve this matter head to [bran]"))
else
to_chat(M, "<span class='danger'>No ban appeals URL has been set.</span>")
to_chat(M, span_danger("No ban appeals URL has been set."))
log_admin_private("[key_name(usr)] has banned [key_name(M)].\nReason: [key_name(M)]\nThis will be removed in [mins] minutes.")
var/msg = "<span class='adminnotice'>[key_name_admin(usr)] has banned [key_name_admin(M)].\nReason: [reason]\nThis will be removed in [mins] minutes.</span>"
var/msg = span_adminnotice("[key_name_admin(usr)] has banned [key_name_admin(M)].\nReason: [reason]\nThis will be removed in [mins] minutes.")
message_admins(msg)
var/datum/admin_help/AH = M.client ? M.client.current_ticket : null
if(AH)
@@ -50,19 +50,19 @@
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0, M.lastKnownIP)
if("No")
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0)
to_chat(M, "<span class='boldannounce'><BIG>You have been banned by [usr.client.key].\nReason: [reason]</BIG></span>")
to_chat(M, "<span class='danger'>This is a permanent ban. The round ID is [GLOB.round_id].</span>")
to_chat(M, span_boldannounce("<BIG>You have been banned by [usr.client.key].\nReason: [reason]</BIG>"))
to_chat(M, span_danger("This is a permanent ban. The round ID is [GLOB.round_id]."))
var/bran = CONFIG_GET(string/banappeals)
if(bran)
to_chat(M, "<span class='danger'>To try to resolve this matter head to [bran]</span>")
to_chat(M, span_danger("To try to resolve this matter head to [bran]"))
else
to_chat(M, "<span class='danger'>No ban appeals URL has been set.</span>")
to_chat(M, span_danger("No ban appeals URL has been set."))
if(!DB_ban_record(BANTYPE_PERMA, M, -1, reason))
to_chat(usr, "<span class='danger'>Failed to apply ban.</span>")
to_chat(usr, span_danger("Failed to apply ban."))
return
ban_unban_log_save("[key_name(usr)] has permabanned [key_name(M)]. - Reason: [reason] - This is a permanent ban.")
log_admin_private("[key_name(usr)] has banned [key_name(M)].\nReason: [reason]\nThis is a permanent ban.")
var/msg = "<span class='adminnotice'>[key_name_admin(usr)] has banned [key_name_admin(M)].\nReason: [reason]\nThis is a permanent ban.</span>"
var/msg = span_adminnotice("[key_name_admin(usr)] has banned [key_name_admin(M)].\nReason: [reason]\nThis is a permanent ban.")
message_admins(msg)
var/datum/admin_help/AH = M.client ? M.client.current_ticket : null
if(AH)
@@ -118,7 +118,7 @@ GLOBAL_LIST_INIT(pp_transformables, list(
newTypeName = newType
log_admin("[key_name(usr)] transformed [key_name(M)] into a [newTypeName].")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] transformed [key_name_admin(M)] into a [newTypeName].</span>")
message_admins(span_adminnotice("[key_name_admin(usr)] transformed [key_name_admin(M)] into a [newTypeName]."))
var/mob/newMob = M.change_mob_type(newType, delete_old_mob = TRUE)
@@ -35,7 +35,7 @@ GLOBAL_VAR_INIT(next_command_message_id, 1)
if ("orbit_sender")
var/atom/movable/sender = get_mob_by_key(params["sender_ckey"])
if(!sender)
to_chat(usr, "<span class='notice'>This player cannot be observed.</span>")
to_chat(usr, span_notice("This player cannot be observed."))
return
if(!isobserver(admin.mob))
@@ -22,7 +22,7 @@
return
if(!CONFIG_GET(flag/use_exp_tracking))
to_chat(usr, "<span class='warning'>Tracking is disabled in the server configuration file.</span>")
to_chat(usr, span_warning("Tracking is disabled in the server configuration file."))
return
if(!playtime_menu)
@@ -120,7 +120,7 @@
var/atom/movable/target = get_mob_by_key(params["ckey"])
if(!target)
to_chat(usr, "<span class='notice'>This player cannot be observed.</span>")
to_chat(usr, span_notice("This player cannot be observed."))
return
var/client/C = usr.client
@@ -2,7 +2,7 @@
set category = "Server"
set name = "Toggle Discord Bunker"
if(!SSdbcore.IsConnected())
to_chat(usr, "<span class='adminnotice'>The Database is not connected/enabled!</span>")
to_chat(usr, span_adminnotice("The Database is not connected/enabled!"))
return
var/new_dbun = !CONFIG_GET(flag/need_discord_to_join)
@@ -18,13 +18,13 @@
set name = "Add Discord Bypass"
set desc = "Allows a given ckey to connect through the discord bunker for the round even if they haven't verified yet."
if(!SSdbcore.IsConnected())
to_chat(usr, "<span class='adminnotice'>The Database is not connected!</span>")
to_chat(usr, span_adminnotice("The Database is not connected!"))
return
if(!SSdiscord)
to_chat(usr, "<span class='adminnotice'>The discord subsystem hasn't initialized yet!</span>")
to_chat(usr, span_adminnotice("The discord subsystem hasn't initialized yet!"))
return
if(!CONFIG_GET(flag/need_discord_to_join))
to_chat(usr, "<span class='adminnotice'>The Discord Bunker is deactivated!</span>")
to_chat(usr, span_adminnotice("The Discord Bunker is deactivated!"))
return
GLOB.discord_passthrough |= ckey(ckeytobypass)
@@ -38,13 +38,13 @@
set name = "Revoke Discord Bypass"
set desc = "Revoke's a ckey's permission to bypass the discord bunker for a given round."
if(!SSdbcore.IsConnected())
to_chat(usr, "<span class='adminnotice'>The Database is not connected!</span>")
to_chat(usr, span_adminnotice("The Database is not connected!"))
return
if(!SSdiscord)
to_chat(usr, "<span class='adminnotice'>The discord subsystem hasn't initialized yet!</span>")
to_chat(usr, span_adminnotice("The discord subsystem hasn't initialized yet!"))
return
if(!CONFIG_GET(flag/need_discord_to_join))
to_chat(usr, "<span class='adminnotice'>The Discord Bunker is deactivated!</span>")
to_chat(usr, span_adminnotice("The Discord Bunker is deactivated!"))
return
GLOB.discord_passthrough -= ckey(ckeytobypass)
@@ -42,7 +42,7 @@
log_admin("SubtlePM ([sender]): [key_name(usr)] -> [key_name(M)] : [msg]")
msg = "<span class='adminnotice'><b> SubtleMessage ([sender]): [key_name_admin(usr)] -> [key_name_admin(M)] :</b> [msg]</span>"
msg = span_adminnotice("<b> SubtleMessage ([sender]): [key_name_admin(usr)] -> [key_name_admin(M)] :</b> [msg]")
message_admins(msg)
admin_ticket_log(M, msg)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Subtle Message") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!