mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Update Chat System to use to_chat(src, "") instead of src << ""
This commit is contained in:
@@ -91,7 +91,7 @@
|
||||
keys += M.client
|
||||
var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys)
|
||||
if(!selection)
|
||||
src << "No keys found."
|
||||
to_chat(src, "No keys found.")
|
||||
return
|
||||
var/mob/M = selection:mob
|
||||
log_admin("[key_name(usr)] jumped to [key_name(M)]")
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
set name = "Check Piping"
|
||||
set background = 1
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
feedback_add_details("admin_verb","CP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
set category = "Mapping"
|
||||
set name = "Check Power"
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
feedback_add_details("admin_verb","CPOW") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
set name = "Change Custom Event"
|
||||
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
var/input = sanitize(input(usr, "Enter the description of the custom event. Be descriptive. To cancel the event, make this blank or hit cancel.", "Custom Event", custom_event_msg) as message|null, MAX_PAPER_MESSAGE_LEN, extra = 0)
|
||||
@@ -30,11 +30,11 @@
|
||||
set name = "Custom Event Info"
|
||||
|
||||
if(!custom_event_msg || custom_event_msg == "")
|
||||
src << "There currently is no known custom event taking place."
|
||||
src << "Keep in mind: it is possible that an admin has not properly set this."
|
||||
to_chat(src, "There currently is no known custom event taking place.")
|
||||
to_chat(src, "Keep in mind: it is possible that an admin has not properly set this.")
|
||||
return
|
||||
|
||||
src << "<h1 class='alert'>Custom Event</h1>"
|
||||
src << "<h2 class='alert'>A custom event is taking place. OOC Info:</h2>"
|
||||
src << "<span class='alert'>[custom_event_msg]</span>"
|
||||
src << "<br>"
|
||||
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, "<br>")
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
set name = "Dsay" //Gave this shit a shorter name so you only have to time out "dsay" rather than "dead say" to use it --NeoFite
|
||||
set hidden = 1
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
if(!src.mob)
|
||||
return
|
||||
if(prefs.muted & MUTE_DEADCHAT)
|
||||
src << "<span class='warning'>You cannot send DSAY messages (muted).</span>"
|
||||
to_chat(src, "<span class='warning'>You cannot send DSAY messages (muted).</span>")
|
||||
return
|
||||
|
||||
if(!is_preference_enabled(/datum/client_preference/show_dsay))
|
||||
src << "<span class='warning'>You have deadchat muted.</span>"
|
||||
to_chat(src, "<span class='warning'>You have deadchat muted.</span>")
|
||||
return
|
||||
|
||||
var/stafftype = uppertext(holder.rank)
|
||||
|
||||
@@ -562,7 +562,7 @@
|
||||
SMES.output_level = 75000
|
||||
|
||||
if(!found_the_pump && response == "Setup Completely")
|
||||
src << "<font color='red'>Unable to locate air supply to fill up with coolant, adding some coolant around the supermatter</font>"
|
||||
to_chat(src, "<font color='red'>Unable to locate air supply to fill up with coolant, adding some coolant around the supermatter</font>")
|
||||
var/turf/simulated/T = SM.loc
|
||||
T.zone.air.gas["nitrogen"] += 450
|
||||
T.zone.air.temperature = 50
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
set category = "Debug"
|
||||
/*
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
if(!air_master)
|
||||
@@ -146,7 +146,7 @@
|
||||
set category = "Debug"
|
||||
/*
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
if(!air_master)
|
||||
|
||||
@@ -24,12 +24,12 @@
|
||||
set category = null
|
||||
|
||||
if(!src.holder)
|
||||
src << "<font color='red'>Only Admins may use this command.</font>"
|
||||
to_chat(src, "<font color='red'>Only Admins may use this command.</font>")
|
||||
return
|
||||
|
||||
var/client/target = input(src,"Choose somebody to grant access to the server's runtime logs (permissions expire at the end of each round):","Grant Permissions",null) as null|anything in GLOB.clients
|
||||
if(!istype(target,/client))
|
||||
src << "<font color='red'>Error: giveruntimelog(): Client not found.</font>"
|
||||
to_chat(src, "<font color='red'>Error: giveruntimelog(): Client not found.</font>")
|
||||
return
|
||||
|
||||
target.verbs |= /client/proc/getruntimelog
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
message_admins("[key_name_admin(src)] accessed file: [path]")
|
||||
src << run( file(path) )
|
||||
src << "Attempting to send file, this may take a fair few minutes if the file is very large."
|
||||
to_chat(src, "Attempting to send file, this may take a fair few minutes if the file is very large.")
|
||||
return
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
message_admins("[key_name_admin(src)] accessed file: [path]")
|
||||
src << run( file(path) )
|
||||
src << "Attempting to send file, this may take a fair few minutes if the file is very large."
|
||||
to_chat(src, "Attempting to send file, this may take a fair few minutes if the file is very large.")
|
||||
return
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
if( fexists(path) )
|
||||
src << run( file(path) )
|
||||
else
|
||||
src << "<font color='red'>Error: view_txt_log(): File not found/Invalid path([path]).</font>"
|
||||
to_chat(src, "<font color='red'>Error: view_txt_log(): File not found/Invalid path([path]).</font>")
|
||||
return
|
||||
feedback_add_details("admin_verb","VTL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
@@ -107,7 +107,7 @@
|
||||
if( fexists(path) )
|
||||
src << run( file(path) )
|
||||
else
|
||||
src << "<font color='red'>Error: view_atk_log(): File not found/Invalid path([path]).</font>"
|
||||
to_chat(src, "<font color='red'>Error: view_atk_log(): File not found/Invalid path([path]).</font>")
|
||||
return
|
||||
usr << run( file(path) )
|
||||
feedback_add_details("admin_verb","SSAL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set category = null
|
||||
set name = "Drop Everything"
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
var/confirm = alert(src, "Make [M] drop everything?", "Message", "Yes", "No")
|
||||
@@ -20,7 +20,7 @@
|
||||
set category = "Admin"
|
||||
set name = "Prison"
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
if (ismob(M))
|
||||
if(istype(M, /mob/living/silicon/ai))
|
||||
@@ -48,7 +48,7 @@
|
||||
set category = "Admin"
|
||||
set name = "Check new Players"
|
||||
if(!holder)
|
||||
src << "Only staff members may use this command."
|
||||
to_chat(src, "Only staff members may use this command.")
|
||||
|
||||
var/age = alert(src, "Age check", "Show accounts yonger then _____ days","7", "30" , "All")
|
||||
|
||||
@@ -70,12 +70,12 @@
|
||||
msg += "[key_name(C, 1, 1, highlight_special_characters)]: account is [C.player_age] days old<br>"
|
||||
|
||||
if(missing_ages)
|
||||
src << "Some accounts did not have proper ages set in their clients. This function requires database to be present."
|
||||
to_chat(src, "Some accounts did not have proper ages set in their clients. This function requires database to be present.")
|
||||
|
||||
if(msg != "")
|
||||
src << browse(msg, "window=Player_age_check")
|
||||
else
|
||||
src << "No matches for that age range found."
|
||||
to_chat(src, "No matches for that age range found.")
|
||||
|
||||
/client/proc/cmd_admin_subtle_message(mob/M as mob in mob_list)
|
||||
set category = "Special Verbs"
|
||||
@@ -83,7 +83,7 @@
|
||||
|
||||
if(!ismob(M)) return
|
||||
if (!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
var/msg = sanitize(input("Message:", text("Subtle PM to [M.key]")) as text)
|
||||
@@ -106,7 +106,7 @@
|
||||
set name = "Global Narrate"
|
||||
|
||||
if (!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
var/msg = sanitize(input("Message:", text("Enter the text you wish to appear to everyone:")) as text)
|
||||
@@ -123,7 +123,7 @@
|
||||
set name = "Direct Narrate"
|
||||
|
||||
if(!holder)
|
||||
src << "Only administrators and moderators may use this command."
|
||||
to_chat(src, "Only administrators and moderators may use this command.")
|
||||
return
|
||||
|
||||
if(!M)
|
||||
@@ -148,7 +148,7 @@
|
||||
set category = "Special Verbs"
|
||||
set name = "Godmode"
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
M.status_flags ^= GODMODE
|
||||
usr << "<font color='blue'> Toggled [(M.status_flags & GODMODE) ? "ON" : "OFF"]</font>"
|
||||
@@ -216,7 +216,7 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
|
||||
set category = "Fun"
|
||||
set name = "Add Random AI Law"
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
|
||||
if(confirm != "Yes") return
|
||||
@@ -248,7 +248,7 @@ Ccomp's first proc.
|
||||
any = 1 //if no ghosts show up, any will just be 0
|
||||
if(!any)
|
||||
if(notify)
|
||||
src << "There doesn't appear to be any ghosts for you to select."
|
||||
to_chat(src, "There doesn't appear to be any ghosts for you to select.")
|
||||
return
|
||||
|
||||
for(var/mob/M in mobs)
|
||||
@@ -265,12 +265,12 @@ Ccomp's first proc.
|
||||
set name = "Allow player to respawn"
|
||||
set desc = "Let's the player bypass the wait to respawn or allow them to re-enter their corpse."
|
||||
if(!holder)
|
||||
src << "Only administrators and moderators may use this command."
|
||||
to_chat(src, "Only administrators and moderators may use this command.")
|
||||
var/list/ghosts= get_ghosts(1,1)
|
||||
|
||||
var/target = input("Please, select a ghost!", "COME BACK TO LIFE!", null, null) as null|anything in ghosts
|
||||
if(!target)
|
||||
src << "Hrm, appears you didn't select a ghost" // Sanity check, if no ghosts in the list we don't want to edit a null variable and cause a runtime error.
|
||||
to_chat(src, "Hrm, appears you didn't select a ghost") // Sanity check, if no ghosts in the list we don't want to edit a null variable and cause a runtime error.
|
||||
return
|
||||
|
||||
var/mob/observer/dead/G = ghosts[target]
|
||||
@@ -295,7 +295,7 @@ Ccomp's first proc.
|
||||
set desc = "Toggles antagHUD usage for observers"
|
||||
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
var/action=""
|
||||
if(config.antag_hud_allowed)
|
||||
for(var/mob/observer/dead/g in get_ghosts())
|
||||
@@ -306,7 +306,7 @@ Ccomp's first proc.
|
||||
g.has_enabled_antagHUD = 2 // We'll allow them to respawn
|
||||
g << "<font color='red'><B>The Administrator has disabled AntagHUD </B></font>"
|
||||
config.antag_hud_allowed = 0
|
||||
src << "<font color='red'><B>AntagHUD usage has been disabled</B></font>"
|
||||
to_chat(src, "<font color='red'><B>AntagHUD usage has been disabled</B></font>")
|
||||
action = "disabled"
|
||||
else
|
||||
for(var/mob/observer/dead/g in get_ghosts())
|
||||
@@ -315,7 +315,7 @@ Ccomp's first proc.
|
||||
g << "<font color='blue'><B>The Administrator has enabled AntagHUD </B></font>" // Notify all observers they can now use AntagHUD
|
||||
config.antag_hud_allowed = 1
|
||||
action = "enabled"
|
||||
src << "<font color='blue'><B>AntagHUD usage has been enabled</B></font>"
|
||||
to_chat(src, "<font color='blue'><B>AntagHUD usage has been enabled</B></font>")
|
||||
|
||||
|
||||
log_admin("[key_name(usr)] has [action] antagHUD usage for observers")
|
||||
@@ -328,14 +328,14 @@ Ccomp's first proc.
|
||||
set name = "Toggle antagHUD Restrictions"
|
||||
set desc = "Restricts players that have used antagHUD from being able to join this round."
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
var/action=""
|
||||
if(config.antag_hud_restricted)
|
||||
for(var/mob/observer/dead/g in get_ghosts())
|
||||
g << "<font color='blue'><B>The administrator has lifted restrictions on joining the round if you use AntagHUD</B></font>"
|
||||
action = "lifted restrictions"
|
||||
config.antag_hud_restricted = 0
|
||||
src << "<font color='blue'><B>AntagHUD restrictions have been lifted</B></font>"
|
||||
to_chat(src, "<font color='blue'><B>AntagHUD restrictions have been lifted</B></font>")
|
||||
else
|
||||
for(var/mob/observer/dead/g in get_ghosts())
|
||||
g << "<font color='red'><B>The administrator has placed restrictions on joining the round if you use AntagHUD</B></font>"
|
||||
@@ -344,7 +344,7 @@ Ccomp's first proc.
|
||||
g.has_enabled_antagHUD = 0
|
||||
action = "placed restrictions"
|
||||
config.antag_hud_restricted = 1
|
||||
src << "<font color='red'><B>AntagHUD restrictions have been enabled</B></font>"
|
||||
to_chat(src, "<font color='red'><B>AntagHUD restrictions have been enabled</B></font>")
|
||||
|
||||
log_admin("[key_name(usr)] has [action] on joining the round if they use AntagHUD")
|
||||
message_admins("Admin [key_name_admin(usr)] has [action] on joining the round if they use AntagHUD", 1)
|
||||
@@ -359,7 +359,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set name = "Spawn Character"
|
||||
set desc = "(Re)Spawn a client's loaded character."
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
//I frontload all the questions so we don't have a half-done process while you're reading.
|
||||
@@ -443,7 +443,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
switch(location)
|
||||
if("Right Here") //Spawn them on your turf
|
||||
if(!src.mob)
|
||||
src << "You can't use 'Right Here' when you are not 'Right Anywhere'!"
|
||||
to_chat(src, "You can't use 'Right Here' when you are not 'Right Anywhere'!")
|
||||
return
|
||||
|
||||
spawnloc = get_turf(src.mob)
|
||||
@@ -452,19 +452,19 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
spawnloc = pick(latejoin)
|
||||
|
||||
else //I have no idea how you're here
|
||||
src << "Invalid spawn location choice."
|
||||
to_chat(src, "Invalid spawn location choice.")
|
||||
return
|
||||
|
||||
//Did we actually get a loc to spawn them?
|
||||
if(!spawnloc)
|
||||
src << "Couldn't get valid spawn location."
|
||||
to_chat(src, "Couldn't get valid spawn location.")
|
||||
return
|
||||
|
||||
new_character = new(spawnloc)
|
||||
|
||||
//We were able to spawn them, right?
|
||||
if(!new_character)
|
||||
src << "Something went wrong and spawning failed."
|
||||
to_chat(src, "Something went wrong and spawning failed.")
|
||||
return
|
||||
|
||||
//Write the appearance and whatnot out to the character
|
||||
@@ -517,7 +517,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set category = "Fun"
|
||||
set name = "Add Custom AI law"
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
var/input = sanitize(input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null)
|
||||
if(!input)
|
||||
@@ -545,7 +545,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set category = "Special Verbs"
|
||||
set name = "Rejuvenate"
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
if(!mob)
|
||||
return
|
||||
@@ -567,7 +567,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set category = "Special Verbs"
|
||||
set name = "Create Command Report"
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
var/input = sanitize(input(usr, "Please enter anything you want. Anything. Serious.", "What?", "") as message|null, extra = 0)
|
||||
var/customname = sanitizeSafe(input(usr, "Pick a title for the report.", "Title") as text|null)
|
||||
@@ -595,7 +595,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set name = "Delete"
|
||||
|
||||
if (!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
admin_delete(O)
|
||||
|
||||
@@ -604,11 +604,11 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set name = "List free slots"
|
||||
|
||||
if (!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
if(job_master)
|
||||
for(var/datum/job/job in job_master.occupations)
|
||||
src << "[job.title]: [job.total_positions]"
|
||||
to_chat(src, "[job.title]: [job.total_positions]")
|
||||
feedback_add_details("admin_verb","LFS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_explosion(atom/O as obj|mob|turf in world)
|
||||
@@ -705,7 +705,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set name = "Manual Ban"
|
||||
set category = "Special Verbs"
|
||||
if(!authenticated || !holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
var/mob/M = null
|
||||
switch(alert("How would you like to ban someone today?", "Manual Ban", "Key List", "Enter Manually", "Cancel"))
|
||||
@@ -777,7 +777,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set category = "Debug"
|
||||
set name = "Stabilize Atmos."
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
feedback_add_details("admin_verb","STATM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
// DEFERRED
|
||||
|
||||
@@ -7,7 +7,7 @@ var/const/commandos_possible = 6 //if more Commandos are needed in the future
|
||||
set desc = "Spawns a strike team if you want to run an admin event."
|
||||
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
if(!ticker)
|
||||
|
||||
@@ -19,6 +19,6 @@
|
||||
if("Yes") config.Tickcomp = 1
|
||||
else config.Tickcomp = 0
|
||||
else
|
||||
src << "<font color='red'>Error: ticklag(): Invalid world.ticklag value. No changes made.</font>"
|
||||
to_chat(src, "<font color='red'>Error: ticklag(): Invalid world.ticklag value. No changes made.</font>")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user