Convert most spans to defines (#31080)

* spanish?

* aaaagain

* keep maptext

* Update robot_items.dm

* Update span_defines.dm

* compiles

* Update silicon_mob.dm

* compile
This commit is contained in:
kyunkyunkyun
2025-12-13 23:55:48 +00:00
committed by GitHub
parent e5f0a6fffb
commit b0463d3c83
1624 changed files with 15737 additions and 15581 deletions
+1 -1
View File
@@ -29,5 +29,5 @@
*/
/datum/controller/proc/log_startup_progress(message)
Master.last_init_info = "([name]): [message]"
to_chat(world, "<span class='danger'><small>\[[name]]</small> [message]</span>", MESSAGE_TYPE_DEBUG, confidential = TRUE)
to_chat(world, SPAN_DANGER("<small>\[[name]]</small> [message]"), MESSAGE_TYPE_DEBUG, confidential = TRUE)
log_world("\[[name]] [message]")
+16 -16
View File
@@ -42,10 +42,10 @@ GLOBAL_REAL(Failsafe, /datum/controller/failsafe)
break
else if(defcon == 1) //Exit Failsafe if we weren't able to recover the MC in the last stage
log_game("FailSafe: Failed to recover MC while in emergency state. Failsafe exiting.")
message_admins("<span class='boldannounceooc'>Failsafe failed critically while trying to recreate broken MC. Please manually fix the MC or reboot the server. Failsafe exiting now.</span>")
message_admins("<span class='boldannounceooc'>You can try manually calling these two procs:.</span>")
message_admins("<span class='boldannounceooc'><code>/proc/recover_all_SS_and_recreate_master</code>: Most stuff should still function but expect instability/runtimes/broken stuff.</span>")
message_admins("<span class='boldannounceooc'><code>/proc/delete_all_SS_and_recreate_master</code>: Most stuff will be broken but basic stuff like movement and chat should still work.</span>")
message_admins(SPAN_BOLDANNOUNCEOOC("Failsafe failed critically while trying to recreate broken MC. Please manually fix the MC or reboot the server. Failsafe exiting now."))
message_admins(SPAN_BOLDANNOUNCEOOC("You can try manually calling these two procs:."))
message_admins(SPAN_BOLDANNOUNCEOOC("<code>/proc/recover_all_SS_and_recreate_master</code>: Most stuff should still function but expect instability/runtimes/broken stuff."))
message_admins(SPAN_BOLDANNOUNCEOOC("<code>/proc/delete_all_SS_and_recreate_master</code>: Most stuff will be broken but basic stuff like movement and chat should still work."))
else if(recovery_result == -1) //Failed to recreate MC
defcon--
sleep(initial(processing_interval)) //Wait a bit until the next try
@@ -74,24 +74,24 @@ GLOBAL_REAL(Failsafe, /datum/controller/failsafe)
--defcon
if(3)
message_admins("<span class='boldnotice'>Notice: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks.</span>")
message_admins(SPAN_BOLDNOTICE("Notice: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks."))
--defcon
if(2)
to_chat(GLOB.admins, "<span class='boldannounceooc'>Warning: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks. Automatic restart in [processing_interval] ticks.</span>")
to_chat(GLOB.admins, SPAN_BOLDANNOUNCEOOC("Warning: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks. Automatic restart in [processing_interval] ticks."))
--defcon
if(1)
to_chat(GLOB.admins, "<span class='boldannounceooc'>Warning: DEFCON [defcon_pretty()]. The Master Controller has still not fired within the last [(5-defcon) * processing_interval] ticks. Killing and restarting...</span>")
to_chat(GLOB.admins, SPAN_BOLDANNOUNCEOOC("Warning: DEFCON [defcon_pretty()]. The Master Controller has still not fired within the last [(5-defcon) * processing_interval] ticks. Killing and restarting..."))
--defcon
var/rtn = Recreate_MC()
if(rtn > 0)
defcon = 4
master_iteration = 0
to_chat(GLOB.admins, "<span class='boldnotice'>MC restarted successfully</span>")
to_chat(GLOB.admins, SPAN_BOLDNOTICE("MC restarted successfully"))
else if(rtn < 0)
log_game("FailSafe: Could not restart MC, runtime encountered. Entering defcon 0")
to_chat(GLOB.admins, "<span class='boldannounceooc'>ERROR: DEFCON [defcon_pretty()]. Could not restart MC, runtime encountered. I will silently keep retrying.</span>")
to_chat(GLOB.admins, SPAN_BOLDANNOUNCEOOC("ERROR: DEFCON [defcon_pretty()]. Could not restart MC, runtime encountered. I will silently keep retrying."))
//if the return number was 0, it just means the mc was restarted too recently, and it just needs some time before we try again
//no need to handle that specially when defcon 0 can handle it
@@ -100,7 +100,7 @@ GLOBAL_REAL(Failsafe, /datum/controller/failsafe)
if(rtn > 0)
defcon = 4
master_iteration = 0
to_chat(GLOB.admins, "<span class='boldnotice'>MC restarted successfully</span>")
to_chat(GLOB.admins, SPAN_BOLDNOTICE("MC restarted successfully"))
else
defcon = min(defcon + 1,5)
master_iteration = Master.iteration
@@ -129,10 +129,10 @@ GLOBAL_REAL(Failsafe, /datum/controller/failsafe)
master_iteration = 0
SSticker.Recover(); //Recover the ticket system so the Masters runlevel gets set
Master.Initialize(10, FALSE, TRUE) //Need to manually start the MC, normally world.new would do this
to_chat(GLOB.admins, "<span class='boldnotice'>Failsafe recovered MC while in emergency state [defcon_pretty()]</span>")
to_chat(GLOB.admins, SPAN_BOLDNOTICE("Failsafe recovered MC while in emergency state [defcon_pretty()]"))
else
log_game("FailSafe: Failsafe in emergency state and was unable to recreate MC while in defcon state [defcon_pretty()].")
message_admins("<span class='boldannounceooc'>Failsafe in emergency state and master down, trying to recreate MC while in defcon level [defcon_pretty()] failed.</span>")
message_admins(SPAN_BOLDANNOUNCEOOC("Failsafe in emergency state and master down, trying to recreate MC while in defcon level [defcon_pretty()] failed."))
///Recreate all SSs which will still cause data survive due to Recover(), the new Master will then find and take them from global.vars
/proc/recover_all_SS_and_recreate_master()
@@ -148,9 +148,9 @@ GLOBAL_REAL(Failsafe, /datum/controller/failsafe)
if(. == 1) //We were able to create a new master
SSticker.Recover(); //Recover the ticket system so the Masters runlevel gets set
Master.Initialize(10, FALSE, TRUE) //Need to manually start the MC, normally world.new would do this
to_chat(GLOB.admins, "<span class='boldnotice'>MC successfully recreated after recovering all subsystems!</span>")
to_chat(GLOB.admins, SPAN_BOLDNOTICE("MC successfully recreated after recovering all subsystems!"))
else
message_admins("<span class='boldannounceooc'>Failed to create new MC!</span>")
message_admins(SPAN_BOLDANNOUNCEOOC("Failed to create new MC!"))
///Delete all existing SS to basically start over
/proc/delete_all_SS_and_recreate_master()
@@ -165,9 +165,9 @@ GLOBAL_REAL(Failsafe, /datum/controller/failsafe)
if(. == 1) //We were able to create a new master
SSticker.Recover(); //Recover the ticket system so the Masters runlevel gets set
Master.Initialize(10, FALSE, TRUE) //Need to manually start the MC, normally world.new would do this
to_chat(GLOB.admins, "<span class='boldnotice'>MC successfully recreated after deleting and recreating all subsystems!</span>")
to_chat(GLOB.admins, SPAN_BOLDNOTICE("MC successfully recreated after deleting and recreating all subsystems!"))
else
message_admins("<span class='boldnotice'>Failed to create new MC!</span>")
message_admins(SPAN_BOLDNOTICE("Failed to create new MC!"))
/datum/controller/failsafe/proc/defcon_pretty()
return defcon
+3 -3
View File
@@ -182,10 +182,10 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
msg = "The [BadBoy.name] subsystem was the last to fire for 2 controller restarts. It will be recovered now and disabled if it happens again."
FireHim = TRUE
if(3)
msg = "The [BadBoy.name] subsystem seems to be destabilizing the MC and will be offlined. <span class='notice'>The following implications are now in effect: [BadBoy.offline_implications]</span>"
msg = "The [BadBoy.name] subsystem seems to be destabilizing the MC and will be offlined. [SPAN_NOTICE("The following implications are now in effect: [BadBoy.offline_implications]")]"
BadBoy.flags |= SS_NO_FIRE
if(msg)
to_chat(GLOB.admins, "<span class='boldannounceooc'>[msg]</span>")
to_chat(GLOB.admins, SPAN_BOLDANNOUNCEOOC("[msg]"))
log_world(msg)
if(istype(Master.subsystems))
@@ -195,7 +195,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
current_runlevel = Master.current_runlevel
StartProcessing(10)
else
to_chat(world, "<span class='boldannounceooc'>The Master Controller is having some issues, we will need to re-initialize EVERYTHING</span>")
to_chat(world, SPAN_BOLDANNOUNCEOOC("The Master Controller is having some issues, we will need to re-initialize EVERYTHING"))
Initialize(20, TRUE)
// Please don't stuff random bullshit here,
+3 -3
View File
@@ -43,14 +43,14 @@ SUBSYSTEM_DEF(afk)
if(!afk_players[H.ckey])
afk_players[H.ckey] = AFK_WARNED
warn(H, "<span class='danger'>You are AFK for [mins_afk] minutes. You will be cryod after [GLOB.configuration.afk.auto_cryo_minutes] total minutes and fully despawned after [GLOB.configuration.afk.auto_despawn_minutes] total minutes. Please move or click in game if you want to avoid being despawned.</span>")
warn(H, SPAN_DANGER("You are AFK for [mins_afk] minutes. You will be cryod after [GLOB.configuration.afk.auto_cryo_minutes] total minutes and fully despawned after [GLOB.configuration.afk.auto_despawn_minutes] total minutes. Please move or click in game if you want to avoid being despawned."))
else
var/area/A = T.loc // Turfs loc is the area
if(afk_players[H.ckey] == AFK_WARNED)
if(mins_afk >= GLOB.configuration.afk.auto_cryo_minutes && A.can_get_auto_cryod)
if(A.fast_despawn)
toRemove += H.ckey
warn(H, "<span class='danger'>You have been despawned after being AFK for [mins_afk] minutes. You have been despawned instantly due to you being in a secure area.</span>")
warn(H, SPAN_DANGER("You have been despawned after being AFK for [mins_afk] minutes. You have been despawned instantly due to you being in a secure area."))
log_afk_action(H, mins_afk, T, "despawned", "AFK in a fast despawn area")
force_cryo_human(H)
else
@@ -69,7 +69,7 @@ SUBSYSTEM_DEF(afk)
else if(afk_players[H.ckey] != AFK_ADMINS_WARNED && mins_afk >= GLOB.configuration.afk.auto_despawn_minutes)
log_afk_action(H, mins_afk, T, "despawned")
warn(H, "<span class='danger'>You have been despawned after being AFK for [mins_afk] minutes.</span>")
warn(H, SPAN_DANGER("You have been despawned after being AFK for [mins_afk] minutes."))
toRemove += H.ckey
force_cryo_human(H)
+1 -1
View File
@@ -801,7 +801,7 @@ SUBSYSTEM_DEF(air)
log_debug(err)
var/msg = "MILLA has crashed. SSair will stop running, and all atmospherics will stop functioning. Every turf will report as full of breathable air, and all fires will be extinguished. Shuttle call highly recommended."
to_chat(GLOB.admins, "<span class='boldannounceooc'>[msg]</span>")
to_chat(GLOB.admins, SPAN_BOLDANNOUNCEOOC("[msg]"))
log_world(msg)
// Disable firing.
+4 -4
View File
@@ -274,7 +274,7 @@ SUBSYSTEM_DEF(dbcore)
*/
/datum/controller/subsystem/dbcore/proc/NewQuery(sql_query, arguments)
if(IsAdminAdvancedProcCall())
to_chat(usr, "<span class='boldannounceooc'>DB query blocked: Advanced ProcCall detected.</span>")
to_chat(usr, SPAN_BOLDANNOUNCEOOC("DB query blocked: Advanced ProcCall detected."))
message_admins("[key_name(usr)] attempted to create a DB query via advanced proc-call")
log_admin("[key_name(usr)] attempted to create a DB query via advanced proc-call")
return FALSE
@@ -375,7 +375,7 @@ SUBSYSTEM_DEF(dbcore)
if(!.)
SSdbcore.total_errors++
if(usr)
to_chat(usr, "<span class='danger'>A SQL error occurred during this operation, please inform an admin or a coder.</span>", MESSAGE_TYPE_ADMINLOG, confidential = TRUE)
to_chat(usr, SPAN_DANGER("A SQL error occurred during this operation, please inform an admin or a coder."), MESSAGE_TYPE_ADMINLOG, confidential = TRUE)
message_admins("An SQL error has occurred. Please check the server logs, with the following timestamp ID: \[[time_stamp()]]")
/**
@@ -483,12 +483,12 @@ SUBSYSTEM_DEF(dbcore)
// Verb that lets admins force reconnect the DB
USER_VERB(reestablish_db_connection, R_ADMIN, "Reestablish DB Connection", "Force a reconnection to the database.", VERB_CATEGORY_DEBUG)
if(!GLOB.configuration.database.enabled)
to_chat(client, "<span class='warning'>The Database is not enabled in the server configuration!</span>")
to_chat(client, SPAN_WARNING("The Database is not enabled in the server configuration!"))
return
if(SSdbcore.IsConnected())
if(!check_rights_client(R_DEBUG, FALSE, client))
to_chat(client, "<span class='warning'>The database is already connected! (Only those with +DEBUG can force a reconnection)</span>")
to_chat(client, SPAN_WARNING("The database is already connected! (Only those with +DEBUG can force a reconnection)"))
return
var/reconnect = alert(client, "The database is already connected! If you *KNOW* that this is incorrect, you can force a reconnection", "The database is already connected!", "Force Reconnect", "Cancel")
+2 -2
View File
@@ -114,7 +114,7 @@ SUBSYSTEM_DEF(events)
html += "<div class='block'>"
html += "<h2>Available [GLOB.severity_to_string[selected_event_container.severity]] Events (queued & running events will not be displayed)</h2>"
html += "<table [table_options]>"
html += "<tr [head_options]><td [row_options2]>Name </td><td>Weight </td><td>MinWeight </td><td>MaxWeight </td><td>OneShot </td><td>Enabled </td><td><span class='alert'>CurrWeight </span></td><td>Remove</td></tr>"
html += "<tr [head_options]><td [row_options2]>Name </td><td>Weight </td><td>MinWeight </td><td>MaxWeight </td><td>OneShot </td><td>Enabled </td><td>[SPAN_ALERT("CurrWeight ")]</td><td>Remove</td></tr>"
for(var/datum/event_meta/EM in selected_event_container.available_events)
if(!EM.skeleton)
continue
@@ -125,7 +125,7 @@ SUBSYSTEM_DEF(events)
html += "<td>[EM.max_weight == INFINITY ? "No max" : EM.max_weight]</td>"
html += "<td><A align='right' href='byond://?src=[UID()];toggle_oneshot=\ref[EM]'>[EM.one_shot]</A></td>"
html += "<td><A align='right' href='byond://?src=[UID()];toggle_enabled=\ref[EM]'>[EM.enabled]</A></td>"
html += "<td><span class='alert'>[EM.get_weight(total_resources)]</span></td>"
html += "<td>[SPAN_ALERT("[EM.get_weight(total_resources)]")]</td>"
html += "<td><A align='right' href='byond://?src=[UID()];remove=\ref[EM];EC=\ref[selected_event_container]'>Remove</A></td>"
html += "</tr>"
html += "</table>"
+7 -7
View File
@@ -137,7 +137,7 @@ SUBSYSTEM_DEF(ghost_spawns)
var/atom/atom_source = source
act_jump = "<a href='byond://?src=[M.UID()];jump=[atom_source.UID()]'>\[Teleport]</a>"
var/act_signup = "<a href='byond://?src=[A.UID()];signup=1'>\[Sign Up]</a>"
to_chat(M, "<big><span class='boldnotice'>Now looking for candidates [role ? "to play as \an [role_cleanname || role]" : "\"[question]\""]. [act_jump] [act_signup] [reason ? "<i>\nReason: [sanitize(reason)]</i>" : ""]</span></big>", MESSAGE_TYPE_DEADCHAT)
to_chat(M, "<big>[SPAN_BOLDNOTICE("Now looking for candidates [role ? "to play as \an [role_cleanname || role]" : "\"[question]\""]. [act_jump] [act_signup] [reason ? "<i>\nReason: [sanitize(reason)]</i>" : ""]")]</big>", MESSAGE_TYPE_DEADCHAT)
// Start processing it so it updates visually the timer
START_PROCESSING(SSprocessing, A)
@@ -258,18 +258,18 @@ SUBSYSTEM_DEF(ghost_spawns)
return
if(M in signed_up)
if(!silent)
to_chat(M, "<span class='warning'>You have already signed up for this!</span>")
to_chat(M, SPAN_WARNING("You have already signed up for this!"))
return
if(time_left() <= 0)
if(!silent)
to_chat(M, "<span class='danger'>Sorry, you were too late for the consideration!</span>")
to_chat(M, SPAN_DANGER("Sorry, you were too late for the consideration!"))
SEND_SOUND(M, sound('sound/machines/buzz-sigh.ogg'))
return
signed_up += M
if(!silent)
to_chat(M, "<span class='notice'>You have signed up for this role! A candidate will be picked randomly soon.</span>")
to_chat(M, SPAN_NOTICE("You have signed up for this role! A candidate will be picked randomly soon."))
// Sign them up for any other polls with the same mob type
for(var/existing_poll in SSghost_spawns.currently_polling)
var/datum/candidate_poll/P = existing_poll
@@ -291,17 +291,17 @@ SUBSYSTEM_DEF(ghost_spawns)
return
if(!(M in signed_up))
if(!silent)
to_chat(M, "<span class='warning'>You aren't signed up for this!</span>")
to_chat(M, SPAN_WARNING("You aren't signed up for this!"))
return
if(time_left() <= 0)
if(!silent)
to_chat(M, "<span class='danger'>It's too late to unregister yourself, selection has already begun!</span>")
to_chat(M, SPAN_DANGER("It's too late to unregister yourself, selection has already begun!"))
return
signed_up -= M
if(!silent)
to_chat(M, "<span class='notice'>You have been unregistered as a candidate for this role. You can freely sign up again before the poll ends.</span>")
to_chat(M, SPAN_NOTICE("You have been unregistered as a candidate for this role. You can freely sign up again before the poll ends."))
for(var/existing_poll in SSghost_spawns.currently_polling)
var/datum/candidate_poll/P = existing_poll
+1 -1
View File
@@ -16,5 +16,5 @@ SUBSYSTEM_DEF(heartbeat)
/datum/controller/subsystem/heartbeat/fire(resumed)
// If the last heartbeat is 0, we never got one this round
if(last_heartbeat != 0 && (last_heartbeat + 2 MINUTES < REALTIMEOFDAY) && !warning_tripped)
to_chat(GLOB.admins, "<hr><center><span class='userdanger'><big>--- CRITICAL ---</big></span><br>The server hasn't received an uptime check from the server daemon for over 2 minutes. Inform AA ASAP.</center><hr>")
to_chat(GLOB.admins, "<hr><center>[SPAN_USERDANGER("<big>--- CRITICAL ---</big>")]<br>The server hasn't received an uptime check from the server daemon for over 2 minutes. Inform AA ASAP.</center><hr>")
warning_tripped = TRUE
+9 -9
View File
@@ -41,7 +41,7 @@ SUBSYSTEM_DEF(jobs)
occupations = list()
var/list/all_jobs = subtypesof(/datum/job)
if(!length(all_jobs))
to_chat(world, "<span class='warning'>Error setting up jobs, no job datums found.</span>")
to_chat(world, SPAN_WARNING("Error setting up jobs, no job datums found."))
return 0
for(var/J in all_jobs)
@@ -270,8 +270,8 @@ SUBSYSTEM_DEF(jobs)
H.mind.store_memory("<b>Your account number is:</b> #[account.account_number]<br><b>Your account pin is:</b> [account.account_pin]")
H.mind.set_initial_account(account)
to_chat(H, "<span class='boldnotice'>As an employee of Nanotrasen you will receive a paycheck of $[account.payday_amount] credits every 30 minutes</span>")
to_chat(H, "<span class='boldnotice'>Your account number is: [account.account_number], your account pin is: [account.account_pin]</span>")
to_chat(H, SPAN_BOLDNOTICE("As an employee of Nanotrasen you will receive a paycheck of $[account.payday_amount] credits every 30 minutes"))
to_chat(H, SPAN_BOLDNOTICE("Your account number is: [account.account_number], your account pin is: [account.account_pin]"))
if(!job) //if their job datum is null (looking at you ERTs...), we don't need to do anything past this point
return
@@ -307,8 +307,8 @@ SUBSYSTEM_DEF(jobs)
remembered_info += "<b>Your department's account funds are:</b> $[department_account.credit_balance]<br>"
H.mind.store_memory(remembered_info)
to_chat(H, "<span class='boldnotice'>Your department will receive a $[department_account.payday_amount] credit stipend every 30 minutes</span>")
to_chat(H, "<span class='boldnotice'>The [department.department_name] department's account number is: #[department_account.account_number], Your department's account pin is: [department_account.account_pin]</span>")
to_chat(H, SPAN_BOLDNOTICE("Your department will receive a $[department_account.payday_amount] credit stipend every 30 minutes"))
to_chat(H, SPAN_BOLDNOTICE("The [department.department_name] department's account number is: #[department_account.account_number], Your department's account pin is: [department_account.account_pin]"))
/// Returns a list of jobs keyed by name to UI color for the job transfer selection.
/datum/controller/subsystem/jobs/proc/format_jobs_for_id_computer(obj/item/card/id/tgtcard)
@@ -520,7 +520,7 @@ SUBSYSTEM_DEF(jobs)
added_differential[EXP_TYPE_LIVING] += minutes
if(announce)
to_chat(C.mob, "<span class='notice'>You got: [minutes] Living EXP!</span>")
to_chat(C.mob, SPAN_NOTICE("You got: [minutes] Living EXP!"))
for(var/category in GLOB.exp_jobsmap)
if(GLOB.exp_jobsmap[category]["titles"])
@@ -528,18 +528,18 @@ SUBSYSTEM_DEF(jobs)
play_records[C.ckey][category] += minutes
added_differential[category] += minutes
if(announce)
to_chat(C.mob, "<span class='notice'>You got: [minutes] [category] EXP!</span>")
to_chat(C.mob, SPAN_NOTICE("You got: [minutes] [category] EXP!"))
if(C.mob.mind.special_role)
play_records[C.ckey][EXP_TYPE_SPECIAL] += minutes
if(announce)
to_chat(C.mob, "<span class='notice'>You got: [minutes] Special EXP!</span>")
to_chat(C.mob, SPAN_NOTICE("You got: [minutes] Special EXP!"))
else if(isobserver(C.mob))
play_records[C.ckey][EXP_TYPE_GHOST] += minutes
added_differential[EXP_TYPE_GHOST] += minutes
if(announce)
to_chat(C.mob, "<span class='notice'>You got: [minutes] Ghost EXP!</span>")
to_chat(C.mob, SPAN_NOTICE("You got: [minutes] Ghost EXP!"))
else
continue
+17 -17
View File
@@ -84,7 +84,7 @@ SUBSYSTEM_DEF(ticker)
// This is ran as soon as the MC starts firing, and should only run ONCE, unless startup fails
pregame_timeleft = GLOB.configuration.general.lobby_time SECONDS
round_start_time = world.time + pregame_timeleft
to_chat(world, "<B><span class='darkmblue'>Welcome to the pre-game lobby!</span></B>")
to_chat(world, "<B>[SPAN_DARKMBLUE("Welcome to the pre-game lobby!")]</B>")
to_chat(world, "Please, setup your character and select ready. Game will start in [GLOB.configuration.general.lobby_time] seconds")
current_state = GAME_STATE_PREGAME
fire() // TG says this is a good idea
@@ -160,7 +160,7 @@ SUBSYSTEM_DEF(ticker)
var/datum/map/target_map = pick(pickable_types)
SSmapping.next_map = new target_map
to_chat(world, "<span class='interface'>Map for next round: [SSmapping.next_map.fluff_name] ([SSmapping.next_map.technical_name])</span>")
to_chat(world, SPAN_INTERFACE("Map for next round: [SSmapping.next_map.fluff_name] ([SSmapping.next_map.technical_name])"))
/datum/controller/subsystem/ticker/proc/call_reboot()
if(mode.station_was_nuked)
@@ -228,7 +228,7 @@ SUBSYSTEM_DEF(ticker)
var/has_antags = (length(P.client.prefs.be_special) > 0)
if(!P.client.prefs.active_character.check_any_job())
to_chat(P, "<span class='danger'>You have no jobs enabled, along with return to lobby if job is unavailable. This makes you ineligible for any round start role, please update your job preferences.</span>")
to_chat(P, SPAN_DANGER("You have no jobs enabled, along with return to lobby if job is unavailable. This makes you ineligible for any round start role, please update your job preferences."))
if(has_antags)
// We add these to a list so we can deal with them as a batch later
// A lot of DB tracking stuff needs doing, so we may as well async it
@@ -344,11 +344,11 @@ SUBSYSTEM_DEF(ticker)
qdel(S)
SSdbcore.SetRoundStart()
to_chat(world, "<span class='darkmblue'><B>Enjoy the game!</B></span>")
to_chat(world, SPAN_DARKMBLUE("<B>Enjoy the game!</B>"))
SEND_SOUND(world, sound(SSmapping.map_datum.welcome_sound))
if(SSholiday.holidays)
to_chat(world, "<span class='darkmblue'>and...</span>")
to_chat(world, SPAN_DARKMBLUE("and..."))
for(var/holidayname in SSholiday.holidays)
var/datum/holiday/holiday = SSholiday.holidays[holidayname]
to_chat(world, "<h4>[holiday.greet()]</h4>")
@@ -396,7 +396,7 @@ SUBSYSTEM_DEF(ticker)
if(M.stat != DEAD)
var/turf/T = get_turf(M)
if(T && is_station_level(T.z) && !istype(M.loc, /obj/structure/closet/secure_closet/freezer) && !(issilicon(M) && override == "AI malfunction"))
to_chat(M, "<span class='danger'><B>The blast wave from the explosion tears you atom from atom!</B></span>")
to_chat(M, SPAN_DANGER("<B>The blast wave from the explosion tears you atom from atom!</B>"))
var/mob/ghost = M.ghostize()
M.dust() //no mercy
if(ghost && ghost.client) //Play the victims an uninterrupted cinematic.
@@ -520,23 +520,23 @@ SUBSYSTEM_DEF(ticker)
if(length(S.contents) < S.storage_slots)
I.forceMove(H.back)
ok = TRUE
to_chat(H, "<span class='notice'>Your [I.name] has been added to your [H.back.name].</span>")
to_chat(H, SPAN_NOTICE("Your [I.name] has been added to your [H.back.name]."))
if(!ok)
for(var/obj/item/storage/S in H.contents) // Try to place it in any item that can store stuff, on the mob.
if(length(S.contents) < S.storage_slots)
I.forceMove(S)
ok = TRUE
to_chat(H, "<span class='notice'>Your [I.name] has been added to your [S.name].</span>")
to_chat(H, SPAN_NOTICE("Your [I.name] has been added to your [S.name]."))
break
if(!ok) // Finally, since everything else failed, place it on the ground
var/turf/T = get_turf(H)
if(T)
I.forceMove(T)
to_chat(H, "<span class='notice'>Your [I.name] is on the [T.name] below you.</span>")
to_chat(H, SPAN_NOTICE("Your [I.name] is on the [T.name] below you."))
else
to_chat(H, "<span class='notice'>Your [I.name] couldnt spawn anywhere on you or even on the floor below you. Please file a bug report.</span>")
to_chat(H, SPAN_NOTICE("Your [I.name] couldnt spawn anywhere on you or even on the floor below you. Please file a bug report."))
qdel(I)
@@ -553,7 +553,7 @@ SUBSYSTEM_DEF(ticker)
m = pick(memetips)
if(m)
to_chat(world, "<span class='purple'><b>Tip of the round: </b>[html_encode(m)]</span>")
to_chat(world, SPAN_PURPLE("<b>Tip of the round: </b>[html_encode(m)]"))
/datum/controller/subsystem/ticker/proc/send_fact_of_the_round()
var/factoid
@@ -565,7 +565,7 @@ SUBSYSTEM_DEF(ticker)
factoid = pick(random_facts)
if(length(factoid))
to_chat(world, "<span class='green'><b>Fact of the round: </b>[html_encode(factoid)]</span>")
to_chat(world, SPAN_GREEN("<b>Fact of the round: </b>[html_encode(factoid)]"))
/datum/controller/subsystem/ticker/proc/declare_completion()
GLOB.nologevent = TRUE //end of round murder and shenanigans are legal; there's no need to jam up attack logs past this point.
@@ -592,7 +592,7 @@ SUBSYSTEM_DEF(ticker)
aiPlayer.laws_sanity_check()
for(var/datum/ai_law/law as anything in aiPlayer.laws.sorted_laws)
if(law == aiPlayer.laws.zeroth_law)
end_of_round_info += "<span class='danger'>[law.get_index()]. [law.law]</span>"
end_of_round_info += SPAN_DANGER("[law.get_index()]. [law.law]")
else
end_of_round_info += "[law.get_index()]. [law.law]"
@@ -621,7 +621,7 @@ SUBSYSTEM_DEF(ticker)
robo.laws_sanity_check()
for(var/datum/ai_law/law as anything in robo.laws.sorted_laws)
if(law == robo.laws.zeroth_law)
end_of_round_info += "<span class='danger'>[law.get_index()]. [law.law]</span>"
end_of_round_info += SPAN_DANGER("[law.get_index()]. [law.law]")
else
end_of_round_info += "[law.get_index()]. [law.law]"
@@ -722,7 +722,7 @@ SUBSYSTEM_DEF(ticker)
/datum/controller/subsystem/ticker/proc/reboot_helper(reason, end_string, delay)
// Admins delayed round end. Just alert and dont bother with anything else.
if(delay_end)
to_chat(world, "<span class='boldannounceooc'>An admin has delayed the round end.</span>")
to_chat(world, SPAN_BOLDANNOUNCEOOC("An admin has delayed the round end."))
return
if(delay)
INVOKE_ASYNC(src, TYPE_PROC_REF(/datum/controller/subsystem/ticker, show_server_restart_blurb), reason)
@@ -734,14 +734,14 @@ SUBSYSTEM_DEF(ticker)
// Use default restart timeout
delay = max(0, GLOB.configuration.general.restart_timeout SECONDS)
to_chat(world, "<span class='boldannounceooc'>Rebooting world in [delay/10] [delay > 10 ? "seconds" : "second"]. [reason]</span>")
to_chat(world, SPAN_BOLDANNOUNCEOOC("Rebooting world in [delay/10] [delay > 10 ? "seconds" : "second"]. [reason]"))
real_reboot_time = world.time + delay
UNTIL(world.time > real_reboot_time) // Hold it here
// And if we re-delayed, bail again
if(delay_end)
to_chat(world, "<span class='boldannounceooc'>Reboot was cancelled by an admin.</span>")
to_chat(world, SPAN_BOLDANNOUNCEOOC("Reboot was cancelled by an admin."))
return
if(end_string)
@@ -35,7 +35,7 @@ SUBSYSTEM_DEF(changelog)
qdel(latest_cl_date)
if(!GenerateChangelogData()) // if this failed to generate
to_chat(world, "<span class='alert'>WARNING: Changelog failed to generate. Please inform a coder/server dev</span>")
to_chat(world, SPAN_ALERT("WARNING: Changelog failed to generate. Please inform a coder/server dev"))
return ..()
ss_ready = TRUE
@@ -75,18 +75,18 @@ SUBSYSTEM_DEF(changelog)
// If we are ready, process the button style
if(C.prefs.lastchangelog != current_cl_timestamp)
winset(C, "rpane.changelog", "border=line;background-color=#bb7700;text-color=#FFFFFF;font-style=bold")
to_chat(C, "<span class='boldnotice'>Changelog has changed since your last visit.</span>")
to_chat(C, SPAN_BOLDNOTICE("Changelog has changed since your last visit."))
/datum/controller/subsystem/changelog/proc/OpenChangelog(client/C)
// If SQL isnt enabled, dont even queue them, just tell them it wont work
if(!SSdbcore.IsConnected())
to_chat(C, "<span class='notice'>This server is not running with an SQL backend. Changelog is unavailable.</span>")
to_chat(C, SPAN_NOTICE("This server is not running with an SQL backend. Changelog is unavailable."))
return
// If SQL is enabled but we aint ready, queue them up
if(!ss_ready)
startup_clients_open |= C
to_chat(C, "<span class='notice'>The changelog system is still initializing. The changelog will open for you once it has initialized.</span>")
to_chat(C, SPAN_NOTICE("The changelog system is still initializing. The changelog will open for you once it has initialized."))
return
UpdatePlayerChangelogDate(C)
@@ -219,5 +219,5 @@ SUBSYSTEM_DEF(changelog)
usr << link(url)
return TRUE
to_chat(usr, "<span class='danger'>The GitHub URL is not set in the server configuration. PRs cannot be opened from changelog view. Please inform the server host.</span>")
to_chat(usr, SPAN_DANGER("The GitHub URL is not set in the server configuration. PRs cannot be opened from changelog view. Please inform the server host."))
@@ -317,12 +317,12 @@ SUBSYSTEM_DEF(mapping)
if(map_datum_path)
map_datum = new map_datum_path
else
to_chat(world, "<span class='narsie'>ERROR: The map datum specified to load is invalid. Falling back to... cyberiad probably?</span>")
to_chat(world, SPAN_NARSIE("ERROR: The map datum specified to load is invalid. Falling back to... cyberiad probably?"))
ASSERT(map_datum.map_path)
if(!fexists(map_datum.map_path))
// Make a VERY OBVIOUS error
to_chat(world, "<span class='narsie'>ERROR: The path specified for the map to load is invalid. No station has been loaded!</span>")
to_chat(world, SPAN_NARSIE("ERROR: The path specified for the map to load is invalid. No station has been loaded!"))
return
var/watch = start_watch()
@@ -109,4 +109,4 @@ SUBSYSTEM_DEF(maprotate)
var/datum/map/winner = pickweight(pickable_maps) // Even if no one votes, pickweight will pick from them evenly. This means a map with zero votes *can* be chosen
to_chat(world, "[returned_text.Join("\n")]")
SSmapping.next_map = new winner
to_chat(world, "<span class='interface'>Map for next round: [SSmapping.next_map.fluff_name] ([SSmapping.next_map.technical_name])</span>")
to_chat(world, SPAN_INTERFACE("Map for next round: [SSmapping.next_map.fluff_name] ([SSmapping.next_map.technical_name])"))
@@ -107,7 +107,7 @@ SUBSYSTEM_DEF(user_verbs)
CRASH("Attempted to dynamically invoke user verb '[verb_type]' that doesn't exist.")
if(!check_rights_client(verb_singleton.permissions, FALSE, admin))
to_chat(admin, "<span class='span_adminnotice'>You lack the permissions to do this.</span>")
to_chat(admin, SPAN_ADMINNOTICE("You lack the permissions to do this."))
return
var/old_usr = usr
@@ -23,7 +23,7 @@ GLOBAL_REAL(SSmentor_tickets, /datum/controller/subsystem/tickets/mentor_tickets
/datum/controller/subsystem/tickets/mentor_tickets/Initialize()
..()
close_messages = list("<font color='red' size='3'><b>- [ticket_name] Closed -</b></font>",
"<span class='boldmessage'>Please try to be as descriptive as possible in mentor helps. Mentors do not know the full situation you're in and need more information to give you a helpful response.</span>",
SPAN_BOLDMESSAGE("Please try to be as descriptive as possible in mentor helps. Mentors do not know the full situation you're in and need more information to give you a helpful response."),
"<span class='[span_class]'>Your [ticket_name] has now been closed.</span>")
response_phrases = list("Known Bug" = "Unfortunately, that's a known bug. Hopefully it gets fixed soon.",
@@ -85,12 +85,12 @@ GLOBAL_REAL(SSmentor_tickets, /datum/controller/subsystem/tickets/mentor_tickets
for(var/mob/living/carbon/human/nct as anything in nct_active)
if(!locate(/obj/item/radio/headset) in list(nct.l_ear, nct.r_ear)) // If the NCT doesn't have a headset, ignore it.
continue
to_chat(nct, "<span class='notice'>Incoming priority transmission from Nanotrasen Training Center. Request information as follows: </span><span class='specialnotice'>Career Trainer, we've received a request from an employee. [trainee.p_their(TRUE)] name is [trainee.real_name], [trainee.p_theyre()] a [trainee.mind.assigned_role]. See if [trainee.p_they()] need [trainee.p_s()] any help.</span>")
to_chat(nct, SPAN_NOTICE("Incoming priority transmission from Nanotrasen Training Center. Request information as follows: </span><span class='specialnotice'>Career Trainer, we've received a request from an employee. [trainee.p_their(TRUE)] name is [trainee.real_name], [trainee.p_theyre()] a [trainee.mind.assigned_role]. See if [trainee.p_they()] need [trainee.p_s()] any help."))
SEND_SOUND(nct, 'sound/effects/headset_message.ogg')
SEND_SOUND(returnClient(N), sound('sound/effects/adminhelp.ogg'))
to_chat_safe(returnClient(N), "<span class='[span_class]'>[key_name_hidden(C)] is autoresponding with:</span> <span class='adminticketalt'>[response_phrases[message_key]]</span>") //for this we want the full value of whatever key this is to tell the player so we do response_phrases[message_key]
message_staff("[C] has auto responded to [ticket_owner]\'s mentorhelp with:<span class='adminticketalt'> [message_key]</span>") //we want to use the short named keys for this instead of the full sentence which is why we just do message_key
to_chat_safe(returnClient(N), "<span class='[span_class]'>[key_name_hidden(C)] is autoresponding with:</span> [SPAN_ADMINTICKETALT("[response_phrases[message_key]]")]") //for this we want the full value of whatever key this is to tell the player so we do response_phrases[message_key]
message_staff("[C] has auto responded to [ticket_owner]\'s mentorhelp with:[SPAN_ADMINTICKETALT(" [message_key]")]") //we want to use the short named keys for this instead of the full sentence which is why we just do message_key
T.lastStaffResponse = "Autoresponse: [message_key]"
resolveTicket(N)
log_game("[C] has auto responded to [ticket_owner]\'s mentorhelp with: [response_phrases[message_key]]")
+13 -13
View File
@@ -48,7 +48,7 @@ SUBSYSTEM_DEF(tickets)
/datum/controller/subsystem/tickets/Initialize()
close_messages = list("<font color='red' size='4'><b>- [ticket_name] Rejected! -</b></font>",
"<span class='boldmessage'>Please try to be calm, clear, and descriptive in admin helps, do not assume the staff member has seen any related events, and clearly state the names of anybody you are reporting. If you asked a question, please ensure it was clear what you were asking.</span>",
SPAN_BOLDMESSAGE("Please try to be calm, clear, and descriptive in admin helps, do not assume the staff member has seen any related events, and clearly state the names of anybody you are reporting. If you asked a question, please ensure it was clear what you were asking."),
"<span class='[span_class]'>Your [ticket_name] has now been closed.</span>")
response_phrases = list("Thanks" = "Thanks for the ahelp!",
@@ -157,7 +157,7 @@ SUBSYSTEM_DEF(tickets)
key_and_name = key_name(M, TRUE, ticket_help_type, ticket_id = ticketNum)
var/list/L = list()
L += "<span class='[ticket_help_span]'>[ticket_help_type]: </span><span class='boldnotice'>[key_and_name][one_line ? " " : "<br>"]</span>"
L += "<span class='[ticket_help_span]'>[ticket_help_type]: </span>[SPAN_BOLDNOTICE("[key_and_name][one_line ? " " : "<br>"]")]"
if(M)
L += "([ADMIN_QUE(M,"?")]) ([ADMIN_PP(M,"PP")]) ([ADMIN_VV(M,"VV")]) ([ADMIN_TP(M,"TP")]) ([ADMIN_SM(M,"SM")]) ([admin_jump_link(M)])"
L += "(<a href='byond://?_src_=holder;openticket=[ticketNum][anchor_link_extra]'>TICKET</a>) "
@@ -248,7 +248,7 @@ SUBSYSTEM_DEF(tickets)
return
var/datum/ticket/T = allTickets[ticketId]
if(T.ticket_converted)
to_chat(usr, "<span class='warning'>This ticket has already been converted!</span>")
to_chat(usr, SPAN_WARNING("This ticket has already been converted!"))
return
convert_ticket(T)
message_staff("<span class='[span_class]'>[usr.client] / ([usr]) converted [ticket_name] number [ticketId]</span>")
@@ -308,15 +308,15 @@ SUBSYSTEM_DEF(tickets)
SSuser_verbs.invoke_verb(C, /datum/user_verb/man_up, returnClient(N))
T.lastStaffResponse = "Autoresponse: [message_key]"
resolveTicket(N)
message_staff("[C] has auto responded to [ticket_owner]\'s adminhelp with:<span class='adminticketalt'> [message_key]</span>")
message_staff("[C] has auto responded to [ticket_owner]\'s adminhelp with:[SPAN_ADMINTICKETALT(" [message_key]")]")
sendFollowupToDiscord(T, C, "*Autoresponded with [message_key]*")
log_game("[C] has auto responded to [T.client_ckey]\'s adminhelp with: [response_phrases[message_key]]")
if("Mentorhelp")
convert_ticket(T)
else
SEND_SOUND(returnClient(N), sound('sound/effects/adminhelp.ogg'))
to_chat_safe(returnClient(N), "<span class='[span_class]'>[key_name_hidden(C)] is autoresponding with: <span/> <span class='adminticketalt'>[response_phrases[message_key]]</span>")//for this we want the full value of whatever key this is to tell the player so we do response_phrases[message_key]
message_staff("[C] has auto responded to [ticket_owner]\'s adminhelp with:<span class='adminticketalt'> [message_key]</span>") //we want to use the short named keys for this instead of the full sentence which is why we just do message_key
to_chat_safe(returnClient(N), "<span class='[span_class]'>[key_name_hidden(C)] is autoresponding with: <span/> [SPAN_ADMINTICKETALT("[response_phrases[message_key]]")]")//for this we want the full value of whatever key this is to tell the player so we do response_phrases[message_key]
message_staff("[C] has auto responded to [ticket_owner]\'s adminhelp with:[SPAN_ADMINTICKETALT(" [message_key]")]") //we want to use the short named keys for this instead of the full sentence which is why we just do message_key
sendFollowupToDiscord(T, C, "*Autoresponded with [message_key]*")
T.lastStaffResponse = "Autoresponse: [message_key]"
resolveTicket(N)
@@ -579,7 +579,7 @@ UI STUFF
for(var/key in C?.persistent.pm_tracker.pms)
var/datum/pm_convo/convo = C.persistent.pm_tracker.pms[key]
if(convo.typing)
dat += "<i><span class='typing'>[key] is typing</span></i><br />"
dat += "<i>[SPAN_TYPING("[key] is typing")]</i><br />"
var/found_typing = FALSE
for(var/client/X in GLOB.admins)
@@ -592,7 +592,7 @@ UI STUFF
continue
var/datum/pm_convo/convo = X.persistent.pm_tracker.pms[key]
if(convo.typing)
dat += "<i><span class='typing'>[key] is typing</span></i><br />"
dat += "<i>[SPAN_TYPING("[key] is typing")]</i><br />"
found_typing = TRUE
break
if(found_typing)
@@ -669,9 +669,9 @@ UI STUFF
/datum/controller/subsystem/tickets/proc/message_staff(msg, prefix_type = TICKET_STAFF_MESSAGE_PREFIX, important = FALSE)
switch(prefix_type)
if(TICKET_STAFF_MESSAGE_ADMIN_CHANNEL)
msg = "<span class='admin_channel'>ADMIN TICKET: [msg]</span>"
msg = SPAN_ADMIN_CHANNEL("ADMIN TICKET: [msg]")
if(TICKET_STAFF_MESSAGE_PREFIX)
msg = "<span class='adminticket'><span class='prefix'>ADMIN TICKET:</span> [msg]</span>"
msg = SPAN_ADMINTICKET("[SPAN_PREFIX("ADMIN TICKET:")] [msg]")
message_adminTicket(chat_box_ahelp(msg), important)
/datum/controller/subsystem/tickets/Topic(href, href_list)
@@ -715,7 +715,7 @@ UI STUFF
if(href_list["detailclose"])
var/indexNum = text2num(href_list["detailclose"])
if(!check_rights(close_rights))
to_chat(usr, "<span class='warning'>Not enough rights to close this ticket.</span>")
to_chat(usr, SPAN_WARNING("Not enough rights to close this ticket."))
return
if(alert("Are you sure? This will send a negative message.", null,"Yes","No") != "Yes")
return
@@ -759,7 +759,7 @@ UI STUFF
if(span_class == "mentorhelp")
message_staff("<span class='[span_class]'>[usr.client] / ([usr]) has taken [ticket_name] number [index]</span>")
else
message_staff("<span class='admin_channel'>[usr.client] / ([usr]) has taken [ticket_name] number [index]</span>", TICKET_STAFF_MESSAGE_ADMIN_CHANNEL)
message_staff(SPAN_ADMIN_CHANNEL("[usr.client] / ([usr]) has taken [ticket_name] number [index]"), TICKET_STAFF_MESSAGE_ADMIN_CHANNEL)
to_chat_safe(returnClient(index), "<span class='[span_class]'>Your [ticket_name] is being handled by [usr.client].</span>")
/datum/controller/subsystem/tickets/proc/unassignTicket(index)
@@ -770,7 +770,7 @@ UI STUFF
if(span_class == "mentorhelp")
message_staff("<span class='[span_class]'>[usr.client] / ([usr]) has unassigned [ticket_name] number [index]</span>")
else
message_staff("<span class='admin_channel'>[usr.client] / ([usr]) has unassigned [ticket_name] number [index]</span>", TICKET_STAFF_MESSAGE_ADMIN_CHANNEL)
message_staff(SPAN_ADMIN_CHANNEL("[usr.client] / ([usr]) has unassigned [ticket_name] number [index]"), TICKET_STAFF_MESSAGE_ADMIN_CHANNEL)
/datum/controller/subsystem/tickets/Shutdown()