Merge remote-tracking branch 'ParadiseSS13/master' into multi-instance-support

This commit is contained in:
AffectedArc07
2021-09-20 22:11:50 +01:00
797 changed files with 21594 additions and 21139 deletions
+2 -3
View File
@@ -97,10 +97,9 @@
qdel(exist_query)
else
if(!exist_query.NextRow()) // If there isnt a row, they aint been seen before
if(GLOB.panic_bunker_enabled)
if(SSqueue?.queue_enabled && (length(GLOB.clients) > SSqueue.queue_threshold) && !(ckey in SSqueue.queue_bypass_list))
qdel(exist_query)
var/threshold = GLOB.configuration.general.panic_bunker_threshold
return list("reason" = "panic bunker", "desc" = "Server is not accepting connections from never-before-seen players until player count is less than [threshold]. Please try again later.")
return list("reason" = "server queue", "desc" = "You seem to have managed to skip the server queue, possibly due to connecting during a restart. Please reconnect in 10 minutes. If you still cannot connect, please inform the server host.")
qdel(exist_query)
+9 -11
View File
@@ -72,7 +72,7 @@ GLOBAL_VAR_INIT(nologevent, 0)
/datum/admins/proc/show_player_panel(mob/M in GLOB.mob_list)
set category = null
set name = "Show Player Panel"
set name = "\[Admin\] Show Player Panel"
set desc="Edit player (respawn, ban, heal, etc)"
if(!M)
@@ -122,7 +122,6 @@ GLOBAL_VAR_INIT(nologevent, 0)
if(M.ckey)
body += "<A href='?_src_=holder;boot2=[M.UID()]'>Kick</A> | "
body += "<A href='?_src_=holder;warn=[M.ckey]'>Warn</A> | "
body += "<A href='?_src_=holder;newban=[M.UID()];dbbanaddckey=[M.ckey]'>Ban</A> | "
body += "<A href='?_src_=holder;jobban2=[M.UID()];dbbanaddckey=[M.ckey]'>Jobban</A> | "
body += "<A href='?_src_=holder;appearanceban=[M.UID()];dbbanaddckey=[M.ckey]'>Appearance Ban</A> | "
@@ -131,7 +130,7 @@ GLOBAL_VAR_INIT(nologevent, 0)
if(GLOB.configuration.url.forum_playerinfo_url)
body += "<A href='?_src_=holder;webtools=[M.ckey]'>WebInfo</A> | "
if(M.client)
if(check_watchlist(M.client.ckey))
if(M.client.watchlisted)
body += "<A href='?_src_=holder;watchremove=[M.ckey]'>Remove from Watchlist</A> | "
body += "<A href='?_src_=holder;watchedit=[M.ckey]'>Edit Watchlist Reason</A> "
else
@@ -141,14 +140,13 @@ GLOBAL_VAR_INIT(nologevent, 0)
body += "\ <A href='?_src_=holder;sendbacktolobby=[M.UID()]'>Send back to Lobby</A> | "
body += "\ <A href='?_src_=holder;eraseflavortext=[M.UID()]'>Erase Flavor Text</A> | "
body += "\ <A href='?_src_=holder;userandomname=[M.UID()]'>Use Random Name</A> | "
var/muted = M.client.prefs.muted
body += {"<br><b>Mute: </b>
\[<A href='?_src_=holder;mute=[M.UID()];mute_type=[MUTE_IC]'><font color='[(muted & MUTE_IC)?"red":"#6685f5"]'>IC</font></a> |
<A href='?_src_=holder;mute=[M.UID()];mute_type=[MUTE_OOC]'><font color='[(muted & MUTE_OOC)?"red":"#6685f5"]'>OOC</font></a> |
<A href='?_src_=holder;mute=[M.UID()];mute_type=[MUTE_PRAY]'><font color='[(muted & MUTE_PRAY)?"red":"#6685f5"]'>PRAY</font></a> |
<A href='?_src_=holder;mute=[M.UID()];mute_type=[MUTE_ADMINHELP]'><font color='[(muted & MUTE_ADMINHELP)?"red":"#6685f5"]'>ADMINHELP</font></a> |
<A href='?_src_=holder;mute=[M.UID()];mute_type=[MUTE_DEADCHAT]'><font color='[(muted & MUTE_DEADCHAT)?"red":"#6685f5"]'>DEADCHAT</font></a>\]
(<A href='?_src_=holder;mute=[M.UID()];mute_type=[MUTE_ALL]'><font color='[(muted & MUTE_ALL)?"red":"#6685f5"]'>toggle all</font></a>)
\[<A href='?_src_=holder;mute=[M.UID()];mute_type=[MUTE_IC]'><font color='[check_mute(M.client.ckey, MUTE_IC) ? "red" : "#6685f5"]'>IC</font></a> |
<A href='?_src_=holder;mute=[M.UID()];mute_type=[MUTE_OOC]'><font color='[check_mute(M.client.ckey, MUTE_OOC) ? "red" : "#6685f5"]'>OOC</font></a> |
<A href='?_src_=holder;mute=[M.UID()];mute_type=[MUTE_PRAY]'><font color='[check_mute(M.client.ckey, MUTE_PRAY) ? "red" : "#6685f5"]'>PRAY</font></a> |
<A href='?_src_=holder;mute=[M.UID()];mute_type=[MUTE_ADMINHELP]'><font color='[check_mute(M.client.ckey, MUTE_ADMINHELP) ? "red" : "#6685f5"]'>ADMINHELP</font></a> |
<A href='?_src_=holder;mute=[M.UID()];mute_type=[MUTE_DEADCHAT]'><font color='[check_mute(M.client.ckey, MUTE_DEADCHAT) ?" red" : "#6685f5"]'>DEADCHAT</font></a>]
(<A href='?_src_=holder;mute=[M.UID()];mute_type=[MUTE_ALL]'><font color='[check_mute(M.client.ckey, MUTE_ALL) ? "red" : "#6685f5"]'>toggle all</font></a>)
"}
var/jumptoeye = ""
@@ -766,7 +764,7 @@ GLOBAL_VAR_INIT(nologevent, 0)
message_admins("[key_name_admin(usr)] checked the AI laws")
/client/proc/update_mob_sprite(mob/living/carbon/human/H as mob)
set name = "Update Mob Sprite"
set name = "\[Admin\] Update Mob Sprite"
set desc = "Should fix any mob sprite update errors."
set category = null
+7 -50
View File
@@ -139,7 +139,9 @@ GLOBAL_LIST_INIT(admin_verbs_server, list(
/client/proc/set_ooc,
/client/proc/reset_ooc,
/client/proc/set_next_map,
/client/proc/refresh_instances
/client/proc/refresh_instances,
/client/proc/manage_queue,
/client/proc/add_queue_server_bypass
))
GLOBAL_LIST_INIT(admin_verbs_debug, list(
/client/proc/cmd_admin_list_open_jobs,
@@ -492,51 +494,6 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list(
log_admin("[key_name(usr)] has turned BB mode [holder.fakekey ? "ON" : "OFF"]")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Big Brother Mode")
#define MAX_WARNS 3
#define AUTOBANTIME 10
/client/proc/warn(warned_ckey)
if(!check_rights(R_ADMIN))
return
if(!warned_ckey || !istext(warned_ckey)) return
if(warned_ckey in GLOB.admin_datums)
to_chat(usr, "<font color='red'>Error: warn(): You can't warn admins.</font>")
return
var/datum/preferences/D
var/client/C = GLOB.directory[warned_ckey]
if(C) D = C.prefs
else D = GLOB.preferences_datums[warned_ckey]
if(!D)
to_chat(src, "<font color='red'>Error: warn(): No such ckey found.</font>")
return
if(++D.warns >= MAX_WARNS) //uh ohhhh...you'reee iiiiin trouuuubble O:)
if(C)
message_admins("[key_name_admin(src)] has warned [key_name_admin(C)] resulting in a [AUTOBANTIME] minute ban")
log_admin("[key_name(src)] has warned [key_name(C)] resulting in a [AUTOBANTIME] minute ban")
to_chat(C, "<font color='red'><BIG><B>You have been autobanned due to a warning by [ckey].</B></BIG><br>This is a temporary ban, it will be removed in [AUTOBANTIME] minutes.")
qdel(C)
else
message_admins("[key_name_admin(src)] has warned [warned_ckey] resulting in a [AUTOBANTIME] minute ban")
log_admin("[key_name(src)] has warned [warned_ckey] resulting in a [AUTOBANTIME] minute ban")
AddBan(warned_ckey, D.last_id, "Autobanning due to too many formal warnings", ckey, 1, AUTOBANTIME)
else
if(C)
to_chat(C, "<font color='red'><BIG><B>You have been formally warned by an administrator.</B></BIG><br>Further warnings will result in an autoban.</font>")
message_admins("[key_name_admin(src)] has warned [key_name_admin(C)]. They have [MAX_WARNS-D.warns] strikes remaining.")
log_admin("[key_name(src)] has warned [key_name(C)]. They have [MAX_WARNS-D.warns] strikes remaining.")
else
message_admins("[key_name_admin(src)] has warned [warned_ckey] (DC). They have [MAX_WARNS-D.warns] strikes remaining.")
log_admin("[key_name(src)] has warned [warned_ckey] (DC). They have [MAX_WARNS-D.warns] strikes remaining.")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Warning") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
#undef MAX_WARNS
#undef AUTOBANTIME
/client/proc/drop_bomb() // Some admin dickery that can probably be done better -- TLE
set category = "Event"
set name = "Drop Bomb"
@@ -613,7 +570,7 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list(
/client/proc/make_sound(obj/O in view()) // -- TLE
set category = "Event"
set name = "Make Sound"
set name = "\[Admin\] Make Sound"
set desc = "Display a message to everyone who can hear the target"
if(!check_rights(R_EVENT))
@@ -799,7 +756,7 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list(
SSblackbox.record_feedback("tally", "admin_verb", 1, "Manage Silicon Laws") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/change_human_appearance_admin(mob/living/carbon/human/H in GLOB.mob_list)
set name = "C.M.A. - Admin"
set name = "\[Admin\] C.M.A. - Admin"
set desc = "Allows you to change the mob appearance"
set category = null
@@ -825,7 +782,7 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list(
SSblackbox.record_feedback("tally", "admin_verb", 1, "CMA - Admin") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/change_human_appearance_self(mob/living/carbon/human/H in GLOB.mob_list)
set name = "C.M.A. - Self"
set name = "\[Admin\] C.M.A. - Self"
set desc = "Allows the mob to change its appearance"
set category = null
@@ -965,7 +922,7 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list(
/client/proc/man_up(mob/T as mob in GLOB.player_list)
set category = null
set name = "Man Up"
set name = "\[Admin\] Man Up"
set desc = "Tells mob to man up and deal with it."
if(!check_rights(R_ADMIN))
+2
View File
@@ -1,9 +1,11 @@
GLOBAL_VAR(create_mob_html)
/datum/admins/proc/create_mob(mob/user)
if(!GLOB.create_mob_html)
var/mobjs = null
mobjs = jointext(typesof(/mob), ";")
GLOB.create_mob_html = file2text('html/create_object.html')
GLOB.create_mob_html = replacetext(GLOB.create_mob_html, "$ATOM$", "Mob")
GLOB.create_mob_html = replacetext(GLOB.create_mob_html, "null /* object types */", "\"[mobjs]\"")
user << browse(replacetext(GLOB.create_mob_html, "/* ref src */", UID()), "window=create_mob;size=425x475")
+2
View File
@@ -6,6 +6,7 @@ GLOBAL_LIST_INIT(create_object_forms, list(/obj, /obj/structure, /obj/machinery,
var/objectjs = null
objectjs = jointext(typesof(/obj), ";")
GLOB.create_object_html = file2text('html/create_object.html')
GLOB.create_object_html = replacetext(GLOB.create_object_html, "$ATOM$", "Object")
GLOB.create_object_html = replacetext(GLOB.create_object_html, "null /* object types */", "\"[objectjs]\"")
user << browse(replacetext(GLOB.create_object_html, "/* ref src */", UID()), "window=create_object;size=425x475")
@@ -17,6 +18,7 @@ GLOBAL_LIST_INIT(create_object_forms, list(/obj, /obj/structure, /obj/machinery,
if(!html_form)
var/objectjs = jointext(typesof(path), ";")
html_form = file2text('html/create_object.html')
html_form = replacetext(html_form, "$ATOM$", "Object")
html_form = replacetext(html_form, "null /* object types */", "\"[objectjs]\"")
GLOB.create_object_forms[path] = html_form
+2
View File
@@ -1,9 +1,11 @@
GLOBAL_VAR(create_turf_html)
/datum/admins/proc/create_turf(mob/user)
if(!GLOB.create_turf_html)
var/turfjs = null
turfjs = jointext(typesof(/turf), ";")
GLOB.create_turf_html = file2text('html/create_object.html')
GLOB.create_turf_html = replacetext(GLOB.create_turf_html, "$ATOM$", "Turf")
GLOB.create_turf_html = replacetext(GLOB.create_turf_html, "null /* object types */", "\"[turfjs]\"")
user << browse(replacetext(GLOB.create_turf_html, "/* ref src */", UID()), "window=create_turf;size=425x475")
+18
View File
@@ -95,6 +95,24 @@ you will have to do something like if(client.holder.rights & R_ADMIN) yourself.
to_chat(user, "<font color='red'>Error: You are not an admin.</font>")
return 0
// Basically the above proc but checks at a /client level
/proc/check_rights_client(rights_required, show_msg = TRUE, client/C)
if(C)
if(rights_required)
if(C.holder)
if(rights_required & C.holder.rights)
return TRUE
else
if(show_msg)
to_chat(C, "<font color='red'>Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")].</font>")
else
if(C.holder)
return TRUE
else
if(show_msg)
to_chat(C, "<font color='red'>Error: You are not an admin.</font>")
return FALSE
//probably a bit iffy - will hopefully figure out a better solution
/proc/check_if_greater_rights_than(client/other)
if(usr && usr.client)
+1 -1
View File
@@ -1,5 +1,5 @@
/proc/machine_upgrade(obj/machinery/M in world)
set name = "Tweak Component Ratings"
set name = "\[Admin\] Tweak Component Ratings"
set category = null
if(!check_rights(R_DEBUG))
+32
View File
@@ -0,0 +1,32 @@
/// Associative list of people who are muted via admin mutes
GLOBAL_LIST_EMPTY(admin_mutes_assoc)
/proc/check_mute(ckey, muteflag)
if(isnull(GLOB.admin_mutes_assoc[ckey]))
return FALSE
if(GLOB.admin_mutes_assoc[ckey] & muteflag)
return TRUE
return FALSE
/proc/toggle_mute(ckey, muteflag)
if(isnull(GLOB.admin_mutes_assoc[ckey]))
GLOB.admin_mutes_assoc[ckey] = 0
if(GLOB.admin_mutes_assoc[ckey] & muteflag)
GLOB.admin_mutes_assoc[ckey] &= ~muteflag
else
GLOB.admin_mutes_assoc[ckey] |= muteflag
/proc/force_add_mute(ckey, muteflag)
if(isnull(GLOB.admin_mutes_assoc[ckey]))
GLOB.admin_mutes_assoc[ckey] = 0
GLOB.admin_mutes_assoc[ckey] |= muteflag
/proc/force_remove_mute(ckey, muteflag)
if(isnull(GLOB.admin_mutes_assoc[ckey]))
GLOB.admin_mutes_assoc[ckey] = 0
GLOB.admin_mutes_assoc[ckey] &= ~muteflag
+8 -10
View File
@@ -446,9 +446,6 @@
alert(usr, "This ban has already been lifted / does not exist.", "Error", "Ok")
unbanpanel()
else if(href_list["warn"])
usr.client.warn(href_list["warn"])
else if(href_list["unbane"])
if(!check_rights(R_BAN)) return
@@ -985,7 +982,8 @@
else if(href_list["removenote"])
var/note_id = href_list["removenote"]
remove_note(note_id)
if(alert("Do you really want to delete this note?", "Note deletion confirmation", "Yes", "No") == "Yes")
remove_note(note_id)
else if(href_list["editnote"])
var/note_id = href_list["editnote"]
@@ -1363,7 +1361,7 @@
to_chat(usr, "<span class='warning'>[M] doesn't seem to have an active client.</span>")
return
if(M.flavor_text == "" && M.client.prefs.flavor_text == "")
if(M.flavor_text == "" && M.client.prefs.active_character.flavor_text == "")
to_chat(usr, "<span class='warning'>[M] has no flavor text set.</span>")
return
@@ -1377,8 +1375,8 @@
M.flavor_text = ""
// Clear and save the DB character's flavor text
M.client.prefs.flavor_text = ""
M.client.prefs.save_character(M.client)
M.client.prefs.active_character.flavor_text = ""
M.client.prefs.active_character.save(M.client)
else if(href_list["userandomname"])
if(!check_rights(R_ADMIN))
@@ -1401,12 +1399,12 @@
message_admins("[key_name_admin(usr)] has forced [key_name_admin(M)] to use a random name.")
// Update the mob's name with a random one straight away
var/random_name = random_name(M.client.prefs.gender, M.client.prefs.species)
var/random_name = random_name(M.client.prefs.active_character.gender, M.client.prefs.active_character.species)
M.rename_character(M.real_name, random_name)
// Save that random name for next rounds
M.client.prefs.real_name = random_name
M.client.prefs.save_character(M.client)
M.client.prefs.active_character.real_name = random_name
M.client.prefs.active_character.save(M.client)
else if(href_list["asays"])
if(!check_rights(R_ADMIN))
+1 -1
View File
@@ -6,7 +6,7 @@ GLOBAL_LIST_INIT(adminhelp_ignored_words, list("unknown", "the", "a", "an", "of"
set name = "Adminhelp"
//handle muting and automuting
if(prefs.muted & MUTE_ADMINHELP)
if(check_mute(ckey, MUTE_ADMINHELP))
to_chat(src, "<font color='red'>Error: Admin-PM: You cannot send adminhelps (Muted).</font>")
return
+3 -3
View File
@@ -66,7 +66,7 @@
SSblackbox.record_feedback("tally", "admin_verb", 1, "Jump To Area") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/jumptoturf(turf/T in world)
set name = "Jump to Turf"
set name = "\[Admin\] Jump to Turf"
set category = null
if(!check_rights(R_ADMIN))
@@ -135,7 +135,7 @@
/client/proc/Getmob(mob/M in GLOB.mob_list)
set category = null
set name = "Get Mob"
set name = "\[Admin\] Get Mob"
set desc = "Mob to teleport"
if(!check_rights(R_ADMIN))
@@ -152,7 +152,7 @@
/client/proc/Getkey()
set category = null
set name = "Get Key"
set name = "\[Admin\] Get Key"
set desc = "Key to teleport"
if(!check_rights(R_ADMIN))
+3 -3
View File
@@ -1,7 +1,7 @@
//allows right clicking mobs to send an admin PM to their client, forwards the selected mob's client to cmd_admin_pm
/client/proc/cmd_admin_pm_context(mob/M as mob in GLOB.mob_list)
set category = null
set name = "Admin PM Mob"
set name = "\[Admin\] Admin PM Mob"
if(!check_rights(R_ADMIN|R_MENTOR))
return
if(!ismob(M) || !M.client)
@@ -58,7 +58,7 @@
//takes input from cmd_admin_pm_context, cmd_admin_pm_panel or /client/Topic and sends them a PM.
//Fetching a message if needed. src is the sender and C is the target client
/client/proc/cmd_admin_pm(whom, msg, type = "PM")
if(prefs.muted & MUTE_ADMINHELP)
if(check_mute(ckey, MUTE_ADMINHELP))
to_chat(src, "<span class='danger'>Error: Private-Message: You are unable to use PM-s (muted).</span>")
return
@@ -212,7 +212,7 @@
return
/client/proc/cmd_admin_discord_pm()
if(prefs.muted & MUTE_ADMINHELP)
if(check_mute(ckey, MUTE_ADMINHELP))
to_chat(src, "<span class='danger'>Error: Private-Message: You are unable to use PMs (muted).</span>")
return
+1
View File
@@ -43,6 +43,7 @@
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
log_mentorsay(msg, src)
mob.create_log(OOC_LOG, "MSAY: [msg]")
if(!msg)
return
+1 -1
View File
@@ -9,7 +9,7 @@
if(!src.mob)
return
if(prefs.muted & MUTE_DEADCHAT)
if(check_mute(ckey, MUTE_DEADCHAT))
to_chat(src, "<span class='warning'>You cannot send DSAY messages (muted).</span>")
return
+2 -2
View File
@@ -173,7 +173,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
/client/proc/callproc_datum(A as null|area|mob|obj|turf)
set category = null
set name = "Atom ProcCall"
set name = "\[Admin\] Atom ProcCall"
if(!check_rights(R_PROCCALL))
return
@@ -630,7 +630,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
/client/proc/cmd_admin_dress(mob/living/carbon/human/M in GLOB.human_list)
set category = "Event"
set name = "Select equipment"
set name = "\[Admin\] Select equipment"
if(!check_rights(R_EVENT))
return
+1 -1
View File
@@ -9,7 +9,7 @@
GLOBAL_LIST_EMPTY(frozen_atom_list) // A list of admin-frozen atoms.
/client/proc/freeze(atom/movable/M)
set name = "Freeze"
set name = "\[Admin\] Freeze"
set category = null
if(!check_rights(R_ADMIN))
+4 -3
View File
@@ -63,9 +63,10 @@
for(var/mob/thisplayer in players_to_spawn)
var/mob/living/carbon/human/H = new /mob/living/carbon/human(T)
H.name = random_name(pick(MALE,FEMALE))
var/datum/preferences/A = new() //Randomize appearance
A.real_name = H.name
A.copy_to(H)
var/datum/character_save/S = new //Randomize appearance
S.randomise()
S.real_name = H.name
S.copy_to(H)
H.dna.ready_dna(H)
H.mind_initialize()
@@ -124,9 +124,10 @@ GLOBAL_VAR_INIT(sent_syndicate_infiltration_team, 0)
var/syndicate_infiltrator_name = random_name(pick(MALE,FEMALE))
var/datum/preferences/A = new() //Randomize appearance
A.real_name = syndicate_infiltrator_name
A.copy_to(new_syndicate_infiltrator)
var/datum/character_save/S = new //Randomize appearance
S.randomise()
S.real_name = syndicate_infiltrator_name
S.copy_to(new_syndicate_infiltrator)
new_syndicate_infiltrator.dna.ready_dna(new_syndicate_infiltrator)
//Creates mind stuff.
+61
View File
@@ -0,0 +1,61 @@
/client/proc/manage_queue()
set name = "Manage Queue Server"
set desc = "Manage the queue server and its settings"
set category = "Server"
if(!check_rights(R_SERVER))
return
var/list/choices = list("Show Status", "Toggle Queue Server", "Set Threshold", "Toggle Setting Persistence")
var/choice = input(usr, "Please, select an option", "Queue Server Manipulation") as null|anything in choices
switch(choice)
if("Show Status")
to_chat(usr, "<b>Queue Server Status</b>")
to_chat(usr, "Enabled: <b>[SSqueue.queue_enabled ? "<font color='green'>Yes</font>" : "<font color='red'>No</font>"]</b>")
to_chat(usr, "Queue Threshold: <b>[SSqueue.queue_threshold]</b>")
to_chat(usr, "Setting Persistence: <b>[SSqueue.persist_queue ? "<font color='green'>Yes</font>" : "<font color='red'>No</font>"]</b>")
if("Toggle Queue Server")
SSqueue.queue_enabled = !SSqueue.queue_enabled
to_chat(usr, "Queue server is now <b>[SSqueue.queue_enabled ? "<font color='green'>Enabled</font>" : "<font color='red'>Disabled</font>"]</b>")
message_admins("[key_name_admin(usr)] has [SSqueue.queue_enabled ? "enabled" : "disabled"] the server queue.")
log_admin("[key_name(usr)] has [SSqueue.queue_enabled ? "enabled" : "disabled"] the server queue.")
SSdiscord.send2discord_simple(DISCORD_WEBHOOK_ADMIN, "**\[Queue Server]** `[usr.ckey]` has now **[SSqueue.queue_enabled ? "enabled" : "disabled"]** the queue server.")
if("Set Threshold")
var/new_threshold = input(usr, "Enter new threshold", "Queue Server Manipulation", SSqueue.queue_threshold) as num|null
if(!new_threshold)
return
SSqueue.queue_threshold = new_threshold
to_chat(usr, "Queue threshold is now <b>[SSqueue.queue_threshold]</b>")
message_admins("[key_name_admin(usr)] has set the queue threshold to [SSqueue.queue_threshold].")
log_admin("[key_name(usr)] has set the queue threshold to [SSqueue.queue_threshold].")
SSdiscord.send2discord_simple(DISCORD_WEBHOOK_ADMIN, "**\[Queue Server]** `[usr.ckey]` has set the queue threshold to **[SSqueue.queue_threshold]**.")
if("Toggle Setting Persistence")
SSqueue.persist_queue = !SSqueue.persist_queue
to_chat(usr, "Queue server setting persistence is now <b>[SSqueue.persist_queue ? "<font color='green'>Enabled</font>" : "<font color='red'>Disabled</font>"]</b>")
message_admins("[key_name_admin(usr)] has [SSqueue.persist_queue ? "enabled" : "disabled"] the server queue settings persistence.")
log_admin("[key_name(usr)] has [SSqueue.persist_queue ? "enabled" : "disabled"] the server queue settings persistence.")
SSdiscord.send2discord_simple(DISCORD_WEBHOOK_ADMIN, "**\[Queue Server]** `[usr.ckey]` has now **[SSqueue.persist_queue ? "enabled" : "disabled"]** server queue settings persistence.")
/client/proc/add_queue_server_bypass()
set name = "Add Queue Server Bypass"
set desc = "Allow a ckey to bypass the server queue"
set category = "Server"
if(!check_rights(R_SERVER))
return
var/bypass_ckey = input(usr, "Please, enter a ckey", "Queue Server Bypass")
if(!bypass_ckey)
return
var/clean_ckey = ckey(bypass_ckey)
if(!clean_ckey)
to_chat(usr, "Invalid ckey supplied")
return
SSqueue.queue_bypass_list.Add(clean_ckey)
message_admins("[key_name_admin(usr)] has added the ckey [clean_ckey] to the queue bypass list.")
log_admin("[key_name(usr)] has added the ckey [clean_ckey] to the queue bypass list.")
+14 -12
View File
@@ -32,7 +32,7 @@
if(M.stat || !M.mind || M.mind.special_role || M.mind.offstation_role)
return FALSE
if(temp)
if((M.mind.assigned_role in temp.restricted_jobs) || (M.client.prefs.species in temp.protected_species))
if((M.mind.assigned_role in temp.restricted_jobs) || (M.client.prefs.active_character.species in temp.protected_species))
return FALSE
if(role) // Don't even bother evaluating if there's no role
if(player_old_enough_antag(M.client,role) && (role in M.client.prefs.be_special) && !M.client.skip_antag && (!jobban_isbanned(M, role)))
@@ -138,7 +138,7 @@
if(confirm != "Yes")
return 0
var/image/I = new('icons/mob/simple_human.dmi', "wizard")
var/list/candidates = SSghost_spawns.poll_candidates("Do you wish to be considered for the position of a Wizard Foundation 'diplomat'?", "wizard", source = I)
var/list/candidates = SSghost_spawns.poll_candidates("Do you wish to be considered for the position of a Wizard Federation 'diplomat'?", "wizard", source = I)
log_admin("[key_name(owner)] tried making a Wizard with One-Click-Antag")
message_admins("[key_name_admin(owner)] tried making a Wizard with One-Click-Antag")
@@ -374,8 +374,8 @@
//First we spawn a dude.
var/mob/living/carbon/human/new_character = new(pick(GLOB.latejoin))//The mob being spawned.
var/datum/preferences/A = new(G_found.client)
A.copy_to(new_character)
// Then clone stuff over
G_found.client.prefs.active_character.copy_to(new_character)
new_character.dna.ready_dna(new_character)
new_character.key = G_found.key
@@ -388,13 +388,14 @@
var/syndicate_commando_rank = pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant 1st Class", "Master Sergeant", "Sergeant Major")
var/syndicate_commando_name = pick(GLOB.last_names)
var/datum/preferences/A = new()//Randomize appearance for the commando.
var/datum/character_save/S = new //Randomize appearance for the commando.
S.randomise()
if(syndicate_leader_selected)
A.real_name = "[syndicate_commando_leader_rank] [syndicate_commando_name]"
A.age = rand(35,45)
S.real_name = "[syndicate_commando_leader_rank] [syndicate_commando_name]"
S.age = rand(35, 45)
else
A.real_name = "[syndicate_commando_rank] [syndicate_commando_name]"
A.copy_to(new_syndicate_commando)
S.real_name = "[syndicate_commando_rank] [syndicate_commando_name]"
S.copy_to(new_syndicate_commando)
new_syndicate_commando.dna.ready_dna(new_syndicate_commando)//Creates DNA.
@@ -576,7 +577,8 @@
if(candidates.len)
var/teamOneMembers = 5
var/teamTwoMembers = 5
var/datum/preferences/A = new()
var/datum/character_save/S = new
S.randomise()
for(var/thing in GLOB.landmarks_list)
var/obj/effect/landmark/L = thing
if(L.name == "tdome1")
@@ -585,7 +587,7 @@
var/mob/living/carbon/human/newMember = new(L.loc)
A.copy_to(newMember)
S.copy_to(newMember)
newMember.dna.ready_dna(newMember)
@@ -607,7 +609,7 @@
var/mob/living/carbon/human/newMember = new(L.loc)
A.copy_to(newMember)
S.copy_to(newMember)
newMember.dna.ready_dna(newMember)
+3 -2
View File
@@ -11,8 +11,9 @@
continue
if(is_type_in_list(H.dna.species, incompatible_species))
H.set_species(/datum/species/human)
var/datum/preferences/A = new() // Randomize appearance
A.copy_to(H)
var/datum/character_save/S = new // Randomize appearance
S.randomise()
S.copy_to(H)
SSticker.mode.traitors += H.mind
H.mind.special_role = SPECIAL_ROLE_TRAITOR
+3 -2
View File
@@ -12,8 +12,9 @@
continue
if(is_type_in_list(H.dna.species, incompatible_species))
H.set_species(/datum/species/human)
var/datum/preferences/A = new() // Randomize appearance
A.copy_to(H)
var/datum/character_save/S = new // Randomize appearance
S.randomise()
S.copy_to(H)
for(var/obj/item/I in H)
if(istype(I, /obj/item/implant))
+2 -2
View File
@@ -1,5 +1,5 @@
/proc/possess(obj/O as obj in world)
set name = "Possess Obj"
set name = "\[Admin\] Possess Obj"
set category = null
if(!check_rights(R_POSSESS))
@@ -34,7 +34,7 @@
SSblackbox.record_feedback("tally", "admin_verb", 1, "Possess Object") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/proc/release(obj/O as obj in world)
set name = "Release Obj"
set name = "\[Admin\] Release Obj"
set category = null
//usr.loc = get_turf(usr)
+16 -2
View File
@@ -1,3 +1,7 @@
#define NUKE_INTACT 0
#define NUKE_CORE_MISSING 1
#define NUKE_MISSING 2
/mob/living/verb/pray(msg as text)
set category = "IC"
set name = "Pray"
@@ -7,7 +11,7 @@
return
if(usr.client)
if(usr.client.prefs.muted & MUTE_PRAY)
if(check_mute(client.ckey, MUTE_PRAY))
to_chat(usr, "<span class='warning'>You cannot pray (muted).</span>")
return
if(client.handle_spam_prevention(msg, MUTE_PRAY, OOC_COOLDOWN))
@@ -72,11 +76,21 @@
/proc/Nuke_request(text , mob/Sender)
var/nuke_code = get_nuke_code()
var/nuke_status = get_nuke_status()
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
msg = "<span class='adminnotice'><b><font color=orange>NUKE CODE REQUEST: </font>[key_name(Sender)] ([ADMIN_PP(Sender,"PP")]) ([ADMIN_VV(Sender,"VV")]) ([ADMIN_TP(Sender,"TP")]) ([ADMIN_SM(Sender,"SM")]) ([admin_jump_link(Sender)]) ([ADMIN_BSA(Sender,"BSA")]) ([ADMIN_CENTCOM_REPLY(Sender,"RPLY")]):</b> [msg]</span>"
for(var/client/X in GLOB.admins)
if(check_rights(R_EVENT,0,X.mob))
to_chat(X, msg)
to_chat(X, "<span class='adminnotice'><b>The nuke code is [nuke_code].</b></span>")
if(nuke_status == NUKE_MISSING)
to_chat(X, "<span class='userdanger'>The nuclear device is not on station!</span>")
else
to_chat(X, "<b>The nuke code is [nuke_code].</b>")
if(nuke_status == NUKE_CORE_MISSING)
to_chat(X, "<span class='userdanger'>The nuclear device does not have a core, and will not arm!</span>")
if(X.prefs.sound & SOUND_ADMINHELP)
SEND_SOUND(X, sound('sound/effects/adminhelp.ogg'))
#undef NUKE_INTACT
#undef NUKE_CORE_MISSING
#undef NUKE_MISSING
+19 -17
View File
@@ -1,6 +1,6 @@
/client/proc/cmd_admin_drop_everything(mob/M as mob in GLOB.mob_list)
set category = null
set name = "Drop Everything"
set name = "\[Admin\] Drop Everything"
if(!check_rights(R_DEBUG|R_ADMIN))
return
@@ -46,7 +46,7 @@
/client/proc/cmd_admin_subtle_message(mob/M as mob in GLOB.mob_list)
set category = "Event"
set name = "Subtle Message"
set name = "\[Admin\] Subtle Message"
if(!ismob(M))
return
@@ -124,7 +124,7 @@
/client/proc/cmd_admin_direct_narrate(mob/M) // Targetted narrate -- TLE
set category = null
set name = "Direct Narrate"
set name = "\[Admin\] Direct Narrate"
if(!check_rights(R_SERVER|R_EVENT))
return
@@ -151,7 +151,7 @@
/client/proc/cmd_admin_headset_message(mob/M in GLOB.mob_list)
set category = "Event"
set name = "Headset Message"
set name = "\[Admin\] Headset Message"
admin_headset_message(M)
@@ -230,19 +230,19 @@
if(automute)
muteunmute = "auto-muted"
M.client.prefs.muted |= mute_type
force_add_mute(M.client.ckey, mute_type)
log_admin("SPAM AUTOMUTE: [muteunmute] [key_name(M)] from [mute_string]")
message_admins("SPAM AUTOMUTE: [muteunmute] [key_name_admin(M)] from [mute_string].", 1)
to_chat(M, "You have been [muteunmute] from [mute_string] by the SPAM AUTOMUTE system. Contact an admin.")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Automute") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
if(M.client.prefs.muted & mute_type)
muteunmute = "unmuted"
M.client.prefs.muted &= ~mute_type
else
toggle_mute(M.client.ckey, mute_type)
if(check_mute(M.client.ckey, mute_type))
muteunmute = "muted"
M.client.prefs.muted |= mute_type
else
muteunmute = "unmuted"
log_admin("[key_name(usr)] has [muteunmute] [key_name(M)] from [mute_string]")
message_admins("[key_name_admin(usr)] has [muteunmute] [key_name_admin(M)] from [mute_string].", 1)
@@ -396,10 +396,12 @@ Traitors and the like can also be revived with the previous role mostly intact.
new_character.age = record_found.fields["age"]
new_character.dna.blood_type = record_found.fields["blood_type"]
else
// We make a random character
new_character.change_gender(pick(MALE,FEMALE))
var/datum/preferences/A = new()
A.real_name = G_found.real_name
A.copy_to(new_character)
var/datum/character_save/S = new
S.randomise()
S.real_name = G_found.real_name
S.copy_to(new_character)
if(!new_character.real_name)
new_character.real_name = random_name(new_character.gender)
@@ -575,7 +577,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
/client/proc/cmd_admin_rejuvenate(mob/living/M as mob in GLOB.mob_list)
set category = null
set name = "Rejuvenate"
set name = "\[Admin\] Rejuvenate"
if(!check_rights(R_REJUVINATE))
return
@@ -606,7 +608,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
"Custom" = "Cryptic Message")
var/list/MsgSound = list("Beep" = 'sound/misc/notice2.ogg',
"Enemy Communications Intercepted" = 'sound/AI/intercept2.ogg',
"Enemy Communications Intercepted" = 'sound/AI/intercept.ogg',
"New Command Report Created" = 'sound/AI/commandreport.ogg')
var/type = input(usr, "Pick a type of report to send", "Report Type", "") as anything in MsgType
@@ -641,7 +643,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
/client/proc/cmd_admin_delete(atom/A as obj|mob|turf in view())
set category = null
set name = "Delete"
set name = "\[Admin\] Delete"
if(!check_rights(R_ADMIN))
return
@@ -780,7 +782,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
SSblackbox.record_feedback("tally", "admin_verb", 1, "Gibself") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_check_contents(mob/living/M as mob in GLOB.mob_list)
set name = "Check Contents"
set name = "\[Admin\] Check Contents"
set category = null
if(!check_rights(R_ADMIN))
+6 -5
View File
@@ -138,13 +138,14 @@ GLOBAL_VAR_INIT(sent_strike_team, 0)
var/commando_leader_rank = pick("Lieutenant", "Captain", "Major")
var/commando_name = pick(GLOB.commando_names)
var/datum/preferences/A = new()//Randomize appearance for the commando.
var/datum/character_save/S = new //Randomize appearance for the commando.
S.randomise()
if(is_leader)
A.age = rand(35,45)
A.real_name = "[commando_leader_rank] [commando_name]"
S.age = rand(35, 45)
S.real_name = "[commando_leader_rank] [commando_name]"
else
A.real_name = "[commando_name]"
A.copy_to(new_commando)
S.real_name = "[commando_name]"
S.copy_to(new_commando)
new_commando.dna.ready_dna(new_commando)//Creates DNA.
@@ -104,13 +104,14 @@ GLOBAL_VAR_INIT(sent_syndicate_strike_team, 0)
var/syndicate_commando_rank = pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant 1st Class", "Master Sergeant", "Sergeant Major")
var/syndicate_commando_name = pick(GLOB.last_names)
var/datum/preferences/A = new()//Randomize appearance for the commando.
var/datum/character_save/S = new //Randomize appearance for the commando.
S.randomise()
if(is_leader)
A.age = rand(35,45)
A.real_name = "[syndicate_commando_leader_rank] [syndicate_commando_name]"
S.age = rand(35, 45)
S.real_name = "[syndicate_commando_leader_rank] [syndicate_commando_name]"
else
A.real_name = "[syndicate_commando_rank] [syndicate_commando_name]"
A.copy_to(new_syndicate_commando)
S.real_name = "[syndicate_commando_rank] [syndicate_commando_name]"
S.copy_to(new_syndicate_commando)
new_syndicate_commando.dna.ready_dna(new_syndicate_commando)//Creates DNA.
+14 -16
View File
@@ -16,8 +16,21 @@
qdel(query_watchfind)
return
else
qdel(query_watchfind)
target_ckey = new_ckey
if(check_watchlist(target_ckey))
var/already_watched = FALSE
var/datum/db_query/query_watch = SSdbcore.NewQuery("SELECT reason FROM watch WHERE ckey=:target_ckey", list(
"target_ckey" = target_ckey
))
if(!query_watch.warn_execute())
qdel(query_watch)
return
if(query_watch.NextRow())
already_watched = TRUE
qdel(query_watch)
if(already_watched)
to_chat(usr, "<span class='redtext'>[target_ckey] is already on the watchlist.</span>")
return
var/reason = input(usr,"Please state the reason","Reason") as message|null
@@ -132,18 +145,3 @@
output += "<br>[reason]<hr style='background:#000000; border:0; height:1px'>"
usr << browse(output, "window=watchwin;size=900x500")
qdel(query_watchlist)
/proc/check_watchlist(target_ckey)
var/datum/db_query/query_watch = SSdbcore.NewQuery("SELECT reason FROM watch WHERE ckey=:target_ckey", list(
"target_ckey" = target_ckey
))
if(!query_watch.warn_execute())
qdel(query_watch)
return
if(query_watch.NextRow())
var/entry = query_watch.item[1]
qdel(query_watch)
return entry
else
qdel(query_watch)
return 0