mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 11:05:03 +01:00
port ADMIN_VERB and friends (#30646)
* port ADMIN_VERB and friends * some renaming * dumb * one more rename * never search and replace this codebase * fix TM issues, more renaming * add a static analysis to shore up user verbs * fix double message on roundstart * remove macro we're not using yet * convert remaining playsounds verbs * convert more verbs i missed somehow * why is this a completely different signature than everything else * fix ui_interact arg * fix logging view and others * buncha issues caught in TM * fix mentor tickets ui * fix bug report viewing * moron
This commit is contained in:
committed by
GitHub
parent
f89b05ee88
commit
2a842644d5
@@ -12,20 +12,13 @@ GLOBAL_PROTECT(investigate_log_wrapper)
|
||||
|
||||
GLOB.investigate_log_wrapper[subject] += "<small>[time_stamp()] [UID()] [ADMIN_COORDJMP(src)] </small> || [src] [message]"
|
||||
|
||||
//ADMINVERBS
|
||||
/client/proc/investigate_show(subject in GLOB.investigate_log_wrapper)
|
||||
set name = "Investigate Round Objects"
|
||||
set category = "Admin"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
USER_VERB(investigate_show, R_ADMIN, "Investigate Round Objects", "View Investigation panel.", VERB_CATEGORY_ADMIN, subject in GLOB.investigate_log_wrapper)
|
||||
// Should never happen
|
||||
if(!(subject in GLOB.investigate_log_wrapper))
|
||||
return
|
||||
|
||||
var/list/entries = GLOB.investigate_log_wrapper[subject]
|
||||
|
||||
var/datum/browser/B = new(usr, "investigatelog", "Investigate ([subject])", 800, 400)
|
||||
var/datum/browser/B = new(client, "investigatelog", "Investigate ([subject])", 800, 400)
|
||||
B.set_content(entries.Join("<br>"))
|
||||
B.open()
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
/client/proc/admin_memo()
|
||||
set name = "Memo"
|
||||
set category = "Server"
|
||||
if(!check_rights(R_SERVER))
|
||||
return
|
||||
USER_VERB(server_memo, R_SERVER, "Memo", "View and modify server memos.", VERB_CATEGORY_SERVER)
|
||||
if(!SSdbcore.IsConnected())
|
||||
to_chat(src, "<span class='danger'>Failed to establish database connection.</span>")
|
||||
to_chat(client, "<span class='danger'>Failed to establish database connection.</span>")
|
||||
return
|
||||
var/memotask = input(usr,"Choose task.","Memo") in list("Show","Write","Edit","Remove")
|
||||
var/memotask = input(client, "Choose task.", "Memo") in list("Show", "Write", "Edit", "Remove")
|
||||
if(!memotask)
|
||||
return
|
||||
admin_memo_output(memotask)
|
||||
client.admin_memo_output(memotask)
|
||||
|
||||
/client/proc/admin_memo_output(task, checkrights = 1, silent = 0)
|
||||
if(checkrights && !check_rights(R_SERVER))
|
||||
|
||||
+206
-788
File diff suppressed because it is too large
Load Diff
@@ -105,13 +105,7 @@
|
||||
popup.set_content(popup_data.Join())
|
||||
popup.open(FALSE)
|
||||
|
||||
// Just a simple verb so admins can do manual lookups
|
||||
/client/proc/ccbdb_lookup_ckey()
|
||||
set name = "Global Ban DB Lookup"
|
||||
set category = "Admin"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/input_ckey = input(usr, "Please enter a ckey to lookup", "Global Ban DB Lookup")
|
||||
holder.create_ccbdb_lookup(input_ckey)
|
||||
/// Just a simple verb so admins can do manual lookups
|
||||
USER_VERB(ccbdb_lookup_ckey, R_ADMIN, "Global Ban DB Lookup", "Lookup global bans by ckey.", VERB_CATEGORY_ADMIN)
|
||||
var/input_ckey = input(client, "Please enter a ckey to lookup", "Global Ban DB Lookup")
|
||||
client.holder.create_ccbdb_lookup(input_ckey)
|
||||
|
||||
@@ -89,7 +89,7 @@ GLOBAL_PROTECT(href_token)
|
||||
return
|
||||
|
||||
owner.holder = src
|
||||
owner.add_admin_verbs()
|
||||
owner.add_user_verbs()
|
||||
if(isobserver(owner.mob))
|
||||
var/mob/dead/observer/ghost = owner.mob
|
||||
ghost.update_admin_actions()
|
||||
@@ -133,7 +133,7 @@ GLOBAL_PROTECT(href_token)
|
||||
|
||||
if(owner)
|
||||
GLOB.admins -= owner
|
||||
owner.hide_verbs()
|
||||
owner.remove_user_verbs()
|
||||
owner.holder = null
|
||||
owner.init_verbs()
|
||||
if(isobserver(owner.mob))
|
||||
|
||||
@@ -1,20 +1,15 @@
|
||||
/proc/machine_upgrade(obj/machinery/M in world)
|
||||
set name = "\[Admin\] Tweak Component Ratings"
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
USER_CONTEXT_MENU(machine_upgrade, R_DEBUG, "\[Admin\] Tweak Component Ratings", obj/machinery/M as obj in world)
|
||||
if(!istype(M))
|
||||
to_chat(usr, "<span class='danger'>This can only be used on subtypes of /obj/machinery.</span>")
|
||||
to_chat(client, "<span class='danger'>This can only be used on subtypes of /obj/machinery.</span>")
|
||||
return
|
||||
|
||||
var/new_rating = input("Enter new rating:","Num") as num
|
||||
var/new_rating = input(client, "Enter new rating:","Num") as num
|
||||
if(!isnull(new_rating) && M.component_parts)
|
||||
for(var/obj/item/stock_parts/P in M.component_parts)
|
||||
P.rating = new_rating
|
||||
M.RefreshParts()
|
||||
|
||||
message_admins("[key_name_admin(usr)] has set the component rating of [M] to [new_rating]")
|
||||
log_admin("[key_name(usr)] has set the component rating of [M] to [new_rating]")
|
||||
message_admins("[key_name_admin(client)] has set the component rating of [M] to [new_rating]")
|
||||
log_admin("[key_name(client)] has set the component rating of [M] to [new_rating]")
|
||||
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Machine Upgrade") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -167,7 +167,7 @@ RESTRICT_TYPE(/datum/ui_module/admin/antagonist_menu)
|
||||
if(QDELETED(mind.current))
|
||||
to_chat(ui.user, "<span class='warning'>Mind doesn't have a corresponding mob.</span>")
|
||||
return
|
||||
ui.user.client.holder.show_player_panel(mind.current)
|
||||
SSuser_verbs.invoke_verb(ui.user, /datum/user_verb/show_player_panel, mind.current)
|
||||
if("pm")
|
||||
ui.user.client.cmd_admin_pm(params["ckey"], null)
|
||||
if("follow")
|
||||
@@ -179,7 +179,7 @@ RESTRICT_TYPE(/datum/ui_module/admin/antagonist_menu)
|
||||
if(!ismob(mind.current))
|
||||
to_chat(ui.user, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
C.admin_observe_target(mind.current)
|
||||
SSuser_verbs.invoke_verb(C, /datum/user_verb/admin_observe_target, mind.current)
|
||||
if("tp")
|
||||
var/datum/mind/mind = locateUID(params["mind_uid"])
|
||||
if(QDELETED(mind))
|
||||
|
||||
@@ -70,16 +70,11 @@ GLOBAL_VAR_INIT(disable_explosions, FALSE)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////Panels
|
||||
|
||||
/datum/admins/proc/show_player_panel(mob/M in GLOB.mob_list)
|
||||
set name = "\[Admin\] Show Player Panel"
|
||||
set desc="Edit player (respawn, ban, heal, etc)"
|
||||
|
||||
USER_CONTEXT_MENU(show_player_panel, R_ADMIN|R_MOD, "\[Admin\] Show Player Panel", mob/M)
|
||||
if(!M)
|
||||
to_chat(usr, "You seem to be selecting a mob that doesn't exist anymore.")
|
||||
to_chat(client, "You seem to be selecting a mob that doesn't exist anymore.")
|
||||
return
|
||||
|
||||
if(!check_rights(R_ADMIN|R_MOD))
|
||||
return
|
||||
var/our_key = M.key
|
||||
if(M.client && M.client.holder)
|
||||
if(M.client.holder.fakekey && M.client.holder.big_brother)
|
||||
@@ -289,34 +284,19 @@ GLOBAL_VAR_INIT(disable_explosions, FALSE)
|
||||
</body></html>
|
||||
"}
|
||||
|
||||
usr << browse(body, "window=adminplayeropts;size=550x615")
|
||||
client << browse(body, "window=adminplayeropts;size=550x615")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Show Player Panel") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
#define PLAYER_NOTES_ENTRIES_PER_PAGE 50
|
||||
/datum/admins/proc/PlayerNotes()
|
||||
set category = "Admin"
|
||||
set name = "Player Notes"
|
||||
|
||||
if(!check_rights(R_ADMIN|R_MOD))
|
||||
return
|
||||
|
||||
USER_VERB(player_notes, R_ADMIN|R_MOD, "Player Notes", "Open Player Notes panel.", VERB_CATEGORY_ADMIN)
|
||||
show_note()
|
||||
|
||||
/datum/admins/proc/show_player_notes(key as text)
|
||||
set category = "Admin"
|
||||
set name = "Show Player Notes"
|
||||
|
||||
if(!check_rights(R_ADMIN|R_MOD))
|
||||
return
|
||||
|
||||
USER_VERB(player_notes_target, R_ADMIN|R_MOD, "Show Player Notes", "Show Player Notes panel for a given ckey.", VERB_CATEGORY_ADMIN, key as text)
|
||||
show_note(key)
|
||||
|
||||
/datum/admins/proc/vpn_whitelist()
|
||||
set category = "Admin"
|
||||
set name = "VPN Ckey Whitelist"
|
||||
if(!check_rights(R_BAN))
|
||||
return
|
||||
var/key = stripped_input(usr, "Enter ckey to add/remove, or leave blank to cancel:", "VPN Whitelist add/remove", max_length=32)
|
||||
USER_VERB(vpn_whitelist, R_BAN, "VPN Ckey Whitelist", "Modify ckey's presence on VPN whitelist", VERB_CATEGORY_ADMIN)
|
||||
var/key = stripped_input(client, "Enter ckey to add/remove, or leave blank to cancel:", "VPN Whitelist add/remove", max_length=32)
|
||||
if(key)
|
||||
GLOB.ipintel_manager.vpn_whitelist_panel(key)
|
||||
|
||||
@@ -348,118 +328,87 @@ GLOBAL_VAR_INIT(disable_explosions, FALSE)
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////admins2.dm merge
|
||||
//i.e. buttons/verbs
|
||||
|
||||
|
||||
/datum/admins/proc/restart()
|
||||
set category = "Server"
|
||||
set name = "Restart"
|
||||
set desc = "Restarts the world."
|
||||
|
||||
if(!check_rights(R_SERVER))
|
||||
return
|
||||
|
||||
USER_VERB(restart_server, R_SERVER, "Restart", "Restarts the world.", VERB_CATEGORY_SERVER)
|
||||
// Give an extra popup if they are rebooting a live server
|
||||
var/is_live_server = TRUE
|
||||
if(usr.client.is_connecting_from_localhost())
|
||||
if(client.is_connecting_from_localhost())
|
||||
is_live_server = FALSE
|
||||
|
||||
var/list/options = list("Regular Restart", "Hard Restart")
|
||||
if(world.TgsAvailable()) // TGS lets you kill the process entirely
|
||||
options += "Terminate Process (Kill and restart DD)"
|
||||
|
||||
var/result = input(usr, "Select reboot method", "World Reboot", options[1]) as null|anything in options
|
||||
var/result = input(client, "Select reboot method", "World Reboot", options[1]) as null|anything in options
|
||||
|
||||
if(result && is_live_server)
|
||||
if(alert(usr, "WARNING: THIS IS A LIVE SERVER, NOT A LOCAL TEST SERVER. DO YOU STILL WANT TO RESTART","This server is live","Restart","Cancel") != "Restart")
|
||||
if(alert(client, "WARNING: THIS IS A LIVE SERVER, NOT A LOCAL TEST SERVER. DO YOU STILL WANT TO RESTART","This server is live","Restart","Cancel") != "Restart")
|
||||
return FALSE
|
||||
|
||||
if(result)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Reboot World") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
var/init_by = "Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key]."
|
||||
var/init_by = "Initiated by [client.holder.fakekey ? "Admin" : client.key]."
|
||||
switch(result)
|
||||
|
||||
if("Regular Restart")
|
||||
var/delay = input("What delay should the restart have (in seconds)?", "Restart Delay", 5) as num|null
|
||||
var/delay = input(client, "What delay should the restart have (in seconds)?", "Restart Delay", 5) as num|null
|
||||
if(!delay)
|
||||
return FALSE
|
||||
|
||||
|
||||
// These are pasted each time so that they dont false send if reboot is cancelled
|
||||
message_admins("[key_name_admin(usr)] has initiated a server restart of type [result]")
|
||||
log_admin("[key_name(usr)] has initiated a server restart of type [result]")
|
||||
message_admins("[key_name_admin(client)] has initiated a server restart of type [result]")
|
||||
log_admin("[key_name(client)] has initiated a server restart of type [result]")
|
||||
SSticker.delay_end = FALSE // We arent delayed anymore
|
||||
SSticker.reboot_helper(init_by, "admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]", delay * 10)
|
||||
SSticker.reboot_helper(init_by, "admin reboot - by [client.key] [client.holder.fakekey ? "(stealth)" : ""]", delay * 10)
|
||||
|
||||
if("Hard Restart")
|
||||
message_admins("[key_name_admin(usr)] has initiated a server restart of type [result]")
|
||||
log_admin("[key_name(usr)] has initiated a server restart of type [result]")
|
||||
message_admins("[key_name_admin(client)] has initiated a server restart of type [result]")
|
||||
log_admin("[key_name(client)] has initiated a server restart of type [result]")
|
||||
world.Reboot(fast_track = TRUE)
|
||||
|
||||
if("Terminate Process (Kill and restart DD)")
|
||||
message_admins("[key_name_admin(usr)] has initiated a server restart of type [result]")
|
||||
log_admin("[key_name(usr)] has initiated a server restart of type [result]")
|
||||
message_admins("[key_name_admin(client)] has initiated a server restart of type [result]")
|
||||
log_admin("[key_name(client)] has initiated a server restart of type [result]")
|
||||
world.TgsEndProcess() // Just nuke the entire process if we are royally fucked
|
||||
|
||||
/datum/admins/proc/end_round()
|
||||
set category = "Server"
|
||||
set name = "End Round"
|
||||
set desc = "Instantly ends the round and brings up the scoreboard, in the same way that wizards dying do."
|
||||
if(!check_rights(R_SERVER))
|
||||
return
|
||||
var/input = sanitize(copytext_char(input(usr, "What text should players see announcing the round end? Input nothing to cancel.", "Specify Announcement Text", "Shift Has Ended!"), 1, MAX_MESSAGE_LEN))
|
||||
USER_VERB(end_round, R_SERVER, "End Round", \
|
||||
"Instantly ends the round and brings up the scoreboard, in the same way that wizards dying do.", \
|
||||
VERB_CATEGORY_SERVER)
|
||||
var/input = sanitize(copytext_char(input(client, "What text should players see announcing the round end? Input nothing to cancel.", "Specify Announcement Text", "Shift Has Ended!"), 1, MAX_MESSAGE_LEN))
|
||||
|
||||
if(!input)
|
||||
return
|
||||
if(SSticker.force_ending)
|
||||
return
|
||||
message_admins("[key_name_admin(usr)] has admin ended the round with message: '[input]'")
|
||||
log_admin("[key_name(usr)] has admin ended the round with message: '[input]'")
|
||||
message_admins("[key_name_admin(client)] has admin ended the round with message: '[input]'")
|
||||
log_admin("[key_name(client)] has admin ended the round with message: '[input]'")
|
||||
SSticker.force_ending = TRUE
|
||||
SSticker.record_biohazard_results()
|
||||
to_chat(world, "<span class='warning'><big><b>[input]</b></big></span>")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "End Round") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
SSticker.mode_result = "admin ended"
|
||||
|
||||
/datum/admins/proc/announce()
|
||||
set category = "Admin"
|
||||
set name = "Announce"
|
||||
set desc = "Announce your desires to the world"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/message = input("Global message to send:", "Admin Announce", null, null) as message|null
|
||||
USER_VERB(announce, R_ADMIN, "Announce", "Announce your desires to the world", VERB_CATEGORY_ADMIN)
|
||||
var/message = input(client, "Global message to send:", "Admin Announce", null) as message|null
|
||||
if(message)
|
||||
if(!check_rights(R_SERVER,0))
|
||||
if(!check_rights_client(R_SERVER, 0, client))
|
||||
message = adminscrub(message,500)
|
||||
message = replacetext(message, "\n", "<br>") // required since we're putting it in a <p> tag
|
||||
to_chat(world, chat_box_notice("<span class='notice'><b>[usr.client.holder.fakekey ? "Administrator" : usr.key] Announces:</b><br><br><p>[message]</p></span>"))
|
||||
log_admin("Announce: [key_name(usr)] : [message]")
|
||||
to_chat(world, chat_box_notice("<span class='notice'><b>[client.holder.fakekey ? "Administrator" : client.key] Announces:</b><br><br><p>[message]</p></span>"))
|
||||
log_admin("Announce: [key_name(client)] : [message]")
|
||||
for(var/client/clients_to_alert in GLOB.clients)
|
||||
window_flash(clients_to_alert)
|
||||
if(clients_to_alert.prefs?.sound & SOUND_ADMINHELP)
|
||||
SEND_SOUND(clients_to_alert, sound('sound/misc/server_alert.ogg'))
|
||||
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Announce") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/toggleooc()
|
||||
set category = "Server"
|
||||
set desc="Globally Toggles OOC"
|
||||
set name="Toggle OOC"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
USER_VERB(toggle_ooc, R_ADMIN, "Toggle OOC", "Globally Toggles OOC", VERB_CATEGORY_SERVER)
|
||||
toggle_ooc()
|
||||
log_and_message_admins("toggled OOC.")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle OOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/togglelooc()
|
||||
set category = "Server"
|
||||
set desc="Globally Toggles LOOC"
|
||||
set name="Toggle LOOC"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
USER_VERB(toggle_looc, R_ADMIN, "Toggle LOOC", "Globally Toggles LOOC", VERB_CATEGORY_SERVER)
|
||||
GLOB.looc_enabled = !(GLOB.looc_enabled)
|
||||
if(GLOB.looc_enabled)
|
||||
to_chat(world, "<B>The LOOC channel has been globally enabled!</B>")
|
||||
@@ -468,92 +417,57 @@ GLOBAL_VAR_INIT(disable_explosions, FALSE)
|
||||
log_and_message_admins("toggled LOOC.")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle LOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/toggledsay()
|
||||
set category = "Server"
|
||||
set desc="Globally Toggles DSAY"
|
||||
set name="Toggle DSAY"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
USER_VERB(toggle_dsay, R_ADMIN, "Toggle DSAY", "Globally Toggles DSAY", VERB_CATEGORY_SERVER)
|
||||
GLOB.dsay_enabled = !(GLOB.dsay_enabled)
|
||||
if(GLOB.dsay_enabled)
|
||||
to_chat(world, "<b>Deadchat has been globally enabled!</b>", MESSAGE_TYPE_DEADCHAT)
|
||||
else
|
||||
to_chat(world, "<b>Deadchat has been globally disabled!</b>", MESSAGE_TYPE_DEADCHAT)
|
||||
log_admin("[key_name(usr)] toggled deadchat.")
|
||||
message_admins("[key_name_admin(usr)] toggled deadchat.", 1)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle Deadchat") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc
|
||||
|
||||
/datum/admins/proc/toggleoocdead()
|
||||
set category = "Server"
|
||||
set desc="Toggle Dead OOC."
|
||||
set name="Toggle Dead OOC"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
log_admin("[key_name(client)] toggled deadchat.")
|
||||
message_admins("[key_name_admin(client)] toggled deadchat.", 1)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle Deadchat") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
USER_VERB(toggle_ooc_dead, R_ADMIN, "Toggle Dead OOC", "Toggle Dead OOC.", VERB_CATEGORY_SERVER)
|
||||
GLOB.dooc_enabled = !(GLOB.dooc_enabled)
|
||||
log_admin("[key_name(usr)] toggled Dead OOC.")
|
||||
message_admins("[key_name_admin(usr)] toggled Dead OOC.", 1)
|
||||
log_admin("[key_name(client)] toggled Dead OOC.")
|
||||
message_admins("[key_name_admin(client)] toggled Dead OOC.", 1)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle Dead OOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/toggleemoji()
|
||||
set category = "Server"
|
||||
set desc = "Toggle OOC Emoji"
|
||||
set name = "Toggle OOC Emoji"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
USER_VERB(toggle_emoji, R_ADMIN, "Toggle OOC Emoji", "Toggle OOC Emoji", VERB_CATEGORY_SERVER)
|
||||
GLOB.configuration.general.enable_ooc_emoji = !(GLOB.configuration.general.enable_ooc_emoji)
|
||||
log_admin("[key_name(usr)] toggled OOC Emoji.")
|
||||
message_admins("[key_name_admin(usr)] toggled OOC Emoji.", 1)
|
||||
log_admin("[key_name(client)] toggled OOC Emoji.")
|
||||
message_admins("[key_name_admin(client)] toggled OOC Emoji.", 1)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle OOC Emoji")
|
||||
|
||||
/datum/admins/proc/startnow()
|
||||
set category = "Server"
|
||||
set desc="Start the round RIGHT NOW"
|
||||
set name="Start Now"
|
||||
|
||||
if(!check_rights(R_SERVER))
|
||||
return
|
||||
|
||||
USER_VERB(start_server_now, R_SERVER, "Start Now", "Start the round RIGHT NOW", VERB_CATEGORY_SERVER)
|
||||
if(SSticker.current_state < GAME_STATE_STARTUP)
|
||||
alert("Unable to start the game as it is not set up.")
|
||||
alert(client, "Unable to start the game as it is not set up.")
|
||||
return
|
||||
|
||||
if(!SSticker.ticker_going)
|
||||
alert("Remove the round-start delay first.")
|
||||
alert(client, "Remove the round-start delay first.")
|
||||
return
|
||||
|
||||
if(GLOB.configuration.general.start_now_confirmation)
|
||||
if(alert(usr, "This is a live server. Are you sure you want to start now?", "Start game", "Yes", "No") != "Yes")
|
||||
if(alert(client, "This is a live server. Are you sure you want to start now?", "Start game", "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
if(SSticker.current_state == GAME_STATE_PREGAME || SSticker.current_state == GAME_STATE_STARTUP)
|
||||
SSticker.force_start = TRUE
|
||||
log_admin("[usr.key] has started the game.")
|
||||
log_admin("[client.key] has started the game.")
|
||||
var/msg = ""
|
||||
if(SSticker.current_state == GAME_STATE_STARTUP)
|
||||
msg = " (The server is still setting up, but the round will be started as soon as possible.)"
|
||||
message_admins("<span class='darkmblue'>[usr.key] has started the game.[msg]</span>")
|
||||
message_admins("<span class='darkmblue'>[client.key] has started the game.[msg]</span>")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Start Game") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return 1
|
||||
else
|
||||
to_chat(usr, "<font color='red'>Error: Start Now: Game has already started.</font>")
|
||||
to_chat(client, "<font color='red'>Error: Start Now: Game has already started.</font>")
|
||||
return
|
||||
|
||||
/datum/admins/proc/toggleenter()
|
||||
set category = "Server"
|
||||
set desc="People can't enter"
|
||||
set name="Toggle Entering"
|
||||
|
||||
if(!check_rights(R_SERVER))
|
||||
return
|
||||
|
||||
if(!usr.client.is_connecting_from_localhost())
|
||||
if(tgui_alert(usr, "Are you sure about this?", "Confirm", list("Yes", "No")) != "Yes")
|
||||
USER_VERB(toggle_enter, R_SERVER, "Toggle Entering", "People can't enter", VERB_CATEGORY_SERVER)
|
||||
if(!client.is_connecting_from_localhost())
|
||||
if(tgui_alert(client, "Are you sure about this?", "Confirm", list("Yes", "No")) != "Yes")
|
||||
return
|
||||
|
||||
GLOB.enter_allowed = !GLOB.enter_allowed
|
||||
@@ -561,40 +475,25 @@ GLOBAL_VAR_INIT(disable_explosions, FALSE)
|
||||
to_chat(world, "<B>New players may no longer enter the game.</B>")
|
||||
else
|
||||
to_chat(world, "<B>New players may now enter the game.</B>")
|
||||
log_admin("[key_name(usr)] toggled new player game entering.")
|
||||
message_admins("[key_name_admin(usr)] toggled new player game entering.", 1)
|
||||
log_admin("[key_name(client)] toggled new player game entering.")
|
||||
message_admins("[key_name_admin(client)] toggled new player game entering.", 1)
|
||||
world.update_status()
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle Entering") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/toggle_ai()
|
||||
set category = "Event"
|
||||
set desc="People can't be AI"
|
||||
set name="Toggle AI"
|
||||
|
||||
if(!check_rights(R_EVENT))
|
||||
return
|
||||
|
||||
|
||||
USER_VERB(toggle_ai_role, R_EVENT, "Toggle AI", "People can't be AI", VERB_CATEGORY_EVENT)
|
||||
GLOB.configuration.jobs.allow_ai = !(GLOB.configuration.jobs.allow_ai)
|
||||
if(!GLOB.configuration.jobs.allow_ai)
|
||||
to_chat(world, "<B>The AI job is no longer chooseable.</B>")
|
||||
else
|
||||
to_chat(world, "<B>The AI job is chooseable now.</B>")
|
||||
message_admins("[key_name_admin(usr)] toggled AI allowed.")
|
||||
log_admin("[key_name(usr)] toggled AI allowed.")
|
||||
message_admins("[key_name_admin(client)] toggled AI allowed.")
|
||||
log_admin("[key_name(client)] toggled AI allowed.")
|
||||
world.update_status()
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle AI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/toggleaban()
|
||||
set category = "Server"
|
||||
set desc="Toggle the ability for players to respawn."
|
||||
set name="Toggle Respawn"
|
||||
|
||||
if(!check_rights(R_SERVER))
|
||||
return
|
||||
|
||||
if(!usr.client.is_connecting_from_localhost())
|
||||
if(tgui_alert(usr, "Are you sure about this?", "Confirm", list("Yes", "No")) != "Yes")
|
||||
USER_VERB(toggle_respawn, R_SERVER, "Toggle Respawn", "Toggle the ability for players to respawn.", VERB_CATEGORY_SERVER)
|
||||
if(!client.is_connecting_from_localhost())
|
||||
if(tgui_alert(client, "Are you sure about this?", "Confirm", list("Yes", "No")) != "Yes")
|
||||
return
|
||||
|
||||
GLOB.configuration.general.respawn_enabled = !(GLOB.configuration.general.respawn_enabled)
|
||||
@@ -602,25 +501,18 @@ GLOBAL_VAR_INIT(disable_explosions, FALSE)
|
||||
to_chat(world, "<B>You may now respawn.</B>")
|
||||
else
|
||||
to_chat(world, "<B>You may no longer respawn</B>")
|
||||
message_admins("[key_name_admin(usr)] toggled respawn to [GLOB.configuration.general.respawn_enabled ? "On" : "Off"].", 1)
|
||||
log_admin("[key_name(usr)] toggled respawn to [GLOB.configuration.general.respawn_enabled ? "On" : "Off"].")
|
||||
message_admins("[key_name_admin(client)] toggled respawn to [GLOB.configuration.general.respawn_enabled ? "On" : "Off"].", 1)
|
||||
log_admin("[key_name(client)] toggled respawn to [GLOB.configuration.general.respawn_enabled ? "On" : "Off"].")
|
||||
world.update_status()
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle Respawn") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/delay()
|
||||
set category = "Server"
|
||||
set desc="Delay the game start/end"
|
||||
set name="Delay"
|
||||
|
||||
if(!check_rights(R_SERVER))
|
||||
return
|
||||
|
||||
USER_VERB(delay_game, R_SERVER, "Delay", "Delay the game start/end", VERB_CATEGORY_SERVER)
|
||||
if(SSticker.current_state < GAME_STATE_STARTUP)
|
||||
alert("Slow down a moment, let the ticker start first!")
|
||||
alert(client, "Slow down a moment, let the ticker start first!")
|
||||
return
|
||||
|
||||
if(!usr.client.is_connecting_from_localhost())
|
||||
if(tgui_alert(usr, "Are you sure about this?", "Confirm", list("Yes", "No")) != "Yes")
|
||||
if(!client.is_connecting_from_localhost())
|
||||
if(tgui_alert(client, "Are you sure about this?", "Confirm", list("Yes", "No")) != "Yes")
|
||||
return
|
||||
|
||||
if(SSblackbox)
|
||||
@@ -628,8 +520,8 @@ GLOBAL_VAR_INIT(disable_explosions, FALSE)
|
||||
|
||||
if(SSticker.current_state > GAME_STATE_PREGAME)
|
||||
SSticker.delay_end = !SSticker.delay_end
|
||||
log_admin("[key_name(usr)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"].")
|
||||
message_admins("[key_name(usr)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"].", 1)
|
||||
log_admin("[key_name(client)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"].")
|
||||
message_admins("[key_name(client)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"].", 1)
|
||||
if(SSticker.delay_end)
|
||||
SSticker.real_reboot_time = 0 // Immediately show the "Admin delayed round end" message
|
||||
return //alert("Round end delayed", null, null, null, null, null)
|
||||
@@ -637,12 +529,12 @@ GLOBAL_VAR_INIT(disable_explosions, FALSE)
|
||||
SSticker.ticker_going = FALSE
|
||||
SSticker.delay_end = TRUE
|
||||
to_chat(world, "<b>The game start has been delayed.</b>")
|
||||
log_admin("[key_name(usr)] delayed the game.")
|
||||
log_admin("[key_name(client)] delayed the game.")
|
||||
else
|
||||
SSticker.ticker_going = TRUE
|
||||
SSticker.round_start_time = world.time + SSticker.pregame_timeleft
|
||||
to_chat(world, "<b>The game will start soon.</b>")
|
||||
log_admin("[key_name(usr)] removed the delay.")
|
||||
log_admin("[key_name(client)] removed the delay.")
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////ADMIN HELPER PROCS
|
||||
|
||||
@@ -725,14 +617,9 @@ GLOBAL_VAR_INIT(disable_explosions, FALSE)
|
||||
|
||||
return ""
|
||||
|
||||
/datum/admins/proc/spawn_atom(object as text)
|
||||
set category = "Debug"
|
||||
set desc = "(atom path) Spawn an atom. Append a period to the text in order to exclude subtypes of paths matching the input."
|
||||
set name = "Spawn"
|
||||
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
|
||||
USER_VERB(spawn_atom, R_SPAWN, "Spawn", \
|
||||
"Spawn an atom. Append a period to the text in order to exclude subtypes of paths matching the input.", \
|
||||
VERB_CATEGORY_DEBUG, object as text)
|
||||
if(!object)
|
||||
return
|
||||
|
||||
@@ -761,48 +648,35 @@ GLOBAL_VAR_INIT(disable_explosions, FALSE)
|
||||
if(length(matches)==1)
|
||||
chosen = matches[1]
|
||||
else
|
||||
chosen = tgui_input_list(usr, "Select an Atom Type", "Spawn Atom", matches)
|
||||
chosen = tgui_input_list(client, "Select an Atom Type", "Spawn Atom", matches)
|
||||
if(!chosen)
|
||||
return
|
||||
|
||||
if(ispath(chosen,/turf))
|
||||
var/turf/T = get_turf(usr.loc)
|
||||
var/turf/T = get_turf(client.mob.loc)
|
||||
T.ChangeTurf(chosen)
|
||||
else
|
||||
var/atom/A = new chosen(usr.loc)
|
||||
var/atom/A = new chosen(client.mob.loc)
|
||||
A.admin_spawned = TRUE
|
||||
|
||||
log_admin("[key_name(usr)] spawned [chosen] at ([usr.x],[usr.y],[usr.z])")
|
||||
log_admin("[key_name(client)] spawned [chosen] at ([client.mob.x],[client.mob.y],[client.mob.z])")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Spawn Atom") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/show_traitor_panel(mob/M in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set desc = "Edit mobs's memory and role"
|
||||
set name = "Show Traitor Panel"
|
||||
|
||||
if(!check_rights(R_ADMIN|R_MOD))
|
||||
return
|
||||
|
||||
USER_VERB_VISIBILITY(show_traitor_panel, VERB_VISIBILITY_FLAG_MOREDEBUG)
|
||||
USER_VERB(show_traitor_panel, R_ADMIN|R_MOD, "Show Traitor Panel", "Edit mob's memory and role", VERB_CATEGORY_ADMIN, mob/M in GLOB.mob_list)
|
||||
if(!istype(M))
|
||||
to_chat(usr, "This can only be used on instances of type /mob")
|
||||
to_chat(client, "This can only be used on instances of type /mob")
|
||||
return
|
||||
if(!M.mind)
|
||||
to_chat(usr, "This mob has no mind!")
|
||||
to_chat(client, "This mob has no mind!")
|
||||
return
|
||||
|
||||
M.mind.edit_memory()
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Show Traitor Panel") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/toggleguests()
|
||||
set category = "Server"
|
||||
set desc="Guests can't enter"
|
||||
set name="Toggle Guests"
|
||||
|
||||
if(!check_rights(R_SERVER))
|
||||
return
|
||||
|
||||
if(!usr.client.is_connecting_from_localhost())
|
||||
if(tgui_alert(usr, "Are you sure about this?", "Confirm", list("Yes", "No")) != "Yes")
|
||||
USER_VERB(toggle_guests, R_SERVER, "Toggle Guests", "Guests can't enter", VERB_CATEGORY_SERVER)
|
||||
if(!client.is_connecting_from_localhost())
|
||||
if(tgui_alert(client, "Are you sure about this?", "Confirm", list("Yes", "No")) != "Yes")
|
||||
return
|
||||
|
||||
GLOB.configuration.general.guest_ban = !(GLOB.configuration.general.guest_ban)
|
||||
@@ -810,8 +684,8 @@ GLOBAL_VAR_INIT(disable_explosions, FALSE)
|
||||
to_chat(world, "<B>Guests may no longer enter the game.</B>")
|
||||
else
|
||||
to_chat(world, "<B>Guests may now enter the game.</B>")
|
||||
log_admin("[key_name(usr)] toggled guests game entering [GLOB.configuration?.general.guest_ban ? "dis" : ""]allowed.")
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] toggled guests game entering [GLOB.configuration?.general.guest_ban ? "dis" : ""]allowed.</span>", 1)
|
||||
log_admin("[key_name(client)] toggled guests game entering [GLOB.configuration?.general.guest_ban ? "dis" : ""]allowed.")
|
||||
message_admins("<span class='notice'>[key_name_admin(client)] toggled guests game entering [GLOB.configuration?.general.guest_ban ? "dis" : ""]allowed.</span>", 1)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle Guests") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/output_ai_laws()
|
||||
@@ -848,13 +722,7 @@ GLOBAL_VAR_INIT(disable_explosions, FALSE)
|
||||
log_admin("[key_name(usr)] checked the AI laws")
|
||||
message_admins("[key_name_admin(usr)] checked the AI laws")
|
||||
|
||||
/client/proc/update_mob_sprite(mob/living/carbon/human/H as mob)
|
||||
set name = "\[Admin\] Update Mob Sprite"
|
||||
set desc = "Should fix any mob sprite update errors."
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
USER_CONTEXT_MENU(update_mob_sprite, R_ADMIN, "\[Admin\] Update Mob Sprite", mob/living/carbon/human/H as mob)
|
||||
if(istype(H))
|
||||
H.regenerate_icons()
|
||||
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
|
||||
|
||||
/client/proc/outfit_manager()
|
||||
set category = "Event"
|
||||
set name = "Outfit Manager"
|
||||
|
||||
if(!check_rights(R_EVENT))
|
||||
return
|
||||
holder.outfit_manager(usr)
|
||||
USER_VERB(outfit_manager, R_EVENT, "Outfit Manager", "Opens the outfit manager.", VERB_CATEGORY_EVENT)
|
||||
client.holder.outfit_manager(client.mob)
|
||||
|
||||
/datum/admins/proc/outfit_manager(mob/admin)
|
||||
var/list/dat = list("<!DOCTYPE html><ul>")
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
/client/proc/edit_admin_permissions()
|
||||
set category = "Admin"
|
||||
set name = "Permissions Panel"
|
||||
set desc = "Edit admin permissions"
|
||||
if(!check_rights(R_PERMISSIONS))
|
||||
return
|
||||
usr.client.holder.edit_admin_permissions()
|
||||
USER_VERB(edit_admin_permissions, R_PERMISSIONS, "Permissions Panel", "Edit admin permissions", VERB_CATEGORY_ADMIN)
|
||||
client.holder.edit_admin_permissions()
|
||||
|
||||
/datum/admins/proc/edit_admin_permissions()
|
||||
if(!check_rights(R_PERMISSIONS))
|
||||
@@ -41,7 +36,7 @@
|
||||
if(GLOB.configuration.admin.use_database_admins)
|
||||
var/datum/db_query/get_admins = SSdbcore.NewQuery({"
|
||||
SELECT
|
||||
admin.ckey,
|
||||
admin.ckey,
|
||||
admin_ranks.name,
|
||||
admin.display_rank,
|
||||
IFNULL(admin_ranks.default_permissions, 0),
|
||||
|
||||
@@ -1,28 +1,12 @@
|
||||
//Verbs
|
||||
USER_VERB(open_admin_tickets, R_ADMIN, "Open Admin Ticket Interface", "Open the ahelp panel.", VERB_CATEGORY_ADMIN)
|
||||
SStickets.showUI(client.mob)
|
||||
|
||||
/client/proc/openAdminTicketUI()
|
||||
|
||||
set name = "Open Admin Ticket Interface"
|
||||
set category = "Admin"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
SStickets.showUI(usr)
|
||||
|
||||
/client/proc/resolveAllAdminTickets()
|
||||
set name = "Resolve All Open Admin Tickets"
|
||||
set category = null
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(alert("Are you sure you want to resolve ALL open admin tickets?","Resolve all open admin tickets?","Yes","No") != "Yes")
|
||||
USER_VERB(resolve_all_admin_tickets, R_ADMIN, "Resolve All Open Admin Tickets", "Resolve All Open Admin Tickets", VERB_CATEGORY_HIDDEN)
|
||||
if(alert(client, "Are you sure you want to resolve ALL open admin tickets?","Resolve all open admin tickets?","Yes","No") != "Yes")
|
||||
return
|
||||
|
||||
SStickets.resolveAllOpenTickets()
|
||||
|
||||
/client/verb/openAdminUserUI()
|
||||
set name = "My Admin Tickets"
|
||||
set category = "Admin"
|
||||
SStickets.userDetailUI(usr)
|
||||
USER_VERB(open_admin_ui, R_ADMIN, "My Admin Tickets", "Open the Admin Ticket UI", VERB_CATEGORY_ADMIN)
|
||||
SStickets.userDetailUI(client.mob)
|
||||
|
||||
@@ -1,28 +1,15 @@
|
||||
//Verbs
|
||||
|
||||
/client/proc/openMentorTicketUI()
|
||||
USER_VERB(open_mentor_tickets, R_MENTOR|R_ADMIN, "Open Mentor Ticket Interface", "Opens the mhelp panel", VERB_CATEGORY_ADMIN)
|
||||
SSmentor_tickets.showUI(client.mob)
|
||||
|
||||
set name = "Open Mentor Ticket Interface"
|
||||
set category = "Admin"
|
||||
|
||||
if(!check_rights(R_MENTOR|R_ADMIN))
|
||||
return
|
||||
|
||||
SSmentor_tickets.showUI(usr)
|
||||
|
||||
/client/proc/resolveAllMentorTickets()
|
||||
set name = "Resolve All Open Mentor Tickets"
|
||||
set category = null
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(alert("Are you sure you want to resolve ALL open mentor tickets?","Resolve all open mentor tickets?","Yes","No") != "Yes")
|
||||
USER_VERB(resolve_all_mentor_tickets, R_ADMIN, "Resolve All Open Mentor Tickets", "Resolves all open mhelps", VERB_CATEGORY_HIDDEN)
|
||||
if(alert(client, "Are you sure you want to resolve ALL open mentor tickets?","Resolve all open mentor tickets?","Yes","No") != "Yes")
|
||||
return
|
||||
|
||||
SSmentor_tickets.resolveAllOpenTickets()
|
||||
|
||||
/client/verb/openMentorUserUI()
|
||||
set name = "My Mentor Tickets"
|
||||
set category = "Admin"
|
||||
set category = VERB_CATEGORY_ADMIN
|
||||
SSmentor_tickets.userDetailUI(usr)
|
||||
|
||||
+31
-61
@@ -918,7 +918,7 @@
|
||||
else if(href_list["open_logging_view"])
|
||||
var/mob/M = locateUID(href_list["open_logging_view"])
|
||||
if(ismob(M))
|
||||
usr.client.open_logging_view(list(M), TRUE)
|
||||
SSuser_verbs.invoke_verb(usr, /datum/user_verb/logging_view, M, TRUE)
|
||||
|
||||
//Player Notes
|
||||
else if(href_list["addnote"])
|
||||
@@ -1404,29 +1404,13 @@
|
||||
M.client.prefs.active_character.save(M.client)
|
||||
|
||||
else if(href_list["asays"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
usr.client.view_asays()
|
||||
|
||||
SSuser_verbs.invoke_verb(usr, /datum/user_verb/view_asays)
|
||||
else if(href_list["msays"])
|
||||
if(!check_rights(R_ADMIN | R_MENTOR))
|
||||
return
|
||||
|
||||
usr.client.view_msays()
|
||||
|
||||
SSuser_verbs.invoke_verb(usr, /datum/user_verb/view_msays)
|
||||
else if(href_list["devsays"])
|
||||
if(!check_rights(R_ADMIN | R_DEV_TEAM))
|
||||
return
|
||||
|
||||
usr.client.view_devsays()
|
||||
|
||||
SSuser_verbs.invoke_verb(usr, /datum/user_verb/view_devsays)
|
||||
else if(href_list["staffsays"])
|
||||
if(!check_rights(R_ADMIN | R_DEV_TEAM))
|
||||
return
|
||||
|
||||
usr.client.view_staffsays()
|
||||
|
||||
SSuser_verbs.invoke_verb(usr, /datum/user_verb/view_staffsays)
|
||||
else if(href_list["tdome1"])
|
||||
if(!check_rights(R_SERVER|R_EVENT)) return
|
||||
|
||||
@@ -1676,8 +1660,7 @@
|
||||
ai_character.moveToAILandmark()
|
||||
|
||||
else if(href_list["makealien"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
// TODO: move these checks into the user verb proper probably
|
||||
var/mob/living/carbon/human/H = locateUID(href_list["makealien"])
|
||||
if(!istype(H))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob/living/carbon/human</span>")
|
||||
@@ -1685,11 +1668,10 @@
|
||||
if(alert(usr, "Confirm make alien?", null, "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
usr.client.cmd_admin_alienize(H)
|
||||
SSuser_verbs.invoke_verb(usr.client, /datum/user_verb/admin_alienize, H)
|
||||
|
||||
else if(href_list["makeslime"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
// TODO: move these checks into the user verb proper probably
|
||||
var/mob/living/carbon/human/H = locateUID(href_list["makeslime"])
|
||||
if(!istype(H))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob/living/carbon/human</span>")
|
||||
@@ -1697,11 +1679,10 @@
|
||||
if(alert(usr, "Confirm make slime?", null, "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
usr.client.cmd_admin_slimeize(H)
|
||||
SSuser_verbs.invoke_verb(usr.client, /datum/user_verb/admin_slimezie, H)
|
||||
|
||||
else if(href_list["makesuper"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
// TODO: move these checks into the user verb proper probably
|
||||
var/mob/living/carbon/human/H = locateUID(href_list["makesuper"])
|
||||
if(!istype(H))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob/living/carbon/human</span>")
|
||||
@@ -1710,11 +1691,10 @@
|
||||
if(alert(usr, "Confirm make superhero?", null, "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
usr.client.cmd_admin_super(H)
|
||||
SSuser_verbs.invoke_verb(usr.client, /datum/user_verb/admin_super, H)
|
||||
|
||||
else if(href_list["makerobot"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
// TODO: move these checks into the user verb proper probably
|
||||
var/mob/living/carbon/human/H = locateUID(href_list["makerobot"])
|
||||
if(!istype(H))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob/living/carbon/human</span>")
|
||||
@@ -1722,12 +1702,10 @@
|
||||
if(alert(usr, "Confirm make robot?", null, "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
usr.client.cmd_admin_robotize(H)
|
||||
SSuser_verbs.invoke_verb(usr.client, /datum/user_verb/admin_robotize, H)
|
||||
|
||||
else if(href_list["makeanimal"])
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
|
||||
// TODO: move these checks into the user verb proper probably
|
||||
var/mob/M = locateUID(href_list["makeanimal"])
|
||||
if(isnewplayer(M))
|
||||
to_chat(usr, "<span class='warning'>This cannot be used on instances of type /mob/new_player</span>")
|
||||
@@ -1735,7 +1713,7 @@
|
||||
if(tgui_alert(usr, "Confirm make animal?", "Confirm Choice", list("Yes", "No")) != "Yes")
|
||||
return
|
||||
|
||||
usr.client.cmd_admin_animalize(M)
|
||||
SSuser_verbs.invoke_verb(usr.client, /datum/user_verb/admin_animalize, M)
|
||||
|
||||
else if(href_list["incarn_ghost"])
|
||||
if(!check_rights(R_SPAWN))
|
||||
@@ -1780,7 +1758,7 @@
|
||||
var/block=text2num(href_list["block"])
|
||||
//testing("togmutate([href_list["block"]] -> [block])")
|
||||
usr.client.cmd_admin_toggle_block(H,block)
|
||||
show_player_panel(H)
|
||||
SSuser_verbs.invoke_verb(usr, /datum/user_verb/show_player_panel, H)
|
||||
//H.regenerate_icons()
|
||||
|
||||
else if(href_list["adminobserve"])
|
||||
@@ -1792,7 +1770,7 @@
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
C.admin_observe_target(M)
|
||||
SSuser_verbs.invoke_verb(C, /datum/user_verb/admin_observe_target, M)
|
||||
|
||||
else if(href_list["adminplayeropts"])
|
||||
var/mob/M = locateUID(href_list["adminplayeropts"])
|
||||
@@ -1801,7 +1779,7 @@
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
|
||||
show_player_panel(M)
|
||||
SSuser_verbs.invoke_verb(usr, /datum/user_verb/show_player_panel, M)
|
||||
|
||||
else if(href_list["adminplayerobservefollow"])
|
||||
if(isnewplayer(usr))
|
||||
@@ -1813,7 +1791,7 @@
|
||||
if(!check_rights(R_ADMIN|R_MOD, show_msg=FALSE)) // Need to be mod or admin to aghost
|
||||
to_chat(usr, "<span class='warning'>You must be an observer to follow someone!</span>")
|
||||
return
|
||||
C.admin_ghost()
|
||||
SSuser_verbs.invoke_verb(C, /datum/user_verb/admin_ghost)
|
||||
|
||||
var/mob/target = locateUID(href_list["adminplayerobservefollow"])
|
||||
if(!ismob(target))
|
||||
@@ -1886,7 +1864,7 @@
|
||||
if("remove_member")
|
||||
team.admin_remove_member(usr, member)
|
||||
if("view_member")
|
||||
show_player_panel(member.current)
|
||||
SSuser_verbs.invoke_verb(usr, /datum/user_verb/show_player_panel, member.current)
|
||||
if("add_objective")
|
||||
team.admin_add_objective(usr)
|
||||
if("announce_objectives")
|
||||
@@ -1936,7 +1914,7 @@
|
||||
if(!isobserver(usr))
|
||||
if(!check_rights(R_ADMIN)) // Need to be admin to aghost
|
||||
return
|
||||
C.admin_ghost()
|
||||
SSuser_verbs.invoke_verb(C, /datum/user_verb/admin_ghost)
|
||||
|
||||
var/x = text2num(href_list["X"])
|
||||
var/y = text2num(href_list["Y"])
|
||||
@@ -2549,7 +2527,7 @@
|
||||
to_chat(owner, "<span class='notice'>You sent [reason] to [H] via a secure channel.</span>")
|
||||
to_chat(H, "<span class='specialnotice bold'>Incoming priority transmission from Central Command. Message as follows,</span><span class='specialnotice'> Your ERT request has been denied for the following reasons: [reason].</span>")
|
||||
else
|
||||
owner.response_team()
|
||||
SSuser_verbs.invoke_verb(owner, /datum/user_verb/dispatch_ert)
|
||||
|
||||
|
||||
else if(href_list["AdminFaxView"])
|
||||
@@ -2778,14 +2756,12 @@
|
||||
usr.client.jumptomob(M)
|
||||
|
||||
else if(href_list["getmob"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes") return
|
||||
var/mob/M = locateUID(href_list["getmob"])
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
usr.client.Getmob(M)
|
||||
SSuser_verbs.invoke_verb(usr, /datum/user_verb/teleport_mob, M)
|
||||
|
||||
else if(href_list["sendmob"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
@@ -2794,30 +2770,23 @@
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
usr.client.sendmob(M)
|
||||
SSuser_verbs.invoke_verb(usr, /datum/user_verb/send_mob, M)
|
||||
|
||||
else if(href_list["narrateto"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
var/mob/M = locateUID(href_list["narrateto"])
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
usr.client.cmd_admin_direct_narrate(M)
|
||||
SSuser_verbs.invoke_verb(usr, /datum/user_verb/direct_narrate, M)
|
||||
|
||||
else if(href_list["subtlemessage"])
|
||||
if(!check_rights(R_EVENT))
|
||||
return
|
||||
|
||||
var/mob/M = locateUID(href_list["subtlemessage"])
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
usr.client.cmd_admin_subtle_message(M)
|
||||
SSuser_verbs.invoke_verb(usr, /datum/user_verb/subtle_message, M)
|
||||
|
||||
else if(href_list["traitor"])
|
||||
if(!check_rights(R_ADMIN|R_MOD)) return
|
||||
|
||||
if(SSticker.current_state < GAME_STATE_PLAYING)
|
||||
alert("The game hasn't started yet!")
|
||||
return
|
||||
@@ -2826,7 +2795,8 @@
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
show_traitor_panel(M)
|
||||
|
||||
SSuser_verbs.invoke_verb(usr, /datum/user_verb/show_traitor_panel, M)
|
||||
|
||||
else if(href_list["create_object"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
@@ -3492,7 +3462,7 @@
|
||||
switch(href_list["secretsmenu"])
|
||||
if("tab")
|
||||
current_tab = text2num(href_list["tab"])
|
||||
Secrets(usr)
|
||||
SSuser_verbs.invoke_verb(usr, /datum/user_verb/secrets_panel)
|
||||
return 1
|
||||
|
||||
else if(href_list["viewruntime"])
|
||||
@@ -3627,7 +3597,7 @@
|
||||
return
|
||||
|
||||
var/mob/about_to_be_banned = locateUID(href_list["adminalert"])
|
||||
usr.client.cmd_admin_alert_message(about_to_be_banned)
|
||||
SSuser_verbs.invoke_verb(usr, /datum/user_verb/send_alert_message, about_to_be_banned)
|
||||
|
||||
else if(href_list["clientmodcheck"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
@@ -3724,7 +3694,7 @@
|
||||
return
|
||||
|
||||
qdel(dbq2)
|
||||
owner.json_spawn_menu() // Refresh their menu
|
||||
SSuser_verbs.invoke_verb(owner, /datum/user_verb/spawn_json)
|
||||
to_chat(usr, "Slot <code>[slot_name]</code> deleted.")
|
||||
|
||||
|
||||
|
||||
@@ -15,20 +15,18 @@
|
||||
|
||||
*/
|
||||
|
||||
/client/proc/SDQL2_query()
|
||||
set category = "Debug"
|
||||
|
||||
if(!check_rights(R_PROCCALL)) //Shouldn't happen... but just to be safe.
|
||||
message_admins("<span class='danger'>ERROR: Non-admin [key_name_admin(usr)] attempted to execute a SDQL query!</span>")
|
||||
log_admin("Non-admin [key_name(usr)] attempted to execute a SDQL query!")
|
||||
USER_VERB(execute_sdql2_query, R_PROCCALL, "SDQL2 Query", "Run an SDQL query", VERB_CATEGORY_DEBUG)
|
||||
if(!check_rights_client(R_PROCCALL, FALSE, client)) //Shouldn't happen... but just to be safe.
|
||||
message_admins("<span class='danger'>ERROR: Non-admin [key_name_admin(client)] attempted to execute a SDQL query!</span>")
|
||||
log_admin("Non-admin [key_name(client)] attempted to execute a SDQL query!")
|
||||
return
|
||||
|
||||
var/query_text = input("SDQL2 query") as message
|
||||
var/query_text = input(client, "SDQL2 query") as message
|
||||
|
||||
if(!query_text || length(query_text) < 1)
|
||||
return
|
||||
|
||||
run_sdql2_query(query_text)
|
||||
client.run_sdql2_query(query_text)
|
||||
|
||||
/client/proc/run_sdql2_query(query_text)
|
||||
if(!check_rights(R_PROCCALL)) //Shouldn't happen... but just to be safe.
|
||||
|
||||
@@ -1,19 +1,13 @@
|
||||
/client/proc/load_sdql2_query()
|
||||
set category = "Debug"
|
||||
set name = "Load SDQL2 Query"
|
||||
|
||||
if(!check_rights(R_PROCCALL))
|
||||
return
|
||||
|
||||
USER_VERB(load_sdql2_query, R_PROCCALL, "Load SDQL2 Query", "Load SDQL2 Query from data directory.", VERB_CATEGORY_DEBUG)
|
||||
var/list/choices = flist("data/sdql/")
|
||||
var/choice = input(src, "Choose an SDQL script to run:", "Load SDQL Query", null) as null|anything in choices
|
||||
var/choice = input(client, "Choose an SDQL script to run:", "Load SDQL Query", null) as null|anything in choices
|
||||
if(isnull(choice))
|
||||
return
|
||||
|
||||
var/script_text = return_file_text("data/sdql/[choice]")
|
||||
script_text = input(usr, "SDQL2 query", "", script_text) as message
|
||||
script_text = input(client, "SDQL2 query", "", script_text) as message
|
||||
|
||||
if(!script_text || length(script_text) < 1)
|
||||
return
|
||||
|
||||
run_sdql2_query(script_text)
|
||||
client.run_sdql2_query(script_text)
|
||||
|
||||
@@ -1,15 +1,8 @@
|
||||
/client/proc/open_admin_zlevel_manager()
|
||||
set name = "Z-Level Manager"
|
||||
set desc = "Opens the Z-Level Manager UI"
|
||||
set category = "Admin"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
USER_VERB(open_zlevel_manager, R_ADMIN, "Z-Level Manager", "Opens the Z-Level Manager.", VERB_CATEGORY_ADMIN)
|
||||
if(!SSmapping || !SSmapping.initialized)
|
||||
to_chat(usr, "<span class='notice'>SSmapping has not initialized yet, Z-Level Manager is not available yet.</span>")
|
||||
to_chat(client, "<span class='notice'>SSmapping has not initialized yet, Z-Level Manager is not available yet.</span>")
|
||||
return
|
||||
|
||||
message_admins("[key_name_admin(usr)] is using the Z-Level Manager")
|
||||
message_admins("[key_name_admin(client)] is using the Z-Level Manager")
|
||||
var/datum/ui_module/admin/z_level_manager/ZLM = get_admin_ui_module(/datum/ui_module/admin/z_level_manager)
|
||||
ZLM.ui_interact(usr)
|
||||
ZLM.ui_interact(client.mob)
|
||||
|
||||
@@ -1,42 +1,35 @@
|
||||
/client/proc/jump_to()
|
||||
set name = "Jump to..."
|
||||
set desc = "Area, Mob, Key or Coordinate"
|
||||
set category = "Admin"
|
||||
USER_VERB(jump_to, R_ADMIN, "Jump to...", "Area, Mob, Key or Coordinate", VERB_CATEGORY_ADMIN)
|
||||
var/list/choices = list("Area", "Mob", "Key", "Coordinates")
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/chosen = input(src, null, "Jump to...") as null|anything in choices
|
||||
var/chosen = input(client, null, "Jump to...") as null|anything in choices
|
||||
if(!chosen)
|
||||
return
|
||||
|
||||
var/jumping // Thing to jump to
|
||||
switch(chosen)
|
||||
if("Area")
|
||||
jumping = input(src, "Area to jump to", "Jump to Area") as null|anything in return_sorted_areas()
|
||||
jumping = input(client, "Area to jump to", "Jump to Area") as null|anything in return_sorted_areas()
|
||||
if(jumping)
|
||||
return jumptoarea(jumping)
|
||||
return client.jumptoarea(jumping)
|
||||
if("Mob")
|
||||
jumping = input(src, "Mob to jump to", "Jump to Mob") as null|anything in GLOB.mob_list
|
||||
jumping = input(client, "Mob to jump to", "Jump to Mob") as null|anything in GLOB.mob_list
|
||||
if(jumping)
|
||||
return jumptomob(jumping)
|
||||
return client.jumptomob(jumping)
|
||||
if("Key")
|
||||
jumping = input(src, "Key to jump to", "Jump to Key") as null|anything in sortKey(GLOB.clients)
|
||||
jumping = input(client, "Key to jump to", "Jump to Key") as null|anything in sortKey(GLOB.clients)
|
||||
if(jumping)
|
||||
return jumptokey(jumping)
|
||||
return client.jumptokey(jumping)
|
||||
if("Coordinates")
|
||||
var/x = input(src, "X Coordinate", "Jump to Coordinates") as null|num
|
||||
var/x = input(client, "X Coordinate", "Jump to Coordinates") as null|num
|
||||
if(!x)
|
||||
return
|
||||
var/y = input(src, "Y Coordinate", "Jump to Coordinates") as null|num
|
||||
var/y = input(client, "Y Coordinate", "Jump to Coordinates") as null|num
|
||||
if(!y)
|
||||
return
|
||||
var/z = input(src, "Z Coordinate", "Jump to Coordinates") as null|num
|
||||
var/z = input(client, "Z Coordinate", "Jump to Coordinates") as null|num
|
||||
if(!z)
|
||||
return
|
||||
return jumptocoord(x, y, z)
|
||||
|
||||
return client.jumptocoord(x, y, z)
|
||||
|
||||
/client/proc/jumptoarea(area/A)
|
||||
if(!A || !check_rights(R_ADMIN))
|
||||
@@ -65,21 +58,15 @@
|
||||
message_admins("[key_name_admin(usr)] jumped to [A]")
|
||||
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 = "\[Admin\] Jump to Turf"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(isobj(usr.loc))
|
||||
var/obj/O = usr.loc
|
||||
O.force_eject_occupant(usr)
|
||||
log_admin("[key_name(usr)] jumped to [T.x], [T.y], [T.z] in [T.loc]")
|
||||
if(!isobserver(usr))
|
||||
message_admins("[key_name_admin(usr)] jumped to [T.x], [T.y], [T.z] in [T.loc]", 1)
|
||||
admin_forcemove(usr, T)
|
||||
USER_CONTEXT_MENU(jump_to_turf, R_ADMIN, "\[Admin\] Jump to Turf", turf/T in world)
|
||||
if(isobj(client.mob.loc))
|
||||
var/obj/O = client.mob.loc
|
||||
O.force_eject_occupant(client.mob)
|
||||
log_admin("[key_name(client)] jumped to [T.x], [T.y], [T.z] in [T.loc]")
|
||||
if(!isobserver(client.mob))
|
||||
message_admins("[key_name_admin(client.mob)] jumped to [T.x], [T.y], [T.z] in [T.loc]", 1)
|
||||
admin_forcemove(client.mob, T)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Jump To Turf") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
/client/proc/jumptomob(mob/M)
|
||||
set name = "Jump to Mob"
|
||||
@@ -129,60 +116,43 @@
|
||||
var/obj/O = usr.loc
|
||||
O.force_eject_occupant(usr)
|
||||
admin_forcemove(usr, M.loc)
|
||||
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Jump To Key") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/Getmob(mob/M in GLOB.mob_list)
|
||||
set name = "\[Admin\] Get Mob"
|
||||
set desc = "Mob to teleport"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
USER_VERB_AND_CONTEXT_MENU(teleport_mob, R_ADMIN, "Teleport Mob", "Teleport a mob to your location.", VERB_CATEGORY_ADMIN, mob/M in GLOB.mob_list)
|
||||
if(!istype(M))
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] teleported [key_name(M)]")
|
||||
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)]", 1)
|
||||
|
||||
if(isobj(M.loc))
|
||||
var/obj/O = M.loc
|
||||
O.force_eject_occupant(M)
|
||||
admin_forcemove(M, get_turf(usr))
|
||||
admin_forcemove(M, get_turf(client.mob))
|
||||
log_admin("[key_name(client)] teleported [key_name(M)]")
|
||||
message_admins("[key_name_admin(client)] teleported [key_name_admin(M)]", 1)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Get Mob") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/Getkey()
|
||||
set name = "\[Admin\] Get Key"
|
||||
set desc = "Key to teleport"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
USER_VERB_AND_CONTEXT_MENU(teleport_ckey, R_ADMIN, "Teleport Client", "Teleport a mob to your location by client.", VERB_CATEGORY_ADMIN)
|
||||
var/list/keys = list()
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
keys += M.client
|
||||
var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys)
|
||||
var/selection = input(client, "Please, select a player!", "Admin Jumping", null) as null|anything in sortKey(keys)
|
||||
if(!selection)
|
||||
return
|
||||
var/mob/M = selection:mob
|
||||
|
||||
if(!M)
|
||||
return
|
||||
log_admin("[key_name(usr)] teleported [key_name(M)]")
|
||||
message_admins("[key_name_admin(usr)] teleported [key_name(M)]", 1)
|
||||
log_admin("[key_name(client.mob)] teleported [key_name(M)]")
|
||||
message_admins("[key_name_admin(client.mob)] teleported [key_name(M)]", 1)
|
||||
if(M)
|
||||
if(isobj(M.loc))
|
||||
var/obj/O = M.loc
|
||||
O.force_eject_occupant(M)
|
||||
admin_forcemove(M, get_turf(usr))
|
||||
admin_forcemove(usr, M.loc)
|
||||
admin_forcemove(M, get_turf(client.mob))
|
||||
admin_forcemove(client.mob, M.loc)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Get Key") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/sendmob(mob/M in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Send Mob"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/area/A = input(usr, "Pick an area.", "Pick an area") as null|anything in return_sorted_areas()
|
||||
USER_VERB(send_mob, R_ADMIN, "Send Mob", "Send mob to an area.", VERB_CATEGORY_ADMIN, mob/M in GLOB.mob_list)
|
||||
var/area/A = input(client, "Pick an area.", "Pick an area") as null|anything in return_sorted_areas()
|
||||
if(!A)
|
||||
return
|
||||
|
||||
@@ -190,9 +160,9 @@
|
||||
var/obj/O = M.loc
|
||||
O.force_eject_occupant(M)
|
||||
admin_forcemove(M, pick(get_area_turfs(A)))
|
||||
log_admin("[key_name(client)] teleported [key_name(M)] to [A]")
|
||||
message_admins("[key_name_admin(client)] teleported [key_name_admin(M)] to [A]", 1)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Send Mob") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(usr)] teleported [key_name(M)] to [A]")
|
||||
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)] to [A]", 1)
|
||||
|
||||
/proc/admin_forcemove(mob/mover, atom/newloc)
|
||||
mover.forceMove(newloc)
|
||||
|
||||
@@ -1,20 +1,13 @@
|
||||
//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 name = "\[Admin\] Admin PM Mob"
|
||||
if(!check_rights(R_ADMIN|R_MENTOR))
|
||||
return
|
||||
/// Allows right clicking mobs to send an admin PM to their client.
|
||||
/// Forwards the selected mob's client to cmd_admin_pm.
|
||||
USER_CONTEXT_MENU(admin_pm_target, R_ADMIN|R_MENTOR, "\[Admin\] Admin PM Mob", mob/M as mob)
|
||||
if(!ismob(M) || !M.client)
|
||||
return
|
||||
cmd_admin_pm(M.client,null)
|
||||
client.cmd_admin_pm(M.client, null)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Admin PM Mob") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
//shows a list of clients we could send PMs to, then forwards our choice to cmd_admin_pm
|
||||
/client/proc/cmd_admin_pm_panel()
|
||||
set category = "Admin"
|
||||
set name = "Admin PM Name"
|
||||
if(!check_rights(R_ADMIN|R_MENTOR))
|
||||
return
|
||||
/// Shows a list of clients we could send PMs to, then forwards our choice to cmd_admin_pm.
|
||||
USER_VERB(admin_pm_panel, R_ADMIN|R_MENTOR, "Admin PM Name", "Send a PM by player name.", VERB_CATEGORY_ADMIN)
|
||||
var/list/client/targets[0]
|
||||
for(var/client/T)
|
||||
if(T.mob)
|
||||
@@ -27,21 +20,17 @@
|
||||
else
|
||||
targets["(No Mob) - [T]"] = T
|
||||
var/list/sorted = sortList(targets)
|
||||
var/target = input(src,"To whom shall we send a message?","Admin PM",null) as null|anything in sorted
|
||||
var/target = input(client, "To whom shall we send a message?", "Admin PM", null) as null|anything in sorted
|
||||
if(!target)
|
||||
return
|
||||
cmd_admin_pm(targets[target],null)
|
||||
client.cmd_admin_pm(targets[target], null)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Admin PM Name") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
//shows a list of clients we could send PMs to, then forwards our choice to cmd_admin_pm
|
||||
/client/proc/cmd_admin_pm_by_key_panel()
|
||||
set category = "Admin"
|
||||
set name = "Admin PM Key"
|
||||
if(!check_rights(R_ADMIN|R_MENTOR))
|
||||
return
|
||||
/// Shows a list of clients we could send PMs to, then forwards our choice to cmd_admin_pm.
|
||||
USER_VERB(admin_pm_by_key_panel, R_ADMIN|R_MENTOR, "Admin PM Key", "Send a PM by key.", VERB_CATEGORY_ADMIN)
|
||||
var/list/client/targets[0]
|
||||
for(var/client/T)
|
||||
if(T?.holder?.big_brother && !check_rights(R_PERMISSIONS, FALSE)) // normal admins can't see BB
|
||||
if(T?.holder?.big_brother && !check_rights_client(R_PERMISSIONS, FALSE, client)) // normal admins can't see BB
|
||||
continue
|
||||
if(T.mob)
|
||||
if(isnewplayer(T.mob))
|
||||
@@ -53,13 +42,12 @@
|
||||
else
|
||||
targets["(No Mob) - [T]"] = T
|
||||
var/list/sorted = sortList(targets)
|
||||
var/target = input(src,"To whom shall we send a message?","Admin PM",null) as null|anything in sorted
|
||||
var/target = input(client, "To whom shall we send a message?", "Admin PM", null) as null|anything in sorted
|
||||
if(!target)
|
||||
return
|
||||
cmd_admin_pm(targets[target],null)
|
||||
client.cmd_admin_pm(targets[target], null)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Admin PM Key") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
//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", ticket_id = -1)
|
||||
@@ -440,11 +428,9 @@
|
||||
return
|
||||
|
||||
if(href_list["adminalert"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/mob/about_to_be_banned = locateUID(href_list["adminalert"])
|
||||
usr.client.cmd_admin_alert_message(about_to_be_banned)
|
||||
if(istype(about_to_be_banned))
|
||||
SSuser_verbs.invoke_verb(usr, /datum/user_verb/send_alert_message, about_to_be_banned)
|
||||
|
||||
if(href_list["ping"])
|
||||
var/client/C = pms[href_list["ping"]].client
|
||||
|
||||
@@ -1,26 +1,28 @@
|
||||
/client/proc/cmd_admin_say(msg as text)
|
||||
set name = "Asay" //Gave this shit a shorter name so you only have to time out "asay" rather than "admin say" to use it --NeoFite
|
||||
set hidden = 1
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
#define SAY_ENABLED TRUE
|
||||
#define SAY_DISABLED FALSE
|
||||
|
||||
GLOBAL_LIST_INIT(say_status, list(
|
||||
"msay" = SAY_ENABLED,
|
||||
))
|
||||
|
||||
USER_VERB(admin_say, R_ADMIN, "Asay", "Asay", VERB_CATEGORY_HIDDEN, msg as text)
|
||||
msg = emoji_parse(copytext_char(sanitize(msg), 1, MAX_MESSAGE_LEN))
|
||||
if(!msg)
|
||||
return
|
||||
|
||||
var/datum/say/asay = new(usr.ckey, usr.client.holder.rank, msg, world.timeofday)
|
||||
var/datum/say/asay = new(client.ckey, client.holder.rank, msg, world.timeofday)
|
||||
GLOB.asays += asay
|
||||
log_adminsay(msg, src)
|
||||
log_adminsay(msg, client.mob)
|
||||
|
||||
// Do this up here before it gets sent to everyone & emoji'd
|
||||
if(SSredis.connected)
|
||||
var/list/data = list()
|
||||
data["author"] = usr.ckey
|
||||
data["author"] = client.ckey
|
||||
data["source"] = GLOB.configuration.system.instance_id
|
||||
data["message"] = html_decode(msg)
|
||||
SSredis.publish("byond.asay", json_encode(data))
|
||||
|
||||
var/display_color = get_staffsay_color()
|
||||
var/display_color = client.get_staffsay_color()
|
||||
for(var/client/C in GLOB.admins)
|
||||
var/temp_message = msg
|
||||
if(R_ADMIN & C.holder.rights)
|
||||
@@ -31,53 +33,44 @@
|
||||
temp_message = replacetext(temp_message, "@[C.key]", "<font color='red'>@[C.key]</font>") // Same applies here. key and ckey.
|
||||
|
||||
temp_message = "<span class='emoji_enabled'>[temp_message]</span>"
|
||||
to_chat(C, "<span class='admin_channel'>ADMIN: <font color='[display_color]'>[key_name(usr, 1)]</font> ([admin_jump_link(mob)]): <span class='message'>[temp_message]</span></span>", MESSAGE_TYPE_ADMINCHAT, confidential = TRUE)
|
||||
to_chat(C, "<span class='admin_channel'>ADMIN: <font color='[display_color]'>[key_name(client, 1)]</font> ([admin_jump_link(client.mob)]): <span class='message'>[temp_message]</span></span>", MESSAGE_TYPE_ADMINCHAT, confidential = TRUE)
|
||||
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Asay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_dev_say(msg as text)
|
||||
set name = "Devsay"
|
||||
set hidden = TRUE
|
||||
|
||||
if(!check_rights(R_ADMIN|R_DEV_TEAM)) // Catch any non-admins trying to use this proc
|
||||
return
|
||||
|
||||
USER_VERB(dev_say, R_ADMIN|R_DEV_TEAM, "Devsay", "Devsay", VERB_CATEGORY_HIDDEN, msg as text)
|
||||
msg = emoji_parse(copytext_char(sanitize(msg), 1, MAX_MESSAGE_LEN))
|
||||
|
||||
if(!msg)
|
||||
return
|
||||
|
||||
log_devsay(msg, src)
|
||||
var/datum/say/devsay = new(usr.ckey, usr.client.holder.rank, msg, world.timeofday)
|
||||
log_devsay(msg, client.mob)
|
||||
var/datum/say/devsay = new(client.ckey, client.holder.rank, msg, world.timeofday)
|
||||
GLOB.devsays += devsay
|
||||
mob.create_log(OOC_LOG, "DEVSAY: [msg]")
|
||||
client.mob.create_log(OOC_LOG, "DEVSAY: [msg]")
|
||||
|
||||
if(SSredis.connected)
|
||||
var/list/data = list()
|
||||
data["author"] = usr.ckey
|
||||
data["author"] = client.ckey
|
||||
data["source"] = GLOB.configuration.system.instance_id
|
||||
data["message"] = html_decode(msg)
|
||||
SSredis.publish("byond.devsay", json_encode(data))
|
||||
|
||||
var/display_color = get_staffsay_color()
|
||||
var/display_color = client.get_staffsay_color()
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(check_rights(R_ADMIN|R_MOD|R_DEV_TEAM, 0, C.mob))
|
||||
var/display_name = key
|
||||
if(holder.fakekey)
|
||||
var/display_name = client.key
|
||||
if(client.holder.fakekey)
|
||||
if(C.holder && C.holder.rights & R_ADMIN)
|
||||
display_name = "[holder.fakekey]/([key])"
|
||||
display_name = "[client.holder.fakekey]/([client.key])"
|
||||
else
|
||||
display_name = holder.fakekey
|
||||
display_name = client.holder.fakekey
|
||||
msg = "<span class='emoji_enabled'>[msg]</span>"
|
||||
to_chat(C, "<span class='[check_rights(R_ADMIN, 0) ? "dev_channel_admin" : "dev_channel"]'>DEV: <font color='[display_color]'>[display_name]</font> ([admin_jump_link(mob)]): <span class='message'>[msg]</span></span>", MESSAGE_TYPE_DEVCHAT, confidential = TRUE)
|
||||
to_chat(C, "<span class='[check_rights(R_ADMIN, 0) ? "dev_channel_admin" : "dev_channel"]'>DEV: <font color='[display_color]'>[display_name]</font> ([admin_jump_link(client.mob)]): <span class='message'>[msg]</span></span>", MESSAGE_TYPE_DEVCHAT, confidential = TRUE)
|
||||
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Devsay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_staff_say(msg as text)
|
||||
set name = "Staffsay"
|
||||
set hidden = TRUE
|
||||
|
||||
if(!check_rights(R_DEV_TEAM|R_ADMIN|R_MENTOR))
|
||||
USER_VERB(staff_say, R_ADMIN|R_MENTOR|R_DEV_TEAM, "Staffsay", "Staffsay", VERB_CATEGORY_HIDDEN, msg as text)
|
||||
if(!check_rights())
|
||||
return
|
||||
|
||||
msg = emoji_parse(copytext_char(sanitize(msg), 1, MAX_MESSAGE_LEN))
|
||||
@@ -85,54 +78,42 @@
|
||||
if(!msg)
|
||||
return
|
||||
|
||||
log_staffsay(msg, src)
|
||||
var/datum/say/staffsay = new(usr.ckey, usr.client.holder.rank, msg, world.timeofday)
|
||||
log_staffsay(msg, client.mob)
|
||||
var/datum/say/staffsay = new(client.ckey, client.holder.rank, msg, world.timeofday)
|
||||
GLOB.staffsays += staffsay
|
||||
mob.create_log(OOC_LOG, "STAFFSAY: [msg]")
|
||||
client.mob.create_log(OOC_LOG, "STAFFSAY: [msg]")
|
||||
|
||||
if(SSredis.connected)
|
||||
var/list/data = list()
|
||||
data["author"] = usr.ckey
|
||||
data["author"] = client.ckey
|
||||
data["source"] = GLOB.configuration.system.instance_id
|
||||
data["message"] = html_decode(msg)
|
||||
SSredis.publish("byond.staffsay", json_encode(data))
|
||||
|
||||
var/display_color = get_staffsay_color()
|
||||
var/display_color = client.get_staffsay_color()
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(check_rights(0, 0, C.mob))
|
||||
var/display_name = key
|
||||
if(holder.fakekey)
|
||||
var/display_name = client.key
|
||||
if(client.holder.fakekey)
|
||||
if(C.holder && C.holder.rights & R_ADMIN)
|
||||
display_name = "[holder.fakekey]/([key])"
|
||||
display_name = "[client.holder.fakekey]/([client.key])"
|
||||
else
|
||||
display_name = holder.fakekey
|
||||
display_name = client.holder.fakekey
|
||||
msg = "<span class='emoji_enabled'>[msg]</span>"
|
||||
to_chat(C, "<span class='[check_rights(R_ADMIN, 0) ? "staff_channel_admin" : "staff_channel"]'>STAFF: <font color='[display_color]'>[display_name]</font> ([admin_jump_link(mob)]): <span class='message'>[msg]</span></span>", MESSAGE_TYPE_STAFFCHAT, confidential = TRUE)
|
||||
to_chat(C, "<span class='[check_rights(R_ADMIN, 0) ? "staff_channel_admin" : "staff_channel"]'>STAFF: <font color='[display_color]'>[display_name]</font> ([admin_jump_link(client.mob)]): <span class='message'>[msg]</span></span>", MESSAGE_TYPE_STAFFCHAT, confidential = TRUE)
|
||||
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Staffsay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_mentor_say(msg as text)
|
||||
set name = "Msay"
|
||||
set hidden = 1
|
||||
|
||||
if(check_rights(R_MENTOR, FALSE)) // Mentor detected, check if the verb has been disabled for mentors
|
||||
var/msay_found = FALSE
|
||||
for(var/procs as anything in GLOB.admin_verbs_mentor)
|
||||
if(procs == /client/proc/cmd_mentor_say)
|
||||
msay_found = TRUE
|
||||
break
|
||||
if(!msay_found)
|
||||
to_chat(src, "<b>Mentor chat has been disabled.</b>")
|
||||
return
|
||||
|
||||
else if(!check_rights(R_ADMIN|R_MOD)) // Catch any other non-admins trying to use this proc
|
||||
USER_VERB(mentor_say, R_ADMIN|R_MENTOR|R_MOD, "Msay", "Use mentorsay.", VERB_CATEGORY_HIDDEN, msg as text)
|
||||
if(GLOB.say_status["msay"] != SAY_ENABLED)
|
||||
to_chat(client, "<b>Mentor chat has been disabled.</b>")
|
||||
return
|
||||
|
||||
msg = emoji_parse(copytext_char(sanitize(msg), 1, MAX_MESSAGE_LEN))
|
||||
log_mentorsay(msg, src)
|
||||
var/datum/say/msay = new(usr.ckey, usr.client.holder.rank, msg, world.timeofday)
|
||||
log_mentorsay(msg, client.mob)
|
||||
var/datum/say/msay = new(client.ckey, client.holder.rank, msg, world.timeofday)
|
||||
GLOB.msays += msay
|
||||
mob.create_log(OOC_LOG, "MSAY: [msg]")
|
||||
client.mob.create_log(OOC_LOG, "MSAY: [msg]")
|
||||
|
||||
if(!msg)
|
||||
return
|
||||
@@ -140,42 +121,34 @@
|
||||
// Do this up here before it gets sent to everyone & emoji'd
|
||||
if(SSredis.connected)
|
||||
var/list/data = list()
|
||||
data["author"] = usr.ckey
|
||||
data["author"] = client.ckey
|
||||
data["source"] = GLOB.configuration.system.instance_id
|
||||
data["message"] = html_decode(msg)
|
||||
SSredis.publish("byond.msay", json_encode(data))
|
||||
|
||||
var/display_color = get_staffsay_color()
|
||||
var/display_color = client.get_staffsay_color()
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(check_rights(R_ADMIN|R_MOD|R_MENTOR, 0, C.mob))
|
||||
var/display_name = key
|
||||
if(holder.fakekey)
|
||||
var/display_name = client.key
|
||||
if(client.holder.fakekey)
|
||||
if(C.holder && C.holder.rights & R_ADMIN)
|
||||
display_name = "[holder.fakekey]/([key])"
|
||||
display_name = "[client.holder.fakekey]/([client.key])"
|
||||
else
|
||||
display_name = holder.fakekey
|
||||
display_name = client.holder.fakekey
|
||||
msg = "<span class='emoji_enabled'>[msg]</span>"
|
||||
to_chat(C, "<span class='[check_rights(R_ADMIN, 0) ? "mentor_channel_admin" : "mentor_channel"]'>MENTOR: <font color='[display_color]'>[display_name]</font> ([admin_jump_link(mob)]): <span class='message'>[msg]</span></span>", MESSAGE_TYPE_MENTORCHAT, confidential = TRUE)
|
||||
to_chat(C, "<span class='[check_rights(R_ADMIN, 0) ? "mentor_channel_admin" : "mentor_channel"]'>MENTOR: <font color='[display_color]'>[display_name]</font> ([admin_jump_link(client.mob)]): <span class='message'>[msg]</span></span>", MESSAGE_TYPE_MENTORCHAT, confidential = TRUE)
|
||||
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Msay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/toggle_mentor_chat()
|
||||
set category = "Server"
|
||||
set name = "Toggle Mentor Chat"
|
||||
set desc = "Toggle whether mentors have access to the msay command"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
USER_VERB(toggle_mentor_chat, R_ADMIN, "Toggle Mentor Chat", "Toggle whether mentors have access to the msay command", VERB_CATEGORY_SERVER)
|
||||
var/enabling
|
||||
var/msay = /client/proc/cmd_mentor_say
|
||||
|
||||
if(msay in GLOB.admin_verbs_mentor)
|
||||
if(GLOB.say_status["msay"] == SAY_ENABLED)
|
||||
enabling = FALSE
|
||||
GLOB.admin_verbs_mentor -= msay
|
||||
GLOB.say_status["msay"] = SAY_DISABLED
|
||||
else
|
||||
enabling = TRUE
|
||||
GLOB.admin_verbs_mentor += msay
|
||||
GLOB.say_status["msay"] = SAY_ENABLED
|
||||
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(check_rights(R_ADMIN|R_MOD, 0, C.mob))
|
||||
@@ -183,10 +156,8 @@
|
||||
if(!check_rights(R_MENTOR, 0, C.mob))
|
||||
continue
|
||||
if(enabling)
|
||||
add_verb(C, msay)
|
||||
to_chat(C, "<b>Mentor chat has been enabled.</b> Use 'msay' to speak in it.")
|
||||
else
|
||||
remove_verb(C, msay)
|
||||
to_chat(C, "<b>Mentor chat has been disabled.</b>")
|
||||
|
||||
log_and_message_admins("toggled mentor chat [enabling ? "on" : "off"].")
|
||||
@@ -196,3 +167,6 @@
|
||||
if(!GLOB.configuration.admin.allow_admin_ooc_colour || !check_rights(R_ADMIN, FALSE))
|
||||
return client2rankcolour(src)
|
||||
return prefs.ooccolor
|
||||
|
||||
#undef SAY_ENABLED
|
||||
#undef SAY_DISABLED
|
||||
|
||||
@@ -1,20 +1,13 @@
|
||||
/client/proc/aooc(msg as text)
|
||||
set category = "OOC"
|
||||
set name = "AOOC"
|
||||
set desc = "Antagonist OOC"
|
||||
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
USER_VERB(aooc, R_ADMIN, "AOOC", "Antagonist OOC", VERB_CATEGORY_OOC, msg as text)
|
||||
msg = sanitize(msg)
|
||||
if(!msg) return
|
||||
|
||||
var/display_name = src.key
|
||||
if(holder && holder.fakekey)
|
||||
display_name = holder.fakekey
|
||||
var/display_name = client.key
|
||||
if(client.holder && client.holder.fakekey)
|
||||
display_name = client.holder.fakekey
|
||||
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if((M.mind && M.mind.special_role && M.client) || (M.client && M.client.holder && (M.client.holder.rights & R_ADMIN)))
|
||||
to_chat(M, "<font color='#960018'><span class='ooc'><span class='prefix'>AOOC:</span> <EM>[display_name]:</EM> <span class='message'>[msg]</span></span></font>")
|
||||
|
||||
|
||||
log_aooc(msg, src)
|
||||
log_aooc(msg, client)
|
||||
|
||||
@@ -15,45 +15,17 @@ GLOBAL_LIST_EMPTY(staffsays)
|
||||
src.message = message
|
||||
src.time = time
|
||||
|
||||
/client/proc/view_msays()
|
||||
set name = "Msays"
|
||||
set desc = "View Msays from the current round."
|
||||
set category = "Admin"
|
||||
USER_VERB(view_msays, R_ADMIN|R_MENTOR, "Msays", "View current round Msays.", VERB_CATEGORY_ADMIN)
|
||||
client.display_says(GLOB.msays, "msay")
|
||||
|
||||
if(!check_rights(R_MENTOR | R_ADMIN))
|
||||
return
|
||||
USER_VERB(view_devsays, R_ADMIN|R_DEV_TEAM, "Devsays", "View current round Devsays.", VERB_CATEGORY_ADMIN)
|
||||
client.display_says(GLOB.devsays, "devsay")
|
||||
|
||||
display_says(GLOB.msays, "msay")
|
||||
USER_VERB(view_asays, R_ADMIN, "Asays", "View current round Asays.", VERB_CATEGORY_ADMIN)
|
||||
client.display_says(GLOB.asays, "asay")
|
||||
|
||||
/client/proc/view_devsays()
|
||||
set name = "Devsays"
|
||||
set desc = "View Devsays from the current round."
|
||||
set category = "Admin"
|
||||
|
||||
if(!check_rights(R_DEV_TEAM | R_ADMIN))
|
||||
return
|
||||
|
||||
display_says(GLOB.devsays, "devsay")
|
||||
|
||||
/client/proc/view_asays()
|
||||
set name = "Asays"
|
||||
set desc = "View Asays from the current round."
|
||||
set category = "Admin"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
display_says(GLOB.asays, "asay")
|
||||
|
||||
/client/proc/view_staffsays()
|
||||
set name = "Staffsays"
|
||||
set desc = "View Staffsays from the current round."
|
||||
set category = "Admin"
|
||||
|
||||
if(!check_rights(R_DEV_TEAM | R_ADMIN))
|
||||
return
|
||||
|
||||
display_says(GLOB.staffsays, "staffsay")
|
||||
USER_VERB(view_staffsays, R_ADMIN|R_DEV_TEAM, "Staffsays", "View current round Staffsays.", VERB_CATEGORY_ADMIN)
|
||||
client.display_says(GLOB.staffsays, "staffsay")
|
||||
|
||||
/client/proc/display_says(list/say_list, title)
|
||||
|
||||
|
||||
@@ -1,27 +1,23 @@
|
||||
/client/proc/atmosscan()
|
||||
set category = "Mapping"
|
||||
set name = "Check Piping"
|
||||
if(!src.holder)
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
USER_VERB_VISIBILITY(debug_check_piping, VERB_VISIBILITY_FLAG_MOREDEBUG)
|
||||
USER_VERB(debug_check_piping, R_ADMIN, "Check Piping", "Check Piping", VERB_CATEGORY_MAPPING)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Check Piping") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
if(alert("WARNING: This command should not be run on a live server. Do you want to continue?", "Check Piping", "No", "Yes") == "No")
|
||||
if(alert(client, "WARNING: This command should not be run on a live server. Do you want to continue?", "Check Piping", "No", "Yes") == "No")
|
||||
return
|
||||
|
||||
to_chat(usr, "Checking for disconnected pipes...")
|
||||
to_chat(client, "Checking for disconnected pipes...")
|
||||
|
||||
//Manifolds
|
||||
for(var/obj/machinery/atmospherics/pipe/manifold/pipe in SSair.atmos_machinery)
|
||||
if(!pipe.node1 || !pipe.node2 || !pipe.node3)
|
||||
to_chat(usr, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")
|
||||
to_chat(client, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")
|
||||
|
||||
//Pipes
|
||||
for(var/obj/machinery/atmospherics/pipe/simple/pipe in SSair.atmos_machinery)
|
||||
if(!pipe.node1 || !pipe.node2)
|
||||
to_chat(usr, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")
|
||||
to_chat(client, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")
|
||||
|
||||
to_chat(usr, "Checking for overlapping pipes...")
|
||||
to_chat(client, "Checking for overlapping pipes...")
|
||||
for(var/turf/T in world)
|
||||
for(var/dir in GLOB.cardinal)
|
||||
var/list/check = list(0, 0, 0)
|
||||
@@ -31,28 +27,24 @@
|
||||
for(var/ct in pipe.connect_types)
|
||||
check[ct]++
|
||||
if(check[ct] > 1)
|
||||
to_chat(usr, "Overlapping pipe ([pipe.name]) located at [T.x],[T.y],[T.z] ([get_area(T)])")
|
||||
to_chat(client, "Overlapping pipe ([pipe.name]) located at [T.x],[T.y],[T.z] ([get_area(T)])")
|
||||
done = 1
|
||||
break
|
||||
if(done)
|
||||
break
|
||||
to_chat(usr, "Done")
|
||||
to_chat(client, "Done")
|
||||
|
||||
/client/proc/powerdebug()
|
||||
set category = "Mapping"
|
||||
set name = "Check Power"
|
||||
if(!src.holder)
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
USER_VERB_VISIBILITY(debug_power, VERB_VISIBILITY_FLAG_MOREDEBUG)
|
||||
USER_VERB(debug_power, R_ADMIN, "Check Power", "Check Power", VERB_CATEGORY_MAPPING)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Check Power") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
for(var/datum/regional_powernet/PN in SSmachines.powernets)
|
||||
if(!PN.nodes || !length(PN.nodes))
|
||||
if(PN.cables && (length(PN.cables) > 1))
|
||||
var/obj/structure/cable/C = PN.cables[1]
|
||||
to_chat(usr, "Powernet with no nodes! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]")
|
||||
to_chat(client, "Powernet with no nodes! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]")
|
||||
|
||||
if(!PN.cables || (length(PN.cables) < 10))
|
||||
if(PN.cables && (length(PN.cables) > 1))
|
||||
var/obj/structure/cable/C = PN.cables[1]
|
||||
to_chat(usr, "Powernet with fewer than 10 cables! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]")
|
||||
to_chat(client, "Powernet with fewer than 10 cables! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]")
|
||||
|
||||
@@ -1,14 +1,9 @@
|
||||
/client/proc/debug_bloom()
|
||||
set name = "Bloom Edit"
|
||||
set category = "Debug"
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
USER_VERB(debug_bloom, R_DEBUG, "Bloom Edit", "Open bloom editor panel.", VERB_CATEGORY_DEBUG)
|
||||
var/datum/bloom_edit/editor = new()
|
||||
editor.ui_interact(usr)
|
||||
editor.ui_interact(client.mob)
|
||||
|
||||
message_admins("[key_name(src)] opened Bloom Edit panel.")
|
||||
log_admin("[key_name(src)] opened Bloom Edit panel.")
|
||||
message_admins("[key_name(client)] opened Bloom Edit panel.")
|
||||
log_admin("[key_name(client)] opened Bloom Edit panel.")
|
||||
|
||||
/datum/bloom_edit
|
||||
|
||||
|
||||
@@ -1,20 +1,14 @@
|
||||
/client/proc/cinematic(cinematic as anything in list("explosion", null))
|
||||
set name = "cinematic"
|
||||
set desc = "Shows a cinematic." // Intended for testing but I thought it might be nice for events on the rare occasion Feel free to comment it out if it's not wanted.
|
||||
set hidden = 1
|
||||
USER_VERB(show_cinematic, R_MAINTAINER, "Cinematic", "Shows a cinematic.", VERB_CATEGORY_HIDDEN, cinematic as anything in list("explosion", null))
|
||||
if(SSticker.current_state < GAME_STATE_PREGAME)
|
||||
return
|
||||
|
||||
if(!check_rights(R_MAINTAINER))
|
||||
return
|
||||
|
||||
switch(cinematic)
|
||||
if("explosion")
|
||||
var/parameter = input(src, "station_missed = ?", "Enter Parameter", 0) as num
|
||||
var/parameter = input(client, "station_missed = ?", "Enter Parameter", 0) as num
|
||||
var/override
|
||||
switch(parameter)
|
||||
if(1)
|
||||
override = input(src, "mode = ?","Enter Parameter", null) as anything in list("nuclear emergency", "fake", "no override")
|
||||
override = input(client, "mode = ?","Enter Parameter", null) as anything in list("nuclear emergency", "fake", "no override")
|
||||
if(0)
|
||||
override = input(src, "mode = ?","Enter Parameter", null) as anything in list("blob", "nuclear emergency", "AI malfunction", "no override")
|
||||
override = input(client, "mode = ?","Enter Parameter", null) as anything in list("blob", "nuclear emergency", "AI malfunction", "no override")
|
||||
SSticker.station_explosion_cinematic(parameter, override)
|
||||
|
||||
@@ -1,20 +1,13 @@
|
||||
// verb for admins to set custom event
|
||||
/client/proc/cmd_admin_change_custom_event()
|
||||
set category = "Event"
|
||||
set name = "Change Custom Event"
|
||||
|
||||
if(!check_rights(R_EVENT))
|
||||
return
|
||||
|
||||
var/input = input(usr, "Enter the description of the custom event. Be descriptive. To cancel the event, make this blank or hit cancel.", "Custom Event", GLOB.custom_event_msg) as message|null
|
||||
USER_VERB(change_custom_event, R_EVENT, "Change Custom Event", "Set a custom event.", VERB_CATEGORY_EVENT)
|
||||
var/input = input(client, "Enter the description of the custom event. Be descriptive. To cancel the event, make this blank or hit cancel.", "Custom Event", GLOB.custom_event_msg) as message|null
|
||||
if(!input || input == "")
|
||||
GLOB.custom_event_msg = null
|
||||
log_admin("[key_name(usr)] has cleared the custom event text.")
|
||||
message_admins("[key_name_admin(usr)] has cleared the custom event text.")
|
||||
log_admin("[key_name(client)] has cleared the custom event text.")
|
||||
message_admins("[key_name_admin(client)] has cleared the custom event text.")
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] has changed the custom event text.")
|
||||
message_admins("[key_name_admin(usr)] has changed the custom event text.")
|
||||
log_admin("[key_name(client)] has changed the custom event text.")
|
||||
message_admins("[key_name_admin(client)] has changed the custom event text.")
|
||||
|
||||
GLOB.custom_event_msg = input
|
||||
|
||||
|
||||
@@ -1,23 +1,16 @@
|
||||
/client/proc/dsay(msg as text)
|
||||
set category = "Admin"
|
||||
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(!check_rights(R_ADMIN|R_MOD))
|
||||
USER_VERB(dsay, R_ADMIN|R_MOD, "Dsay", "Deadsay", VERB_CATEGORY_HIDDEN, msg as text)
|
||||
if(!client.mob)
|
||||
return
|
||||
|
||||
if(!src.mob)
|
||||
if(check_mute(client.ckey, MUTE_DEADCHAT))
|
||||
to_chat(client, "<span class='warning'>You cannot send DSAY messages (muted).</span>")
|
||||
return
|
||||
|
||||
if(check_mute(ckey, MUTE_DEADCHAT))
|
||||
to_chat(src, "<span class='warning'>You cannot send DSAY messages (muted).</span>")
|
||||
if(!(client.prefs.toggles & PREFTOGGLE_CHAT_DEAD))
|
||||
to_chat(client, "<span class='warning'>You have deadchat muted.</span>")
|
||||
return
|
||||
|
||||
if(!(prefs.toggles & PREFTOGGLE_CHAT_DEAD))
|
||||
to_chat(src, "<span class='warning'>You have deadchat muted.</span>")
|
||||
return
|
||||
|
||||
if(handle_spam_prevention(msg,MUTE_DEADCHAT))
|
||||
if(client.handle_spam_prevention(msg, MUTE_DEADCHAT))
|
||||
return
|
||||
|
||||
var/stafftype = null
|
||||
@@ -35,20 +28,13 @@
|
||||
stafftype = "ADMIN"
|
||||
|
||||
msg = emoji_parse(sanitize(copytext_char(msg, 1, MAX_MESSAGE_LEN)))
|
||||
log_admin("[key_name(src)] : [msg]")
|
||||
log_admin("[key_name(client)] : [msg]")
|
||||
|
||||
if(!msg)
|
||||
return
|
||||
|
||||
var/prefix = "[stafftype] ([src.key])"
|
||||
if(holder.fakekey)
|
||||
var/prefix = "[stafftype] ([client.key])"
|
||||
if(client.holder.fakekey)
|
||||
prefix = "Administrator"
|
||||
say_dead_direct("<span class='name'>[prefix]</span> says, <span class='message'>\"[msg]\"</span>")
|
||||
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Dsay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/get_dead_say()
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/msg = input(src, null, "dsay \"text\"") as text | null
|
||||
dsay(msg)
|
||||
|
||||
+136
-291
@@ -1,86 +1,71 @@
|
||||
/* 21st Sept 2010
|
||||
Updated by Skie -- Still not perfect but better!
|
||||
Stuff you can't do:
|
||||
Call proc /mob/proc/Dizzy() for some player
|
||||
Because if you select a player mob as owner it tries to do the proc for
|
||||
/mob/living/carbon/human/ instead. And that gives a run-time error.
|
||||
But you can call procs that are of type /mob/living/carbon/human/proc/ for that player.
|
||||
*/
|
||||
|
||||
/client/proc/callproc()
|
||||
set category = "Debug"
|
||||
set name = "Advanced ProcCall"
|
||||
|
||||
if(!check_rights(R_PROCCALL))
|
||||
return
|
||||
|
||||
USER_VERB(advanced_proccall, R_PROCCALL, "Advanced ProcCall", "Advanced ProcCall", VERB_CATEGORY_DEBUG)
|
||||
spawn(0)
|
||||
var/target = null
|
||||
var/targetselected = 0
|
||||
var/returnval = null
|
||||
var/class = null
|
||||
|
||||
switch(alert("Proc owned by something?", null,"Yes","No"))
|
||||
switch(alert(client, "Proc owned by something?", null,"Yes","No"))
|
||||
if("Yes")
|
||||
targetselected = 1
|
||||
if(src.holder && src.holder.marked_datum)
|
||||
class = input("Proc owned by...","Owner",null) as null|anything in list("Obj","Mob","Area or Turf","Client","Marked datum ([holder.marked_datum.type])")
|
||||
if(class == "Marked datum ([holder.marked_datum.type])")
|
||||
if(client.holder && client.holder.marked_datum)
|
||||
class = input(client, "Proc owned by...","Owner",null) as null|anything in list("Obj","Mob","Area or Turf","Client","Marked datum ([client.holder.marked_datum.type])")
|
||||
if(class == "Marked datum ([client.holder.marked_datum.type])")
|
||||
class = "Marked datum"
|
||||
else
|
||||
class = input("Proc owned by...","Owner",null) as null|anything in list("Obj","Mob","Area or Turf","Client")
|
||||
class = input(client, "Proc owned by...","Owner",null) as null|anything in list("Obj","Mob","Area or Turf","Client")
|
||||
switch(class)
|
||||
if("Obj")
|
||||
target = input("Enter target:","Target",usr) as obj in world
|
||||
target = input(client, "Enter target:","Target",usr) as obj in world
|
||||
if("Mob")
|
||||
target = input("Enter target:","Target",usr) as mob in world
|
||||
target = input(client, "Enter target:","Target",usr) as mob in world
|
||||
if("Area or Turf")
|
||||
target = input("Enter target:","Target",usr.loc) as area|turf in world
|
||||
target = input(client, "Enter target:","Target",usr.loc) as area|turf in world
|
||||
if("Client")
|
||||
var/list/keys = list()
|
||||
for(var/client/C)
|
||||
keys += C
|
||||
target = input("Please, select a player!", "Selection", null, null) as null|anything in keys
|
||||
target = input(client, "Please, select a player!", "Selection", null) as null|anything in keys
|
||||
if("Marked datum")
|
||||
target = holder.marked_datum
|
||||
target = client.holder.marked_datum
|
||||
else
|
||||
return
|
||||
if("No")
|
||||
target = null
|
||||
targetselected = 0
|
||||
|
||||
var/procname = clean_input("Proc path, eg: /proc/fake_blood","Path:", null)
|
||||
var/procname = clean_input("Proc path, eg: /proc/fake_blood","Path:", null, user = client)
|
||||
if(!procname) return
|
||||
|
||||
// absolutely not
|
||||
if(findtextEx(trim(lowertext(procname)), "rustg"))
|
||||
message_admins("<span class='userdanger'>[key_name_admin(src)] attempted to proc call rust-g procs. Inform the host <u>at once</u>.</span>")
|
||||
log_admin("[key_name(src)] attempted to proc call rust-g procs. Inform the host at once.")
|
||||
GLOB.discord_manager.send2discord_simple(DISCORD_WEBHOOK_ADMIN, "[key_name(src)] attempted to proc call rustg things. Inform the host at once.")
|
||||
message_admins("<span class='userdanger'>[key_name_admin(client)] attempted to proc call rust-g procs. Inform the host <u>at once</u>.</span>")
|
||||
log_admin("[key_name(client)] attempted to proc call rust-g procs. Inform the host at once.")
|
||||
GLOB.discord_manager.send2discord_simple(DISCORD_WEBHOOK_ADMIN, "[key_name(client)] attempted to proc call rustg things. Inform the host at once.")
|
||||
return
|
||||
|
||||
if(targetselected && !hascall(target,procname))
|
||||
to_chat(usr, "<font color='red'>Error: callproc(): target has no such call [procname].</font>")
|
||||
to_chat(client, "<font color='red'>Error: callproc(): target has no such call [procname].</font>")
|
||||
return
|
||||
|
||||
var/list/lst = get_callproc_args()
|
||||
var/list/lst = client.get_callproc_args()
|
||||
if(!lst)
|
||||
return
|
||||
|
||||
if(targetselected)
|
||||
if(!target)
|
||||
to_chat(usr, "<font color='red'>Error: callproc(): owner of proc no longer exists.</font>")
|
||||
to_chat(client, "<font color='red'>Error: callproc(): owner of proc no longer exists.</font>")
|
||||
return
|
||||
message_admins("[key_name_admin(src)] called [target]'s [procname]() with [length(lst) ? "the arguments [list2params(lst)]":"no arguments"].")
|
||||
log_admin("[key_name(src)] called [target]'s [procname]() with [length(lst) ? "the arguments [list2params(lst)]":"no arguments"].")
|
||||
message_admins("[key_name_admin(client)] called [target]'s [procname]() with [length(lst) ? "the arguments [list2params(lst)]":"no arguments"].")
|
||||
log_admin("[key_name(client)] called [target]'s [procname]() with [length(lst) ? "the arguments [list2params(lst)]":"no arguments"].")
|
||||
returnval = WrapAdminProcCall(target, procname, lst) // Pass the lst as an argument list to the proc
|
||||
else
|
||||
//this currently has no hascall protection. wasn't able to get it working.
|
||||
message_admins("[key_name_admin(src)] called [procname]() with [length(lst) ? "the arguments [list2params(lst)]":"no arguments"]")
|
||||
log_admin("[key_name(src)] called [procname]() with [length(lst) ? "the arguments [list2params(lst)]":"no arguments"]")
|
||||
message_admins("[key_name_admin(client)] called [procname]() with [length(lst) ? "the arguments [list2params(lst)]":"no arguments"]")
|
||||
log_admin("[key_name(client)] called [procname]() with [length(lst) ? "the arguments [list2params(lst)]":"no arguments"]")
|
||||
returnval = WrapAdminProcCall(GLOBAL_PROC, procname, lst) // Pass the lst as an argument list to the proc
|
||||
|
||||
to_chat(usr, "<font color='#EB4E00'>[procname] returned: [!isnull(returnval) ? returnval : "null"]</font>")
|
||||
to_chat(client, "<font color='#EB4E00'>[procname] returned: [!isnull(returnval) ? returnval : "null"]</font>")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Advanced Proc-Call") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
// All these vars are related to proc call protection
|
||||
@@ -159,39 +144,34 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
return usr && usr.client && GLOB.AdminProcCaller == usr.client.ckey
|
||||
#endif
|
||||
|
||||
/client/proc/callproc_datum(A as null|area|mob|obj|turf)
|
||||
set name = "\[Admin\] Atom ProcCall"
|
||||
|
||||
if(!check_rights(R_PROCCALL))
|
||||
return
|
||||
|
||||
USER_CONTEXT_MENU(call_proc_datum, R_PROCCALL, "\[Admin\] Atom ProcCall", datum/A as null|area|mob|obj|turf)
|
||||
if(istype(A, /datum/logging) || istype(A, /datum/log_record))
|
||||
message_admins("<span class='userdanger'>[key_name_admin(src)] attempted to proc call on a logging object. Inform the host <u>at once</u>.</span>")
|
||||
log_admin("[key_name(src)] attempted to proc call on a logging object. Inform the host at once.")
|
||||
GLOB.discord_manager.send2discord_simple(DISCORD_WEBHOOK_ADMIN, "[key_name(src)] attempted to proc call on a logging object. Inform the host at once.")
|
||||
message_admins("<span class='userdanger'>[key_name_admin(client)] attempted to proc call on a logging object. Inform the host <u>at once</u>.</span>")
|
||||
log_admin("[key_name(client)] attempted to proc call on a logging object. Inform the host at once.")
|
||||
GLOB.discord_manager.send2discord_simple(DISCORD_WEBHOOK_ADMIN, "[key_name(client)] attempted to proc call on a logging object. Inform the host at once.")
|
||||
return
|
||||
|
||||
var/procname = clean_input("Proc name, eg: fake_blood","Proc:", null)
|
||||
var/procname = clean_input("Proc name, eg: fake_blood","Proc:", null, user = client)
|
||||
if(!procname)
|
||||
return
|
||||
|
||||
if(!hascall(A,procname))
|
||||
to_chat(usr, "<span class='warning'>Error: callproc_datum(): target has no such call [procname].</span>")
|
||||
to_chat(client, "<span class='warning'>Error: callproc_datum(): target has no such call [procname].</span>")
|
||||
return
|
||||
|
||||
var/list/lst = get_callproc_args()
|
||||
var/list/lst = client.get_callproc_args()
|
||||
if(!lst)
|
||||
return
|
||||
|
||||
if(!A || !IsValidSrc(A))
|
||||
to_chat(src, "<span class='warning'>Error: callproc_datum(): owner of proc no longer exists.</span>")
|
||||
to_chat(client, "<span class='warning'>Error: callproc_datum(): owner of proc no longer exists.</span>")
|
||||
return
|
||||
message_admins("[key_name_admin(src)] called [A]'s [procname]() with [length(lst) ? "the arguments [list2params(lst)]":"no arguments"]")
|
||||
log_admin("[key_name(src)] called [A]'s [procname]() with [length(lst) ? "the arguments [list2params(lst)]":"no arguments"]")
|
||||
message_admins("[key_name_admin(client)] called [A]'s [procname]() with [length(lst) ? "the arguments [list2params(lst)]":"no arguments"]")
|
||||
log_admin("[key_name(client)] called [A]'s [procname]() with [length(lst) ? "the arguments [list2params(lst)]":"no arguments"]")
|
||||
|
||||
spawn()
|
||||
var/returnval = WrapAdminProcCall(A, procname, lst) // Pass the lst as an argument list to the proc
|
||||
to_chat(src, "<span class='notice'>[procname] returned: [!isnull(returnval) ? returnval : "null"]</span>")
|
||||
to_chat(client, "<span class='notice'>[procname] returned: [!isnull(returnval) ? returnval : "null"]</span>")
|
||||
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Atom Proc-Call") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -216,16 +196,11 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
lst += value["value"]
|
||||
return lst
|
||||
|
||||
/client/proc/Cell()
|
||||
set category = "Debug"
|
||||
set name = "Air Status in Location"
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
USER_VERB_VISIBILITY(air_status, VERB_VISIBILITY_FLAG_MOREDEBUG)
|
||||
USER_VERB(air_status, R_DEBUG, "Air Status in Location", "Print out the local air contents.", VERB_CATEGORY_DEBUG)
|
||||
if(!client.mob)
|
||||
return
|
||||
|
||||
if(!mob)
|
||||
return
|
||||
var/turf/T = mob.loc
|
||||
var/turf/T = client.mob.loc
|
||||
|
||||
if(!isturf(T))
|
||||
return
|
||||
@@ -241,76 +216,56 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
usr.show_message(t, 1)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Air Status (Location)") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_robotize(mob/M in GLOB.mob_list)
|
||||
set category = "Event"
|
||||
set name = "Make Robot"
|
||||
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
|
||||
USER_VERB(admin_robotize, R_SPAWN, "Make Robot", "Turn the target into a borg.", VERB_CATEGORY_EVENT, mob/M in GLOB.mob_list)
|
||||
if(SSticker.current_state < GAME_STATE_PLAYING)
|
||||
alert("Wait until the game starts")
|
||||
alert(client, "Wait until the game starts")
|
||||
return
|
||||
if(ishuman(M))
|
||||
log_admin("[key_name(src)] has robotized [M.key].")
|
||||
log_admin("[key_name(client)] has robotized [M.key].")
|
||||
spawn(10)
|
||||
M:Robotize()
|
||||
|
||||
else
|
||||
alert("Invalid mob")
|
||||
|
||||
/client/proc/cmd_admin_animalize(mob/M in GLOB.mob_list)
|
||||
set category = "Event"
|
||||
set name = "Make Simple Animal"
|
||||
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
alert(client, "Invalid mob")
|
||||
|
||||
USER_VERB(admin_animalize, R_SPAWN, "Make Simple Animal", "Turn the target into a simple animal.", VERB_CATEGORY_EVENT, mob/M in GLOB.mob_list)
|
||||
if(SSticker.current_state < GAME_STATE_PLAYING)
|
||||
alert("Wait until the game starts")
|
||||
alert(client, "Wait until the game starts")
|
||||
return
|
||||
|
||||
if(!M)
|
||||
alert("That mob doesn't seem to exist, close the panel and try again.")
|
||||
alert(client, "That mob doesn't seem to exist, close the panel and try again.")
|
||||
return
|
||||
|
||||
if(isnewplayer(M))
|
||||
alert("The mob must not be a new_player.")
|
||||
alert(client, "The mob must not be a new_player.")
|
||||
return
|
||||
|
||||
log_admin("[key_name(src)] has animalized [M.key].")
|
||||
log_admin("[key_name(client)] has animalized [M.key].")
|
||||
spawn(10)
|
||||
M.Animalize()
|
||||
|
||||
|
||||
/client/proc/makepAI(turf/T in GLOB.mob_list)
|
||||
set category = "Event"
|
||||
set name = "Make pAI"
|
||||
set desc = "Specify a location to spawn a pAI device, then specify a key to play that pAI"
|
||||
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
|
||||
USER_VERB(admin_make_pai, R_SPAWN, "Make pAI", "Specify a location to spawn a pAI device, then specify a key to play that pAI", VERB_CATEGORY_EVENT, turf/T in GLOB.mob_list)
|
||||
var/list/available = list()
|
||||
for(var/mob/C in GLOB.mob_list)
|
||||
if(C.key)
|
||||
available.Add(C)
|
||||
var/mob/choice = input("Choose a player to play the pAI", "Spawn pAI") in available
|
||||
var/mob/choice = input(client, "Choose a player to play the pAI", "Spawn pAI") in available
|
||||
if(!choice)
|
||||
return 0
|
||||
if(!isobserver(choice))
|
||||
var/confirm = input("[choice.key] isn't ghosting right now. Are you sure you want to yank [choice.p_them()] out of [choice.p_their()] body and place [choice.p_them()] in this pAI?", "Spawn pAI Confirmation", "No") in list("Yes", "No")
|
||||
var/confirm = input(client, "[choice.key] isn't ghosting right now. Are you sure you want to yank [choice.p_them()] out of [choice.p_their()] body and place [choice.p_them()] in this pAI?", "Spawn pAI Confirmation", "No") in list("Yes", "No")
|
||||
if(confirm != "Yes")
|
||||
return 0
|
||||
var/obj/item/paicard/card = new(T)
|
||||
var/mob/living/silicon/pai/pai = new(card)
|
||||
var/raw_name = clean_input("Enter your pAI name:", "pAI Name", "Personal AI", choice)
|
||||
var/raw_name = clean_input("Enter your pAI name:", "pAI Name", "Personal AI", choice, user = client)
|
||||
var/new_name = reject_bad_name(raw_name, 1)
|
||||
if(new_name)
|
||||
pai.name = new_name
|
||||
pai.real_name = new_name
|
||||
else
|
||||
to_chat(usr, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>")
|
||||
to_chat(client, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>")
|
||||
pai.real_name = pai.name
|
||||
pai.key = choice.key
|
||||
card.setPersonality(pai)
|
||||
@@ -319,75 +274,51 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
GLOB.paiController.pai_candidates.Remove(candidate)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Make pAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_alienize(mob/M in GLOB.mob_list)
|
||||
set category = "Event"
|
||||
set name = "Make Alien"
|
||||
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
|
||||
USER_VERB(admin_alienize, R_SPAWN, "Make Alien", "Turn the target mob into an alien.", VERB_CATEGORY_EVENT, mob/M in GLOB.mob_list)
|
||||
if(SSticker.current_state < GAME_STATE_PLAYING)
|
||||
alert("Wait until the game starts")
|
||||
alert(client, "Wait until the game starts")
|
||||
return
|
||||
if(ishuman(M))
|
||||
log_admin("[key_name(src)] has alienized [M.key].")
|
||||
log_admin("[key_name(client)] has alienized [M.key].")
|
||||
spawn(10)
|
||||
M:Alienize()
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Make Alien") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(usr)] made [key_name(M)] into an alien.")
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] made [key_name(M)] into an alien.</span>", 1)
|
||||
log_admin("[key_name(client)] made [key_name(M)] into an alien.")
|
||||
message_admins("<span class='notice'>[key_name_admin(client)] made [key_name(M)] into an alien.</span>", 1)
|
||||
else
|
||||
alert("Invalid mob")
|
||||
|
||||
/client/proc/cmd_admin_slimeize(mob/M in GLOB.mob_list)
|
||||
set category = "Event"
|
||||
set name = "Make slime"
|
||||
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
alert(client, "Invalid mob")
|
||||
|
||||
USER_VERB(admin_slimezie, R_SPAWN, "Make slime", "Turn the target mob into a slime.", VERB_CATEGORY_EVENT, mob/M in GLOB.mob_list)
|
||||
if(SSticker.current_state < GAME_STATE_PLAYING)
|
||||
alert("Wait until the game starts")
|
||||
alert(client, "Wait until the game starts")
|
||||
return
|
||||
if(ishuman(M))
|
||||
log_admin("[key_name(src)] has slimeized [M.key].")
|
||||
log_admin("[key_name(client)] has slimeized [M.key].")
|
||||
spawn(10)
|
||||
M:slimeize()
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Make Slime") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(usr)] made [key_name(M)] into a slime.")
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] made [key_name(M)] into a slime.</span>", 1)
|
||||
log_admin("[key_name(client)] made [key_name(M)] into a slime.")
|
||||
message_admins("<span class='notice'>[key_name_admin(client)] made [key_name(M)] into a slime.</span>", 1)
|
||||
else
|
||||
alert("Invalid mob")
|
||||
|
||||
/client/proc/cmd_admin_super(mob/M in GLOB.mob_list)
|
||||
set category = "Event"
|
||||
set name = "Make Superhero"
|
||||
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
alert(client, "Invalid mob")
|
||||
|
||||
USER_VERB(admin_super, R_SPAWN, "Make Superhero", "Turn the target mob into a superhero.", VERB_CATEGORY_EVENT, mob/M in GLOB.mob_list)
|
||||
if(SSticker.current_state < GAME_STATE_PLAYING)
|
||||
alert("Wait until the game starts")
|
||||
alert(client, "Wait until the game starts")
|
||||
return
|
||||
if(ishuman(M))
|
||||
var/type = input("Pick the Superhero","Superhero") as null|anything in GLOB.all_superheroes
|
||||
var/type = input(client, "Pick the Superhero","Superhero") as null|anything in GLOB.all_superheroes
|
||||
var/datum/superheroes/S = GLOB.all_superheroes[type]
|
||||
if(S)
|
||||
S.create(M)
|
||||
log_admin("[key_name(src)] has turned [M.key] into a Superhero.")
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] made [key_name(M)] into a Superhero.</span>", 1)
|
||||
log_admin("[key_name(client)] has turned [M.key] into a Superhero.")
|
||||
message_admins("<span class='notice'>[key_name_admin(client)] made [key_name(M)] into a Superhero.</span>", 1)
|
||||
else
|
||||
alert("Invalid mob")
|
||||
|
||||
/client/proc/cmd_debug_del_sing()
|
||||
set category = "Debug"
|
||||
set name = "Del Singulo / Tesla"
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
alert(client, "Invalid mob")
|
||||
|
||||
USER_VERB(delete_singulo, R_DEBUG, "Del Singulo / Tesla", "Delete all singularities and tesla balls.", VERB_CATEGORY_DEBUG)
|
||||
//This gets a confirmation check because it's way easier to accidentally hit this and delete things than it is with qdel-all
|
||||
var/confirm = alert("This will delete ALL Singularities and Tesla orbs except for any that are on away mission z-levels or the centcomm z-level. Are you sure you want to delete them?", "Confirm Panic Button", "Yes", "No")
|
||||
var/confirm = alert(client, "This will delete ALL Singularities and Tesla orbs except for any that are on away mission z-levels or the centcomm z-level. Are you sure you want to delete them?", "Confirm Panic Button", "Yes", "No")
|
||||
if(confirm != "Yes")
|
||||
return
|
||||
|
||||
@@ -396,31 +327,20 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
if(!is_level_reachable(S.z))
|
||||
continue
|
||||
qdel(S)
|
||||
log_admin("[key_name(src)] has deleted all Singularities and Tesla orbs.")
|
||||
message_admins("[key_name_admin(src)] has deleted all Singularities and Tesla orbs.", 0)
|
||||
log_admin("[key_name(client)] has deleted all Singularities and Tesla orbs.")
|
||||
message_admins("[key_name_admin(client)] has deleted all Singularities and Tesla orbs.", 0)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Del Singulo/Tesla") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_debug_make_powernets()
|
||||
set category = "Debug"
|
||||
set name = "Make Powernets"
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
USER_VERB(make_powernets, R_DEBUG, "Make Powernets", "Remake all powernets.", VERB_CATEGORY_DEBUG)
|
||||
SSmachines.makepowernets()
|
||||
log_admin("[key_name(src)] has remade the powernet. makepowernets() called.")
|
||||
message_admins("[key_name_admin(src)] has remade the powernets. makepowernets() called.", 0)
|
||||
log_admin("[key_name(client)] has remade the powernet. makepowernets() called.")
|
||||
message_admins("[key_name_admin(client)] has remade the powernets. makepowernets() called.", 0)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Make Powernets") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_grantfullaccess(mob/M in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Grant Full Access"
|
||||
|
||||
if(!check_rights(R_EVENT))
|
||||
return
|
||||
|
||||
USER_VERB_VISIBILITY(grant_full_access, VERB_VISIBILITY_FLAG_MOREDEBUG)
|
||||
USER_VERB(grant_full_access, R_EVENT, "Grant Full Access", "Gives mob all-access.", VERB_CATEGORY_ADMIN, mob/M in GLOB.mob_list)
|
||||
if(SSticker.current_state < GAME_STATE_PLAYING)
|
||||
alert("Wait until the game starts")
|
||||
alert(client, "Wait until the game starts")
|
||||
return
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
@@ -441,41 +361,29 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
H.equip_to_slot_or_del(id, ITEM_SLOT_ID)
|
||||
H.update_inv_wear_id()
|
||||
else
|
||||
alert("Invalid mob")
|
||||
alert(client, "Invalid mob")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Grant Full Access") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(src)] has granted [M.key] full access.")
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] has granted [M.key] full access.</span>", 1)
|
||||
|
||||
/client/proc/cmd_assume_direct_control(mob/M in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Assume direct control"
|
||||
set desc = "Direct intervention"
|
||||
|
||||
if(!check_rights(R_DEBUG|R_ADMIN))
|
||||
return
|
||||
log_admin("[key_name(client)] has granted [M.key] full access.")
|
||||
message_admins("<span class='notice'>[key_name_admin(client)] has granted [M.key] full access.</span>", 1)
|
||||
|
||||
USER_VERB_VISIBILITY(assume_direct_control, VERB_VISIBILITY_FLAG_MOREDEBUG)
|
||||
USER_VERB(assume_direct_control, R_ADMIN|R_DEBUG, "Assume direct control", "Direct intervention", VERB_CATEGORY_ADMIN, mob/M in GLOB.mob_list)
|
||||
if(M.ckey)
|
||||
if(alert("This mob is being controlled by [M.ckey]. Are you sure you wish to assume control of it? [M.ckey] will be made a ghost.", null,"Yes","No") != "Yes")
|
||||
if(alert(client, "This mob is being controlled by [M.ckey]. Are you sure you wish to assume control of it? [M.ckey] will be made a ghost.", null,"Yes","No") != "Yes")
|
||||
return
|
||||
else
|
||||
var/mob/dead/observer/ghost = new/mob/dead/observer(M,1)
|
||||
ghost.ckey = M.ckey
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] assumed direct control of [M].</span>", 1)
|
||||
log_admin("[key_name(usr)] assumed direct control of [M].")
|
||||
var/mob/adminmob = src.mob
|
||||
M.ckey = src.ckey
|
||||
message_admins("<span class='notice'>[key_name_admin(client)] assumed direct control of [M].</span>", 1)
|
||||
log_admin("[key_name(client)] assumed direct control of [M].")
|
||||
var/mob/adminmob = client.mob
|
||||
M.ckey = client.ckey
|
||||
if(isobserver(adminmob))
|
||||
qdel(adminmob)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Assume Direct Control") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/proc/cmd_admin_areatest()
|
||||
set category = "Mapping"
|
||||
set name = "Test areas"
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
USER_VERB_VISIBILITY(mapping_area_test, VERB_VISIBILITY_FLAG_MOREDEBUG)
|
||||
USER_VERB(mapping_area_test, R_DEBUG, "Test areas", "Run mapping area test", VERB_CATEGORY_MAPPING)
|
||||
var/list/areas_all = list()
|
||||
var/list/areas_with_APC = list()
|
||||
var/list/areas_with_air_alarm = list()
|
||||
@@ -585,17 +493,12 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
for(var/areatype in areas_without_camera)
|
||||
to_chat(world, "* [areatype]")
|
||||
|
||||
/client/proc/cmd_admin_dress(mob/living/carbon/human/M in GLOB.human_list)
|
||||
set name = "\[Admin\] Select equipment"
|
||||
|
||||
if(!check_rights(R_EVENT))
|
||||
return
|
||||
|
||||
USER_CONTEXT_MENU(select_equipment, R_EVENT, "\[Admin\] Select equipment", mob/living/carbon/human/M in GLOB.human_list)
|
||||
if(!ishuman(M) && !isobserver(M))
|
||||
alert("Invalid mob")
|
||||
alert(client, "Invalid mob")
|
||||
return
|
||||
|
||||
var/dresscode = robust_dress_shop()
|
||||
var/dresscode = client.robust_dress_shop()
|
||||
|
||||
if(!dresscode)
|
||||
return
|
||||
@@ -607,7 +510,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
else
|
||||
H = M
|
||||
if(H.l_store || H.r_store || H.s_store) //saves a lot of time for admins and coders alike
|
||||
if(alert("Should the items in their pockets be dropped? Selecting \"No\" will delete them.", "Robust quick dress shop", "Yes", "No") == "No")
|
||||
if(alert(client, "Should the items in their pockets be dropped? Selecting \"No\" will delete them.", "Robust quick dress shop", "Yes", "No") == "No")
|
||||
delete_pocket = TRUE
|
||||
|
||||
for(var/obj/item/I in H.get_equipped_items(delete_pocket))
|
||||
@@ -618,8 +521,8 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
H.regenerate_icons()
|
||||
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Select Equipment") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(usr)] changed the equipment of [key_name(M)] to [dresscode].")
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] changed the equipment of [key_name_admin(M)] to [dresscode].</span>", 1)
|
||||
log_admin("[key_name(client)] changed the equipment of [key_name(M)] to [dresscode].")
|
||||
message_admins("<span class='notice'>[key_name_admin(client)] changed the equipment of [key_name_admin(M)] to [dresscode].</span>", 1)
|
||||
|
||||
/client/proc/robust_dress_shop(list/potential_minds)
|
||||
var/list/special_outfits = list(
|
||||
@@ -673,15 +576,9 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
|
||||
return dresscode
|
||||
|
||||
/client/proc/startSinglo()
|
||||
set category = "Debug"
|
||||
set name = "Start Singularity"
|
||||
set desc = "Sets up the singularity and all machines to get power flowing through the station"
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
if(alert("Are you sure? This will start up the engine. Should only be used during debug!", null,"Yes","No") != "Yes")
|
||||
USER_VERB_VISIBILITY(start_singulo, VERB_VISIBILITY_FLAG_MOREDEBUG)
|
||||
USER_VERB(start_singulo, R_DEBUG, "Start Singularity", "Sets up the singularity and all machines to get power flowing through the station", VERB_CATEGORY_DEBUG)
|
||||
if(alert(client, "Are you sure? This will start up the engine. Should only be used during debug!", null,"Yes","No") != "Yes")
|
||||
return
|
||||
|
||||
for(var/obj/machinery/power/emitter/E in SSmachines.get_by_type(/obj/machinery/power/emitter))
|
||||
@@ -721,46 +618,32 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
if(SMES.anchored)
|
||||
SMES.input_attempt = 1
|
||||
|
||||
/client/proc/cmd_debug_mob_lists()
|
||||
set category = "Debug"
|
||||
set name = "Debug Mob Lists"
|
||||
set desc = "For when you just gotta know"
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
switch(input("Which list?") in list("Players", "Admins", "Mobs", "Living Mobs", "Alive Mobs", "Dead Mobs", "Silicons", "Clients", "Respawnable Mobs"))
|
||||
USER_VERB(debug_mob_lists, R_DEBUG, "Debug Mob Lists", "For when you just gotta know", VERB_CATEGORY_DEBUG)
|
||||
switch(input(client, "Which list?") in list("Players", "Admins", "Mobs", "Living Mobs", "Alive Mobs", "Dead Mobs", "Silicons", "Clients", "Respawnable Mobs"))
|
||||
if("Players")
|
||||
to_chat(usr, jointext(GLOB.player_list, ","))
|
||||
to_chat(client, jointext(GLOB.player_list, ","))
|
||||
if("Admins")
|
||||
to_chat(usr, jointext(GLOB.admins, ","))
|
||||
to_chat(client, jointext(GLOB.admins, ","))
|
||||
if("Mobs")
|
||||
to_chat(usr, jointext(GLOB.mob_list, ","))
|
||||
to_chat(client, jointext(GLOB.mob_list, ","))
|
||||
if("Living Mobs")
|
||||
to_chat(usr, jointext(GLOB.mob_living_list, ","))
|
||||
to_chat(client, jointext(GLOB.mob_living_list, ","))
|
||||
if("Alive Mobs")
|
||||
to_chat(usr, jointext(GLOB.alive_mob_list, ","))
|
||||
to_chat(client, jointext(GLOB.alive_mob_list, ","))
|
||||
if("Dead Mobs")
|
||||
to_chat(usr, jointext(GLOB.dead_mob_list, ","))
|
||||
to_chat(client, jointext(GLOB.dead_mob_list, ","))
|
||||
if("Silicons")
|
||||
to_chat(usr, jointext(GLOB.silicon_mob_list, ","))
|
||||
to_chat(client, jointext(GLOB.silicon_mob_list, ","))
|
||||
if("Clients")
|
||||
to_chat(usr, jointext(GLOB.clients, ","))
|
||||
to_chat(client, jointext(GLOB.clients, ","))
|
||||
if("Respawnable Mobs")
|
||||
var/list/respawnable_mobs
|
||||
for(var/mob/potential_respawnable in GLOB.player_list)
|
||||
if(HAS_TRAIT(potential_respawnable, TRAIT_RESPAWNABLE))
|
||||
respawnable_mobs += potential_respawnable
|
||||
to_chat(usr, jointext(respawnable_mobs, ", "))
|
||||
|
||||
/client/proc/cmd_display_del_log()
|
||||
set category = "Debug"
|
||||
set name = "Display del() Log"
|
||||
set desc = "Display del's log of everything that's passed through it."
|
||||
|
||||
if(!check_rights(R_DEBUG|R_VIEWRUNTIMES))
|
||||
return
|
||||
to_chat(client, jointext(respawnable_mobs, ", "))
|
||||
|
||||
USER_VERB(display_del_log, R_DEBUG|R_VIEWRUNTIMES, "Display del() Log", "Display del's log of everything that's passed through it.", VERB_CATEGORY_DEBUG)
|
||||
var/list/dellog = list("<B>List of things that have gone through qdel this round</B><BR><BR><ol>")
|
||||
sortTim(SSgarbage.items, GLOBAL_PROC_REF(cmp_qdel_item_time), TRUE)
|
||||
for(var/path in SSgarbage.items)
|
||||
@@ -784,16 +667,10 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
|
||||
dellog += "</ol>"
|
||||
|
||||
usr << browse(dellog.Join(), "window=dellog")
|
||||
|
||||
/client/proc/cmd_display_del_log_simple()
|
||||
set category = "Debug"
|
||||
set name = "Display Simple del() Log"
|
||||
set desc = "Display a compacted del's log."
|
||||
|
||||
if(!check_rights(R_DEBUG|R_VIEWRUNTIMES))
|
||||
return
|
||||
client << browse(dellog.Join(), "window=dellog")
|
||||
|
||||
USER_VERB(display_del_log_simple, R_DEBUG|R_VIEWRUNTIMES, "Display Simple del() Log", \
|
||||
"Display a compacted del's log.", VERB_CATEGORY_DEBUG)
|
||||
var/dat = "<B>List of things that failed to GC this round</B><BR><BR>"
|
||||
for(var/path in SSgarbage.items)
|
||||
var/datum/qdel_item/I = SSgarbage.items[path]
|
||||
@@ -812,16 +689,10 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
if(I.slept_destroy)
|
||||
dat += "[I]<BR>"
|
||||
|
||||
usr << browse(dat, "window=simpledellog")
|
||||
|
||||
/client/proc/show_gc_queues()
|
||||
set name = "View GC Queue"
|
||||
set category = "Debug"
|
||||
set desc = "Shows the list of whats currently in a GC queue"
|
||||
|
||||
if(!check_rights(R_DEBUG|R_VIEWRUNTIMES))
|
||||
return
|
||||
client << browse(dat, "window=simpledellog")
|
||||
|
||||
USER_VERB(show_gc_queues, R_DEBUG|R_VIEWRUNTIMES, "View GC Queue", \
|
||||
"Shows the list of whats currently in a GC queue", VERB_CATEGORY_DEBUG)
|
||||
// Get the amount of queues
|
||||
var/queue_count = length(SSgarbage.queues)
|
||||
var/list/selectable_queues = list()
|
||||
@@ -830,7 +701,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
selectable_queues["Queue #[i] ([length(SSgarbage.queues[i])] item\s)"] = i
|
||||
|
||||
// Ask the user
|
||||
var/choice = input(usr, "Select a GC queue. Note that the queue lookup may lag the server.", "GC Queue") as null|anything in selectable_queues
|
||||
var/choice = input(client, "Select a GC queue. Note that the queue lookup may lag the server.", "GC Queue") as null|anything in selectable_queues
|
||||
if(!choice)
|
||||
return
|
||||
|
||||
@@ -858,7 +729,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
text += "<li>[key] - [sorted[key]]</li>"
|
||||
|
||||
text += "</ul>"
|
||||
usr << browse(text.Join(), "window=gcqueuestatus")
|
||||
client << browse(text.Join(), "window=gcqueuestatus")
|
||||
|
||||
/client/proc/cmd_admin_toggle_block(mob/M, block)
|
||||
if(!check_rights(R_SPAWN))
|
||||
@@ -878,40 +749,20 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
else
|
||||
alert("Invalid mob")
|
||||
|
||||
/client/proc/view_runtimes()
|
||||
set category = "Debug"
|
||||
set name = "View Runtimes"
|
||||
set desc = "Open the Runtime Viewer"
|
||||
USER_VERB(view_runtimes, R_DEBUG|R_VIEWRUNTIMES, "View Runtimes", "Open the Runtime Viewer", VERB_CATEGORY_DEBUG)
|
||||
GLOB.error_cache.showTo(client)
|
||||
|
||||
if(!check_rights(R_DEBUG|R_VIEWRUNTIMES))
|
||||
USER_VERB(allow_browser_inspect, R_DEBUG, "Allow Browser Inspect", "Allow browser debugging via inspect", VERB_CATEGORY_DEBUG)
|
||||
if(client.byond_version < 516)
|
||||
to_chat(client, "<span class='warning'>You can only use this on 516!</span>")
|
||||
return
|
||||
|
||||
GLOB.error_cache.showTo(usr)
|
||||
to_chat(client, "<span class='notice'>You can now right click to use inspect on browsers.</span>")
|
||||
winset(client, "", "browser-options=byondstorage,find,devtools")
|
||||
|
||||
/client/proc/allow_browser_inspect()
|
||||
set category = "Debug"
|
||||
set name = "Allow Browser Inspect"
|
||||
set desc = "Allow browser debugging via inspect"
|
||||
|
||||
if(!check_rights(R_DEBUG) || !isclient(src))
|
||||
return
|
||||
|
||||
if(byond_version < 516)
|
||||
to_chat(src, "<span class='warning'>You can only use this on 516!</span>")
|
||||
return
|
||||
|
||||
to_chat(src, "<span class='notice'>You can now right click to use inspect on browsers.</span>")
|
||||
winset(src, "", "browser-options=byondstorage,find,devtools")
|
||||
|
||||
/client/proc/cmd_clean_radiation()
|
||||
set name = "Remove All Radiation"
|
||||
set desc = "Remove all radiation in the world."
|
||||
set category = "Debug"
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
if(alert(src, "Are you sure you want to remove all radiation in the world? This may lag the server. Alternatively, use the radiation cleaning buildmode.", "Lag warning", "Yes, I'm sure", "No, I want to live") != "Yes, I'm sure")
|
||||
USER_VERB_VISIBILITY(debug_clean_radiation, VERB_VISIBILITY_FLAG_MOREDEBUG)
|
||||
USER_VERB(debug_clean_radiation, R_DEBUG, "Remove All Radiation", "Remove all radiation in the world.", VERB_CATEGORY_DEBUG)
|
||||
if(alert(client, "Are you sure you want to remove all radiation in the world? This may lag the server. Alternatively, use the radiation cleaning buildmode.", "Lag warning", "Yes, I'm sure", "No, I want to live") != "Yes, I'm sure")
|
||||
return
|
||||
|
||||
log_and_message_admins("is decontaminating the world of all radiation. (This may be laggy!)")
|
||||
@@ -924,21 +775,15 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
|
||||
log_and_message_admins_no_usr("The world has been decontaminated of [counter] radiation components.")
|
||||
|
||||
/client/proc/view_bug_reports()
|
||||
set name = "View Bug Reports"
|
||||
set desc = "Select a bug report to view"
|
||||
set category = "Debug"
|
||||
if(!check_rights(R_DEBUG|R_VIEWRUNTIMES|R_ADMIN))
|
||||
return
|
||||
USER_VERB(view_bug_reports, R_DEBUG|R_VIEWRUNTIMES|R_ADMIN, "View Bug Reports", "Select a bug report to view", VERB_CATEGORY_DEBUG)
|
||||
if(!length(GLOB.bug_reports))
|
||||
to_chat(usr, "<span class='warning'>There are no bug reports to view</span>")
|
||||
to_chat(client, "<span class='warning'>There are no bug reports to view</span>")
|
||||
return
|
||||
var/list/bug_report_selection = list()
|
||||
for(var/datum/tgui_bug_report_form/report in GLOB.bug_reports)
|
||||
bug_report_selection["[report.initial_key] - [report.bug_report_data["title"]]"] = report
|
||||
var/datum/tgui_bug_report_form/form = bug_report_selection[tgui_input_list(usr, "Select a report to view:", "Bug Reports", bug_report_selection)]
|
||||
if(!form?.assign_approver(usr))
|
||||
var/datum/tgui_bug_report_form/form = bug_report_selection[tgui_input_list(client, "Select a report to view:", "Bug Reports", bug_report_selection)]
|
||||
if(!form?.assign_approver(client.mob))
|
||||
return
|
||||
form.ui_interact(usr)
|
||||
return
|
||||
form.ui_interact(client.mob)
|
||||
|
||||
|
||||
@@ -1,35 +1,22 @@
|
||||
// Admin verb to debug the DMAPI
|
||||
|
||||
/client/proc/dmapi_debug()
|
||||
set name = "Debug DMAPI"
|
||||
set category = "Debug"
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
USER_VERB(debug_dmapi, R_DEBUG, "Debug DMAPI", "Dump DMAPI information.", VERB_CATEGORY_DEBUG)
|
||||
if(!world.TgsAvailable())
|
||||
to_chat(src, "DMAPI not connected")
|
||||
to_chat(client, "DMAPI not connected")
|
||||
return
|
||||
|
||||
to_chat(src, "TGS Info")
|
||||
to_chat(src, "Revision: [world.TgsRevision()]")
|
||||
to_chat(src, "Version: [world.TgsVersion()]")
|
||||
to_chat(src, "API Version: [world.TgsApiVersion()]")
|
||||
to_chat(src, "Instance Name: [world.TgsInstanceName()]")
|
||||
to_chat(src, "Testmerges:")
|
||||
to_chat(client, "TGS Info")
|
||||
to_chat(client, "Revision: [world.TgsRevision()]")
|
||||
to_chat(client, "Version: [world.TgsVersion()]")
|
||||
to_chat(client, "API Version: [world.TgsApiVersion()]")
|
||||
to_chat(client, "Instance Name: [world.TgsInstanceName()]")
|
||||
to_chat(client, "Testmerges:")
|
||||
for(var/datum/tgs_revision_information/test_merge/TM as anything in world.TgsTestMerges())
|
||||
to_chat(src, "#[TM.number] | [TM.author] - [TM.title]")
|
||||
to_chat(client, "#[TM.number] | [TM.author] - [TM.title]")
|
||||
|
||||
to_chat(src, "Channel info:")
|
||||
to_chat(client, "Channel info:")
|
||||
for(var/datum/tgs_chat_channel/CC as anything in world.TgsChatChannelInfo())
|
||||
to_chat(src, "I:[CC.id] | FN:[CC.friendly_name] | AC:[CC.is_admin_channel] | PC:[CC.is_private_channel] | CT:[CC.custom_tag]")
|
||||
to_chat(src, "Security level: [world.TgsSecurityLevel()]")
|
||||
to_chat(client, "I:[CC.id] | FN:[CC.friendly_name] | AC:[CC.is_admin_channel] | PC:[CC.is_private_channel] | CT:[CC.custom_tag]")
|
||||
to_chat(client, "Security level: [world.TgsSecurityLevel()]")
|
||||
|
||||
/client/proc/dmapi_log()
|
||||
set name = "DMAPI Log"
|
||||
set category = "Debug"
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
usr << browse(GLOB.tgs_log.Join("<br>"), "window=dmapi_log")
|
||||
USER_VERB(dmapi_log, R_DEBUG, "DMAPI Log", "Open the DMAPI log.", VERB_CATEGORY_DEBUG)
|
||||
client << browse(GLOB.tgs_log.Join("<br>"), "window=dmapi_log")
|
||||
|
||||
@@ -99,40 +99,25 @@
|
||||
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Radio Report") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/reload_admins()
|
||||
set name = "Reload Admins"
|
||||
set category = "Server"
|
||||
|
||||
if(!check_rights(R_SERVER))
|
||||
return
|
||||
|
||||
if(!usr.client.is_connecting_from_localhost())
|
||||
if(tgui_alert(usr, "Are you sure about this?", "Confirm", list("Yes", "No")) != "Yes")
|
||||
USER_VERB(reload_admins, R_SERVER, "Reload Admins", "Perform a forced refresh of admin data.", VERB_CATEGORY_SERVER)
|
||||
if(!client.is_connecting_from_localhost())
|
||||
if(tgui_alert(client, "Are you sure about this?", "Confirm", list("Yes", "No")) != "Yes")
|
||||
return
|
||||
|
||||
message_admins("[key_name_admin(usr)] has manually reloaded admins")
|
||||
log_admin("[key_name(usr)] has manually reloaded admins")
|
||||
message_admins("[key_name_admin(client)] has manually reloaded admins")
|
||||
log_admin("[key_name(client)] has manually reloaded admins")
|
||||
|
||||
load_admins(run_async=TRUE)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Reload Admins") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/vv_by_ref()
|
||||
set name = "VV by Ref"
|
||||
set desc = "Give this a ref string, and you will see its corresponding VV panel if it exists"
|
||||
set category = "Debug"
|
||||
|
||||
// It's gated by "Debug Verbs", so might as well gate it to the debug permission
|
||||
// AA: This seems harmless but is **incredibly** powerful and dangerous. Maints only.
|
||||
if(!check_rights(R_MAINTAINER))
|
||||
return
|
||||
|
||||
var/refstring = clean_input("Which reference?","Ref")
|
||||
USER_VERB(vv_by_ref, R_MAINTAINER, "VV by Ref", "Give this a ref string, and you will see its corresponding VV panel if it exists", VERB_CATEGORY_DEBUG)
|
||||
var/refstring = clean_input("Which reference?","Ref", user = client)
|
||||
if(!refstring)
|
||||
return
|
||||
|
||||
var/datum/D = locate(refstring)
|
||||
if(!D)
|
||||
to_chat(usr, "<span class='warning'>That ref string does not correspond to any datum.</span>")
|
||||
to_chat(client, "<span class='warning'>That ref string does not correspond to any datum.</span>")
|
||||
return
|
||||
|
||||
debug_variables(D)
|
||||
SSuser_verbs.invoke_verb(client, /datum/user_verb/debug_variables, D)
|
||||
|
||||
@@ -8,13 +8,8 @@
|
||||
|
||||
GLOBAL_LIST_EMPTY(frozen_atom_list) // A list of admin-frozen atoms.
|
||||
|
||||
/client/proc/freeze(atom/movable/M)
|
||||
set name = "\[Admin\] Freeze"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
M.admin_Freeze(src)
|
||||
USER_CONTEXT_MENU(admin_freeze, R_ADMIN, "\[Admin\] Freeze", atom/movable/M)
|
||||
M.admin_Freeze(client)
|
||||
|
||||
/// Created here as a base proc. Override as needed for any type of object or mob you want able to be frozen.
|
||||
/atom/movable/proc/admin_Freeze(client/admin)
|
||||
|
||||
@@ -1,24 +1,11 @@
|
||||
/// This proc allows download of past server logs saved within the data/logs/ folder.
|
||||
/client/proc/getserverlogs()
|
||||
set name = "Get Server Logs"
|
||||
set desc = "View/retrieve logfiles."
|
||||
set category = "Admin"
|
||||
/// Allows download of past server logs saved within the data/logs/ folder.
|
||||
USER_VERB(get_server_logs, R_ADMIN|R_VIEWLOGS, "Get Server Logs", "View/retrieve logfiles.", VERB_CATEGORY_ADMIN)
|
||||
access_file_by_browsing_path(client.mob, "data/logs/")
|
||||
|
||||
if(!check_rights(R_ADMIN|R_VIEWLOGS))
|
||||
return
|
||||
|
||||
access_file_by_browsing_path(usr, "data/logs/")
|
||||
|
||||
/// This proc allows download of past server logs saved within the data/logs/ folder by specifying a specific round ID.
|
||||
/client/proc/get_server_logs_by_round_id()
|
||||
set name = "Get Round Logs"
|
||||
set desc = "View/retrieve logfiles for a given round."
|
||||
set category = "Admin"
|
||||
|
||||
if(!check_rights(R_ADMIN|R_VIEWLOGS))
|
||||
return
|
||||
|
||||
var/round_id = input(usr, "Enter a round ID.", "Enter Round ID", "[GLOB.round_id]") as null|text
|
||||
/// Allows download of past server logs saved within the data/logs/ folder by specifying a specific round ID.
|
||||
USER_VERB(get_server_logs_by_round_id, R_ADMIN|R_VIEWLOGS, "Get Round Logs", \
|
||||
"View/retrieve logfiles for a given round.", VERB_CATEGORY_ADMIN)
|
||||
var/round_id = input(client, "Enter a round ID.", "Enter Round ID", "[GLOB.round_id]") as null|text
|
||||
if(isnull(round_id))
|
||||
return
|
||||
|
||||
@@ -30,12 +17,12 @@
|
||||
)
|
||||
if(!query.warn_execute())
|
||||
qdel(query)
|
||||
to_chat(usr, "Could not check database for round [round_id].")
|
||||
to_chat(client, "Could not check database for round [round_id].")
|
||||
return
|
||||
|
||||
if(!query.NextRow())
|
||||
qdel(query)
|
||||
to_chat(usr, "Could not find round [round_id] in database.")
|
||||
to_chat(client, "Could not find round [round_id] in database.")
|
||||
return
|
||||
|
||||
// convert unix timestamp in seconds to byond timestamp in deciseconds
|
||||
@@ -45,7 +32,7 @@
|
||||
|
||||
if(!fexists(round_path))
|
||||
log_debug("Logs for round `[round_id]` not found in path `[round_path]`.")
|
||||
access_file_by_browsing_path(usr, round_path)
|
||||
access_file_by_browsing_path(client.mob, round_path)
|
||||
|
||||
/proc/access_file_by_browsing_path(mob/user, path)
|
||||
if(!user.client)
|
||||
|
||||
@@ -1,21 +1,14 @@
|
||||
GLOBAL_LIST_EMPTY(open_logging_views)
|
||||
|
||||
/client/proc/cmd_admin_open_logging_view()
|
||||
set category = "Admin"
|
||||
set name = "Logging View"
|
||||
set desc = "Opens the detailed logging viewer"
|
||||
open_logging_view()
|
||||
|
||||
/client/proc/open_logging_view(list/mob/mobs_to_add = null, clear_view = FALSE)
|
||||
var/datum/log_viewer/cur_view = GLOB.open_logging_views[usr.client.ckey]
|
||||
USER_VERB(logging_view, R_ADMIN, "Logging View", "Opens the detailed logging viewer", VERB_CATEGORY_ADMIN, mob/M as null, clear_view as null)
|
||||
var/datum/log_viewer/cur_view = GLOB.open_logging_views[client.ckey]
|
||||
if(!cur_view)
|
||||
cur_view = new /datum/log_viewer()
|
||||
GLOB.open_logging_views[usr.client.ckey] = cur_view
|
||||
GLOB.open_logging_views[client.ckey] = cur_view
|
||||
else if(clear_view)
|
||||
cur_view.clear_all()
|
||||
|
||||
if(length(mobs_to_add))
|
||||
cur_view.add_mobs(mobs_to_add)
|
||||
|
||||
cur_view.show_ui(usr)
|
||||
if(istype(M))
|
||||
cur_view.add_mobs(list(M))
|
||||
|
||||
cur_view.show_ui(client.mob)
|
||||
|
||||
@@ -1,51 +1,37 @@
|
||||
/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
|
||||
|
||||
USER_VERB(manage_queue, R_SERVER, "Manage Queue Server", "Manage the queue server and its settings", VERB_CATEGORY_SERVER)
|
||||
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
|
||||
var/choice = input(client, "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>")
|
||||
to_chat(client, "<b>Queue Server Status</b>")
|
||||
to_chat(client, "Enabled: <b>[SSqueue.queue_enabled ? "<font color='green'>Yes</font>" : "<font color='red'>No</font>"]</b>")
|
||||
to_chat(client, "Queue Threshold: <b>[SSqueue.queue_threshold]</b>")
|
||||
to_chat(client, "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.")
|
||||
GLOB.discord_manager.send2discord_simple(DISCORD_WEBHOOK_ADMIN, "**\[Queue Server]** `[usr.ckey]` has now **[SSqueue.queue_enabled ? "enabled" : "disabled"]** the queue server.")
|
||||
to_chat(client, "Queue server is now <b>[SSqueue.queue_enabled ? "<font color='green'>Enabled</font>" : "<font color='red'>Disabled</font>"]</b>")
|
||||
message_admins("[key_name_admin(client)] has [SSqueue.queue_enabled ? "enabled" : "disabled"] the server queue.")
|
||||
log_admin("[key_name(client)] has [SSqueue.queue_enabled ? "enabled" : "disabled"] the server queue.")
|
||||
GLOB.discord_manager.send2discord_simple(DISCORD_WEBHOOK_ADMIN, "**\[Queue Server]** `[client.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
|
||||
var/new_threshold = input(client, "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].")
|
||||
GLOB.discord_manager.send2discord_simple(DISCORD_WEBHOOK_ADMIN, "**\[Queue Server]** `[usr.ckey]` has set the queue threshold to **[SSqueue.queue_threshold]**.")
|
||||
to_chat(client, "Queue threshold is now <b>[SSqueue.queue_threshold]</b>")
|
||||
message_admins("[key_name_admin(client)] has set the queue threshold to [SSqueue.queue_threshold].")
|
||||
log_admin("[key_name(client)] has set the queue threshold to [SSqueue.queue_threshold].")
|
||||
GLOB.discord_manager.send2discord_simple(DISCORD_WEBHOOK_ADMIN, "**\[Queue Server]** `[client.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.")
|
||||
GLOB.discord_manager.send2discord_simple(DISCORD_WEBHOOK_ADMIN, "**\[Queue Server]** `[usr.ckey]` has now **[SSqueue.persist_queue ? "enabled" : "disabled"]** server queue settings persistence.")
|
||||
to_chat(client, "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(client)] has [SSqueue.persist_queue ? "enabled" : "disabled"] the server queue settings persistence.")
|
||||
log_admin("[key_name(client)] has [SSqueue.persist_queue ? "enabled" : "disabled"] the server queue settings persistence.")
|
||||
GLOB.discord_manager.send2discord_simple(DISCORD_WEBHOOK_ADMIN, "**\[Queue Server]** `[client.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 = tgui_input_text(usr, "Please, enter a ckey. Enter nothing to cancel", "Queue Server Bypass")
|
||||
USER_VERB(add_queue_server_bypass, R_SERVER, "Add Queue Server Bypass", "Allow a ckey to bypass the server queue", VERB_CATEGORY_SERVER)
|
||||
var/bypass_ckey = tgui_input_text(client, "Please, enter a ckey. Enter nothing to cancel", "Queue Server Bypass")
|
||||
|
||||
if(!bypass_ckey)
|
||||
return
|
||||
@@ -53,9 +39,9 @@
|
||||
var/clean_ckey = ckey(bypass_ckey)
|
||||
|
||||
if(!clean_ckey)
|
||||
to_chat(usr, "Invalid ckey supplied")
|
||||
to_chat(client, "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.")
|
||||
message_admins("[key_name_admin(client)] has added the ckey [clean_ckey] to the queue bypass list.")
|
||||
log_admin("[key_name(client)] has added the ckey [clean_ckey] to the queue bypass list.")
|
||||
|
||||
@@ -1,78 +1,59 @@
|
||||
/client/proc/map_template_load()
|
||||
set category = "Debug"
|
||||
set name = "Map template - Place"
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
USER_VERB(map_template_place, R_DEBUG, "Map template - Place", "Map template - Place", VERB_CATEGORY_DEBUG)
|
||||
var/datum/map_template/template
|
||||
|
||||
var/map = input(usr, "Choose a Map Template to place at your CURRENT LOCATION","Place Map Template") as null|anything in GLOB.map_templates
|
||||
var/map = input(client, "Choose a Map Template to place at your CURRENT LOCATION","Place Map Template") as null|anything in GLOB.map_templates
|
||||
if(!map)
|
||||
return
|
||||
template = GLOB.map_templates[map]
|
||||
|
||||
var/turf/T = get_turf(mob)
|
||||
var/turf/T = get_turf(client.mob)
|
||||
if(!T)
|
||||
return
|
||||
|
||||
if(!template.fits_in_map_bounds(T, centered = TRUE))
|
||||
to_chat(usr, "Map is too large to fit in bounds. Map's dimensions: ([template.width], [template.height])")
|
||||
to_chat(client, "Map is too large to fit in bounds. Map's dimensions: ([template.width], [template.height])")
|
||||
return
|
||||
|
||||
var/list/preview = list()
|
||||
for(var/S in template.get_affected_turfs(T,centered = TRUE))
|
||||
preview += image('icons/turf/overlays.dmi',S,"greenOverlay")
|
||||
usr.client.images += preview
|
||||
if(alert(usr,"Confirm location.","Template Confirm","Yes","No") == "Yes")
|
||||
client.images += preview
|
||||
if(alert(client, "Confirm location.","Template Confirm","Yes","No") == "Yes")
|
||||
var/timer = start_watch()
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has started to place the map template ([template.name]) at <A href='byond://?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>(JMP)</a></span>")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(client)] has started to place the map template ([template.name]) at <A href='byond://?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>(JMP)</a></span>")
|
||||
if(template.load(T, centered = TRUE))
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has placed a map template ([template.name]) at <A href='byond://?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>(JMP)</a>. Took [stop_watch(timer)]s.</span>")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(client)] has placed a map template ([template.name]) at <A href='byond://?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>(JMP)</a>. Took [stop_watch(timer)]s.</span>")
|
||||
else
|
||||
to_chat(usr, "Failed to place map")
|
||||
usr.client.images -= preview
|
||||
to_chat(client, "Failed to place map")
|
||||
client.images -= preview
|
||||
|
||||
/client/proc/map_template_upload()
|
||||
set category = "Debug"
|
||||
set name = "Map Template - Upload"
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
var/map = input(usr, "Choose a Map Template to upload to template storage","Upload Map Template") as null|file
|
||||
USER_VERB(map_template_upload, R_DEBUG, "Map Template - Upload", "Map Template - Upload", VERB_CATEGORY_DEBUG)
|
||||
var/map = input(client, "Choose a Map Template to upload to template storage","Upload Map Template") as null|file
|
||||
if(!map)
|
||||
return
|
||||
if(copytext("[map]",-4) != ".dmm")
|
||||
to_chat(usr, "Bad map file: [map]")
|
||||
to_chat(client, "Bad map file: [map]")
|
||||
return
|
||||
|
||||
var/timer = start_watch()
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has begun uploading a map template ([map])</span>")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(client)] has begun uploading a map template ([map])</span>")
|
||||
var/datum/map_template/M = new(map=map, rename="[map]")
|
||||
if(M.preload_size(map))
|
||||
to_chat(usr, "Map template '[map]' ready to place ([M.width]x[M.height])")
|
||||
to_chat(client, "Map template '[map]' ready to place ([M.width]x[M.height])")
|
||||
GLOB.map_templates[M.name] = M
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has uploaded a map template ([map]). Took [stop_watch(timer)]s.</span>")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(client)] has uploaded a map template ([map]). Took [stop_watch(timer)]s.</span>")
|
||||
else
|
||||
to_chat(usr, "Map template '[map]' failed to load properly")
|
||||
to_chat(client, "Map template '[map]' failed to load properly")
|
||||
|
||||
/client/proc/map_template_load_lazy()
|
||||
set category = "Debug"
|
||||
set name = "Map template - Lazy Load"
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
var/map = input(usr, "Choose a Map Template to place on the lazy load map level.","Place Map Template") as null|anything in GLOB.map_templates
|
||||
USER_VERB(map_template_load_lazy, R_DEBUG, "Map template - Lazy Load", "Map template - Lazy Load", VERB_CATEGORY_DEBUG)
|
||||
var/map = input(client, "Choose a Map Template to place on the lazy load map level.","Place Map Template") as null|anything in GLOB.map_templates
|
||||
if(!map)
|
||||
return
|
||||
var/datum/map_template/template = GLOB.map_templates[map]
|
||||
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] is lazyloading the map template ([template.name]).</span>")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(client)] is lazyloading the map template ([template.name]).</span>")
|
||||
var/datum/turf_reservation/reserve = SSmapping.lazy_load_template(template)
|
||||
if(!istype(reserve))
|
||||
message_admins("<span class='danger'>Lazyloading [template.name] failed! You should report this as a bug.</span>")
|
||||
return
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has lazyloaded the map template ([template.name]) at [ADMIN_JMP(reserve.bottom_left_turf)]</span>")
|
||||
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(client)] has lazyloaded the map template ([template.name]) at [ADMIN_JMP(reserve.bottom_left_turf)]</span>")
|
||||
|
||||
@@ -35,13 +35,8 @@ GLOBAL_VAR_INIT(intercom_range_display_status, 0)
|
||||
/obj/effect/debugging/marker/Move()
|
||||
return 0
|
||||
|
||||
/client/proc/camera_view()
|
||||
set category = "Mapping"
|
||||
set name = "Camera Range Display"
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
USER_VERB_VISIBILITY(debug_camera_view, VERB_VISIBILITY_FLAG_MOREDEBUG)
|
||||
USER_VERB(debug_camera_view, R_DEBUG, "Camera Range Display", "Camera Range Display", VERB_CATEGORY_MAPPING)
|
||||
if(GLOB.camera_range_display_status)
|
||||
GLOB.camera_range_display_status = 0
|
||||
else
|
||||
@@ -59,13 +54,8 @@ GLOBAL_VAR_INIT(intercom_range_display_status, 0)
|
||||
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Camera Range Display") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/sec_camera_report()
|
||||
set category = "Mapping"
|
||||
set name = "Camera Report"
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
USER_VERB_VISIBILITY(debug_camera_report, VERB_VISIBILITY_FLAG_MOREDEBUG)
|
||||
USER_VERB(debug_camera_report, R_DEBUG, "Camera Report", "Camera Report", VERB_CATEGORY_MAPPING)
|
||||
var/list/obj/machinery/camera/CL = list()
|
||||
|
||||
for(var/obj/machinery/camera/C in GLOB.cameranet.cameras)
|
||||
@@ -95,16 +85,11 @@ GLOBAL_VAR_INIT(intercom_range_display_status, 0)
|
||||
output += "<li><font color='red'>Camera not connected to wall at \[[C1.x], [C1.y], [C1.z]\] ([C1.loc.loc]) Network: [C1.network]</color></li>"
|
||||
|
||||
output += "</ul>"
|
||||
usr << browse(output,"window=airreport;size=1000x500")
|
||||
client << browse(output,"window=airreport;size=1000x500")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Camera Report") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/intercom_view()
|
||||
set category = "Mapping"
|
||||
set name = "Intercom Range Display"
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
USER_VERB_VISIBILITY(debug_view_intercoms, VERB_VISIBILITY_FLAG_MOREDEBUG)
|
||||
USER_VERB(debug_view_intercoms, R_DEBUG, "Intercom Range Display", "Intercom Range Display", VERB_CATEGORY_MAPPING)
|
||||
if(GLOB.intercom_range_display_status)
|
||||
GLOB.intercom_range_display_status = 0
|
||||
else
|
||||
@@ -121,20 +106,15 @@ GLOBAL_VAR_INIT(intercom_range_display_status, 0)
|
||||
qdel(F)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Intercom Range Display") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/count_objects_on_z_level()
|
||||
set category = "Mapping"
|
||||
set name = "Count Objects On Level"
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
var/level = clean_input("Which z-level?","Level?")
|
||||
USER_VERB_VISIBILITY(debug_object_count_zlevel, VERB_VISIBILITY_FLAG_MOREDEBUG)
|
||||
USER_VERB(debug_object_count_zlevel, R_DEBUG, "Count Objects On Level", "Count Objects On Level", VERB_CATEGORY_MAPPING)
|
||||
var/level = clean_input("Which z-level?","Level?", user = client)
|
||||
if(!level) return
|
||||
var/num_level = text2num(level)
|
||||
if(!num_level) return
|
||||
if(!isnum(num_level)) return
|
||||
|
||||
var/type_text = clean_input("Which type path?","Path?")
|
||||
var/type_text = clean_input("Which type path?","Path?", user = client)
|
||||
if(!type_text) return
|
||||
var/type_path = text2path(type_text)
|
||||
if(!type_path) return
|
||||
@@ -159,14 +139,9 @@ GLOBAL_VAR_INIT(intercom_range_display_status, 0)
|
||||
to_chat(world, "There are [count] objects of type [type_path] on z-level [num_level].")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Count Objects (On Level)") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/count_objects_all()
|
||||
set category = "Mapping"
|
||||
set name = "Count Objects All"
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
var/type_text = clean_input("Which type path?","")
|
||||
USER_VERB_VISIBILITY(debug_object_count_world, VERB_VISIBILITY_FLAG_MOREDEBUG)
|
||||
USER_VERB(debug_object_count_world, R_DEBUG, "Count Objects All", "Count Objects All", VERB_CATEGORY_MAPPING)
|
||||
var/type_text = clean_input("Which type path?","", user = client)
|
||||
if(!type_text) return
|
||||
var/type_path = text2path(type_text)
|
||||
if(!type_path) return
|
||||
@@ -180,28 +155,22 @@ GLOBAL_VAR_INIT(intercom_range_display_status, 0)
|
||||
to_chat(world, "There are [count] objects of type [type_path] in the game world.")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Count Objects (Global)") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/set_next_map()
|
||||
set category = "Server"
|
||||
set name = "Set Next Map"
|
||||
|
||||
if(!check_rights(R_SERVER))
|
||||
return
|
||||
|
||||
USER_VERB(set_next_map, R_SERVER, "Set Next Map", "Set Next Map", VERB_CATEGORY_SERVER)
|
||||
var/list/map_datums = list()
|
||||
for(var/x in subtypesof(/datum/map))
|
||||
var/datum/map/M = x
|
||||
if(initial(M.voteable))
|
||||
map_datums["[initial(M.fluff_name)] ([initial(M.technical_name)])"] = M // Put our map in
|
||||
|
||||
var/target_map_name = input(usr, "Select target map", "Next map", null) as null|anything in map_datums
|
||||
var/target_map_name = input(client, "Select target map", "Next map", null) as null|anything in map_datums
|
||||
|
||||
if(!target_map_name)
|
||||
return
|
||||
|
||||
var/datum/map/TM = map_datums[target_map_name]
|
||||
SSmapping.next_map = new TM
|
||||
var/announce_to_players = alert(usr, "Do you wish to tell the playerbase about your choice?", "Announce", "Yes", "No")
|
||||
message_admins("[key_name_admin(usr)] has set the next map to [SSmapping.next_map.fluff_name] ([SSmapping.next_map.technical_name])")
|
||||
log_admin("[key_name(usr)] has set the next map to [SSmapping.next_map.fluff_name] ([SSmapping.next_map.technical_name])")
|
||||
var/announce_to_players = alert(client, "Do you wish to tell the playerbase about your choice?", "Announce", "Yes", "No")
|
||||
message_admins("[key_name_admin(client)] has set the next map to [SSmapping.next_map.fluff_name] ([SSmapping.next_map.technical_name])")
|
||||
log_admin("[key_name(client)] has set the next map to [SSmapping.next_map.fluff_name] ([SSmapping.next_map.technical_name])")
|
||||
if(announce_to_players == "Yes")
|
||||
to_chat(world, "<span class='boldannounceooc'>[key] has chosen the following map for next round: <font color='cyan'>[SSmapping.next_map.fluff_name] ([SSmapping.next_map.technical_name])</font></span>")
|
||||
to_chat(world, "<span class='boldannounceooc'>[client.key] has chosen the following map for next round: <font color='cyan'>[SSmapping.next_map.fluff_name] ([SSmapping.next_map.technical_name])</font></span>")
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
/client/proc/one_click_antag()
|
||||
set name = "Create Antagonist"
|
||||
set desc = "Auto-create an antagonist of your choice"
|
||||
set category = "Event"
|
||||
|
||||
if(!check_rights(R_SERVER|R_EVENT)) return
|
||||
|
||||
if(holder)
|
||||
holder.one_click_antag()
|
||||
return
|
||||
|
||||
USER_VERB(one_click_antag, R_SERVER|R_EVENT, "Create Antagonist", "Auto-create an antagonist of your choice", VERB_CATEGORY_EVENT)
|
||||
if(client.holder)
|
||||
client.holder.one_click_antag()
|
||||
|
||||
/datum/admins/proc/one_click_antag()
|
||||
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
/client/proc/ping_all_admins()
|
||||
set name = "Ping all admins"
|
||||
set category = "Admin"
|
||||
|
||||
if(!check_rights(R_ADMIN, FALSE))
|
||||
return
|
||||
|
||||
var/msg = input(src, "What message do you want the ping to show?", "Ping all admins") as text|null
|
||||
USER_VERB(ping_all_admins, R_ADMIN, "Ping all admins", "Ping all admins", VERB_CATEGORY_ADMIN)
|
||||
var/msg = input(client, "What message do you want the ping to show?", "Ping all admins") as text|null
|
||||
msg = sanitize(copytext_char(msg, 1, MAX_MESSAGE_LEN))
|
||||
|
||||
if(!msg)
|
||||
@@ -17,23 +11,23 @@
|
||||
if(R_ADMIN & C.holder.rights)
|
||||
admins_to_ping += C
|
||||
|
||||
var/de_admin_also = alert(usr, "Do you want to ping admins that have used de-admin?","Ping all admins", "Yes", "No")
|
||||
var/de_admin_also = alert(client, "Do you want to ping admins that have used de-admin?","Ping all admins", "Yes", "No")
|
||||
if(de_admin_also == "Yes")
|
||||
for(var/key in GLOB.de_admins)
|
||||
var/client/C = GLOB.directory[ckey]
|
||||
var/client/C = GLOB.directory[client.ckey]
|
||||
if(!C)
|
||||
continue
|
||||
admins_to_ping += C
|
||||
|
||||
if(length(admins_to_ping) < 2) // All by yourself?
|
||||
to_chat(usr, "<span class='boldannounceooc'>No other admins online to ping[de_admin_also == "Yes" ? ", including those that have used de-admin" : ""]!</span>")
|
||||
to_chat(client, "<span class='boldannounceooc'>No other admins online to ping[de_admin_also == "Yes" ? ", including those that have used de-admin" : ""]!</span>")
|
||||
return
|
||||
|
||||
var/datum/say/asay = new(usr.ckey, usr.client.holder.rank, msg, world.timeofday)
|
||||
var/datum/say/asay = new(client.ckey, client.holder.rank, msg, world.timeofday)
|
||||
GLOB.asays += asay
|
||||
log_ping_all_admins("[length(admins_to_ping)] clients pinged: [msg]", src)
|
||||
log_ping_all_admins("[length(admins_to_ping)] clients pinged: [msg]", client)
|
||||
|
||||
for(var/client/C in admins_to_ping)
|
||||
SEND_SOUND(C, sound('sound/misc/ping.ogg'))
|
||||
to_chat(C, "<span class='all_admin_ping'>ALL ADMIN PING: <span class='name'>[key_name(usr, TRUE)]</span> ([admin_jump_link(mob)]): <span class='emoji_enabled'>[msg]</span></span>")
|
||||
to_chat(usr, "[length(admins_to_ping)] clients pinged.")
|
||||
to_chat(C, "<span class='all_admin_ping'>ALL ADMIN PING: <span class='name'>[key_name(client, TRUE)]</span> ([admin_jump_link(client.mob)]): <span class='emoji_enabled'>[msg]</span></span>")
|
||||
to_chat(client, "[length(admins_to_ping)] clients pinged.")
|
||||
|
||||
@@ -1,26 +1,17 @@
|
||||
GLOBAL_LIST_EMPTY(sounds_cache)
|
||||
|
||||
/client/proc/stop_global_admin_sounds()
|
||||
set category = "Event"
|
||||
set name = "Stop Global Admin Sounds"
|
||||
if(!check_rights(R_SOUNDS))
|
||||
return
|
||||
|
||||
USER_VERB(stop_global_admin_sounds, R_SOUNDS, "Stop Global Admin Sounds", "Stop all playing admin sounds", VERB_CATEGORY_EVENT)
|
||||
var/sound/awful_sound = sound(null, repeat = 0, wait = 0, channel = CHANNEL_ADMIN)
|
||||
|
||||
log_admin("[key_name(src)] stopped admin sounds.")
|
||||
message_admins("[key_name_admin(src)] stopped admin sounds.", 1)
|
||||
log_admin("[key_name(client)] stopped admin sounds.")
|
||||
message_admins("[key_name_admin(client)] stopped admin sounds.", 1)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
M << awful_sound
|
||||
var/client/C = M.client
|
||||
C?.tgui_panel?.stop_music()
|
||||
|
||||
/client/proc/play_sound(S as sound)
|
||||
set category = "Event"
|
||||
set name = "Legacy Play Global Sound"
|
||||
if(!check_rights(R_SOUNDS)) return
|
||||
|
||||
if(alert("WARNING: Legacy Play Global Sound does not support CDN asset sending. Sounds will have to be sent directly to players, which may freeze the game for long durations. Are you SURE?", "Really use Legacy Play Global Sound?", "Yes", "No") == "No")
|
||||
USER_VERB(play_sound, R_SOUNDS, "Legacy Play Global Sound", "Send a sound to players", VERB_CATEGORY_EVENT, S as sound)
|
||||
if(alert(client, "WARNING: Legacy Play Global Sound does not support CDN asset sending. Sounds will have to be sent directly to players, which may freeze the game for long durations. Are you SURE?", "Really use Legacy Play Global Sound?", "Yes", "No") == "No")
|
||||
return
|
||||
|
||||
var/sound/uploaded_sound = sound(S, repeat = 0, wait = 1, channel = CHANNEL_ADMIN)
|
||||
@@ -28,85 +19,73 @@ GLOBAL_LIST_EMPTY(sounds_cache)
|
||||
|
||||
GLOB.sounds_cache += S
|
||||
|
||||
if(alert("Are you sure?\nSong: [S]\nNow you can also play this sound using \"Play Server Sound\".", "Confirmation request" ,"Play", "Cancel") == "Cancel")
|
||||
if(alert(client, "Are you sure?\nSong: [S]\nNow you can also play this sound using \"Play Server Sound\".", "Confirmation request" ,"Play", "Cancel") == "Cancel")
|
||||
return
|
||||
|
||||
if(holder.fakekey)
|
||||
if(alert("Playing this sound will expose your real ckey despite being in stealth mode. You sure?", "Double check" ,"Play", "Cancel") == "Cancel")
|
||||
if(client.holder.fakekey)
|
||||
if(alert(client, "Playing this sound will expose your real ckey despite being in stealth mode. You sure?", "Double check" ,"Play", "Cancel") == "Cancel")
|
||||
return
|
||||
|
||||
|
||||
log_admin("[key_name(src)] played sound [S]")
|
||||
message_admins("[key_name_admin(src)] played sound [S]", 1)
|
||||
log_admin("[key_name(client)] played sound [S]")
|
||||
message_admins("[key_name_admin(client)] played sound [S]", 1)
|
||||
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.client.prefs.sound & SOUND_MIDI)
|
||||
if(ckey in M.client.prefs.admin_sound_ckey_ignore)
|
||||
if(client.ckey in M.client.prefs.admin_sound_ckey_ignore)
|
||||
continue // This player has this admin muted
|
||||
if(isnewplayer(M) && (M.client.prefs.sound & SOUND_LOBBY))
|
||||
M.stop_sound_channel(CHANNEL_LOBBYMUSIC)
|
||||
uploaded_sound.volume = 100 * M.client.prefs.get_channel_volume(CHANNEL_ADMIN)
|
||||
|
||||
var/this_uid = M.client.UID()
|
||||
to_chat(M, "<span class='boldannounceic'>[ckey] played <code>[S]</code> (<a href='byond://?src=[this_uid];action=silenceSound'>SILENCE</a>) (<a href='byond://?src=[this_uid];action=muteAdmin&a=[ckey]'>ALWAYS SILENCE THIS ADMIN</a>)</span>")
|
||||
to_chat(M, "<span class='boldannounceic'>[client.ckey] played <code>[S]</code> (<a href='byond://?src=[this_uid];action=silenceSound'>SILENCE</a>) (<a href='byond://?src=[this_uid];action=muteAdmin&a=[client.ckey]'>ALWAYS SILENCE THIS ADMIN</a>)</span>")
|
||||
SEND_SOUND(M, uploaded_sound)
|
||||
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Play Global Sound") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/proc/play_local_sound(S as sound)
|
||||
set category = "Event"
|
||||
set name = "Play Local Sound"
|
||||
if(!check_rights(R_SOUNDS)) return
|
||||
|
||||
log_admin("[key_name(src)] played a local sound [S]")
|
||||
message_admins("[key_name_admin(src)] played a local sound [S]", 1)
|
||||
playsound(get_turf(src.mob), S, 50, FALSE, 0)
|
||||
USER_VERB(play_local_sound, R_SOUNDS, "Play Local Sound", "Send a sound to players", VERB_CATEGORY_EVENT, S as sound)
|
||||
log_admin("[key_name(client)] played a local sound [S]")
|
||||
message_admins("[key_name_admin(client)] played a local sound [S]", 1)
|
||||
playsound(get_turf(client.mob), S, 50, FALSE, 0)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Play Local Sound") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/play_server_sound()
|
||||
set category = "Event"
|
||||
set name = "Play Server Sound"
|
||||
if(!check_rights(R_SOUNDS)) return
|
||||
|
||||
USER_VERB(play_server_sound, R_SOUNDS, "Play Server Sound", "Send a sound to players", VERB_CATEGORY_EVENT)
|
||||
var/list/sounds = file2list("sound/serversound_list.txt")
|
||||
sounds += GLOB.sounds_cache
|
||||
|
||||
var/melody = input("Select a sound from the server to play", "Server sound list") as null|anything in sounds
|
||||
var/melody = input(client, "Select a sound from the server to play", "Server sound list") as null|anything in sounds
|
||||
if(!melody) return
|
||||
|
||||
play_sound(melody)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Play Server Sound") //If you are copy-pasting this, ensure the 2nd paramter is unique to the new proc!
|
||||
SSuser_verbs.invoke_verb(client, /datum/user_verb/play_local_sound, melody)
|
||||
|
||||
/client/proc/play_intercomm_sound()
|
||||
set category = "Event"
|
||||
set name = "Play Sound via Intercomms"
|
||||
set desc = "Plays a sound at every intercomm on the station z level. Works best with small sounds."
|
||||
if(!check_rights(R_SOUNDS)) return
|
||||
USER_VERB(play_intercomm_sound, \
|
||||
R_SOUNDS, "Play Sound via Intercomms", \
|
||||
"Plays a sound at every intercomm on the station z level. Works best with small sounds.", \
|
||||
VERB_CATEGORY_EVENT)
|
||||
|
||||
var/A = alert("This will play a sound at every intercomm, are you sure you want to continue? This works best with short sounds, beware.","Warning","Yep","Nope")
|
||||
var/A = alert(client, "This will play a sound at every intercomm, are you sure you want to continue? This works best with short sounds, beware.","Warning","Yep","Nope")
|
||||
if(A != "Yep") return
|
||||
|
||||
var/list/sounds = file2list("sound/serversound_list.txt")
|
||||
sounds += GLOB.sounds_cache
|
||||
|
||||
var/melody = input("Select a sound from the server to play", "Server sound list") as null|anything in sounds
|
||||
var/melody = input(client, "Select a sound from the server to play", "Server sound list") as null|anything in sounds
|
||||
if(!melody) return
|
||||
|
||||
var/cvol = 35
|
||||
var/inputvol = input("How loud would you like this to be? (1-70)", "Volume", "35") as num | null
|
||||
var/inputvol = input(client, "How loud would you like this to be? (1-70)", "Volume", "35") as num | null
|
||||
if(!inputvol) return
|
||||
if(inputvol && inputvol >= 1 && inputvol <= 70)
|
||||
cvol = inputvol
|
||||
|
||||
//Allows for override to utilize intercomms on all z-levels
|
||||
var/B = alert("Do you want to play through intercomms on ALL Z-levels, or just the station?", "Override", "All", "Station")
|
||||
var/B = alert(client, "Do you want to play through intercomms on ALL Z-levels, or just the station?", "Override", "All", "Station")
|
||||
var/ignore_z = 0
|
||||
if(B == "All")
|
||||
ignore_z = 1
|
||||
|
||||
//Allows for override to utilize incomplete and unpowered intercomms
|
||||
var/C = alert("Do you want to play through unpowered / incomplete intercomms, so the crew can't silence it?", "Override", "Yep", "Nope")
|
||||
var/C = alert(client, "Do you want to play through unpowered / incomplete intercomms, so the crew can't silence it?", "Override", "Yep", "Nope")
|
||||
var/ignore_power = 0
|
||||
if(C == "Yep")
|
||||
ignore_power = 1
|
||||
@@ -119,27 +98,16 @@ GLOBAL_LIST_EMPTY(sounds_cache)
|
||||
continue
|
||||
playsound(I, melody, cvol)
|
||||
|
||||
/client/proc/stop_sounds_global()
|
||||
set category = "Debug"
|
||||
set name = "Stop Sounds Global"
|
||||
set desc = "Stop all playing sounds globally."
|
||||
if(!check_rights(R_SOUNDS))
|
||||
return
|
||||
|
||||
log_admin("[key_name(src)] stopped all currently playing sounds.")
|
||||
message_admins("[key_name_admin(src)] stopped all currently playing sounds.")
|
||||
USER_VERB(stop_sounds_global, R_SOUNDS, "Stop Sounds Global", "Stop all playing sounds globally.", VERB_CATEGORY_DEBUG)
|
||||
log_admin("[key_name(client)] stopped all currently playing sounds.")
|
||||
message_admins("[key_name_admin(client)] stopped all currently playing sounds.")
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
SEND_SOUND(M, sound(null))
|
||||
var/client/C = M.client
|
||||
C?.tgui_panel?.stop_music()
|
||||
|
||||
/client/proc/play_sound_tgchat()
|
||||
set category = "Event"
|
||||
set name = "Play Global Sound"
|
||||
if(!check_rights(R_SOUNDS))
|
||||
return
|
||||
|
||||
var/sound_mode = tgui_alert(src, "Play a sound from which source?", "Select Source", list("Web", "Upload MP3"))
|
||||
USER_VERB(play_sound_tgchat, R_SOUNDS, "Play Global Sound", "Play a sound to be heard by all players.", VERB_CATEGORY_EVENT)
|
||||
var/sound_mode = tgui_alert(client, "Play a sound from which source?", "Select Source", list("Web", "Upload MP3"))
|
||||
if(!sound_mode)
|
||||
return
|
||||
|
||||
@@ -152,18 +120,18 @@ GLOBAL_LIST_EMPTY(sounds_cache)
|
||||
|
||||
if(sound_mode == "Web")
|
||||
if(!GLOB.configuration.system.ytdlp_url)
|
||||
to_chat(src, "<span class='boldwarning'>yt-dlp was not configured, action unavailable</span>") //Check config
|
||||
to_chat(client, "<span class='boldwarning'>yt-dlp was not configured, action unavailable</span>") //Check config
|
||||
return
|
||||
|
||||
web_sound_input = tgui_input_text(src, "Enter content URL", "Play Internet Sound", null)
|
||||
web_sound_input = tgui_input_text(client, "Enter content URL", "Play Internet Sound", null)
|
||||
if(!length(web_sound_input))
|
||||
return
|
||||
|
||||
web_sound_input = trim(web_sound_input)
|
||||
|
||||
if(findtext(web_sound_input, ":") && !findtext(web_sound_input, GLOB.is_http_protocol))
|
||||
to_chat(src, "<span class='boldwarning'>Non-http(s) URIs are not allowed.</span>")
|
||||
to_chat(src, "<span class='warning'>For yt-dlp shortcuts like ytsearch: please use the appropriate full url from the website.</span>")
|
||||
to_chat(client, "<span class='boldwarning'>Non-http(s) URIs are not allowed.</span>")
|
||||
to_chat(client, "<span class='warning'>For yt-dlp shortcuts like ytsearch: please use the appropriate full url from the website.</span>")
|
||||
return
|
||||
|
||||
// Prepare the body
|
||||
@@ -181,35 +149,35 @@ GLOBAL_LIST_EMPTY(sounds_cache)
|
||||
try
|
||||
data = json_decode(media_poll_response.body)
|
||||
catch(var/exception/e)
|
||||
to_chat(src, "<span class='boldwarning'>yt-dlp JSON parsing FAILED:</span>")
|
||||
to_chat(src, "<span class='warning'>[e]: [media_poll_response.body]</span>")
|
||||
to_chat(client, "<span class='boldwarning'>yt-dlp JSON parsing FAILED:</span>")
|
||||
to_chat(client, "<span class='warning'>[e]: [media_poll_response.body]</span>")
|
||||
return
|
||||
else
|
||||
to_chat(src, "<span class='boldwarning'>yt-dlp URL retrieval FAILED:</span>")
|
||||
to_chat(src, "<span class='warning'>[media_poll_response.body]</span>")
|
||||
to_chat(client, "<span class='boldwarning'>yt-dlp URL retrieval FAILED:</span>")
|
||||
to_chat(client, "<span class='warning'>[media_poll_response.body]</span>")
|
||||
return
|
||||
|
||||
else if(sound_mode == "Upload MP3")
|
||||
if(GLOB.configuration.asset_cache.asset_transport == "simple")
|
||||
if(tgui_alert(src, "WARNING: Your server is using simple asset transport. Sounds will have to be sent directly to players, which may freeze the game for long durations. Are you SURE?", "Really play direct sound?", list("Yes", "No")) != "Yes")
|
||||
if(tgui_alert(client, "WARNING: Your server is using simple asset transport. Sounds will have to be sent directly to players, which may freeze the game for long durations. Are you SURE?", "Really play direct sound?", list("Yes", "No")) != "Yes")
|
||||
return
|
||||
must_send_assets = TRUE
|
||||
|
||||
var/soundfile = input(src, "Choose an MP3 file to play", "Upload Sound") as null|file
|
||||
var/soundfile = input(client, "Choose an MP3 file to play", "Upload Sound") as null|file
|
||||
if(!soundfile)
|
||||
return
|
||||
|
||||
var/static/regex/only_extension = regex(@{"^.*\.([a-z0-9]{1,5})$"}, "gi")
|
||||
var/extension = only_extension.Replace("[soundfile]", "$1")
|
||||
if(!length(extension) || extension != "mp3")
|
||||
to_chat(src, "<span class='boldwarning'>Invalid filename extension.</span>")
|
||||
to_chat(client, "<span class='boldwarning'>Invalid filename extension.</span>")
|
||||
return
|
||||
|
||||
var/static/playsound_notch = 1
|
||||
asset_name = "admin_sound_[playsound_notch++].[extension]"
|
||||
SSassets.transport.register_asset(asset_name, soundfile)
|
||||
log_admin("[key_name_admin(src)] uploaded admin sound '[soundfile]' to asset transport.")
|
||||
message_admins("[key_name_admin(src)] uploaded admin sound '[soundfile]' to asset transport.")
|
||||
log_admin("[key_name_admin(client)] uploaded admin sound '[soundfile]' to asset transport.")
|
||||
message_admins("[key_name_admin(client)] uploaded admin sound '[soundfile]' to asset transport.")
|
||||
|
||||
var/static/regex/remove_extension = regex(@{"\.[a-z0-9]+$"}, "gi")
|
||||
data["title"] = remove_extension.Replace("[soundfile]", "")
|
||||
@@ -227,26 +195,26 @@ GLOBAL_LIST_EMPTY(sounds_cache)
|
||||
music_extra_data["link"] = data["webpage_url"]
|
||||
music_extra_data["title"] = data["title"]
|
||||
|
||||
var/res = tgui_alert(src, "Show the title of and link to this song to the players?\n[title]", "Show Info?", list("Yes", "No"))
|
||||
var/res = tgui_alert(client, "Show the title of and link to this song to the players?\n[title]", "Show Info?", list("Yes", "No"))
|
||||
if(!res)
|
||||
return
|
||||
if(res == "Yes")
|
||||
log_admin("[key_name(src)] played sound: [web_sound_input]")
|
||||
message_admins("[key_name(src)] played sound: [web_sound_input]")
|
||||
to_chat(world, "<span class='boldannounceooc'>[src.ckey] played: [webpage_url]</span>")
|
||||
log_admin("[key_name(client)] played sound: [web_sound_input]")
|
||||
message_admins("[key_name(client)] played sound: [web_sound_input]")
|
||||
to_chat(world, "<span class='boldannounceooc'>[client.ckey] played: [webpage_url]</span>")
|
||||
else if(res == "No")
|
||||
music_extra_data["link"] = "Song Link Hidden"
|
||||
music_extra_data["title"] = "Song Title Hidden"
|
||||
music_extra_data["artist"] = "Song Artist Hidden"
|
||||
log_admin("[key_name(src)] played sound: [web_sound_input]")
|
||||
message_admins("[key_name(src)] played sound: [web_sound_input]")
|
||||
to_chat(world, "<span class='boldannounceooc'>[src.ckey] played a sound</span>")
|
||||
log_admin("[key_name(client)] played sound: [web_sound_input]")
|
||||
message_admins("[key_name(client)] played sound: [web_sound_input]")
|
||||
to_chat(world, "<span class='boldannounceooc'>[client.ckey] played a sound</span>")
|
||||
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Play Global Sound TGchat")
|
||||
|
||||
if(!must_send_assets && web_sound_url && !findtext(web_sound_url, GLOB.is_http_protocol))
|
||||
to_chat(src, "<span class='boldwarning'>BLOCKED: Content URL not using http(s) protocol</span>", confidential = TRUE)
|
||||
to_chat(src, "<span class='warning'>The media provider returned a content URL that isn't using the HTTP or HTTPS protocol</span>", confidential = TRUE)
|
||||
to_chat(client, "<span class='boldwarning'>BLOCKED: Content URL not using http(s) protocol</span>", confidential = TRUE)
|
||||
to_chat(client, "<span class='warning'>The media provider returned a content URL that isn't using the HTTP or HTTPS protocol</span>", confidential = TRUE)
|
||||
return
|
||||
|
||||
if(web_sound_url)
|
||||
@@ -254,14 +222,14 @@ GLOBAL_LIST_EMPTY(sounds_cache)
|
||||
var/client/C = M.client
|
||||
var/player_uid = M.client.UID()
|
||||
if(C.prefs.sound & SOUND_MIDI)
|
||||
if(ckey in M.client.prefs.admin_sound_ckey_ignore)
|
||||
to_chat(C, "<span class='warning'>But [src.ckey] is muted locally in preferences!</span>")
|
||||
if(client.ckey in M.client.prefs.admin_sound_ckey_ignore)
|
||||
to_chat(C, "<span class='warning'>But [client.ckey] is muted locally in preferences!</span>")
|
||||
continue
|
||||
else
|
||||
if(must_send_assets)
|
||||
SSassets.transport.send_assets(C, asset_name)
|
||||
C.tgui_panel?.play_music(web_sound_url, music_extra_data)
|
||||
to_chat(C, "<span class='warning'>(<a href='byond://?src=[player_uid];action=silenceSound'>SILENCE</a>) (<a href='byond://?src=[player_uid];action=muteAdmin&a=[ckey]'>ALWAYS SILENCE THIS ADMIN</a>)</span>")
|
||||
to_chat(C, "<span class='warning'>(<a href='byond://?src=[player_uid];action=silenceSound'>SILENCE</a>) (<a href='byond://?src=[player_uid];action=muteAdmin&a=[client.ckey]'>ALWAYS SILENCE THIS ADMIN</a>)</span>")
|
||||
else
|
||||
to_chat(C, "<span class='warning'>But Admin MIDIs are disabled in preferences!</span>")
|
||||
return
|
||||
|
||||
@@ -1,53 +1,44 @@
|
||||
/proc/possess(obj/O as obj in world)
|
||||
set name = "\[Admin\] Possess Obj"
|
||||
|
||||
if(!check_rights(R_POSSESS))
|
||||
return
|
||||
|
||||
USER_CONTEXT_MENU(possess_object, R_POSSESS, "\[Admin\] Possess Obj", obj/O as obj in world)
|
||||
if(istype(O,/obj/singularity))
|
||||
if(GLOB.configuration.general.forbid_singulo_possession) // I love how this needs to exist
|
||||
to_chat(usr, "It is forbidden to possess singularities.")
|
||||
to_chat(client, "It is forbidden to possess singularities.")
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(O)
|
||||
|
||||
var/confirm = alert("Are you sure you want to possess [O]?", "Confirm possession", "Yes", "No")
|
||||
var/confirm = alert(client, "Are you sure you want to possess [O]?", "Confirm possession", "Yes", "No")
|
||||
|
||||
if(confirm != "Yes")
|
||||
return
|
||||
if(T)
|
||||
log_admin("[key_name(usr)] has possessed [O] ([O.type]) at ([T.x], [T.y], [T.z])")
|
||||
message_admins("[key_name_admin(usr)] has possessed [O] ([O.type]) at ([T.x], [T.y], [T.z])", 1)
|
||||
log_admin("[key_name(client)] has possessed [O] ([O.type]) at ([T.x], [T.y], [T.z])")
|
||||
message_admins("[key_name_admin(client)] has possessed [O] ([O.type]) at ([T.x], [T.y], [T.z])", 1)
|
||||
else
|
||||
log_admin("[key_name(usr)] has possessed [O] ([O.type]) at an unknown location")
|
||||
message_admins("[key_name_admin(usr)] has possessed [O] ([O.type]) at an unknown location", 1)
|
||||
log_admin("[key_name(client)] has possessed [O] ([O.type]) at an unknown location")
|
||||
message_admins("[key_name_admin(client)] has possessed [O] ([O.type]) at an unknown location", 1)
|
||||
|
||||
if(!usr.control_object) //If you're not already possessing something...
|
||||
usr.name_archive = usr.real_name
|
||||
var/mob/client_mob = client.mob
|
||||
|
||||
usr.loc = O
|
||||
usr.real_name = O.name
|
||||
usr.name = O.name
|
||||
usr.client.eye = O
|
||||
usr.control_object = O
|
||||
if(!client_mob.control_object) //If you're not already possessing something...
|
||||
client_mob.name_archive = client_mob.real_name
|
||||
|
||||
client_mob.loc = O
|
||||
client_mob.real_name = O.name
|
||||
client_mob.name = O.name
|
||||
client_mob.client.eye = O
|
||||
client_mob.control_object = O
|
||||
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 = "\[Admin\] Release Obj"
|
||||
//usr.loc = get_turf(usr)
|
||||
|
||||
if(!check_rights(R_POSSESS))
|
||||
return
|
||||
|
||||
if(usr.control_object && usr.name_archive) //if you have a name archived and if you are actually relassing an object
|
||||
usr.real_name = usr.name_archive
|
||||
usr.name = usr.real_name
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
USER_CONTEXT_MENU(release_object, R_POSSESS, "\[Admin\] Release Obj", obj/O as obj in world)
|
||||
var/mob/client_mob = client.mob
|
||||
if(client_mob.control_object && client_mob.name_archive) //if you have a name archived and if you are actually relassing an object
|
||||
client_mob.real_name = client_mob.name_archive
|
||||
client_mob.name = client_mob.real_name
|
||||
if(ishuman(client_mob))
|
||||
var/mob/living/carbon/human/H = client_mob
|
||||
H.name = H.get_visible_name()
|
||||
// usr.regenerate_icons() //So the name is updated properly
|
||||
|
||||
usr.loc = O.loc // Appear where the object you were controlling is -- TLE
|
||||
usr.client.eye = usr
|
||||
usr.control_object = null
|
||||
client_mob.loc = O.loc // Appear where the object you were controlling is -- TLE
|
||||
client_mob.client.eye = client_mob
|
||||
client_mob.control_object = null
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Release Object") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,13 +1,13 @@
|
||||
/client/proc/cmd_mass_screenshot()
|
||||
set category = "Debug"
|
||||
set name = "Mass Screenshot"
|
||||
USER_VERB(mass_screenshot, R_DEBUG, "Mass Screenshot", "Take a sliced screenshot of a z-level.", VERB_CATEGORY_DEBUG)
|
||||
set waitfor = FALSE
|
||||
|
||||
if(!check_rights(R_DEBUG) || !mob)
|
||||
if(!client.mob)
|
||||
return
|
||||
|
||||
var/mob/mob = client.mob
|
||||
|
||||
var/confirmation = tgui_alert(
|
||||
usr,
|
||||
client,
|
||||
"Are you sure you want to mass screenshot this z-level? \
|
||||
Ensure you have emptied your BYOND screenshots folder.",
|
||||
"Mass Screenshot",
|
||||
@@ -15,9 +15,9 @@
|
||||
)
|
||||
if(confirmation != "Yes")
|
||||
return
|
||||
|
||||
|
||||
var/sleep_duration = tgui_input_number(
|
||||
usr,
|
||||
client,
|
||||
"Enter a delay in deciseconds between screenshots to allow the client to render changes.",
|
||||
"Screenshot delay",
|
||||
default = 2, max_value = 10, min_value = 1, round_value = TRUE
|
||||
@@ -26,25 +26,25 @@
|
||||
return
|
||||
|
||||
if(!isobserver(mob))
|
||||
admin_ghost()
|
||||
SSuser_verbs.invoke_verb(client, /datum/user_verb/admin_ghost)
|
||||
|
||||
message_admins("[key_name(usr)] started a mass screenshot operation")
|
||||
message_admins("[key_name(client)] started a mass screenshot operation")
|
||||
|
||||
// Prepare for screenshot
|
||||
var/old_client_view = view
|
||||
var/old_status_bar_visible = winget(src, "menu.statusbar", "is-checked") == "false" ? "true" : "false"
|
||||
var/old_client_view = client.view
|
||||
var/old_status_bar_visible = winget(client, "menu.statusbar", "is-checked") == "false" ? "true" : "false"
|
||||
var/old_hud_version = mob.hud_used ? mob.hud_used.hud_version : HUD_STYLE_NOHUD
|
||||
var/old_mob_alpha = mob.alpha
|
||||
var/old_mob_movement = mob.animate_movement
|
||||
|
||||
view = 15
|
||||
winset(src, "paramapwindow.status_bar", "is-visible=false")
|
||||
client.view = 15
|
||||
winset(client, "paramapwindow.status_bar", "is-visible=false")
|
||||
mob.hud_used?.show_hud(HUD_STYLE_NOHUD)
|
||||
mob.hud_used?.remove_parallax()
|
||||
mob.alpha = 0
|
||||
mob.animate_movement = NO_STEPS
|
||||
|
||||
var/half_chunk_size = view + 1
|
||||
var/half_chunk_size = client.view + 1
|
||||
var/chunk_size = half_chunk_size * 2 - 1
|
||||
var/cur_x = half_chunk_size
|
||||
var/cur_y = half_chunk_size
|
||||
@@ -60,7 +60,7 @@
|
||||
while(cur_x < width)
|
||||
mob.forceMove(locate(cur_x, cur_y, cur_z))
|
||||
sleep(sleep_duration)
|
||||
winset(src, null, "command='.screenshot auto'")
|
||||
winset(client, null, "command='.screenshot auto'")
|
||||
if(cur_x == width_inside)
|
||||
break
|
||||
cur_x += chunk_size
|
||||
@@ -72,10 +72,10 @@
|
||||
cur_y = min(cur_y, height_inside)
|
||||
catch(var/exception/e)
|
||||
exception = e
|
||||
|
||||
|
||||
// Bring UI back
|
||||
view = old_client_view
|
||||
winset(src, "paramapwindow.status_bar", "is-visible=" + old_status_bar_visible)
|
||||
client.view = old_client_view
|
||||
winset(client, "paramapwindow.status_bar", "is-visible=" + old_status_bar_visible)
|
||||
mob.alpha = old_mob_alpha
|
||||
mob.hud_used?.show_hud(old_hud_version)
|
||||
mob.hud_used?.update_parallax_pref()
|
||||
@@ -84,4 +84,4 @@
|
||||
if(exception)
|
||||
throw exception
|
||||
|
||||
to_chat(usr, "Provide these values when asked for the MapTileImageTool: [width] [height] [half_chunk_size] [world.icon_size]")
|
||||
to_chat(client, "Provide these values when asked for the MapTileImageTool: [width] [height] [half_chunk_size] [world.icon_size]")
|
||||
|
||||
@@ -1,30 +1,25 @@
|
||||
/client/proc/admin_serialize()
|
||||
set name = "Serialize Marked Datum"
|
||||
set desc = "Turns your marked object into a JSON string you can later use to re-create the object"
|
||||
set category = "Debug"
|
||||
|
||||
if(!check_rights(R_ADMIN|R_DEBUG))
|
||||
USER_VERB(serialize_datum, R_ADMIN|R_DEBUG, "Serialize Marked Datum", \
|
||||
"Turns your marked object into a JSON string you can later use to re-create the object", \
|
||||
VERB_CATEGORY_DEBUG)
|
||||
if(!istype(client.holder.marked_datum, /atom/movable))
|
||||
to_chat(client, "The marked datum is not an atom/movable!")
|
||||
return
|
||||
|
||||
if(!istype(holder.marked_datum, /atom/movable))
|
||||
to_chat(src, "The marked datum is not an atom/movable!")
|
||||
return
|
||||
|
||||
var/atom/movable/AM = holder.marked_datum
|
||||
var/atom/movable/AM = client.holder.marked_datum
|
||||
|
||||
var/json_data = json_encode(AM.serialize())
|
||||
|
||||
var/choice = alert(usr, "Would you like to store this on your PC or server side?", "Storage Location", "PC", "Server", "Cancel")
|
||||
var/choice = alert(client, "Would you like to store this on your PC or server side?", "Storage Location", "PC", "Server", "Cancel")
|
||||
if(!choice || choice == "Cancel")
|
||||
return
|
||||
|
||||
if(choice == "PC")
|
||||
to_chat(src, chat_box_examine(json_data))
|
||||
to_chat(client, chat_box_examine(json_data))
|
||||
|
||||
if(choice == "Server")
|
||||
// Right, get their slot names
|
||||
var/list/slots = list("--NEW--")
|
||||
var/datum/db_query/dbq = SSdbcore.NewQuery("SELECT slotname FROM json_datum_saves WHERE ckey=:ckey", list("ckey" = usr.ckey))
|
||||
var/datum/db_query/dbq = SSdbcore.NewQuery("SELECT slotname FROM json_datum_saves WHERE ckey=:ckey", list("ckey" = client.ckey))
|
||||
if(!dbq.warn_execute())
|
||||
qdel(dbq)
|
||||
return
|
||||
@@ -34,14 +29,14 @@
|
||||
|
||||
qdel(dbq)
|
||||
|
||||
var/slot_choice = input(usr, "Select a slot to update, or create a new one.", "Slot Selection") as null|anything in slots
|
||||
var/slot_choice = input(client, "Select a slot to update, or create a new one.", "Slot Selection") as null|anything in slots
|
||||
|
||||
if(!slot_choice)
|
||||
return
|
||||
|
||||
if(slot_choice == "--NEW--")
|
||||
// New slot, save to DB
|
||||
var/chosen_slot_name = input(usr, "Name your slot", "Slot name") as null|text
|
||||
var/chosen_slot_name = input(client, "Name your slot", "Slot name") as null|text
|
||||
if(!chosen_slot_name || length(chosen_slot_name) == 0)
|
||||
return
|
||||
|
||||
@@ -50,7 +45,7 @@
|
||||
|
||||
// And save
|
||||
var/datum/db_query/dbq2 = SSdbcore.NewQuery("INSERT INTO json_datum_saves (ckey, slotname, slotjson) VALUES(:ckey, :slotname, :slotjson)", list(
|
||||
"ckey" = usr.ckey,
|
||||
"ckey" = client.ckey,
|
||||
"slotname" = clean_name,
|
||||
"slotjson" = json_data
|
||||
))
|
||||
@@ -59,18 +54,18 @@
|
||||
return
|
||||
|
||||
qdel(dbq2)
|
||||
to_chat(usr, "Successfully saved <code>[clean_name]</code>. You can spawn it from <code>Debug > Spawn Saved JSON Datum</code>.")
|
||||
to_chat(client, "Successfully saved <code>[clean_name]</code>. You can spawn it from <code>Debug > Spawn Saved JSON Datum</code>.")
|
||||
|
||||
else
|
||||
// Existing slot, warn first
|
||||
var/confirmation = alert(usr, "Are you sure you want to update '[slot_choice]'? This cannot be undone!", "You sure?", "Yes", "No")
|
||||
var/confirmation = alert(client, "Are you sure you want to update '[slot_choice]'? This cannot be undone!", "You sure?", "Yes", "No")
|
||||
if(confirmation != "Yes")
|
||||
return
|
||||
|
||||
// Now update
|
||||
var/datum/db_query/dbq2 = SSdbcore.NewQuery("UPDATE json_datum_saves SET slotjson=:slotjson WHERE slotname=:slotname AND ckey=:ckey", list(
|
||||
"slotjson" = json_data,
|
||||
"ckey" = usr.ckey,
|
||||
"ckey" = client.ckey,
|
||||
"slotname" = slot_choice
|
||||
))
|
||||
if(!dbq2.warn_execute())
|
||||
@@ -78,36 +73,19 @@
|
||||
return
|
||||
|
||||
qdel(dbq2)
|
||||
to_chat(usr, "Successfully updated <code>[slot_choice]</code>. You can spawn it from <code>Debug > Spawn Saved JSON Datum</code>.")
|
||||
to_chat(client, "Successfully updated <code>[slot_choice]</code>. You can spawn it from <code>Debug > Spawn Saved JSON Datum</code>.")
|
||||
|
||||
|
||||
/client/proc/admin_deserialize()
|
||||
set name = "Deserialize JSON datum"
|
||||
set desc = "Creates an object from a JSON string"
|
||||
set category = "Debug"
|
||||
|
||||
if(!check_rights(R_SPAWN)) // this involves spawning things
|
||||
return
|
||||
|
||||
var/json_text = input("Enter the JSON code:","Text") as message|null
|
||||
USER_VERB(deserialize_json, R_SPAWN, "Deserialize JSON datum", "Creates an object from a JSON string", VERB_CATEGORY_DEBUG)
|
||||
var/json_text = input(client, "Enter the JSON code:","Text") as message|null
|
||||
if(json_text)
|
||||
json_to_object(json_text, get_turf(usr))
|
||||
message_admins("[key_name_admin(usr)] spawned an atom from a custom JSON object.")
|
||||
log_admin("[key_name(usr)] spawned an atom from a custom JSON object, JSON Text: [json_text]")
|
||||
|
||||
|
||||
/client/proc/json_spawn_menu()
|
||||
set name = "Spawn Saved JSON Datum"
|
||||
set desc = "Spawns a JSON datums saved server side"
|
||||
set category = "Debug"
|
||||
|
||||
// This needs a holder to function
|
||||
if(!check_rights(R_SPAWN) || !holder)
|
||||
return
|
||||
json_to_object(json_text, get_turf(client.mob))
|
||||
message_admins("[key_name_admin(client)] spawned an atom from a custom JSON object.")
|
||||
log_admin("[key_name(client)] spawned an atom from a custom JSON object, JSON Text: [json_text]")
|
||||
|
||||
USER_VERB(spawn_json, R_SPAWN, "Spawn Saved JSON Datum", "Spawns a JSON datums saved server side", VERB_CATEGORY_DEBUG)
|
||||
// Right, get their slot names
|
||||
var/list/slots = list()
|
||||
var/datum/db_query/dbq = SSdbcore.NewQuery("SELECT slotname, id FROM json_datum_saves WHERE ckey=:ckey", list("ckey" = usr.ckey))
|
||||
var/datum/db_query/dbq = SSdbcore.NewQuery("SELECT slotname, id FROM json_datum_saves WHERE ckey=:ckey", list("ckey" = client.ckey))
|
||||
if(!dbq.warn_execute())
|
||||
qdel(dbq)
|
||||
return
|
||||
@@ -117,10 +95,10 @@
|
||||
qdel(dbq)
|
||||
|
||||
|
||||
var/datum/browser/popup = new(usr, "jsonspawnmenu", "JSON Spawn Menu", 400, 300)
|
||||
var/datum/browser/popup = new(client, "jsonspawnmenu", "JSON Spawn Menu", 400, 300)
|
||||
|
||||
// Cache this to reduce proc jumps
|
||||
var/holder_uid = holder.UID()
|
||||
var/holder_uid = client.holder.UID()
|
||||
|
||||
var/list/rows = list()
|
||||
rows += "<table><tr><th scope='col' width='90%'>Slot</th><th scope='col' width='10%'>Actions</th></tr>"
|
||||
|
||||
@@ -1,51 +1,32 @@
|
||||
/client/proc/admin_redo_space_transitions()
|
||||
set name = "Remake Space Transitions"
|
||||
set desc = "Re-assigns all space transitions"
|
||||
set category = "Debug"
|
||||
|
||||
if(!check_rights(R_ADMIN|R_DEBUG))
|
||||
return
|
||||
|
||||
var/choice = alert("Do you want to rebuild space transitions?", null,"Yes", "No")
|
||||
USER_VERB_VISIBILITY(redo_space_transitions, VERB_VISIBILITY_FLAG_MOREDEBUG)
|
||||
USER_VERB(redo_space_transitions, R_ADMIN|R_DEBUG, "Remake Space Transitions", "Re-assigns all space transitions", VERB_CATEGORY_DEBUG)
|
||||
var/choice = alert(client, "Do you want to rebuild space transitions?", null,"Yes", "No")
|
||||
|
||||
if(choice == "No")
|
||||
return
|
||||
|
||||
|
||||
message_admins("[key_name_admin(usr)] re-assigned all space transitions")
|
||||
message_admins("[key_name_admin(client)] re-assigned all space transitions")
|
||||
GLOB.space_manager.do_transition_setup()
|
||||
log_admin("[key_name(usr)] re-assigned all space transitions")
|
||||
log_admin("[key_name(client)] re-assigned all space transitions")
|
||||
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Remake Space Transitions") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
|
||||
|
||||
/client/proc/make_turf_space_map()
|
||||
set name = "Make Space Map"
|
||||
set desc = "Create a map of the space levels as turfs at your feet"
|
||||
set category = "Debug"
|
||||
|
||||
if(!check_rights(R_ADMIN|R_DEBUG))
|
||||
return
|
||||
|
||||
var/choice = alert("Are you sure you want to make a space map out of turfs?", null,"Yes","No")
|
||||
USER_VERB_VISIBILITY(make_turf_space_map, VERB_VISIBILITY_FLAG_MOREDEBUG)
|
||||
USER_VERB(make_turf_space_map, R_ADMIN|R_DEBUG, "Make Space Map", "Create a map of the space levels as turfs at your feet", VERB_CATEGORY_DEBUG)
|
||||
var/choice = alert(client, "Are you sure you want to make a space map out of turfs?", null,"Yes","No")
|
||||
|
||||
if(choice == "No")
|
||||
return
|
||||
|
||||
var/static/list/sectortypes = list(TRANSITION_TAG_SPACE, TRANSITION_TAG_LAVALAND)
|
||||
var/sectortype = tgui_input_list(usr, "Please select sector type", "", sectortypes)
|
||||
var/sectortype = tgui_input_list(client, "Please select sector type", "", sectortypes)
|
||||
|
||||
if(!(sectortype in sectortypes))
|
||||
return
|
||||
|
||||
message_admins("[key_name_admin(usr)] made a space map")
|
||||
message_admins("[key_name_admin(client)] made a space map")
|
||||
|
||||
GLOB.space_manager.map_as_turfs(get_turf(usr), sectortype)
|
||||
log_admin("[key_name(usr)] made a space map")
|
||||
GLOB.space_manager.map_as_turfs(get_turf(client.mob), sectortype)
|
||||
log_admin("[key_name(client)] made a space map")
|
||||
|
||||
|
||||
/proc/save_lavaland_maps()
|
||||
for(var/zlvl in levels_by_trait(ORE_LEVEL))
|
||||
GLOB.maploader.save_map(locate(1, 1, zlvl), locate(world.maxx, world.maxy, zlvl), "lavaland_[zlvl]")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Make Space Map") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -1,21 +1,13 @@
|
||||
//Merged Doohl's and the existing ticklag as they both had good elements about them ~Carn
|
||||
|
||||
/client/proc/ticklag()
|
||||
set category = "Debug"
|
||||
set name = "Set Ticklag"
|
||||
set desc = "Sets a new tick lag. Recommend you don't mess with this too much! Stable, time-tested ticklag value is 0.9"
|
||||
|
||||
if(!check_rights(R_MAINTAINER)) return
|
||||
|
||||
var/newtick = input("Sets a new tick lag. Please don't mess with this too much! The stable, time-tested ticklag value is 0.9","Lag of Tick", world.tick_lag) as num|null
|
||||
USER_VERB(set_ticklag, R_MAINTAINER, "Set Ticklag", \
|
||||
"Sets a new tick lag. Recommend you don't mess with this too much! Stable, time-tested ticklag value is 0.9", \
|
||||
VERB_CATEGORY_DEBUG)
|
||||
var/newtick = input(client, "Sets a new tick lag. Please don't mess with this too much! The stable, time-tested ticklag value is 0.9","Lag of Tick", world.tick_lag) as num|null
|
||||
//I've used ticks of 2 before to help with serious singulo lags
|
||||
if(newtick && newtick <= 2 && newtick > 0)
|
||||
log_admin("[key_name(src)] has modified world.tick_lag to [newtick]", 0)
|
||||
message_admins("[key_name_admin(src)] has modified world.tick_lag to [newtick]", 0)
|
||||
log_admin("[key_name(client)] has modified world.tick_lag to [newtick]", 0)
|
||||
message_admins("[key_name_admin(client)] has modified world.tick_lag to [newtick]", 0)
|
||||
world.tick_lag = newtick
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Set Ticklag") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
else
|
||||
to_chat(src, "<span class='warning'>Error: ticklag(): Invalid world.ticklag value. No changes made.</span>")
|
||||
|
||||
|
||||
to_chat(client, "<span class='warning'>Error: ticklag(): Invalid world.ticklag value. No changes made.</span>")
|
||||
|
||||
@@ -1,32 +1,9 @@
|
||||
GLOBAL_LIST_INIT(admin_verbs_show_debug_verbs, list(
|
||||
/client/proc/camera_view,
|
||||
/client/proc/sec_camera_report,
|
||||
/client/proc/intercom_view,
|
||||
/client/proc/Cell, //More air things
|
||||
/client/proc/atmosscan, //check plumbing
|
||||
/client/proc/powerdebug, //check power
|
||||
/client/proc/count_objects_on_z_level,
|
||||
/client/proc/count_objects_all,
|
||||
/client/proc/cmd_assume_direct_control,
|
||||
/client/proc/startSinglo,
|
||||
/client/proc/cmd_admin_grantfullaccess,
|
||||
/client/proc/cmd_admin_areatest,
|
||||
/client/proc/cmd_admin_rejuvenate,
|
||||
/datum/admins/proc/show_traitor_panel,
|
||||
/client/proc/forceEvent,
|
||||
/client/proc/admin_redo_space_transitions,
|
||||
/client/proc/make_turf_space_map,
|
||||
/client/proc/cmd_clean_radiation,
|
||||
))
|
||||
|
||||
// Would be nice to make this a permanent admin pref so we don't need to click it each time
|
||||
/client/proc/enable_debug_verbs()
|
||||
set category = "Debug"
|
||||
set name = "Debug verbs"
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
add_verb(src, GLOB.admin_verbs_show_debug_verbs)
|
||||
|
||||
USER_VERB(enable_debug_verbs, R_DEBUG, "Debug verbs", "Enable all debug verbs.", VERB_CATEGORY_DEBUG)
|
||||
SSuser_verbs.update_visibility_flag(client, VERB_VISIBILITY_FLAG_MOREDEBUG, TRUE)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Debug Verbs") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
USER_VERB_VISIBILITY(disable_debug_verbs, VERB_VISIBILITY_FLAG_MOREDEBUG)
|
||||
USER_VERB(disable_debug_verbs, R_DEBUG, "Debug verbs", "Disable all debug verbs.", VERB_CATEGORY_DEBUG)
|
||||
SSuser_verbs.update_visibility_flag(client, VERB_VISIBILITY_FLAG_MOREDEBUG, FALSE)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Debug Verbs") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
/client/proc/view_instances()
|
||||
set name = "View Server Instances"
|
||||
set desc = "View the running server instances"
|
||||
set category = "Server"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
to_chat(usr, "<b>Server instances info</b>")
|
||||
USER_VERB(view_server_instances, R_ADMIN, "View Server Instances", "View the running server instances", VERB_CATEGORY_SERVER)
|
||||
to_chat(client, "<b>Server instances info</b>")
|
||||
var/datum/db_query/dbq1 = SSdbcore.NewQuery({"
|
||||
SELECT server_id, key_name, key_value FROM instance_data_cache WHERE server_id IN
|
||||
(SELECT server_id FROM instance_data_cache WHERE
|
||||
@@ -29,5 +22,5 @@
|
||||
var/server_data = servers_outer[server]
|
||||
var/players = text2num(server_data["playercount"])
|
||||
|
||||
to_chat(usr, "<code>[server]</code> - [players] player[players == 1 ? "" : "s"] online.")
|
||||
to_chat(usr, "<i>Offline instances are not reported</i>")
|
||||
to_chat(client, "<code>[server]</code> - [players] player[players == 1 ? "" : "s"] online.")
|
||||
to_chat(client, "<i>Offline instances are not reported</i>")
|
||||
|
||||
Reference in New Issue
Block a user