Admin Verb Datums MkIII | Now with functional command bar (#82511)

This commit is contained in:
Zephyr
2024-04-12 15:27:09 -04:00
committed by GitHub
parent e0d335b442
commit 7f8752be14
104 changed files with 1898 additions and 3287 deletions

View File

@@ -13,6 +13,8 @@
},
"files.eol": "\n",
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
"editor.insertSpaces": false,
"git.branchProtection": ["master"],
"gitlens.advanced.blame.customArguments": ["-w"],
"tgstationTestExplorer.project.resultsType": "json",

View File

@@ -11,7 +11,7 @@
return FALSE;\
}\
##Path/Read(savefile/savefile){\
qdel(src);\
del(src);\
}\
##Path/Write(savefile/savefile){\
return;\
@@ -19,3 +19,4 @@
#else
#define GENERAL_PROTECT_DATUM(Path)
#endif
// we del instead of qdel because for security reasons we must ensure the datum does not exist if Read is called. qdel will not enforce this.

View File

@@ -23,6 +23,8 @@
#define BANTYPE_ANY_JOB 9
//Admin Permissions
/// Used for signifying that all admins can use this regardless of actual permissions
#define R_NONE NONE
#define R_BUILD (1<<0)
#define R_ADMIN (1<<1)
#define R_BAN (1<<2)
@@ -174,4 +176,3 @@ GLOBAL_VAR_INIT(ghost_role_flags, ALL)
/// Used in logging uses of admin verbs (and sometimes some non-admin or debug verbs) to the blackbox
/// Only pass it a string key, the verb being used.
#define BLACKBOX_LOG_ADMIN_VERB(the_verb) SSblackbox.record_feedback("tally", "admin_verb", 1, the_verb)

View File

@@ -0,0 +1,92 @@
/client/CanProcCall(procname)
if(findtext(procname, "__avd_") == 1)
message_admins("[key_name_admin(usr)] attempted to directly call admin verb '[procname]'.")
log_admin("[key_name(usr)] attempted to directly call admin verb '[procname]'.")
return FALSE
return ..()
/**
* This is the only macro you should use to define admin verbs.
* It will define the verb and the verb holder for you.
* Using it is very simple:
* ADMIN_VERB(verb_path, R_PERM, "Name", "Description", "Admin.Category", args...)
* This sets up all of the above and also acts as syntatic sugar as a verb delcaration for the verb itself.
* Note that the verb args have an injected `client/user` argument that is the user that called the verb.
* Do not use usr in your verb; technically you can but I'll kill you.
*/
#define _ADMIN_VERB(verb_path_name, verb_permissions, verb_name, verb_desc, verb_category, show_in_context_menu, verb_args...) \
/datum/admin_verb/##verb_path_name \
{ \
name = ##verb_name; \
description = ##verb_desc; \
category = ##verb_category; \
permissions = ##verb_permissions; \
verb_path = /client/proc/__avd_##verb_path_name; \
}; \
/client/proc/__avd_##verb_path_name(##verb_args) \
{ \
set name = ##verb_name; \
set desc = ##verb_desc; \
set hidden = FALSE; /* this is explicitly needed as the proc begins with an underscore */ \
set popup_menu = ##show_in_context_menu; \
set category = ##verb_category; \
var/list/_verb_args = list(usr, /datum/admin_verb/##verb_path_name); \
_verb_args += args; \
SSadmin_verbs.dynamic_invoke_verb(arglist(_verb_args)); \
}; \
/datum/admin_verb/##verb_path_name/__avd_do_verb(client/user, ##verb_args)
#define ADMIN_VERB(verb_path_name, verb_permissions, verb_name, verb_desc, verb_category, verb_args...) \
_ADMIN_VERB(verb_path_name, verb_permissions, verb_name, verb_desc, verb_category, FALSE, ##verb_args)
#define ADMIN_VERB_ONLY_CONTEXT_MENU(verb_path_name, verb_permissions, verb_name, verb_args...) \
_ADMIN_VERB(verb_path_name, verb_permissions, verb_name, ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, TRUE, ##verb_args)
#define ADMIN_VERB_AND_CONTEXT_MENU(verb_path_name, verb_permissions, verb_name, verb_desc, verb_category, verb_args...) \
_ADMIN_VERB(verb_path_name, verb_permissions, verb_name, verb_desc, verb_category, TRUE, ##verb_args)
/// Used to define a special check to determine if the admin verb should exist at all. Useful for verbs such as play sound which require configuration.
#define ADMIN_VERB_CUSTOM_EXIST_CHECK(verb_path_name) \
/datum/admin_verb/##verb_path_name/__avd_check_should_exist()
/// Used to define the visibility flag of the verb. If the admin does not have this flag enabled they will not see the verb.
#define ADMIN_VERB_VISIBILITY(verb_path_name, verb_visibility) /datum/admin_verb/##verb_path_name/visibility_flag = ##verb_visibility
// These are put here to prevent the "procedure override precedes definition" error.
/datum/admin_verb/proc/__avd_get_verb_path()
CRASH("__avd_get_verb_path not defined. use the macro")
/datum/admin_verb/proc/__avd_do_verb(...)
CRASH("__avd_do_verb not defined. use the macro")
/datum/admin_verb/proc/__avd_check_should_exist()
return TRUE
/*
* This is an example of how to use the above macro:
* ```
* ADMIN_VERB(name_of_verb, R_ADMIN, "Verb Name", "Verb Desc", "Verb Category", mob/target in world)
* to_chat(user, "Hello!")
* ```
* Note the implied `client/user` argument that is injected into the verb.
* Also note that byond is shit and you cannot multi-line the macro call.
*/
/// Use this to mark your verb as not having a description. Should ONLY be used if you are also hiding the verb!
#define ADMIN_VERB_NO_DESCRIPTION ""
/// Used to verbs you do not want to show up in the master verb panel.
#define ADMIN_CATEGORY_HIDDEN null
// Admin verb categories
#define ADMIN_CATEGORY_MAIN "Admin"
#define ADMIN_CATEGORY_EVENTS "Admin.Events"
#define ADMIN_CATEGORY_FUN "Admin.Fun"
#define ADMIN_CATEGORY_GAME "Admin.Game"
// Special categories that are seperated
#define ADMIN_CATEGORY_DEBUG "Debug"
#define ADMIN_CATEGORY_SERVER "Server"
#define ADMIN_CATEGORY_OBJECT "Object"
#define ADMIN_CATEGORY_MAPPING "Mapping"
#define ADMIN_CATEGORY_PROFILE "Profile"
// Visibility flags
#define ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG "Map-Debug"

View File

@@ -137,6 +137,7 @@
#define INIT_ORDER_BLACKBOX 94
#define INIT_ORDER_SERVER_MAINT 93
#define INIT_ORDER_INPUT 85
#define INIT_ORDER_ADMIN_VERBS 84 // needs to be pretty high, admins cant do much without it
#define INIT_ORDER_SOUNDS 83
#define INIT_ORDER_INSTRUMENTS 82
#define INIT_ORDER_GREYSCALE 81

View File

@@ -113,11 +113,7 @@ GLOBAL_LIST_INIT(random_hallucination_weighted_list, generate_hallucination_weig
to_chat(usr, span_boldnotice("The total weight of the hallucination weighted list is [total_weight]."))
return total_weight
/// Debug verb for getting the weight of each distinct type within the random_hallucination_weighted_list
/client/proc/debug_hallucination_weighted_list_per_type()
set name = "Show Hallucination Weights"
set category = "Debug"
ADMIN_VERB(debug_hallucination_weighted_list_per_type, R_DEBUG, "Show Hallucination Weights", "View the weight of each hallucination subtype in the random weighted list.", ADMIN_CATEGORY_DEBUG)
var/header = "<tr><th>Type</th> <th>Weight</th> <th>Percent</th>"
var/total_weight = debug_hallucination_weighted_list()
@@ -153,7 +149,7 @@ GLOBAL_LIST_INIT(random_hallucination_weighted_list, generate_hallucination_weig
var/page_style = "<style>table, th, td {border: 1px solid black;border-collapse: collapse;}</style>"
var/page_contents = "[page_style]<table style=\"width:100%\">[header][jointext(assoc_to_keys(all_weights), "")]</table>"
var/datum/browser/popup = new(mob, "hallucinationdebug", "Hallucination Weights", 600, 400)
var/datum/browser/popup = new(user.mob, "hallucinationdebug", "Hallucination Weights", 600, 400)
popup.set_content(page_contents)
popup.open()

View File

@@ -44,40 +44,30 @@
offset[2] += y_off
return offset_to_screen_loc(offset[1], offset[2], our_client?.view)
//Debug procs
/client/proc/test_movable_UI()
set category = "Debug"
set name = "Spawn Movable UI Object"
var/atom/movable/screen/movable/M = new()
ADMIN_VERB(test_movable_UI, R_DEBUG, "Spawn Movable UI Object", "Spawn a movable UI object for testing.", ADMIN_CATEGORY_DEBUG)
var/atom/movable/screen/movable/M = new
M.name = "Movable UI Object"
M.icon_state = "block"
M.maptext = MAPTEXT("Movable")
M.maptext_width = 64
var/screen_l = input(usr,"Where on the screen? (Formatted as 'X,Y' e.g: '1,1' for bottom left)","Spawn Movable UI Object") as text|null
var/screen_l = input(user, "Where on the screen? (Formatted as 'X,Y' e.g: '1,1' for bottom left)","Spawn Movable UI Object") as text|null
if(!screen_l)
return
M.screen_loc = screen_l
user.screen += M
screen += M
/client/proc/test_snap_UI()
set category = "Debug"
set name = "Spawn Snap UI Object"
var/atom/movable/screen/movable/snap/S = new()
ADMIN_VERB(test_snap_ui, R_DEBUG, "Spawn Snap UI Object", "Spawn a snap UI object for testing.", ADMIN_CATEGORY_DEBUG)
var/atom/movable/screen/movable/snap/S = new
S.name = "Snap UI Object"
S.icon_state = "block"
S.maptext = MAPTEXT("Snap")
S.maptext_width = 64
var/screen_l = input(usr,"Where on the screen? (Formatted as 'X,Y' e.g: '1,1' for bottom left)","Spawn Snap UI Object") as text|null
var/screen_l = input(user,"Where on the screen? (Formatted as 'X,Y' e.g: '1,1' for bottom left)","Spawn Snap UI Object") as text|null
if(!screen_l)
return
S.screen_loc = screen_l
screen += S
user.screen += S

View File

@@ -44,15 +44,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/statclick)
usr.client.debug_variables(target)
message_admins("Admin [key_name_admin(usr)] is debugging the [target] [class].")
// Debug verbs.
/client/proc/restart_controller(controller in list("Master", "Failsafe"))
set category = "Debug"
set name = "Restart Controller"
set desc = "Restart one of the various periodic loop controllers for the game (be careful!)"
if(!holder)
return
ADMIN_VERB(restart_controller, R_DEBUG, "Restart Controller", "Restart one of the various periodic loop controllers for the game (be careful!)", ADMIN_CATEGORY_DEBUG, controller in list("Master", "Failsafe"))
switch(controller)
if("Master")
Recreate_MC()
@@ -61,16 +53,9 @@ INITIALIZE_IMMEDIATE(/obj/effect/statclick)
new /datum/controller/failsafe()
BLACKBOX_LOG_ADMIN_VERB("Restart Failsafe Controller")
message_admins("Admin [key_name_admin(usr)] has restarted the [controller] controller.")
/client/proc/debug_controller()
set category = "Debug"
set name = "Debug Controller"
set desc = "Debug the various periodic loop controllers for the game (be careful!)"
if(!holder)
return
message_admins("Admin [key_name_admin(user)] has restarted the [controller] controller.")
ADMIN_VERB(debug_controller, R_DEBUG, "Debug Controller", "Debug the various periodic loop controllers for the game (be careful!)", ADMIN_CATEGORY_DEBUG)
var/list/controllers = list()
var/list/controller_choices = list()
@@ -85,7 +70,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/statclick)
if (!istype(controller))
return
debug_variables(controller)
SSadmin_verbs.dynamic_invoke_verb(user, /datum/admin_verb/debug_variables, controller)
BLACKBOX_LOG_ADMIN_VERB("Debug Controller")
message_admins("Admin [key_name_admin(usr)] is debugging the [controller] controller.")
message_admins("Admin [key_name_admin(user)] is debugging the [controller] controller.")

View File

@@ -0,0 +1,150 @@
GENERAL_PROTECT_DATUM(/datum/controller/subsystem/admin_verbs)
SUBSYSTEM_DEF(admin_verbs)
name = "Admin Verbs"
flags = SS_NO_FIRE
init_order = INIT_ORDER_ADMIN_VERBS
/// A list of all admin verbs indexed by their type.
var/list/datum/admin_verb/admin_verbs_by_type = list()
/// A list of all admin verbs indexed by their visibility flag.
var/list/list/datum/admin_verb/admin_verbs_by_visibility_flag = list()
/// A map of all assosciated admins and their visibility flags.
var/list/admin_visibility_flags = list()
/// A list of all admins that are pending initialization of this SS.
var/list/admins_pending_subsytem_init = list()
/datum/controller/subsystem/admin_verbs/Initialize()
setup_verb_list()
process_pending_admins()
return SS_INIT_SUCCESS
/datum/controller/subsystem/admin_verbs/Recover()
admin_verbs_by_type = SSadmin_verbs.admin_verbs_by_type
/datum/controller/subsystem/admin_verbs/stat_entry(msg)
return "[..()] | V: [length(admin_verbs_by_type)]"
/datum/controller/subsystem/admin_verbs/proc/process_pending_admins()
var/list/pending_admins = admins_pending_subsytem_init
admins_pending_subsytem_init = null
for(var/admin_ckey in pending_admins)
assosciate_admin(GLOB.directory[admin_ckey])
/datum/controller/subsystem/admin_verbs/proc/setup_verb_list()
if(length(admin_verbs_by_type))
CRASH("Attempting to setup admin verbs twice!")
for(var/datum/admin_verb/verb_type as anything in subtypesof(/datum/admin_verb))
var/datum/admin_verb/verb_singleton = new verb_type
if(!verb_singleton.__avd_check_should_exist())
qdel(verb_singleton, force = TRUE)
continue
admin_verbs_by_type[verb_type] = verb_singleton
if(verb_singleton.visibility_flag)
if(!(verb_singleton.visibility_flag in admin_verbs_by_visibility_flag))
admin_verbs_by_visibility_flag[verb_singleton.visibility_flag] = list()
admin_verbs_by_visibility_flag[verb_singleton.visibility_flag] |= list(verb_singleton)
/datum/controller/subsystem/admin_verbs/proc/get_valid_verbs_for_admin(client/admin)
if(isnull(admin.holder))
CRASH("Why are we checking a non-admin for their valid... ahem... admin verbs?")
var/list/has_permission = list()
for(var/permission_flag in GLOB.bitflags)
if(admin.holder.check_for_rights(permission_flag))
has_permission["[permission_flag]"] = TRUE
var/list/valid_verbs = list()
for(var/datum/admin_verb/verb_type as anything in admin_verbs_by_type)
var/datum/admin_verb/verb_singleton = admin_verbs_by_type[verb_type]
if(!verify_visibility(admin, verb_singleton))
continue
var/verb_permissions = verb_singleton.permissions
if(verb_permissions == R_NONE)
valid_verbs |= list(verb_singleton)
else for(var/permission_flag in bitfield_to_list(verb_permissions))
if(!has_permission["[permission_flag]"])
continue
valid_verbs |= list(verb_singleton)
return valid_verbs
/datum/controller/subsystem/admin_verbs/proc/verify_visibility(client/admin, datum/admin_verb/verb_singleton)
var/needed_flag = verb_singleton.visibility_flag
return !needed_flag || (needed_flag in admin_visibility_flags[admin.ckey])
/datum/controller/subsystem/admin_verbs/proc/update_visibility_flag(client/admin, flag, state)
if(state)
admin_visibility_flags[admin.ckey] |= list(flag)
assosciate_admin(admin)
return
admin_visibility_flags[admin.ckey] -= list(flag)
// they lost the flag, iterate over verbs with that flag and yoink em
for(var/datum/admin_verb/verb_singleton as anything in admin_verbs_by_visibility_flag[flag])
verb_singleton.unassign_from_client(admin)
admin.init_verbs()
/datum/controller/subsystem/admin_verbs/proc/dynamic_invoke_verb(client/admin, datum/admin_verb/verb_type, ...)
if(IsAdminAdvancedProcCall())
message_admins("PERMISSION ELEVATION: [key_name_admin(admin)] attempted to dynamically invoke admin verb '[verb_type]'.")
return
if(ismob(admin))
var/mob/mob = admin
admin = mob.client
if(!ispath(verb_type, /datum/admin_verb) || verb_type == /datum/admin_verb)
CRASH("Attempted to dynamically invoke admin verb with invalid typepath '[verb_type]'.")
if(isnull(admin.holder))
CRASH("Attempted to dynamically invoke admin verb '[verb_type]' with a non-admin.")
var/list/verb_args = args.Copy()
verb_args.Cut(2, 3)
var/datum/admin_verb/verb_singleton = admin_verbs_by_type[verb_type] // this cannot be typed because we need to use `:`
if(isnull(verb_singleton))
CRASH("Attempted to dynamically invoke admin verb '[verb_type]' that doesn't exist.")
if(!admin.holder.check_for_rights(verb_singleton.permissions))
to_chat(admin, span_adminnotice("You lack the permissions to do this."))
return
var/old_usr = usr
usr = admin.mob
// THE MACRO ENSURES THIS EXISTS. IF IT EVER DOESNT EXIST SOMEONE DIDNT USE THE DAMN MACRO!
verb_singleton.__avd_do_verb(arglist(verb_args))
usr = old_usr
SSblackbox.record_feedback("tally", "dynamic_admin_verb_invocation", 1, "[verb_type]")
/**
* Assosciates and/or resyncs an admin with their accessible admin verbs.
*/
/datum/controller/subsystem/admin_verbs/proc/assosciate_admin(client/admin)
if(IsAdminAdvancedProcCall())
return
if(!isnull(admins_pending_subsytem_init)) // if the list exists we are still initializing
to_chat(admin, span_big(span_green("Admin Verbs are still initializing. Please wait and you will be automatically assigned your verbs when it is complete.")))
admins_pending_subsytem_init |= list(admin.ckey)
return
// refresh their verbs
admin_visibility_flags[admin.ckey] ||= list()
for(var/datum/admin_verb/verb_singleton as anything in get_valid_verbs_for_admin(admin))
verb_singleton.assign_to_client(admin)
admin.init_verbs()
/**
* Unassosciates an admin from their admin verbs.
* Goes over all admin verbs because we don't know which ones are assigned to the admin's mob without a bunch of extra bookkeeping.
* This might be a performance issue in the future if we have a lot of admin verbs.
*/
/datum/controller/subsystem/admin_verbs/proc/deassosciate_admin(client/admin)
if(IsAdminAdvancedProcCall())
return
UnregisterSignal(admin, COMSIG_CLIENT_MOB_LOGIN)
for(var/datum/admin_verb/verb_type as anything in admin_verbs_by_type)
admin_verbs_by_type[verb_type].unassign_from_client(admin)
admin_visibility_flags -= list(admin.ckey)

View File

@@ -87,12 +87,9 @@ SUBSYSTEM_DEF(explosions)
throwturf -= T
held_throwturf -= T
/client/proc/check_bomb_impacts()
set name = "Check Bomb Impact"
set category = "Debug"
var/newmode = tgui_alert(usr, "Use reactionary explosions?","Check Bomb Impact", list("Yes", "No"))
var/turf/epicenter = get_turf(mob)
ADMIN_VERB(check_bomb_impacts, R_DEBUG, "Check Bomb Impact", "See what the effect of a bomb would be.", ADMIN_CATEGORY_DEBUG)
var/newmode = tgui_alert(user, "Use reactionary explosions?","Check Bomb Impact", list("Yes", "No"))
var/turf/epicenter = get_turf(user.mob)
if(!epicenter)
return
@@ -100,7 +97,7 @@ SUBSYSTEM_DEF(explosions)
var/heavy = 0
var/light = 0
var/list/choices = list("Small Bomb","Medium Bomb","Big Bomb","Custom Bomb")
var/choice = tgui_input_list(usr, "Pick the bomb size", "Bomb Size?", choices)
var/choice = tgui_input_list(user, "Pick the bomb size", "Bomb Size?", choices)
switch(choice)
if(null)
return 0
@@ -117,9 +114,9 @@ SUBSYSTEM_DEF(explosions)
heavy = 5
light = 7
if("Custom Bomb")
dev = input("Devastation range (Tiles):") as num
heavy = input("Heavy impact range (Tiles):") as num
light = input("Light impact range (Tiles):") as num
dev = input(user, "Devastation range (Tiles):") as num
heavy = input(user, "Heavy impact range (Tiles):") as num
light = input(user, "Light impact range (Tiles):") as num
var/max_range = max(dev, heavy, light)
var/x0 = epicenter.x

View File

@@ -643,46 +643,38 @@ GLOBAL_LIST_EMPTY(the_station_areas)
holodeck_templates[holo_template.template_id] = holo_template
//Manual loading of away missions.
/client/proc/admin_away()
set name = "Load Away Mission"
set category = "Admin.Events"
if(!holder || !check_rights(R_FUN))
return
ADMIN_VERB(load_away_mission, R_FUN, "Load Away Mission", "Load a specific away mission for the station.", ADMIN_CATEGORY_EVENTS)
if(!GLOB.the_gateway)
if(tgui_alert(usr, "There's no home gateway on the station. You sure you want to continue ?", "Uh oh", list("Yes", "No")) != "Yes")
if(tgui_alert(user, "There's no home gateway on the station. You sure you want to continue ?", "Uh oh", list("Yes", "No")) != "Yes")
return
var/list/possible_options = GLOB.potentialRandomZlevels + "Custom"
var/away_name
var/datum/space_level/away_level
var/secret = FALSE
if(tgui_alert(usr, "Do you want your mission secret? (This will prevent ghosts from looking at your map in any way other than through a living player's eyes.)", "Are you $$$ekret?", list("Yes", "No")) == "Yes")
if(tgui_alert(user, "Do you want your mission secret? (This will prevent ghosts from looking at your map in any way other than through a living player's eyes.)", "Are you $$$ekret?", list("Yes", "No")) == "Yes")
secret = TRUE
var/answer = input("What kind?","Away") as null|anything in possible_options
var/answer = input(user, "What kind?","Away") as null|anything in possible_options
switch(answer)
if("Custom")
var/mapfile = input("Pick file:", "File") as null|file
var/mapfile = input(user, "Pick file:", "File") as null|file
if(!mapfile)
return
away_name = "[mapfile] custom"
to_chat(usr,span_notice("Loading [away_name]..."))
to_chat(user,span_notice("Loading [away_name]..."))
var/datum/map_template/template = new(mapfile, "Away Mission")
away_level = template.load_new_z(secret)
else
if(answer in GLOB.potentialRandomZlevels)
away_name = answer
to_chat(usr,span_notice("Loading [away_name]..."))
to_chat(user,span_notice("Loading [away_name]..."))
var/datum/map_template/template = new(away_name, "Away Mission")
away_level = template.load_new_z(secret)
else
return
message_admins("Admin [key_name_admin(usr)] has loaded [away_name] away mission.")
log_admin("Admin [key_name(usr)] has loaded [away_name] away mission.")
message_admins("Admin [key_name_admin(user)] has loaded [away_name] away mission.")
log_admin("Admin [key_name(user)] has loaded [away_name] away mission.")
if(!away_level)
message_admins("Loading [away_name] failed!")
return

View File

@@ -86,15 +86,9 @@ SUBSYSTEM_DEF(weather)
/datum/controller/subsystem/weather/proc/get_weather_by_type(type)
return locate(type) in processing
/**
* Calls end() on all current weather effects that are currently processing in the weather subsystem.
*/
/client/proc/stop_weather()
set category = "Debug"
set name = "Stop All Active Weather"
log_admin("[key_name(src)] stopped all currently active weather.")
message_admins("[key_name_admin(src)] stopped all currently active weather.")
ADMIN_VERB(stop_weather, R_DEBUG|R_ADMIN, "Stop All Active Weather", "Stop all currently active weather.", ADMIN_CATEGORY_DEBUG)
log_admin("[key_name(user)] stopped all currently active weather.")
message_admins("[key_name_admin(user)] stopped all currently active weather.")
for(var/datum/weather/current_weather as anything in SSweather.processing)
if(current_weather in SSweather.processing)
current_weather.end()

View File

@@ -217,11 +217,11 @@
message = capitalize(message)
if(message_mods[RADIO_EXTENSION] == MODE_ADMIN)
client?.cmd_admin_say(message)
SSadmin_verbs.dynamic_invoke_verb(client, /datum/admin_verb/cmd_admin_say, message)
return
if(message_mods[RADIO_EXTENSION] == MODE_DEADMIN)
client?.dsay(message)
SSadmin_verbs.dynamic_invoke_verb(client, /datum/admin_verb/dsay, message)
return
if(check_emote(message, forced))

View File

@@ -280,12 +280,7 @@
var/list/answers = list()
var/description
/// Debug verb for validating that all puzzgrids can be created successfully.
/// Locked behind a verb because it's fairly slow and memory intensive.
/client/proc/validate_puzzgrids()
set name = "Validate Puzzgrid Config"
set category = "Debug"
ADMIN_VERB(validate_puzzgrids, R_DEBUG, "Validate Puzzgrid Config", "Validate the puzzgrid config to ensure it's set up correctly.", ADMIN_CATEGORY_DEBUG)
var/line_number = 0
for (var/line in world.file2list(PUZZGRID_CONFIG))
@@ -296,16 +291,16 @@
var/line_json_decoded = safe_json_decode(line)
if (isnull(line_json_decoded))
to_chat(src, span_warning("Line [line_number] in puzzgrids.txt is not a JSON: [line]"))
to_chat(user, span_warning("Line [line_number] in puzzgrids.txt is not a JSON: [line]"))
continue
var/datum/puzzgrid/puzzgrid = new
var/populate_result = puzzgrid.populate(line_json_decoded)
if (populate_result != TRUE)
to_chat(src, span_warning("Line [line_number] in puzzgrids.txt is not formatted correctly: [populate_result]"))
to_chat(user, span_warning("Line [line_number] in puzzgrids.txt is not formatted correctly: [populate_result]"))
to_chat(src, span_notice("Validated. If you did not see any errors, you're in the clear."))
to_chat(user, span_notice("Validated. If you did not see any errors, you're in the clear."))
#undef PUZZGRID_CONFIG
#undef PUZZGRID_GROUP_COUNT

View File

@@ -23,7 +23,7 @@
. = ..()
if(.)
return
user.admin_ghost()
SSadmin_verbs.dynamic_invoke_verb(user, /datum/admin_verb/admin_ghost)
return TRUE
/datum/keybinding/admin/player_panel_new
@@ -51,7 +51,7 @@
. = ..()
if(.)
return
user.togglebuildmodeself()
SSadmin_verbs.dynamic_invoke_verb(user, /datum/admin_verb/build_mode_self)
return TRUE
/datum/keybinding/admin/stealthmode
@@ -65,7 +65,7 @@
. = ..()
if(.)
return
user.stealth()
SSadmin_verbs.dynamic_invoke_verb(user, /datum/admin_verb/stealth)
return TRUE
/datum/keybinding/admin/invisimin
@@ -79,7 +79,7 @@
. = ..()
if(.)
return
user.invisimin()
SSadmin_verbs.dynamic_invoke_verb(user, /datum/admin_verb/invisimin)
return TRUE
/datum/keybinding/admin/deadsay
@@ -107,7 +107,7 @@
. = ..()
if(.)
return
user.deadmin()
SSadmin_verbs.dynamic_invoke_verb(user, /datum/admin_verb/deadmin)
return TRUE
/datum/keybinding/admin/readmin
@@ -135,5 +135,5 @@
. = ..()
if(.)
return
user.holder?.display_tags()
SSadmin_verbs.dynamic_invoke_verb(user, /datum/admin_verb/display_tags)
return TRUE

View File

@@ -1,10 +1,6 @@
/// Opens the station traits admin panel
/datum/admins/proc/station_traits_panel()
set name = "Modify Station Traits"
set category = "Admin.Events"
ADMIN_VERB(station_traits_panel, R_FUN, "Modify Station Traits", "Modify the station traits for the next round.", ADMIN_CATEGORY_EVENTS)
var/static/datum/station_traits_panel/station_traits_panel = new
station_traits_panel.ui_interact(usr)
station_traits_panel.ui_interact(user.mob)
/datum/station_traits_panel
var/static/list/future_traits

View File

@@ -67,14 +67,10 @@
message_admins(span_notice("[key_name(usr)] has added [amount] units of [chosen_id] to [src]"))
if(href_list[VV_HK_TRIGGER_EXPLOSION])
if(!check_rights(R_FUN))
return
usr.client.cmd_admin_explosion(src)
return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/admin_explosion, src)
if(href_list[VV_HK_TRIGGER_EMP])
if(!check_rights(R_FUN))
return
usr.client.cmd_admin_emp(src)
return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/admin_emp, src)
if(href_list[VV_HK_SHOW_HIDDENPRINTS])
if(!check_rights(R_ADMIN))

View File

@@ -147,9 +147,7 @@ GLOBAL_LIST_EMPTY(objects_by_id_tag)
return
if(href_list[VV_HK_OSAY])
if(!check_rights(R_FUN, FALSE))
return
usr.client.object_say(src)
return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/object_say, src)
if(href_list[VV_HK_MASS_DEL_TYPE])
if(!check_rights(R_DEBUG|R_SERVER))

View File

@@ -48,14 +48,9 @@
////////////////////////////////////////////////////////////////////////////////////////////////ADMIN HELPER PROCS
/datum/admins/proc/spawn_atom(object as text)
set category = "Debug"
set desc = "(atom path) Spawn an atom"
set name = "Spawn"
if(!check_rights(R_SPAWN) || !object)
ADMIN_VERB(spawn_atom, R_SPAWN, "Spawn", "Spawn an atom.", ADMIN_CATEGORY_DEBUG, object as text)
if(!object)
return
var/list/preparsed = splittext(object,":")
var/path = preparsed[1]
var/amount = 1
@@ -65,7 +60,7 @@
var/chosen = pick_closest_path(path)
if(!chosen)
return
var/turf/T = get_turf(usr)
var/turf/T = get_turf(user.mob)
if(ispath(chosen, /turf))
T.ChangeTurf(chosen)
@@ -74,21 +69,14 @@
var/atom/A = new chosen(T)
A.flags_1 |= ADMIN_SPAWNED_1
log_admin("[key_name(usr)] spawned [amount] x [chosen] at [AREACOORD(usr)]")
log_admin("[key_name(user)] spawned [amount] x [chosen] at [AREACOORD(user.mob)]")
BLACKBOX_LOG_ADMIN_VERB("Spawn Atom")
/datum/admins/proc/podspawn_atom(object as text)
set category = "Debug"
set desc = "(atom path) Spawn an atom via supply drop"
set name = "Podspawn"
if(!check_rights(R_SPAWN))
return
ADMIN_VERB(spawn_atom_pod, R_SPAWN, "PodSpawn", "Spawn an atom via supply drop.", ADMIN_CATEGORY_DEBUG, object as text)
var/chosen = pick_closest_path(object)
if(!chosen)
return
var/turf/target_turf = get_turf(usr)
var/turf/target_turf = get_turf(user.mob)
if(ispath(chosen, /turf))
target_turf.ChangeTurf(chosen)
@@ -101,25 +89,18 @@
var/atom/A = new chosen(pod)
A.flags_1 |= ADMIN_SPAWNED_1
log_admin("[key_name(usr)] pod-spawned [chosen] at [AREACOORD(usr)]")
log_admin("[key_name(user)] pod-spawned [chosen] at [AREACOORD(user.mob)]")
BLACKBOX_LOG_ADMIN_VERB("Podspawn Atom")
/datum/admins/proc/spawn_cargo(object as text)
set category = "Debug"
set desc = "(atom path) Spawn a cargo crate"
set name = "Spawn Cargo"
if(!check_rights(R_SPAWN))
return
ADMIN_VERB(spawn_cargo, R_SPAWN, "Spawn Cargo", "Spawn a cargo crate.", ADMIN_CATEGORY_DEBUG, object as text)
var/chosen = pick_closest_path(object, make_types_fancy(subtypesof(/datum/supply_pack)))
if(!chosen)
return
var/datum/supply_pack/S = new chosen
S.admin_spawned = TRUE
S.generate(get_turf(usr))
S.generate(get_turf(user.mob))
log_admin("[key_name(usr)] spawned cargo pack [chosen] at [AREACOORD(usr)]")
log_admin("[key_name(user)] spawned cargo pack [chosen] at [AREACOORD(user.mob)]")
BLACKBOX_LOG_ADMIN_VERB("Spawn Cargo")
/datum/admins/proc/dynamic_mode_options(mob/user)
@@ -246,10 +227,8 @@
log_admin(logged_message)
message_admins(logged_message)
/datum/admins/proc/create_or_modify_area()
set category = "Debug"
set name = "Create or modify area"
create_area(usr)
ADMIN_VERB(create_or_modify_area, R_DEBUG, "Create Or Modify Area", "Create of modify an area. wow.", ADMIN_CATEGORY_DEBUG)
create_area(user.mob)
//Kicks all the clients currently in the lobby. The second parameter (kick_only_afk) determins if an is_afk() check is ran, or if all clients are kicked
//defaults to kicking everyone (afk + non afk clients in the lobby)

View File

@@ -1,15 +1,6 @@
/**
* If client have R_ADMIN flag, opens an admin fax panel.
*/
/client/proc/fax_panel()
set category = "Admin.Events"
set name = "Fax Panel"
if(!check_rights(R_ADMIN))
return
var/datum/fax_panel_interface/ui = new(usr)
ui.ui_interact(usr)
ADMIN_VERB(fax_panel, R_ADMIN, "Fax Panel", "View and respond to faxes sent to CC.", ADMIN_CATEGORY_EVENTS)
var/datum/fax_panel_interface/ui = new /datum/fax_panel_interface(user.mob)
ui.ui_interact(user.mob)
/// Admin Fax Panel. Tool for sending fax messages faster.
/datum/fax_panel_interface
@@ -97,15 +88,15 @@
switch(action)
if("follow")
if(!isobserver(usr))
usr.client?.admin_ghost()
if(!isobserver(ui.user))
SSadmin_verbs.dynamic_invoke_verb(ui.user, /datum/admin_verb/admin_ghost)
usr.client?.admin_follow(action_fax)
ui.user.client?.admin_follow(action_fax)
if("preview") // see saved variant
if(!fax_paper)
return
fax_paper.ui_interact(usr)
fax_paper.ui_interact(ui.user)
if("save") // save paper
if(params["paperName"])
@@ -129,7 +120,7 @@
if(stamp)
fax_paper.add_stamp(stamp_class, params["stampX"], params["stampY"], params["stampAngle"], stamp)
fax_paper.update_static_data(usr) // OK, it's work, and update UI.
fax_paper.update_static_data(ui.user) // OK, it's work, and update UI.
if("send")
//copy
@@ -137,9 +128,9 @@
our_fax.name = fax_paper.name
//send
action_fax.receive(our_fax, sending_fax_name)
message_admins("[key_name_admin(usr)] has sent a custom fax message to [action_fax.name][ADMIN_FLW(action_fax)][ADMIN_SHOW_PAPER(fax_paper)].")
log_admin("[key_name(usr)] has sent a custom fax message to [action_fax.name]")
message_admins("[key_name_admin(ui.user)] has sent a custom fax message to [action_fax.name][ADMIN_FLW(action_fax)][ADMIN_SHOW_PAPER(fax_paper)].")
log_admin("[key_name(ui.user)] has sent a custom fax message to [action_fax.name]")
if("createPaper")
var/obj/item/paper/our_paper = fax_paper.copy(/obj/item/paper, usr.loc)
var/obj/item/paper/our_paper = fax_paper.copy(/obj/item/paper, ui.user.loc)
our_paper.name = fax_paper.name

View File

@@ -10,13 +10,8 @@
WRITE_FILE(F, "[time_stamp(format = "YYYY-MM-DD hh:mm:ss")] [REF(src)] ([x],[y],[z]) || [source] [message]<br>")
/client/proc/investigate_show()
set name = "Investigate"
set category = "Admin.Game"
if(!holder)
return
var/list/investigates = list(
ADMIN_VERB(investigate_show, R_NONE, "Investigate", "Browse various detailed logs.", ADMIN_CATEGORY_GAME)
var/static/list/investigates = list(
INVESTIGATE_ACCESSCHANGES,
INVESTIGATE_ATMOS,
INVESTIGATE_BOTANY,
@@ -48,7 +43,7 @@
var/list/combined = sort_list(logs_present) + sort_list(logs_missing)
var/selected = tgui_input_list(src, "Investigate what?", "Investigation", combined)
var/selected = tgui_input_list(user, "Investigate what?", "Investigation", combined)
if(isnull(selected))
return
if(!(selected in combined) || selected == "---")
@@ -62,6 +57,6 @@
var/F = file("[GLOB.log_directory]/[selected].html")
if(!fexists(F))
to_chat(src, span_danger("No [selected] logfile was found."), confidential = TRUE)
to_chat(user, span_danger("No [selected] logfile was found."), confidential = TRUE)
return
src << browse(F,"window=investigate[selected];size=800x300")
user << browse(F,"window=investigate[selected];size=800x300")

View File

@@ -1,12 +1,6 @@
///Allows an admin to send messages on PDA
/client/proc/message_pda()
set name = "PDA Message"
set category = "Admin.Events"
if(!holder || !check_rights(R_ADMIN))
return
holder.message_pda()
ADMIN_VERB(message_pda, R_ADMIN, "PDA Message", "Send a message to a user's PDA.", ADMIN_CATEGORY_EVENTS)
user.holder.message_pda()
///Opens up the PDA Message Panel
/datum/admins/proc/message_pda()

File diff suppressed because it is too large Load Diff

View File

@@ -92,11 +92,8 @@ GLOBAL_PROTECT(AdminProcCallHandler)
usr = lastusr
handler.remove_caller(user)
/client/proc/callproc()
set category = "Debug"
set name = "Advanced ProcCall"
set waitfor = FALSE
callproc_blocking()
ADMIN_VERB(advanced_proc_call, R_DEBUG, "Advanced ProcCall", "Call a proc on any datum in the server.", ADMIN_CATEGORY_DEBUG)
user.callproc_blocking()
/client/proc/callproc_blocking(list/get_retval)
if(!check_rights(R_DEBUG))
@@ -230,37 +227,30 @@ GLOBAL_PROTECT(LastAdminCalledProc)
return (GLOB.AdminProcCaller && GLOB.AdminProcCaller == usr?.client?.ckey) || (GLOB.AdminProcCallHandler && usr == GLOB.AdminProcCallHandler)
#endif
/client/proc/callproc_datum(datum/A as null|area|mob|obj|turf)
set category = "Debug"
set name = "Atom ProcCall"
set waitfor = FALSE
if(!check_rights(R_DEBUG))
return
var/procname = input("Proc name, eg: fake_blood","Proc:", null) as text|null
ADMIN_VERB_ONLY_CONTEXT_MENU(call_proc_datum, R_DEBUG, "Atom ProcCall", datum/thing as null|area|mob|obj|turf)
var/procname = input(user, "Proc name, eg: fake_blood","Proc:", null) as text|null
if(!procname)
return
if(!hascall(A,procname))
to_chat(usr, "<font color='red'>Error: callproc_datum(): type [A.type] has no proc named [procname].</font>", confidential = TRUE)
if(!hascall(thing, procname))
to_chat(user, "<font color='red'>Error: callproc_datum(): type [thing.type] has no proc named [procname].</font>", confidential = TRUE)
return
var/list/lst = get_callproc_args()
var/list/lst = user.get_callproc_args()
if(!lst)
return
if(!A || !is_valid_src(A))
to_chat(usr, span_warning("Error: callproc_datum(): owner of proc no longer exists."), confidential = TRUE)
if(!thing || !is_valid_src(thing))
to_chat(user, span_warning("Error: callproc_datum(): owner of proc no longer exists."), confidential = TRUE)
return
log_admin("[key_name(src)] called [A]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
var/msg = "[key_name(src)] called [A]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"]."
log_admin("[key_name(user)] called [thing]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
var/msg = "[key_name(user)] called [thing]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"]."
message_admins(msg)
admin_ticket_log(A, msg)
admin_ticket_log(thing, msg)
BLACKBOX_LOG_ADMIN_VERB("Atom ProcCall")
var/returnval = WrapAdminProcCall(A, procname, lst) // Pass the lst as an argument list to the proc
. = get_callproc_returnval(returnval,procname)
var/returnval = WrapAdminProcCall(thing, procname, lst) // Pass the lst as an argument list to the proc
. = user.get_callproc_returnval(returnval,procname)
if(.)
to_chat(usr, ., confidential = TRUE)
to_chat(user, ., confidential = TRUE)
/client/proc/get_callproc_args()
var/argnum = input("Number of arguments","Number:",0) as num|null

View File

@@ -1,12 +1,6 @@
///Allows an admin to force an event
/client/proc/forceEvent()
set name = "Trigger Event"
set category = "Admin.Events"
if(!holder || !check_rights(R_FUN))
return
holder.forceEvent()
ADMIN_VERB(force_event, R_FUN, "Trigger Event", "Forces an event to occur.", ADMIN_CATEGORY_EVENTS)
user.holder.forceEvent()
///Opens up the Force Event Panel
/datum/admins/proc/forceEvent()

View File

@@ -187,8 +187,5 @@ GLOBAL_DATUM_INIT(known_alts, /datum/known_alts, new)
client << browse(html, "window=known_alts;size=700x400")
/datum/admins/proc/known_alts_panel()
set name = "Known Alts Panel"
set category = "Admin"
GLOB.known_alts.show_panel(usr.client)
ADMIN_VERB(known_alts_panel, R_ADMIN, "Known Alts Panel", "View a panel of known alts.", ADMIN_CATEGORY_MAIN)
GLOB.known_alts.show_panel(user)

View File

@@ -1,18 +1,8 @@
/client/proc/outfit_manager()
set category = "Debug"
set name = "Outfit Manager"
if(!check_rights(R_DEBUG))
return
var/datum/outfit_manager/ui = new(usr)
ui.ui_interact(usr)
ADMIN_VERB(outfit_manager, R_DEBUG|R_ADMIN, "Outfit Manager", "View and edit outfits.", ADMIN_CATEGORY_DEBUG)
var/static/datum/outfit_manager/ui = new
ui.ui_interact(user.mob)
/datum/outfit_manager
var/client/owner
/datum/outfit_manager/New(user)
owner = CLIENT_FROM_VAR(user)
/datum/outfit_manager/ui_state(mob/user)
return GLOB.admin_state
@@ -53,24 +43,24 @@
switch(action)
if("new")
owner.open_outfit_editor(new /datum/outfit)
ui.user.client.open_outfit_editor(new /datum/outfit)
if("load")
owner.holder.load_outfit(owner.mob)
ui.user.client.holder.load_outfit(ui.user)
if("copy")
var/datum/outfit/outfit = tgui_input_list(owner, "Pick an outfit to copy from", "Outfit Manager", subtypesof(/datum/outfit))
var/datum/outfit/outfit = tgui_input_list(ui.user, "Pick an outfit to copy from", "Outfit Manager", subtypesof(/datum/outfit))
if(isnull(outfit))
return
if(!ispath(outfit))
return
owner.open_outfit_editor(new outfit)
ui.user.client.open_outfit_editor(new outfit)
var/datum/outfit/target_outfit = locate(params["outfit"])
if(!istype(target_outfit))
return
switch(action) //wow we're switching through action again this is horrible optimization smh
if("edit")
owner.open_outfit_editor(target_outfit)
ui.user.client.open_outfit_editor(target_outfit)
if("save")
owner.holder.save_outfit(owner.mob, target_outfit)
ui.user.client.holder.save_outfit(ui.user, target_outfit)
if("delete")
owner.holder.delete_outfit(owner.mob, target_outfit)
ui.user.client.holder.delete_outfit(ui.user, target_outfit)

View File

@@ -1,11 +1,6 @@
/datum/admins/proc/paintings_manager()
set name = "Paintings Manager"
set category = "Admin"
if(!check_rights(R_ADMIN))
return
var/datum/paintings_manager/ui = new(usr)
ui.ui_interact(usr)
ADMIN_VERB(painting_manager, R_ADMIN, "Paintings Manager", "View and redact paintings.", ADMIN_CATEGORY_MAIN)
var/static/datum/paintings_manager/ui = new
ui.ui_interact(user.mob)
/// Painting Admin Management Panel
/datum/paintings_manager

View File

@@ -1,10 +1,6 @@
/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()
ADMIN_VERB(edit_admin_permissions, R_PERMISSIONS, "Permissions Panel", "Edit admin permissions.", ADMIN_CATEGORY_MAIN)
user.holder.edit_admin_permissions()
/datum/admins/proc/edit_admin_permissions(action, target, operation, page)
if(!check_rights(R_PERMISSIONS))

View File

@@ -481,10 +481,5 @@
. = list2params(.)
/client/proc/stickybanpanel()
set name = "Sticky Ban Panel"
set category = "Admin"
if (!holder)
return
holder.stickyban_show()
ADMIN_VERB(panel_sticky_ban, R_BAN, "Sticky Ban Panel", "List and manage sticky bans.", ADMIN_CATEGORY_MAIN)
user.holder.stickyban_show()

View File

@@ -49,21 +49,14 @@
<font color='#00cc66'>[X.getToxLoss()]</font> \
<font color='#00cccc'>[X.getOxyLoss()]</font>"
/// Display all of the tagged datums
/datum/admins/proc/display_tags()
set category = "Admin.Game"
set name = "View Tags"
if (!istype(src, /datum/admins))
src = usr.client.holder
if (!istype(src, /datum/admins))
to_chat(usr, "Error: you are not an admin!", confidential = TRUE)
return
ADMIN_VERB(display_tags, R_ADMIN, "View Tags", "Display all of the tagged datums.", ADMIN_CATEGORY_GAME)
var/index = 0
var/list/dat = list("<center><B>Tag Menu</B></center><hr>")
dat += "<br><A href='?src=[REF(src)];[HrefToken(forceGlobal = TRUE)];show_tags=1'>Refresh</a><br>"
var/list/tagged_datums = user.holder.tagged_datums
var/list/marked_datum = user.holder.marked_datum
dat += "<br><A href='?src=[REF(user)];[HrefToken(forceGlobal = TRUE)];show_tags=1'>Refresh</a><br>"
if(LAZYLEN(tagged_datums))
for(var/datum/iter_datum as anything in tagged_datums)
index++
@@ -71,7 +64,7 @@
if(isnull(iter_datum))
dat += "\t[index]: Null reference - Check runtime logs!"
stack_trace("Null datum found in tagged datum menu! User: [usr]")
stack_trace("Null datum found in tagged datum menu! User: [user]")
continue
else if(iscarbon(iter_datum))
var/mob/living/carbon/resolved_carbon = iter_datum
@@ -99,7 +92,7 @@
dat += "No datums tagged :("
dat = dat.Join("<br>")
usr << browse(dat, "window=tag;size=800x480")
user << browse(dat, "window=tag;size=800x480")
#undef TAG_DEL
#undef TAG_MARK

View File

@@ -136,8 +136,7 @@
to_chat(usr, "[shuttle_console] was [shuttle_console.admin_controlled ? "locked" : "unlocked"].", confidential = TRUE)
else if(href_list["delay_round_end"])
// Permissions are checked in delay_round_end
delay_round_end()
return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/delay_round_end)
else if(href_list["undelay_round_end"])
if(!check_rights(R_SERVER))
@@ -725,21 +724,10 @@
our_mob.AIize(our_mob.client, move)
else if(href_list["makerobot"])
if(!check_rights(R_SPAWN))
return
var/mob/our_mob = locate(href_list["makerobot"])
if(!istype(our_mob))
return
if(iscyborg(our_mob))
to_chat(usr, "That's already a cyborg.", confidential = TRUE)
return
usr.client.cmd_admin_robotize(our_mob)
return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/cmd_admin_robotize, locate(href_list["makerobot"]))
else if(href_list["adminplayeropts"])
var/mob/M = locate(href_list["adminplayeropts"])
show_player_panel(M)
return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/show_player_panel, locate(href_list["adminplayeropts"]))
else if(href_list["ppbyckey"])
var/target_ckey = href_list["ppbyckey"]
@@ -754,7 +742,7 @@
return
to_chat(usr, span_notice("Jumping to [target_ckey]'s new mob: [target_mob]!"))
show_player_panel(target_mob)
return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/show_player_panel, target_mob)
else if(href_list["adminplayerobservefollow"])
if(!isobserver(usr) && !check_rights(R_ADMIN))
@@ -771,20 +759,13 @@
AM.forceMove(get_turf(usr))
else if(href_list["adminplayerobservecoodjump"])
if(!isobserver(usr) && !check_rights(R_ADMIN))
return
if(isnewplayer(usr))
return
var/x = text2num(href_list["X"])
var/y = text2num(href_list["Y"])
var/z = text2num(href_list["Z"])
var/client/C = usr.client
if(!isobserver(usr))
C.admin_ghost()
sleep(0.2 SECONDS)
C.jumptocoord(x,y,z)
return SSadmin_verbs.dynamic_invoke_verb(
usr,
/datum/admin_verb/jump_to_coord,
text2num(href_list["X"]),
text2num(href_list["Y"]),
text2num(href_list["Z"]),
)
else if(href_list["adminchecklaws"])
if(!check_rights(R_ADMIN))
@@ -984,15 +965,7 @@
give_admin_popup(target, owner, message)
else if(href_list["adminsmite"])
if(!check_rights(R_ADMIN|R_FUN))
return
var/mob/living/carbon/human/H = locate(href_list["adminsmite"]) in GLOB.mob_list
if(!H || !istype(H))
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human", confidential = TRUE)
return
usr.client.smite(H)
return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/admin_smite, locate(href_list["adminsmite"]))
else if(href_list["CentComReply"])
if(!check_rights(R_ADMIN))
@@ -1021,42 +994,21 @@
var/obj/item/station_charter/charter = locate(href_list["reject_custom_name"])
if(istype(charter))
charter.reject_proposed(usr)
else if(href_list["jumpto"])
if(!isobserver(usr) && !check_rights(R_ADMIN))
return
var/mob/M = locate(href_list["jumpto"])
usr.client.jumptomob(M)
else if(href_list["jumpto"])
return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/jump_to_mob, locate(href_list["jumpto"]))
else if(href_list["getmob"])
if(!check_rights(R_ADMIN))
return
if(tgui_alert(usr, "Confirm?", "Message", list("Yes", "No")) != "Yes")
return
var/mob/M = locate(href_list["getmob"])
usr.client.Getmob(M)
return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/get_mob, locate(href_list["getmob"]))
else if(href_list["sendmob"])
if(!check_rights(R_ADMIN))
return
var/mob/M = locate(href_list["sendmob"])
usr.client.sendmob(M)
return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/send_mob, locate(href_list["sendmob"]))
else if(href_list["narrateto"])
if(!check_rights(R_ADMIN))
return
var/mob/M = locate(href_list["narrateto"])
usr.client.cmd_admin_direct_narrate(M)
return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/cmd_admin_direct_narrate, locate(href_list["narrateto"]))
else if(href_list["subtlemessage"])
if(!check_rights(R_ADMIN))
return
var/mob/M = locate(href_list["subtlemessage"])
usr.client.cmd_admin_subtle_message(M)
return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/cmd_admin_subtle_message, locate(href_list["subtlemessage"]))
else if(href_list["playsoundto"])
if(!check_rights(R_SOUND))
@@ -1065,7 +1017,7 @@
var/mob/M = locate(href_list["playsoundto"])
var/S = input("", "Select a sound file",) as null|sound
if(S)
usr.client.play_direct_mob_sound(S, M)
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/play_direct_mob_sound, S, M)
else if(href_list["individuallog"])
if(!check_rights(R_ADMIN))
@@ -1104,7 +1056,8 @@
else
D.traitor_panel()
else
show_traitor_panel(M)
SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/show_traitor_panel, M)
return
else if(href_list["skill"])
if(!check_rights(R_ADMIN))
@@ -1124,17 +1077,11 @@
else
to_chat(usr, "This can only be used on instances of type /mob and /mind", confidential = TRUE)
return
show_skill_panel(target_mind)
SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/show_skill_panel, target_mind)
return
else if(href_list["borgpanel"])
if(!check_rights(R_ADMIN))
return
var/mob/M = locate(href_list["borgpanel"])
if(!iscyborg(M))
to_chat(usr, "This can only be used on cyborgs", confidential = TRUE)
else
open_borgopanel(M)
return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/borg_panel, locate(href_list["borgpanel"]))
else if(href_list["initmind"])
if(!check_rights(R_ADMIN))
@@ -1306,9 +1253,7 @@
return
else if(href_list["check_antagonist"])
if(!check_rights(R_ADMIN))
return
usr.client.check_antagonists()
SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/check_antagonists)
else if(href_list["kick_all_from_lobby"])
if(!check_rights(R_ADMIN))
@@ -1378,7 +1323,7 @@
log_admin("[key_name(usr)] turned a Lag Switch measure at index ([switch_index]) [LAZYACCESS(SSlag_switch.measures, switch_index) ? "ON" : "OFF"]")
message_admins("[key_name_admin(usr)] turned a Lag Switch measure [LAZYACCESS(SSlag_switch.measures, switch_index) ? "ON" : "OFF"]")
src.show_lag_switch_panel()
SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/lag_switch_panel)
else if(href_list["change_lag_switch_option"])
if(!check_rights(R_ADMIN))
@@ -1407,7 +1352,7 @@
log_admin("[key_name(usr)] set the Lag Switch slowmode cooldown to [new_num] seconds.")
message_admins("[key_name_admin(usr)] set the Lag Switch slowmode cooldown to [new_num] seconds.")
src.show_lag_switch_panel()
SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/lag_switch_panel)
else if(href_list["viewruntime"])
var/datum/error_viewer/error_viewer = locate(href_list["viewruntime"])
@@ -1523,13 +1468,7 @@
toggle_id_ctf(usr, CTF_GHOST_CTF_GAME_ID)
else if(href_list["rebootworld"])
if(!check_rights(R_ADMIN))
return
var/confirm = tgui_alert(usr,"Are you sure you want to reboot the server?", "Confirm Reboot", list("Yes", "No"))
if(confirm == "No")
return
if(confirm == "Yes")
restart()
SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/restart)
else if(href_list["check_teams"])
if(!check_rights(R_ADMIN))
@@ -1748,9 +1687,7 @@
return remove_tagged_datum(datum_to_remove)
else if(href_list["show_tags"])
if(!check_rights(R_ADMIN))
return
return display_tags()
return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/display_tags)
else if(href_list["mark_datum"])
if(!check_rights(R_ADMIN))
@@ -1797,7 +1734,4 @@
web_sound(usr, link_url, credit)
else if(href_list["debug_z_levels"])
if(!check_rights(R_DEBUG))
return
owner.debug_z_levels()
return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/debug_z_levels)

View File

@@ -1,11 +1,6 @@
/datum/admins/proc/trophy_manager()
set name = "Trophy Manager"
set category = "Admin"
if(!check_rights(R_ADMIN))
return
var/datum/trophy_manager/ui = new(usr)
ui.ui_interact(usr)
ADMIN_VERB(trophy_manager, R_ADMIN, "Trophy Manager", "View all trophies.", ADMIN_CATEGORY_MAIN)
var/static/datum/trophy_manager/ui = new
ui.ui_interact(user.mob)
/// Trophy Admin Management Panel
/datum/trophy_manager

View File

@@ -0,0 +1,27 @@
GENERAL_PROTECT_DATUM(/datum/admin_verb)
/**
* This is the admin verb datum. It is used to store the verb's information and handle the verb's functionality.
* All of this is setup for you, and you should not be defining this manually.
* That means you reader.
*/
/datum/admin_verb
var/name //! The name of the verb.
var/description //! The description of the verb.
var/category //! The category of the verb.
var/permissions //! The permissions required to use the verb.
var/visibility_flag //! The flag that determines if the verb is visible.
VAR_PROTECTED/verb_path //! The path to the verb proc.
/datum/admin_verb/Destroy(force)
if(!force)
return QDEL_HINT_LETMELIVE
return ..()
/// Assigns the verb to the admin.
/datum/admin_verb/proc/assign_to_client(client/admin)
add_verb(admin, verb_path)
/// Unassigns the verb from the admin.
/datum/admin_verb/proc/unassign_from_client(client/admin)
remove_verb(admin, verb_path)

View File

@@ -195,20 +195,15 @@
state = SDQL2_STATE_ERROR;\
CRASH("SDQL2 fatal error");};
/client/proc/SDQL2_query(query_text as message)
set category = "Debug"
if(!check_rights(R_DEBUG)) //Shouldn't happen... but just to be safe.
message_admins(span_danger("ERROR: Non-admin [key_name(usr)] attempted to execute a SDQL query!"))
usr.log_message("non-admin attempted to execute a SDQL query!", LOG_ADMIN)
return FALSE
var/prompt = tgui_alert(usr, "Run SDQL2 Query?", "SDQL2", list("Yes", "Cancel"))
ADMIN_VERB(sdql2_query, R_DEBUG, "SDQL2 Query", "Run a SDQL2 query.", ADMIN_CATEGORY_DEBUG, query_text as message)
var/prompt = tgui_alert(user, "Run SDQL2 Query?", "SDQL2", list("Yes", "Cancel"))
if (prompt != "Yes")
return
var/list/results = world.SDQL2_query(query_text, key_name_admin(usr), "[key_name(usr)]")
var/list/results = world.SDQL2_query(query_text, key_name_admin(user), "[key_name(user)]")
if(length(results) == 3)
for(var/I in 1 to 3)
to_chat(usr, span_admin(results[I]), confidential = TRUE)
SSblackbox.record_feedback("nested tally", "SDQL query", 1, list(ckey, query_text))
to_chat(user, span_admin(results[I]), confidential = TRUE)
SSblackbox.record_feedback("nested tally", "SDQL query", 1, list(user.ckey, query_text))
/world/proc/SDQL2_query(query_text, log_entry1, log_entry2, silent = FALSE)
var/query_log = "executed SDQL query(s): \"[query_text]\"."

View File

@@ -1,15 +1,5 @@
// Admin Tab - Admin Verbs
/client/proc/show_tip()
set category = "Admin"
set name = "Show Tip"
set desc = "Sends a tip (that you specify) to all players. After all \
you're the experienced player here."
if(!check_rights(R_ADMIN))
return
var/input = input(usr, "Please specify your tip that you want to send to the players.", "Tip", "") as message|null
ADMIN_VERB(show_tip, R_ADMIN, "Show Tip", "Sends a tip to all players.", ADMIN_CATEGORY_MAIN)
var/input = input(user, "Please specify your tip that you want to send to the players.", "Tip", "") as message|null
if(!input)
return
@@ -22,44 +12,34 @@
else
SSticker.selected_tip = input
message_admins("[key_name_admin(usr)] sent a tip of the round.")
log_admin("[key_name(usr)] sent \"[input]\" as the Tip of the Round.")
message_admins("[key_name_admin(user)] sent a tip of the round.")
log_admin("[key_name(user)] sent \"[input]\" as the Tip of the Round.")
BLACKBOX_LOG_ADMIN_VERB("Show Tip")
/datum/admins/proc/announce()
set category = "Admin"
set name = "Announce"
set desc="Announce your desires to the world"
if(!check_rights(0))
ADMIN_VERB(announce, R_ADMIN, "Announce", "Announce your desires to the world.", ADMIN_CATEGORY_MAIN)
var/message = input(user, "Global message to send:", "Admin Announce") as message|null
if(!message)
return
var/message = input("Global message to send:", "Admin Announce", null, null) as message|null
if(message)
if(!check_rights(R_SERVER,0))
message = adminscrub(message,500)
send_ooc_announcement(message, "From [usr.client.holder.fakekey ? "Administrator" : usr.key]")
log_admin("Announce: [key_name(usr)] : [message]")
if(!user.holder.check_for_rights(R_SERVER))
message = adminscrub(message,500)
send_ooc_announcement(message, "From [user.holder.fakekey ? "Administrator" : user.key]")
log_admin("Announce: [key_name(user)] : [message]")
BLACKBOX_LOG_ADMIN_VERB("Announce")
/datum/admins/proc/unprison(mob/M in GLOB.mob_list)
set category = "Admin"
set name = "Unprison"
if (is_centcom_level(M.z))
SSjob.SendToLateJoin(M)
message_admins("[key_name_admin(usr)] has unprisoned [key_name_admin(M)]")
log_admin("[key_name(usr)] has unprisoned [key_name(M)]")
else
tgui_alert(usr,"[M.name] is not prisoned.")
BLACKBOX_LOG_ADMIN_VERB("Unprison")
/client/proc/cmd_admin_check_player_exp() //Allows admins to determine who the newer players are.
set category = "Admin"
set name = "Player Playtime"
if(!check_rights(R_ADMIN))
ADMIN_VERB(unprison, R_ADMIN, "UnPrison", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, mob/prisoner)
if(!is_centcom_level(prisoner.z))
tgui_alert(user, "[prisoner.name] is not prisoned.")
return
SSjob.SendToLateJoin(prisoner)
message_admins("[key_name_admin(user)] has unprisoned [key_name_admin(prisoner)]")
log_admin("[key_name(user)] has unprisoned [key_name(prisoner)]")
BLACKBOX_LOG_ADMIN_VERB("Unprison")
ADMIN_VERB(cmd_admin_check_player_exp, R_ADMIN, "Player Playtime", "View player playtime.", ADMIN_CATEGORY_MAIN)
if(!CONFIG_GET(flag/use_exp_tracking))
to_chat(usr, span_warning("Tracking is disabled in the server configuration file."), confidential = TRUE)
to_chat(user, span_warning("Tracking is disabled in the server configuration file."), confidential = TRUE)
return
var/list/msg = list()
@@ -67,7 +47,7 @@
for(var/client/client in sort_list(GLOB.clients, GLOBAL_PROC_REF(cmp_playtime_asc)))
msg += "<LI> [ADMIN_PP(client.mob)] [key_name_admin(client)]: <A href='?_src_=holder;[HrefToken()];getplaytimewindow=[REF(client.mob)]'>" + client.get_exp_living() + "</a></LI>"
msg += "</UL></BODY></HTML>"
src << browse(msg.Join(), "window=Player_playtime_check")
user << browse(msg.Join(), "window=Player_playtime_check")
/client/proc/trigger_centcom_recall()
if(!check_rights(R_ADMIN))
@@ -164,23 +144,18 @@
///////////////////////////////////////////////////////////////////////////////////////////////
/client/proc/cmd_admin_drop_everything(mob/M in GLOB.mob_list)
set category = null
set name = "Drop Everything"
if(!check_rights(R_ADMIN))
return
var/confirm = tgui_alert(usr, "Make [M] drop everything?", "Message", list("Yes", "No"))
ADMIN_VERB(drop_everything, R_ADMIN, "Drop Everything", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, mob/dropee)
var/confirm = tgui_alert(user, "Make [dropee] drop everything?", "Message", list("Yes", "No"))
if(confirm != "Yes")
return
M.drop_everything(del_on_drop = FALSE, force = TRUE, del_if_nodrop = TRUE)
M.regenerate_icons()
dropee.drop_everything(del_on_drop = FALSE, force = TRUE, del_if_nodrop = TRUE)
dropee.regenerate_icons()
log_admin("[key_name(usr)] made [key_name(M)] drop everything!")
var/msg = "[key_name_admin(usr)] made [ADMIN_LOOKUPFLW(M)] drop everything!"
log_admin("[key_name(user)] made [key_name(dropee)] drop everything!")
var/msg = "[key_name_admin(user)] made [ADMIN_LOOKUPFLW(dropee)] drop everything!"
message_admins(msg)
admin_ticket_log(M, msg)
admin_ticket_log(dropee, msg)
BLACKBOX_LOG_ADMIN_VERB("Drop Everything")
/proc/cmd_admin_mute(whom, mute_type, automute = 0)

View File

@@ -1,17 +1,6 @@
/datum/admins/proc/access_news_network() //MARKER
set category = "Admin.Events"
set name = "Access Newscaster Network"
set desc = "Allows you to view, add and edit news feeds."
if (!istype(src, /datum/admins))
src = usr.client.holder
if (!istype(src, /datum/admins))
to_chat(usr, "Error: you are not an admin!", confidential = TRUE)
return
ADMIN_VERB(access_news_network, R_ADMIN, "Access Newscaster Network", "Allows you to view, add, and edit news feeds.", ADMIN_CATEGORY_EVENTS)
var/datum/newspanel/new_newspanel = new
new_newspanel.ui_interact(usr)
new_newspanel.ui_interact(user.mob)
/datum/newspanel
///What newscaster channel is currently being viewed by the player?

View File

@@ -1,37 +1,24 @@
// Admin Tab - Event Verbs
/client/proc/cmd_admin_subtle_message(mob/M in GLOB.mob_list)
set category = "Admin.Events"
set name = "Subtle Message"
if(!ismob(M))
return
if(!check_rights(R_ADMIN))
return
message_admins("[key_name_admin(src)] has started answering [ADMIN_LOOKUPFLW(M)]'s prayer.")
var/msg = input("Message:", "Subtle PM to [M.key]") as text|null
ADMIN_VERB_AND_CONTEXT_MENU(cmd_admin_subtle_message, R_ADMIN, "Subtle Message", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, mob/target in world)
message_admins("[key_name_admin(user)] has started answering [ADMIN_LOOKUPFLW(target)]'s prayer.")
var/msg = input(user, "Message:", "Subtle PM to [target.key]") as text|null
if(!msg)
message_admins("[key_name_admin(src)] decided not to answer [ADMIN_LOOKUPFLW(M)]'s prayer")
message_admins("[key_name_admin(user)] decided not to answer [ADMIN_LOOKUPFLW(target)]'s prayer")
return
if(usr)
if (usr.client)
if(usr.client.holder)
M.balloon_alert(M, "you hear a voice")
to_chat(M, "<i>You hear a voice in your head... <b>[msg]</i></b>", confidential = TRUE)
log_admin("SubtlePM: [key_name(usr)] -> [key_name(M)] : [msg]")
msg = span_adminnotice("<b> SubtleMessage: [key_name_admin(usr)] -> [key_name_admin(M)] :</b> [msg]")
target.balloon_alert(target, "you hear a voice")
to_chat(target, "<i>You hear a voice in your head... <b>[msg]</i></b>", confidential = TRUE)
log_admin("SubtlePM: [key_name(user)] -> [key_name(target)] : [msg]")
msg = span_adminnotice("<b> SubtleMessage: [key_name_admin(user)] -> [key_name_admin(target)] :</b> [msg]")
message_admins(msg)
admin_ticket_log(M, msg)
admin_ticket_log(target, msg)
BLACKBOX_LOG_ADMIN_VERB("Subtle Message")
/client/proc/cmd_admin_headset_message(mob/M in GLOB.mob_list)
set category = "Admin.Events"
set name = "Headset Message"
admin_headset_message(M)
ADMIN_VERB_AND_CONTEXT_MENU(cmd_admin_headset_message, R_ADMIN, "Headset Message", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, mob/target in world)
user.admin_headset_message(target)
/client/proc/admin_headset_message(mob/target in GLOB.mob_list, sender = null)
var/mob/living/carbon/human/human_recipient
@@ -73,102 +60,64 @@
BLACKBOX_LOG_ADMIN_VERB("Headset Message")
/client/proc/cmd_admin_world_narrate()
set category = "Admin.Events"
set name = "Global Narrate"
if(!check_rights(R_ADMIN))
return
var/msg = input("Message:", "Enter the text you wish to appear to everyone:") as text|null
ADMIN_VERB(cmd_admin_world_narrate, R_ADMIN, "Global Narrate", "Send a direct narration to all connected players.", ADMIN_CATEGORY_EVENTS)
var/msg = input(user, "Message:", "Enter the text you wish to appear to everyone:") as text|null
if (!msg)
return
to_chat(world, "[msg]", confidential = TRUE)
log_admin("GlobalNarrate: [key_name(usr)] : [msg]")
message_admins(span_adminnotice("[key_name_admin(usr)] Sent a global narrate"))
log_admin("GlobalNarrate: [key_name(user)] : [msg]")
message_admins(span_adminnotice("[key_name_admin(user)] Sent a global narrate"))
BLACKBOX_LOG_ADMIN_VERB("Global Narrate")
/client/proc/cmd_admin_local_narrate(atom/A)
set category = "Admin.Events"
set name = "Local Narrate"
if(!check_rights(R_ADMIN))
return
if(!A)
return
var/range = input("Range:", "Narrate to mobs within how many tiles:", 7) as num|null
ADMIN_VERB_AND_CONTEXT_MENU(cmd_admin_local_narrate, R_ADMIN, "Local Narrate", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, atom/locale in world)
var/range = input(user, "Range:", "Narrate to mobs within how many tiles:", 7) as num|null
if(!range)
return
var/msg = input("Message:", "Enter the text you wish to appear to everyone within view:") as text|null
var/msg = input(user, "Message:", "Enter the text you wish to appear to everyone within view:") as text|null
if (!msg)
return
for(var/mob/M in view(range,A))
for(var/mob/M in view(range, locale))
to_chat(M, msg, confidential = TRUE)
log_admin("LocalNarrate: [key_name(usr)] at [AREACOORD(A)]: [msg]")
message_admins(span_adminnotice("<b> LocalNarrate: [key_name_admin(usr)] at [ADMIN_VERBOSEJMP(A)]:</b> [msg]<BR>"))
log_admin("LocalNarrate: [key_name(user)] at [AREACOORD(locale)]: [msg]")
message_admins(span_adminnotice("<b> LocalNarrate: [key_name_admin(user)] at [ADMIN_VERBOSEJMP(locale)]:</b> [msg]<BR>"))
BLACKBOX_LOG_ADMIN_VERB("Local Narrate")
/client/proc/cmd_admin_direct_narrate(mob/M)
set category = "Admin.Events"
set name = "Direct Narrate"
if(!check_rights(R_ADMIN))
return
if(!M)
M = input("Direct narrate to whom?", "Active Players") as null|anything in GLOB.player_list
if(!M)
return
var/msg = input("Message:", "Enter the text you wish to appear to your target:") as text|null
ADMIN_VERB_AND_CONTEXT_MENU(cmd_admin_direct_narrate, R_ADMIN, "Direct Narrate", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, mob/target)
var/msg = input(user, "Message:", "Enter the text you wish to appear to your target:") as text|null
if( !msg )
return
to_chat(M, msg, confidential = TRUE)
log_admin("DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]")
msg = span_adminnotice("<b> DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]):</b> [msg]<BR>")
to_chat(target, msg, confidential = TRUE)
log_admin("DirectNarrate: [key_name(user)] to ([key_name(target)]): [msg]")
msg = span_adminnotice("<b> DirectNarrate: [key_name_admin(user)] to ([key_name_admin(target)]):</b> [msg]<BR>")
message_admins(msg)
admin_ticket_log(M, msg)
admin_ticket_log(target, msg)
BLACKBOX_LOG_ADMIN_VERB("Direct Narrate")
/client/proc/cmd_admin_add_freeform_ai_law()
set category = "Admin.Events"
set name = "Add Custom AI law"
if(!check_rights(R_ADMIN))
return
var/input = input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null
ADMIN_VERB(cmd_admin_add_freeform_ai_law, R_ADMIN, "Add Custom AI Law", "Add a custom law to the Silicons.", ADMIN_CATEGORY_EVENTS)
var/input = input(user, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null
if(!input)
return
log_admin("Admin [key_name(usr)] has added a new AI law - [input]")
message_admins("Admin [key_name_admin(usr)] has added a new AI law - [input]")
log_admin("Admin [key_name(user)] has added a new AI law - [input]")
message_admins("Admin [key_name_admin(user)] has added a new AI law - [input]")
var/show_log = tgui_alert(usr, "Show ion message?", "Message", list("Yes", "No"))
var/show_log = tgui_alert(user, "Show ion message?", "Message", list("Yes", "No"))
var/announce_ion_laws = (show_log == "Yes" ? 100 : 0)
var/datum/round_event/ion_storm/add_law_only/ion = new()
var/datum/round_event/ion_storm/add_law_only/ion = new
ion.announce_chance = announce_ion_laws
ion.ionMessage = input
BLACKBOX_LOG_ADMIN_VERB("Add Custom AI Law")
/client/proc/admin_call_shuttle()
set category = "Admin.Events"
set name = "Call Shuttle"
ADMIN_VERB(call_shuttle, R_ADMIN, "Call Shuttle", "Force a shuttle call with additional modifiers.", ADMIN_CATEGORY_EVENTS)
if(EMERGENCY_AT_LEAST_DOCKED)
return
if(!check_rights(R_ADMIN))
return
var/confirm = tgui_alert(usr, "You sure?", "Confirm", list("Yes", "Yes (No Recall)", "No"))
var/confirm = tgui_alert(user, "You sure?", "Confirm", list("Yes", "Yes (No Recall)", "No"))
switch(confirm)
if(null, "No")
return
@@ -178,46 +127,30 @@
SSshuttle.emergency.request()
BLACKBOX_LOG_ADMIN_VERB("Call Shuttle")
log_admin("[key_name(usr)] admin-called the emergency shuttle.")
message_admins(span_adminnotice("[key_name_admin(usr)] admin-called the emergency shuttle[confirm == "Yes (No Recall)" ? " (non-recallable)" : ""]."))
return
/client/proc/admin_cancel_shuttle()
set category = "Admin.Events"
set name = "Cancel Shuttle"
if(!check_rights(0))
return
if(tgui_alert(usr, "You sure?", "Confirm", list("Yes", "No")) != "Yes")
return
if(SSshuttle.admin_emergency_no_recall)
SSshuttle.admin_emergency_no_recall = FALSE
log_admin("[key_name(user)] admin-called the emergency shuttle.")
message_admins(span_adminnotice("[key_name_admin(user)] admin-called the emergency shuttle[confirm == "Yes (No Recall)" ? " (non-recallable)" : ""]."))
ADMIN_VERB(cancel_shuttle, R_ADMIN, "Cancel Shuttle", "Recall the shuttle, regardless of circumstances.", ADMIN_CATEGORY_EVENTS)
if(EMERGENCY_AT_LEAST_DOCKED)
return
if(tgui_alert(user, "You sure?", "Confirm", list("Yes", "No")) != "Yes")
return
SSshuttle.admin_emergency_no_recall = FALSE
SSshuttle.emergency.cancel()
BLACKBOX_LOG_ADMIN_VERB("Cancel Shuttle")
log_admin("[key_name(usr)] admin-recalled the emergency shuttle.")
message_admins(span_adminnotice("[key_name_admin(usr)] admin-recalled the emergency shuttle."))
return
/client/proc/admin_disable_shuttle()
set category = "Admin.Events"
set name = "Disable Shuttle"
if(!check_rights(R_ADMIN))
return
log_admin("[key_name(user)] admin-recalled the emergency shuttle.")
message_admins(span_adminnotice("[key_name_admin(user)] admin-recalled the emergency shuttle."))
ADMIN_VERB(disable_shuttle, R_ADMIN, "Disable Shuttle", "Those fuckers aren't getting out.", ADMIN_CATEGORY_EVENTS)
if(SSshuttle.emergency.mode == SHUTTLE_DISABLED)
to_chat(usr, span_warning("Error, shuttle is already disabled."))
to_chat(user, span_warning("Error, shuttle is already disabled."))
return
if(tgui_alert(usr, "You sure?", "Confirm", list("Yes", "No")) != "Yes")
if(tgui_alert(user, "You sure?", "Confirm", list("Yes", "No")) != "Yes")
return
message_admins(span_adminnotice("[key_name_admin(usr)] disabled the shuttle."))
message_admins(span_adminnotice("[key_name_admin(user)] disabled the shuttle."))
SSshuttle.last_mode = SSshuttle.emergency.mode
SSshuttle.last_call_time = SSshuttle.emergency.timeLeft(1)
@@ -232,21 +165,15 @@
color_override = "grey",
)
/client/proc/admin_enable_shuttle()
set category = "Admin.Events"
set name = "Enable Shuttle"
if(!check_rights(R_ADMIN))
return
ADMIN_VERB(enable_shuttle, R_ADMIN, "Enable Shuttle", "Those fuckers ARE getting out.", ADMIN_CATEGORY_EVENTS)
if(SSshuttle.emergency.mode != SHUTTLE_DISABLED)
to_chat(usr, span_warning("Error, shuttle not disabled."))
to_chat(user, span_warning("Error, shuttle not disabled."))
return
if(tgui_alert(usr, "You sure?", "Confirm", list("Yes", "No")) != "Yes")
if(tgui_alert(user, "You sure?", "Confirm", list("Yes", "No")) != "Yes")
return
message_admins(span_adminnotice("[key_name_admin(usr)] enabled the emergency shuttle."))
message_admins(span_adminnotice("[key_name_admin(user)] enabled the emergency shuttle."))
SSshuttle.admin_emergency_no_recall = FALSE
SSshuttle.emergency_no_recall = FALSE
if(SSshuttle.last_mode == SHUTTLE_DISABLED) //If everything goes to shit, fix it.
@@ -264,135 +191,77 @@
color_override = "green",
)
/client/proc/admin_hostile_environment()
set category = "Admin.Events"
set name = "Hostile Environment"
if(!check_rights(R_ADMIN))
return
switch(tgui_alert(usr, "Select an Option", "Hostile Environment Manager", list("Enable", "Disable", "Clear All")))
ADMIN_VERB(hostile_environment, R_ADMIN, "Hostile Environment", "Disable the shuttle, naturally.", ADMIN_CATEGORY_EVENTS)
switch(tgui_alert(user, "Select an Option", "Hostile Environment Manager", list("Enable", "Disable", "Clear All")))
if("Enable")
if (SSshuttle.hostile_environments["Admin"] == TRUE)
to_chat(usr, span_warning("Error, admin hostile environment already enabled."))
to_chat(user, span_warning("Error, admin hostile environment already enabled."))
else
message_admins(span_adminnotice("[key_name_admin(usr)] Enabled an admin hostile environment"))
message_admins(span_adminnotice("[key_name_admin(user)] Enabled an admin hostile environment"))
SSshuttle.registerHostileEnvironment("Admin")
if("Disable")
if (!SSshuttle.hostile_environments["Admin"])
to_chat(usr, span_warning("Error, no admin hostile environment found."))
to_chat(user, span_warning("Error, no admin hostile environment found."))
else
message_admins(span_adminnotice("[key_name_admin(usr)] Disabled the admin hostile environment"))
message_admins(span_adminnotice("[key_name_admin(user)] Disabled the admin hostile environment"))
SSshuttle.clearHostileEnvironment("Admin")
if("Clear All")
message_admins(span_adminnotice("[key_name_admin(usr)] Disabled all current hostile environment sources"))
message_admins(span_adminnotice("[key_name_admin(user)] Disabled all current hostile environment sources"))
SSshuttle.hostile_environments.Cut()
SSshuttle.checkHostileEnvironment()
/client/proc/toggle_nuke(obj/machinery/nuclearbomb/N in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/nuclearbomb))
set category = "Admin.Events"
set name = "Toggle Nuke"
set popup_menu = FALSE
if(!check_rights(R_DEBUG))
return
if(!N.timing)
var/newtime = input(usr, "Set activation timer.", "Activate Nuke", "[N.timer_set]") as num|null
ADMIN_VERB(toggle_nuke, R_DEBUG|R_ADMIN, "Toggle Nuke", "Arm or disarm a nuke.", ADMIN_CATEGORY_EVENTS, obj/machinery/nuclearbomb/nuke in world)
if(!nuke.timing)
var/newtime = input(user, "Set activation timer.", "Activate Nuke", "[nuke.timer_set]") as num|null
if(!newtime)
return
N.timer_set = newtime
N.toggle_nuke_safety()
N.toggle_nuke_armed()
nuke.timer_set = newtime
nuke.toggle_nuke_safety()
nuke.toggle_nuke_armed()
log_admin("[key_name(usr)] [N.timing ? "activated" : "deactivated"] a nuke at [AREACOORD(N)].")
message_admins("[ADMIN_LOOKUPFLW(usr)] [N.timing ? "activated" : "deactivated"] a nuke at [ADMIN_VERBOSEJMP(N)].")
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Nuke", "[N.timing]")) // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
log_admin("[key_name(user)] [nuke.timing ? "activated" : "deactivated"] a nuke at [AREACOORD(nuke)].")
message_admins("[ADMIN_LOOKUPFLW(user)] [nuke.timing ? "activated" : "deactivated"] a nuke at [ADMIN_VERBOSEJMP(nuke)].")
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Nuke", "[nuke.timing]")) // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
/client/proc/admin_change_sec_level()
set category = "Admin.Events"
set name = "Set Security Level"
set desc = "Changes the security level. Announcement only, i.e. setting to Delta won't activate nuke"
if(!check_rights(R_ADMIN))
return
var/level = tgui_input_list(usr, "Select Security Level:", "Set Security Level", SSsecurity_level.available_levels)
ADMIN_VERB(change_sec_level, R_ADMIN, "Set Security Level", "Changes the security level. Announcement effects only.", ADMIN_CATEGORY_EVENTS)
var/level = tgui_input_list(user, "Select Security Level:", "Set Security Level", SSsecurity_level.available_levels)
if(!level)
return
SSsecurity_level.set_level(level)
log_admin("[key_name(usr)] changed the security level to [level]")
message_admins("[key_name_admin(usr)] changed the security level to [level]")
log_admin("[key_name(user)] changed the security level to [level]")
message_admins("[key_name_admin(user)] changed the security level to [level]")
BLACKBOX_LOG_ADMIN_VERB("Set Security Level [capitalize(level)]")
/client/proc/run_weather()
set category = "Admin.Events"
set name = "Run Weather"
set desc = "Triggers a weather on the z-level you choose."
if(!holder)
return
var/weather_type = input("Choose a weather", "Weather") as null|anything in sort_list(subtypesof(/datum/weather), GLOBAL_PROC_REF(cmp_typepaths_asc))
ADMIN_VERB(run_weather, R_FUN, "Run Weather", "Triggers specific weather on the z-level you choose.", ADMIN_CATEGORY_EVENTS)
var/weather_type = input(user, "Choose a weather", "Weather") as null|anything in sort_list(subtypesof(/datum/weather), GLOBAL_PROC_REF(cmp_typepaths_asc))
if(!weather_type)
return
var/turf/T = get_turf(mob)
var/z_level = input("Z-Level to target?", "Z-Level", T?.z) as num|null
var/turf/T = get_turf(user.mob)
var/z_level = input(user, "Z-Level to target?", "Z-Level", T?.z) as num|null
if(!isnum(z_level))
return
SSweather.run_weather(weather_type, z_level)
message_admins("[key_name_admin(usr)] started weather of type [weather_type] on the z-level [z_level].")
log_admin("[key_name(usr)] started weather of type [weather_type] on the z-level [z_level].")
message_admins("[key_name_admin(user)] started weather of type [weather_type] on the z-level [z_level].")
log_admin("[key_name(user)] started weather of type [weather_type] on the z-level [z_level].")
BLACKBOX_LOG_ADMIN_VERB("Run Weather")
/client/proc/add_marked_mob_ability()
set category = "Admin.Events"
set name = "Add Mob Ability (Marked Mob)"
set desc = "Adds an ability to a marked mob."
if(!holder)
return
if(!isliving(holder.marked_datum))
to_chat(usr, span_warning("Error: Please mark a mob to add actions to it."))
return
give_mob_action(holder.marked_datum)
/client/proc/remove_marked_mob_ability()
set category = "Admin.Events"
set name = "Remove Mob Ability (Marked Mob)"
set desc = "Removes an ability from marked mob."
if(!holder)
return
if(!isliving(holder.marked_datum))
to_chat(usr, span_warning("Error: Please mark a mob to remove actions from it."))
return
remove_mob_action(holder.marked_datum)
/client/proc/command_report_footnote()
set category = "Admin.Events"
set name = "Command Report Footnote"
set desc = "Adds a footnote to the roundstart command report."
if(!check_rights(R_ADMIN))
return
ADMIN_VERB(command_report_footnote, R_ADMIN, "Command Report Footnote", "Adds a footnote to the roundstart command report.", ADMIN_CATEGORY_EVENTS)
var/datum/command_footnote/command_report_footnote = new /datum/command_footnote()
SScommunications.block_command_report++ //Add a blocking condition to the counter until the inputs are done.
command_report_footnote.message = tgui_input_text(usr, "This message will be attached to the bottom of the roundstart threat report. Be sure to delay the roundstart report if you need extra time.", "P.S.")
SScommunications.block_command_report += 1 //Add a blocking condition to the counter until the inputs are done.
command_report_footnote.message = tgui_input_text(user, "This message will be attached to the bottom of the roundstart threat report. Be sure to delay the roundstart report if you need extra time.", "P.S.")
if(!command_report_footnote.message)
SScommunications.block_command_report -= 1
qdel(command_report_footnote)
return
command_report_footnote.signature = tgui_input_text(usr, "Whose signature will appear on this footnote?", "Also sign here, here, aaand here.")
command_report_footnote.signature = tgui_input_text(user, "Whose signature will appear on this footnote?", "Also sign here, here, aaand here.")
if(!command_report_footnote.signature)
command_report_footnote.signature = "Classified"
@@ -400,23 +269,12 @@
SScommunications.command_report_footnotes += command_report_footnote
SScommunications.block_command_report--
message_admins("[usr] has added a footnote to the command report: [command_report_footnote.message], signed [command_report_footnote.signature]")
message_admins("[user] has added a footnote to the command report: [command_report_footnote.message], signed [command_report_footnote.signature]")
/datum/command_footnote
var/message
var/signature
/client/proc/delay_command_report()
set category = "Admin.Events"
set name = "Delay Command Report"
set desc = "Prevents the roundstart command report from being sent until toggled."
if(!check_rights(R_ADMIN))
return
if(SScommunications.block_command_report) //If it's anything other than 0, decrease. If 0, increase.
SScommunications.block_command_report--
message_admins("[usr] has enabled the roundstart command report.")
else
SScommunications.block_command_report++
message_admins("[usr] has delayed the roundstart command report.")
ADMIN_VERB(delay_command_report, R_FUN, "Delay Command Report", "Prevents the roundstart command report from being sent; or forces it to send it delayed.", ADMIN_CATEGORY_EVENTS)
SScommunications.block_command_report = !SScommunications.block_command_report
message_admins("[key_name_admin(user)] has [(SScommunications.block_command_report ? "delayed" : "sent")] the roundstart command report.")

View File

@@ -1,74 +1,54 @@
// Admin Tab - Fun Verbs
/client/proc/cmd_admin_explosion(atom/O as obj|mob|turf in world)
set category = "Admin.Fun"
set name = "Explosion"
if(!check_rights(R_ADMIN))
return
var/devastation = input("Range of total devastation. -1 to none", "Input") as num|null
ADMIN_VERB(admin_explosion, R_ADMIN|R_FUN, "Explosion", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, atom/orignator as obj|mob|turf)
var/devastation = input(user, "Range of total devastation. -1 to none", "Input") as num|null
if(devastation == null)
return
var/heavy = input("Range of heavy impact. -1 to none", "Input") as num|null
var/heavy = input(user, "Range of heavy impact. -1 to none", "Input") as num|null
if(heavy == null)
return
var/light = input("Range of light impact. -1 to none", "Input") as num|null
var/light = input(user, "Range of light impact. -1 to none", "Input") as num|null
if(light == null)
return
var/flash = input("Range of flash. -1 to none", "Input") as num|null
var/flash = input(user, "Range of flash. -1 to none", "Input") as num|null
if(flash == null)
return
var/flames = input("Range of flames. -1 to none", "Input") as num|null
var/flames = input(user, "Range of flames. -1 to none", "Input") as num|null
if(flames == null)
return
if ((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1) || (flames != -1))
if ((devastation > 20) || (heavy > 20) || (light > 20) || (flames > 20))
if (tgui_alert(usr, "Are you sure you want to do this? It will laaag.", "Confirmation", list("Yes", "No")) == "No")
if (tgui_alert(user, "Are you sure you want to do this? It will laaag.", "Confirmation", list("Yes", "No")) == "No")
return
explosion(O, devastation, heavy, light, flames, flash, explosion_cause = mob)
log_admin("[key_name(usr)] created an explosion ([devastation],[heavy],[light],[flames]) at [AREACOORD(O)]")
message_admins("[key_name_admin(usr)] created an explosion ([devastation],[heavy],[light],[flames]) at [AREACOORD(O)]")
explosion(orignator, devastation, heavy, light, flames, flash, explosion_cause = user.mob)
log_admin("[key_name(user)] created an explosion ([devastation],[heavy],[light],[flames]) at [AREACOORD(orignator)]")
message_admins("[key_name_admin(user)] created an explosion ([devastation],[heavy],[light],[flames]) at [AREACOORD(orignator)]")
BLACKBOX_LOG_ADMIN_VERB("Explosion")
/client/proc/cmd_admin_emp(atom/O as obj|mob|turf in world)
set category = "Admin.Fun"
set name = "EM Pulse"
if(!check_rights(R_ADMIN))
return
var/heavy = input("Range of heavy pulse.", "Input") as num|null
ADMIN_VERB(admin_emp, R_ADMIN|R_FUN, "EM Pulse", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, atom/orignator as obj|mob|turf)
var/heavy = input(user, "Range of heavy pulse.", "Input") as num|null
if(heavy == null)
return
var/light = input("Range of light pulse.", "Input") as num|null
var/light = input(user, "Range of light pulse.", "Input") as num|null
if(light == null)
return
if (heavy || light)
empulse(O, heavy, light)
log_admin("[key_name(usr)] created an EM Pulse ([heavy],[light]) at [AREACOORD(O)]")
message_admins("[key_name_admin(usr)] created an EM Pulse ([heavy],[light]) at [AREACOORD(O)]")
empulse(orignator, heavy, light)
log_admin("[key_name(user)] created an EM Pulse ([heavy],[light]) at [AREACOORD(orignator)]")
message_admins("[key_name_admin(user)] created an EM Pulse ([heavy],[light]) at [AREACOORD(orignator)]")
BLACKBOX_LOG_ADMIN_VERB("EM Pulse")
/client/proc/cmd_admin_gib(mob/victim in GLOB.mob_list)
set category = "Admin.Fun"
set name = "Gib"
if(!check_rights(R_ADMIN))
return
var/confirm = tgui_alert(usr, "Drop a brain?", "Confirm", list("Yes", "No","Cancel")) || "Cancel"
ADMIN_VERB(gib_them, R_ADMIN, "Gib", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, mob/victim)
var/confirm = tgui_alert(user, "Drop a brain?", "Confirm", list("Yes", "No","Cancel")) || "Cancel"
if(confirm == "Cancel")
return
//Due to the delay here its easy for something to have happened to the mob
if(isnull(victim))
return
log_admin("[key_name(usr)] has gibbed [key_name(victim)]")
message_admins("[key_name_admin(usr)] has gibbed [key_name_admin(victim)]")
log_admin("[key_name(user)] has gibbed [key_name(victim)]")
message_admins("[key_name_admin(user)] has gibbed [key_name_admin(victim)]")
if(isobserver(victim))
new /obj/effect/gibspawner/generic(get_turf(victim))
@@ -84,62 +64,47 @@
BLACKBOX_LOG_ADMIN_VERB("Gib")
/client/proc/cmd_admin_gib_self()
set name = "Gibself"
set category = "Admin.Fun"
var/confirm = tgui_alert(usr, "You sure?", "Confirm", list("Yes", "No"))
ADMIN_VERB(gib_self, R_ADMIN, "Gibself", "Give yourself the same treatment you give others.", ADMIN_CATEGORY_FUN)
var/confirm = tgui_alert(user, "You sure?", "Confirm", list("Yes", "No"))
if(confirm != "Yes")
return
log_admin("[key_name(usr)] used gibself.")
message_admins(span_adminnotice("[key_name_admin(usr)] used gibself."))
log_admin("[key_name(user)] used gibself.")
message_admins(span_adminnotice("[key_name_admin(user)] used gibself."))
BLACKBOX_LOG_ADMIN_VERB("Gib Self")
var/mob/living/ourself = mob
var/mob/living/ourself = user.mob
if (istype(ourself))
ourself.gib()
/client/proc/everyone_random()
set category = "Admin.Fun"
set name = "Make Everyone Random"
set desc = "Make everyone have a random appearance. You can only use this before rounds!"
ADMIN_VERB(everyone_random, R_SERVER, "Make Everyone Random", "Make everyone have a random appearance.", ADMIN_CATEGORY_FUN)
if(SSticker.HasRoundStarted())
to_chat(usr, "Nope you can't do this, the game's already started. This only works before rounds!", confidential = TRUE)
to_chat(user, "Nope you can't do this, the game's already started. This only works before rounds!", confidential = TRUE)
return
var/frn = CONFIG_GET(flag/force_random_names)
if(frn)
CONFIG_SET(flag/force_random_names, FALSE)
message_admins("Admin [key_name_admin(usr)] has disabled \"Everyone is Special\" mode.")
to_chat(usr, "Disabled.", confidential = TRUE)
message_admins("Admin [key_name_admin(user)] has disabled \"Everyone is Special\" mode.")
to_chat(user, "Disabled.", confidential = TRUE)
return
var/notifyplayers = tgui_alert(usr, "Do you want to notify the players?", "Options", list("Yes", "No", "Cancel")) || "Cancel"
var/notifyplayers = tgui_alert(user, "Do you want to notify the players?", "Options", list("Yes", "No", "Cancel")) || "Cancel"
if(notifyplayers == "Cancel")
return
log_admin("Admin [key_name(src)] has forced the players to have random appearances.")
message_admins("Admin [key_name_admin(usr)] has forced the players to have random appearances.")
log_admin("Admin [key_name(user)] has forced the players to have random appearances.")
message_admins("Admin [key_name_admin(user)] has forced the players to have random appearances.")
if(notifyplayers == "Yes")
to_chat(world, span_adminnotice("Admin [usr.key] has forced the players to have completely random identities!"), confidential = TRUE)
to_chat(world, span_adminnotice("Admin [user.key] has forced the players to have completely random identities!"), confidential = TRUE)
to_chat(usr, "<i>Remember: you can always disable the randomness by using the verb again, assuming the round hasn't started yet</i>.", confidential = TRUE)
to_chat(user, "<i>Remember: you can always disable the randomness by using the verb again, assuming the round hasn't started yet</i>.", confidential = TRUE)
CONFIG_SET(flag/force_random_names, TRUE)
BLACKBOX_LOG_ADMIN_VERB("Make Everyone Random")
/client/proc/mass_zombie_infection()
set category = "Admin.Fun"
set name = "Mass Zombie Infection"
set desc = "Infects all humans with a latent organ that will zombify \
them on death."
if(!check_rights(R_ADMIN))
return
var/confirm = tgui_alert(usr, "Please confirm you want to add latent zombie organs in all humans?", "Confirm Zombies", list("Yes", "No"))
ADMIN_VERB(mass_zombie_infection, R_ADMIN, "Mass Zombie Infection", "Infects all humans with a latent organ that will zombify them on death.", ADMIN_CATEGORY_FUN)
var/confirm = tgui_alert(user, "Please confirm you want to add latent zombie organs in all humans?", "Confirm Zombies", list("Yes", "No"))
if(confirm != "Yes")
return
@@ -147,45 +112,32 @@
var/mob/living/carbon/human/H = i
new /obj/item/organ/internal/zombie_infection/nodamage(H)
message_admins("[key_name_admin(usr)] added a latent zombie infection to all humans.")
log_admin("[key_name(usr)] added a latent zombie infection to all humans.")
message_admins("[key_name_admin(user)] added a latent zombie infection to all humans.")
log_admin("[key_name(user)] added a latent zombie infection to all humans.")
BLACKBOX_LOG_ADMIN_VERB("Mass Zombie Infection")
/client/proc/mass_zombie_cure()
set category = "Admin.Fun"
set name = "Mass Zombie Cure"
set desc = "Removes the zombie infection from all humans, returning them to normal."
if(!check_rights(R_ADMIN))
return
var/confirm = tgui_alert(usr, "Please confirm you want to cure all zombies?", "Confirm Zombie Cure", list("Yes", "No"))
ADMIN_VERB(mass_zombie_cure, R_ADMIN, "Mass Zombie Cure", "Removes the zombie infection from all humans, returning them to normal.", ADMIN_CATEGORY_FUN)
var/confirm = tgui_alert(user, "Please confirm you want to cure all zombies?", "Confirm Zombie Cure", list("Yes", "No"))
if(confirm != "Yes")
return
for(var/obj/item/organ/internal/zombie_infection/nodamage/I in GLOB.zombie_infection_list)
qdel(I)
message_admins("[key_name_admin(usr)] cured all zombies.")
log_admin("[key_name(usr)] cured all zombies.")
message_admins("[key_name_admin(user)] cured all zombies.")
log_admin("[key_name(user)] cured all zombies.")
BLACKBOX_LOG_ADMIN_VERB("Mass Zombie Cure")
/client/proc/polymorph_all()
set category = "Admin.Fun"
set name = "Polymorph All"
set desc = "Applies the effects of the bolt of change to every single mob."
if(!check_rights(R_ADMIN))
return
var/confirm = tgui_alert(usr, "Please confirm you want polymorph all mobs?", "Confirm Polymorph", list("Yes", "No"))
ADMIN_VERB(polymorph_all, R_ADMIN, "Polymorph All", "Applies the effects of the bolt of change to every single mob.", ADMIN_CATEGORY_FUN)
var/confirm = tgui_alert(user, "Please confirm you want polymorph all mobs?", "Confirm Polymorph", list("Yes", "No"))
if(confirm != "Yes")
return
var/list/mobs = shuffle(GLOB.alive_mob_list.Copy()) // might change while iterating
var/who_did_it = key_name_admin(usr)
var/who_did_it = key_name_admin(user)
message_admins("[key_name_admin(usr)] started polymorphed all living mobs.")
log_admin("[key_name(usr)] polymorphed all living mobs.")
message_admins("[key_name_admin(user)] started polymorphed all living mobs.")
log_admin("[key_name(user)] polymorphed all living mobs.")
BLACKBOX_LOG_ADMIN_VERB("Polymorph All")
for(var/mob/living/M in mobs)
@@ -201,23 +153,18 @@
message_admins("Mass polymorph started by [who_did_it] is complete.")
/client/proc/smite(mob/living/target as mob)
set category = "Admin.Fun"
set name = "Smite"
if(!check_rights(R_ADMIN) || !check_rights(R_FUN))
return
var/punishment = input("Choose a punishment", "DIVINE SMITING") as null|anything in GLOB.smites
ADMIN_VERB_AND_CONTEXT_MENU(admin_smite, R_ADMIN|R_FUN, "Smite", "Smite a player with divine power.", ADMIN_CATEGORY_FUN, mob/living/target in world)
var/punishment = input(user, "Choose a punishment", "DIVINE SMITING") as null|anything in GLOB.smites
if(QDELETED(target) || !punishment)
return
var/smite_path = GLOB.smites[punishment]
var/datum/smite/smite = new smite_path
var/configuration_success = smite.configure(usr)
var/configuration_success = smite.configure(user)
if (configuration_success == FALSE)
return
smite.effect(src, target)
smite.effect(user, target)
/// "Turns" people into objects. Really, we just add them to the contents of the item.
/proc/objectify(atom/movable/target, path)

View File

@@ -1,159 +1,150 @@
// Admin Tab - Game Verbs
ADMIN_VERB_ONLY_CONTEXT_MENU(show_player_panel, R_ADMIN, "Show Player Panel", mob/player in world)
log_admin("[key_name(user)] checked the individual player panel for [key_name(player)][isobserver(user.mob)?"":" while in game"].")
/datum/admins/proc/show_player_panel(mob/M in GLOB.mob_list)
set category = "Admin.Game"
set name = "Show Player Panel"
set desc="Edit player (respawn, ban, heal, etc)"
if(!check_rights())
if(!player)
to_chat(user, span_warning("You seem to be selecting a mob that doesn't exist anymore."), confidential = TRUE)
return
log_admin("[key_name(usr)] checked the individual player panel for [key_name(M)][isobserver(usr)?"":" while in game"].")
if(!M)
to_chat(usr, span_warning("You seem to be selecting a mob that doesn't exist anymore."), confidential = TRUE)
return
var/body = "<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><title>Options for [M.key]</title></head>"
body += "<body>Options panel for <b>[M]</b>"
if(M.client)
body += " played by <b>[M.client]</b> "
body += "\[<A href='?_src_=holder;[HrefToken()];editrights=[(GLOB.admin_datums[M.client.ckey] || GLOB.deadmins[M.client.ckey]) ? "rank" : "add"];key=[M.key]'>[M.client.holder ? M.client.holder.rank_names() : "Player"]</A>\]"
var/body = "<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><title>Options for [player.key]</title></head>"
body += "<body>Options panel for <b>[player]</b>"
if(player.client)
body += " played by <b>[player.client]</b> "
body += "\[<A href='?_src_=holder;[HrefToken()];editrights=[(GLOB.admin_datums[player.client.ckey] || GLOB.deadmins[player.client.ckey]) ? "rank" : "add"];key=[player.key]'>[player.client.holder ? player.client.holder.rank_names() : "Player"]</A>\]"
if(CONFIG_GET(flag/use_exp_tracking))
body += "\[<A href='?_src_=holder;[HrefToken()];getplaytimewindow=[REF(M)]'>" + M.client.get_exp_living(FALSE) + "</a>\]"
body += "\[<A href='?_src_=holder;[HrefToken()];getplaytimewindow=[REF(player)]'>" + player.client.get_exp_living(FALSE) + "</a>\]"
if(isnewplayer(M))
if(isnewplayer(player))
body += " <B>Hasn't Entered Game</B> "
else
body += " \[<A href='?_src_=holder;[HrefToken()];revive=[REF(M)]'>Heal</A>\] "
body += " \[<A href='?_src_=holder;[HrefToken()];revive=[REF(player)]'>Heal</A>\] "
if(M.ckey)
body += "<br>\[<A href='?_src_=holder;[HrefToken()];ppbyckey=[M.ckey];ppbyckeyorigmob=[REF(M)]'>Find Updated Panel</A>\]"
if(player.ckey)
body += "<br>\[<A href='?_src_=holder;[HrefToken()];ppbyckey=[player.ckey];ppbyckeyorigmob=[REF(player)]'>Find Updated Panel</A>\]"
if(M.client)
body += "<br>\[<b>First Seen:</b> [M.client.player_join_date]\]\[<b>Byond account registered on:</b> [M.client.account_join_date]\]"
if(player.client)
body += "<br>\[<b>First Seen:</b> [player.client.player_join_date]\]\[<b>Byond account registered on:</b> [player.client.account_join_date]\]"
body += "<br><br><b>CentCom Galactic Ban DB: </b> "
if(CONFIG_GET(string/centcom_ban_db))
body += "<a href='?_src_=holder;[HrefToken()];centcomlookup=[M.client.ckey]'>Search</a>"
body += "<a href='?_src_=holder;[HrefToken()];centcomlookup=[player.client.ckey]'>Search</a>"
else
body += "<i>Disabled</i>"
body += "<br><br><b>Show related accounts by:</b> "
body += "\[ <a href='?_src_=holder;[HrefToken()];showrelatedacc=cid;client=[REF(M.client)]'>CID</a> | "
body += "<a href='?_src_=holder;[HrefToken()];showrelatedacc=ip;client=[REF(M.client)]'>IP</a> \]"
body += "\[ <a href='?_src_=holder;[HrefToken()];showrelatedacc=cid;client=[REF(player.client)]'>CID</a> | "
body += "<a href='?_src_=holder;[HrefToken()];showrelatedacc=ip;client=[REF(player.client)]'>IP</a> \]"
var/full_version = "Unknown"
if(M.client.byond_version)
full_version = "[M.client.byond_version].[M.client.byond_build ? M.client.byond_build : "xxx"]"
if(player.client.byond_version)
full_version = "[player.client.byond_version].[player.client.byond_build ? player.client.byond_build : "xxx"]"
body += "<br>\[<b>Byond version:</b> [full_version]\]<br>"
body += "<br><br>\[ "
body += "<a href='?_src_=vars;[HrefToken()];Vars=[REF(M)]'>VV</a> - "
if(M.mind)
body += "<a href='?_src_=holder;[HrefToken()];traitor=[REF(M)]'>TP</a> - "
body += "<a href='?_src_=holder;[HrefToken()];skill=[REF(M)]'>SKILLS</a> - "
body += "<a href='?_src_=vars;[HrefToken()];Vars=[REF(player)]'>VV</a> - "
if(player.mind)
body += "<a href='?_src_=holder;[HrefToken()];traitor=[REF(player)]'>TP</a> - "
body += "<a href='?_src_=holder;[HrefToken()];skill=[REF(player)]'>SKILLS</a> - "
else
body += "<a href='?_src_=holder;[HrefToken()];initmind=[REF(M)]'>Init Mind</a> - "
if (iscyborg(M))
body += "<a href='?_src_=holder;[HrefToken()];borgpanel=[REF(M)]'>BP</a> - "
body += "<a href='?priv_msg=[M.ckey]'>PM</a> - "
body += "<a href='?_src_=holder;[HrefToken()];subtlemessage=[REF(M)]'>SM</a> - "
if (ishuman(M) && M.mind)
body += "<a href='?_src_=holder;[HrefToken()];HeadsetMessage=[REF(M)]'>HM</a> - "
body += "<a href='?_src_=holder;[HrefToken()];adminplayerobservefollow=[REF(M)]'>FLW</a> - "
body += "<a href='?_src_=holder;[HrefToken()];initmind=[REF(player)]'>Init Mind</a> - "
if (iscyborg(player))
body += "<a href='?_src_=holder;[HrefToken()];borgpanel=[REF(player)]'>BP</a> - "
body += "<a href='?priv_msg=[player.ckey]'>PM</a> - "
body += "<a href='?_src_=holder;[HrefToken()];subtlemessage=[REF(player)]'>SM</a> - "
if (ishuman(player) && player.mind)
body += "<a href='?_src_=holder;[HrefToken()];HeadsetMessage=[REF(player)]'>HM</a> - "
body += "<a href='?_src_=holder;[HrefToken()];adminplayerobservefollow=[REF(player)]'>FLW</a> - "
//Default to client logs if available
var/source = LOGSRC_MOB
if(M.ckey)
if(player.ckey)
source = LOGSRC_CKEY
body += "<a href='?_src_=holder;[HrefToken()];individuallog=[REF(M)];log_src=[source]'>LOGS</a>\] <br>"
body += "<a href='?_src_=holder;[HrefToken()];individuallog=[REF(player)];log_src=[source]'>LOGS</a>\] <br>"
body += "<b>Mob type</b> = [M.type]<br><br>"
body += "<b>Mob type</b> = [player.type]<br><br>"
if(M.client)
if(player.client)
body += "<b>Old names:</b> "
var/datum/player_details/deets = GLOB.player_details[M.ckey]
var/datum/player_details/deets = GLOB.player_details[player.ckey]
if(deets)
body += deets.get_played_names()
else
body += "<i>None?!</i>"
body += "<br><br>"
body += "<A href='?_src_=holder;[HrefToken()];boot2=[REF(M)]'>Kick</A> | "
if(M.client)
body += "<A href='?_src_=holder;[HrefToken()];newbankey=[M.key];newbanip=[M.client.address];newbancid=[M.client.computer_id]'>Ban</A> | "
body += "<A href='?_src_=holder;[HrefToken()];boot2=[REF(player)]'>Kick</A> | "
if(player.client)
body += "<A href='?_src_=holder;[HrefToken()];newbankey=[player.key];newbanip=[player.client.address];newbancid=[player.client.computer_id]'>Ban</A> | "
else
body += "<A href='?_src_=holder;[HrefToken()];newbankey=[M.key]'>Ban</A> | "
body += "<A href='?_src_=holder;[HrefToken()];newbankey=[player.key]'>Ban</A> | "
body += "<A href='?_src_=holder;[HrefToken()];showmessageckey=[M.ckey]'>Notes | Messages | Watchlist</A> | "
if(M.client)
body += "| <A href='?_src_=holder;[HrefToken()];sendtoprison=[REF(M)]'>Prison</A> | "
body += "\ <A href='?_src_=holder;[HrefToken()];sendbacktolobby=[REF(M)]'>Send back to Lobby</A> | "
var/muted = M.client.prefs.muted
body += "<A href='?_src_=holder;[HrefToken()];showmessageckey=[player.ckey]'>Notes | Messages | Watchlist</A> | "
if(player.client)
body += "| <A href='?_src_=holder;[HrefToken()];sendtoprison=[REF(player)]'>Prison</A> | "
body += "\ <A href='?_src_=holder;[HrefToken()];sendbacktolobby=[REF(player)]'>Send back to Lobby</A> | "
var/muted = player.client.prefs.muted
body += "<br><b>Mute: </b> "
body += "\[<A href='?_src_=holder;[HrefToken()];mute=[M.ckey];mute_type=[MUTE_IC]'><font color='[(muted & MUTE_IC)?"red":"blue"]'>IC</font></a> | "
body += "<A href='?_src_=holder;[HrefToken()];mute=[M.ckey];mute_type=[MUTE_OOC]'><font color='[(muted & MUTE_OOC)?"red":"blue"]'>OOC</font></a> | "
body += "<A href='?_src_=holder;[HrefToken()];mute=[M.ckey];mute_type=[MUTE_PRAY]'><font color='[(muted & MUTE_PRAY)?"red":"blue"]'>PRAY</font></a> | "
body += "<A href='?_src_=holder;[HrefToken()];mute=[M.ckey];mute_type=[MUTE_ADMINHELP]'><font color='[(muted & MUTE_ADMINHELP)?"red":"blue"]'>ADMINHELP</font></a> | "
body += "<A href='?_src_=holder;[HrefToken()];mute=[M.ckey];mute_type=[MUTE_INTERNET_REQUEST]'><font color='[(muted & MUTE_INTERNET_REQUEST)?"red":"blue"]'>WEBREQ</font></a> | "
body += "<A href='?_src_=holder;[HrefToken()];mute=[M.ckey];mute_type=[MUTE_DEADCHAT]'><font color='[(muted & MUTE_DEADCHAT)?"red":"blue"]'>DEADCHAT</font></a>\]"
body += "(<A href='?_src_=holder;[HrefToken()];mute=[M.ckey];mute_type=[MUTE_ALL]'><font color='[(muted & MUTE_ALL)?"red":"blue"]'>toggle all</font></a>)"
body += "\[<A href='?_src_=holder;[HrefToken()];mute=[player.ckey];mute_type=[MUTE_IC]'><font color='[(muted & MUTE_IC)?"red":"blue"]'>IC</font></a> | "
body += "<A href='?_src_=holder;[HrefToken()];mute=[player.ckey];mute_type=[MUTE_OOC]'><font color='[(muted & MUTE_OOC)?"red":"blue"]'>OOC</font></a> | "
body += "<A href='?_src_=holder;[HrefToken()];mute=[player.ckey];mute_type=[MUTE_PRAY]'><font color='[(muted & MUTE_PRAY)?"red":"blue"]'>PRAY</font></a> | "
body += "<A href='?_src_=holder;[HrefToken()];mute=[player.ckey];mute_type=[MUTE_ADMINHELP]'><font color='[(muted & MUTE_ADMINHELP)?"red":"blue"]'>ADMINHELP</font></a> | "
body += "<A href='?_src_=holder;[HrefToken()];mute=[player.ckey];mute_type=[MUTE_INTERNET_REQUEST]'><font color='[(muted & MUTE_INTERNET_REQUEST)?"red":"blue"]'>WEBREQ</font></a> | "
body += "<A href='?_src_=holder;[HrefToken()];mute=[player.ckey];mute_type=[MUTE_DEADCHAT]'><font color='[(muted & MUTE_DEADCHAT)?"red":"blue"]'>DEADCHAT</font></a>\]"
body += "(<A href='?_src_=holder;[HrefToken()];mute=[player.ckey];mute_type=[MUTE_ALL]'><font color='[(muted & MUTE_ALL)?"red":"blue"]'>toggle all</font></a>)"
body += "<br><br>"
body += "<A href='?_src_=holder;[HrefToken()];jumpto=[REF(M)]'><b>Jump to</b></A> | "
body += "<A href='?_src_=holder;[HrefToken()];getmob=[REF(M)]'>Get</A> | "
body += "<A href='?_src_=holder;[HrefToken()];sendmob=[REF(M)]'>Send To</A>"
body += "<A href='?_src_=holder;[HrefToken()];jumpto=[REF(player)]'><b>Jump to</b></A> | "
body += "<A href='?_src_=holder;[HrefToken()];getmob=[REF(player)]'>Get</A> | "
body += "<A href='?_src_=holder;[HrefToken()];sendmob=[REF(player)]'>Send To</A>"
body += "<br><br>"
body += "<A href='?_src_=holder;[HrefToken()];traitor=[REF(M)]'>Traitor panel</A> | "
body += "<A href='?_src_=holder;[HrefToken()];narrateto=[REF(M)]'>Narrate to</A> | "
body += "<A href='?_src_=holder;[HrefToken()];subtlemessage=[REF(M)]'>Subtle message</A> | "
body += "<A href='?_src_=holder;[HrefToken()];playsoundto=[REF(M)]'>Play sound to</A> | "
body += "<A href='?_src_=holder;[HrefToken()];languagemenu=[REF(M)]'>Language Menu</A>"
body += "<A href='?_src_=holder;[HrefToken()];traitor=[REF(player)]'>Traitor panel</A> | "
body += "<A href='?_src_=holder;[HrefToken()];narrateto=[REF(player)]'>Narrate to</A> | "
body += "<A href='?_src_=holder;[HrefToken()];subtlemessage=[REF(player)]'>Subtle message</A> | "
body += "<A href='?_src_=holder;[HrefToken()];playsoundto=[REF(player)]'>Play sound to</A> | "
body += "<A href='?_src_=holder;[HrefToken()];languagemenu=[REF(player)]'>Language Menu</A>"
if(M.client)
if(!isnewplayer(M))
if(player.client)
if(!isnewplayer(player))
body += "<br><br>"
body += "<b>Transformation:</b><br>"
if(isobserver(M))
if(isobserver(player))
body += "<b>Ghost</b> | "
else
body += "<A href='?_src_=holder;[HrefToken()];simplemake=observer;mob=[REF(M)]'>Make Ghost</A> | "
body += "<A href='?_src_=holder;[HrefToken()];simplemake=observer;mob=[REF(player)]'>Make Ghost</A> | "
if(ishuman(M) && !ismonkey(M))
if(ishuman(player) && !ismonkey(player))
body += "<b>Human</b> | "
else
body += "<A href='?_src_=holder;[HrefToken()];simplemake=human;mob=[REF(M)]'>Make Human</A> | "
body += "<A href='?_src_=holder;[HrefToken()];simplemake=human;mob=[REF(player)]'>Make Human</A> | "
if(ismonkey(M))
if(ismonkey(player))
body += "<b>Monkey</b> | "
else
body += "<A href='?_src_=holder;[HrefToken()];simplemake=monkey;mob=[REF(M)]'>Make Monkey</A> | "
body += "<A href='?_src_=holder;[HrefToken()];simplemake=monkey;mob=[REF(player)]'>Make Monkey</A> | "
if(iscyborg(M))
if(iscyborg(player))
body += "<b>Cyborg</b> | "
else
body += "<A href='?_src_=holder;[HrefToken()];simplemake=robot;mob=[REF(M)]'>Make Cyborg</A> | "
body += "<A href='?_src_=holder;[HrefToken()];simplemake=robot;mob=[REF(player)]'>Make Cyborg</A> | "
if(isAI(M))
if(isAI(player))
body += "<b>AI</b>"
else
body += "<A href='?_src_=holder;[HrefToken()];makeai=[REF(M)]'>Make AI</A>"
body += "<A href='?_src_=holder;[HrefToken()];makeai=[REF(player)]'>Make AI</A>"
body += "<br><br>"
body += "<b>Other actions:</b>"
body += "<br>"
if(!isnewplayer(M))
body += "<A href='?_src_=holder;[HrefToken()];forcespeech=[REF(M)]'>Forcesay</A> | "
body += "<A href='?_src_=holder;[HrefToken()];applyquirks=[REF(M)]'>Apply Client Quirks</A> | "
body += "<A href='?_src_=holder;[HrefToken()];tdome1=[REF(M)]'>Thunderdome 1</A> | "
body += "<A href='?_src_=holder;[HrefToken()];tdome2=[REF(M)]'>Thunderdome 2</A> | "
body += "<A href='?_src_=holder;[HrefToken()];tdomeadmin=[REF(M)]'>Thunderdome Admin</A> | "
body += "<A href='?_src_=holder;[HrefToken()];tdomeobserve=[REF(M)]'>Thunderdome Observer</A> | "
body += "<A href='?_src_=holder;[HrefToken()];admincommend=[REF(M)]'>Commend Behavior</A> | "
if(!isnewplayer(player))
body += "<A href='?_src_=holder;[HrefToken()];forcespeech=[REF(player)]'>Forcesay</A> | "
body += "<A href='?_src_=holder;[HrefToken()];applyquirks=[REF(player)]'>Apply Client Quirks</A> | "
body += "<A href='?_src_=holder;[HrefToken()];tdome1=[REF(player)]'>Thunderdome 1</A> | "
body += "<A href='?_src_=holder;[HrefToken()];tdome2=[REF(player)]'>Thunderdome 2</A> | "
body += "<A href='?_src_=holder;[HrefToken()];tdomeadmin=[REF(player)]'>Thunderdome Admin</A> | "
body += "<A href='?_src_=holder;[HrefToken()];tdomeobserve=[REF(player)]'>Thunderdome Observer</A> | "
body += "<A href='?_src_=holder;[HrefToken()];admincommend=[REF(player)]'>Commend Behavior</A> | "
body += "<br>"
body += "</body></html>"
usr << browse(body, "window=adminplayeropts-[REF(M)];size=550x515")
user << browse(body, "window=adminplayeropts-[REF(player)];size=550x515")
BLACKBOX_LOG_ADMIN_VERB("Player Panel")
/client/proc/cmd_admin_godmode(mob/M in GLOB.mob_list)
@@ -176,14 +167,8 @@ If a guy was gibbed and you want to revive him, this is a good way to do so.
Works kind of like entering the game with a new character. Character receives a new mind if they didn't have one.
Traitors and the like can also be revived with the previous role mostly intact.
/N */
/client/proc/respawn_character()
set category = "Admin.Game"
set name = "Respawn Character"
set desc = "Respawn a person that has been gibbed/dusted/killed. They must be a ghost for this to work and preferably should not have a body to go back into."
if(!check_rights(R_ADMIN))
return
var/input = ckey(input(src, "Please specify which key will be respawned.", "Key", ""))
ADMIN_VERB(respawn_character, R_ADMIN, "Respawn Character", "Respawn a player that has been round removed in some manner. They must be a ghost.", ADMIN_CATEGORY_GAME)
var/input = ckey(input(user, "Please specify which key will be respawned.", "Key", ""))
if(!input)
return
@@ -194,19 +179,19 @@ Traitors and the like can also be revived with the previous role mostly intact.
break
if(!G_found)//If a ghost was not found.
to_chat(usr, "<font color='red'>There is no active key like that in the game or the person is not currently a ghost.</font>", confidential = TRUE)
to_chat(user, "<font color='red'>There is no active key like that in the game or the person is not currently a ghost.</font>", confidential = TRUE)
return
if(G_found.mind && !G_found.mind.active) //mind isn't currently in use by someone/something
//check if they were a monkey
if(findtext(G_found.real_name,"monkey"))
if(tgui_alert(usr,"This character appears to have been a monkey. Would you like to respawn them as such?",,list("Yes","No")) == "Yes")
if(tgui_alert(user,"This character appears to have been a monkey. Would you like to respawn them as such?",,list("Yes","No")) == "Yes")
var/mob/living/carbon/human/species/monkey/new_monkey = new
SSjob.SendToLateJoin(new_monkey)
G_found.mind.transfer_to(new_monkey) //be careful when doing stuff like this! I've already checked the mind isn't in use
new_monkey.key = G_found.key
to_chat(new_monkey, "You have been fully respawned. Enjoy the game.", confidential = TRUE)
var/msg = span_adminnotice("[key_name_admin(usr)] has respawned [new_monkey.key] as a filthy monkey.")
var/msg = span_adminnotice("[key_name_admin(user)] has respawned [new_monkey.key] as a filthy monkey.")
message_admins(msg)
admin_ticket_log(new_monkey, msg)
return //all done. The ghost is auto-deleted
@@ -248,7 +233,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
*/
//Two variables to properly announce later on.
var/admin = key_name_admin(src)
var/admin = key_name_admin(user)
var/player_key = G_found.key
//Now for special roles and equipment.
@@ -303,13 +288,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
BLACKBOX_LOG_ADMIN_VERB("Respawn Character")
return new_character
/client/proc/cmd_admin_list_open_jobs()
set category = "Admin.Game"
set name = "Manage Job Slots"
if(!check_rights(R_ADMIN))
return
holder.manage_free_slots()
ADMIN_VERB(manage_job_slots, R_ADMIN, "Manage Job Slots", "Manage the number of available job slots.", ADMIN_CATEGORY_GAME)
user.holder.manage_free_slots()
BLACKBOX_LOG_ADMIN_VERB("Manage Job Slots")
/datum/admins/proc/manage_free_slots()
@@ -352,38 +332,25 @@ Traitors and the like can also be revived with the previous role mostly intact.
browser.set_content(dat.Join())
browser.open()
/client/proc/toggle_view_range()
set category = "Admin.Game"
set name = "Change View Range"
set desc = "switches between 1x and custom views"
if(view_size.getView() == view_size.default)
view_size.setTo(input("Select view range:", "FUCK YE", 7) in list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,37) - 7)
ADMIN_VERB(toggle_view_range, R_ADMIN, "Change View Range", "Switch between 1x and custom views.", ADMIN_CATEGORY_GAME)
if(user.view_size.getView() == user.view_size.default)
user.view_size.setTo(input(user, "Select view range:", "FUCK YE", 7) in list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,37) - 7)
else
view_size.resetToDefault(getScreenSize(prefs.read_preference(/datum/preference/toggle/widescreen)))
user.view_size.resetToDefault(getScreenSize(user.prefs.read_preference(/datum/preference/toggle/widescreen)))
log_admin("[key_name(usr)] changed their view range to [view].")
//message_admins("\blue [key_name_admin(usr)] changed their view range to [view].") //why? removed by order of XSI
log_admin("[key_name(user)] changed their view range to [user.view].")
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Change View Range", "[user.view]")) // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Change View Range", "[view]")) // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
/client/proc/toggle_combo_hud()
set category = "Admin.Game"
set name = "Toggle Combo HUD"
set desc = "Toggles the Admin Combo HUD (antag, sci, med, eng)"
if(!check_rights(R_ADMIN))
return
if (combo_hud_enabled)
disable_combo_hud()
ADMIN_VERB(combo_hud, R_ADMIN, "Toggle Combo HUD", "Toggles the Admin Combo HUD.", ADMIN_CATEGORY_GAME)
if(user.combo_hud_enabled)
user.disable_combo_hud()
else
enable_combo_hud()
user.enable_combo_hud()
to_chat(usr, "You toggled your admin combo HUD [combo_hud_enabled ? "ON" : "OFF"].", confidential = TRUE)
message_admins("[key_name_admin(usr)] toggled their admin combo HUD [combo_hud_enabled ? "ON" : "OFF"].")
log_admin("[key_name(usr)] toggled their admin combo HUD [combo_hud_enabled ? "ON" : "OFF"].")
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Combo HUD", "[combo_hud_enabled ? "Enabled" : "Disabled"]")) // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
to_chat(user, "You toggled your admin combo HUD [user.combo_hud_enabled ? "ON" : "OFF"].", confidential = TRUE)
message_admins("[key_name_admin(user)] toggled their admin combo HUD [user.combo_hud_enabled ? "ON" : "OFF"].")
log_admin("[key_name(user)] toggled their admin combo HUD [user.combo_hud_enabled ? "ON" : "OFF"].")
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Combo HUD", "[user.combo_hud_enabled ? "Enabled" : "Disabled"]")) // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
/client/proc/enable_combo_hud()
if (combo_hud_enabled)
@@ -417,47 +384,31 @@ Traitors and the like can also be revived with the previous role mostly intact.
mob.lighting_cutoff = mob.default_lighting_cutoff()
mob.update_sight()
/datum/admins/proc/show_traitor_panel(mob/target_mob in GLOB.mob_list)
set category = "Admin.Game"
set desc = "Edit mobs's memory and role"
set name = "Show Traitor Panel"
ADMIN_VERB(show_traitor_panel, R_ADMIN, "Show Traitor Panel", "Edit mobs's memory and role", ADMIN_CATEGORY_GAME, mob/target_mob)
var/datum/mind/target_mind = target_mob.mind
if(!target_mind)
to_chat(usr, "This mob has no mind!", confidential = TRUE)
to_chat(user, "This mob has no mind!", confidential = TRUE)
return
if(!istype(target_mob) && !istype(target_mind))
to_chat(usr, "This can only be used on instances of type /mob and /mind", confidential = TRUE)
to_chat(user, "This can only be used on instances of type /mob and /mind", confidential = TRUE)
return
target_mind.traitor_panel()
BLACKBOX_LOG_ADMIN_VERB("Traitor Panel")
/datum/admins/proc/show_skill_panel(target)
set category = "Admin.Game"
set desc = "Edit mobs's experience and skill levels"
set name = "Show Skill Panel"
ADMIN_VERB(show_skill_panel, R_ADMIN, "Show Skill Panel", "Edit mobs's experience and skill levels", ADMIN_CATEGORY_GAME, mob/target_mob)
var/datum/mind/target_mind
if(ismob(target))
var/mob/target_mob = target
target_mind = target_mob.mind
else if (istype(target, /datum/mind))
target_mind = target
if(istype(target_mob, /datum/mind))
target_mind = target_mob
else
to_chat(usr, "This can only be used on instances of type /mob and /mind", confidential = TRUE)
return
var/datum/skill_panel/SP = new(usr, target_mind)
SP.ui_interact(usr)
target_mind = target_mob.mind
/datum/admins/proc/show_lag_switch_panel()
set category = "Admin.Game"
set name = "Show Lag Switches"
set desc="Display the controls for drastic lag mitigation measures."
var/datum/skill_panel/SP = new(user, target_mind)
SP.ui_interact(user.mob)
ADMIN_VERB(lag_switch_panel, R_ADMIN, "Show Lag Switches", "Display the controls for drastic lag mitigation.", ADMIN_CATEGORY_GAME)
if(!SSlag_switch.initialized)
to_chat(usr, span_notice("The Lag Switch subsystem has not yet been initialized."))
to_chat(user, span_notice("The Lag Switch subsystem has not yet been initialized."))
return
if(!check_rights())
return
var/list/dat = list("<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><title>Lag Switches</title></head><body><h2><B>Lag (Reduction) Switches</B></h2>")
dat += "Automatic Trigger: <a href='?_src_=holder;[HrefToken()];change_lag_switch_option=TOGGLE_AUTO'><b>[SSlag_switch.auto_switch ? "On" : "Off"]</b></a><br/>"
dat += "Population Threshold: <a href='?_src_=holder;[HrefToken()];change_lag_switch_option=NUM'><b>[SSlag_switch.trigger_pop]</b></a><br/>"
@@ -475,4 +426,4 @@ Traitors and the like can also be revived with the previous role mostly intact.
dat += "Disable parallax: <a href='?_src_=holder;[HrefToken()];change_lag_switch=[DISABLE_PARALLAX]'><b>[SSlag_switch.measures[DISABLE_PARALLAX] ? "On" : "Off"]</b></a> - <span style='font-size:80%'>trait applies to character</span><br />"
dat += "Disable footsteps: <a href='?_src_=holder;[HrefToken()];change_lag_switch=[DISABLE_FOOTSTEPS]'><b>[SSlag_switch.measures[DISABLE_FOOTSTEPS] ? "On" : "Off"]</b></a> - <span style='font-size:80%'>trait applies to character</span><br />"
dat += "</body></html>"
usr << browse(dat.Join(), "window=lag_switch_panel;size=420x480")
user << browse(dat.Join(), "window=lag_switch_panel;size=420x480")

View File

@@ -1,114 +1,75 @@
/client/proc/jumptoarea(area/A in get_sorted_areas())
set name = "Jump to Area"
set desc = "Area to jump to"
set category = "Admin.Game"
if(!src.holder)
to_chat(src, "Only administrators may use this command.", confidential = TRUE)
ADMIN_VERB(jump_to_area, R_ADMIN, "Jump To Area", "Jumps to the specified area.", ADMIN_CATEGORY_GAME, area/target in world)
if(!isobserver(user.mob))
SSadmin_verbs.dynamic_invoke_verb(user, /datum/admin_verb/admin_ghost)
var/turf/drop_location
top_level:
for(var/list/zlevel_turfs as anything in target.get_zlevel_turf_lists())
for(var/turf/area_turf as anything in zlevel_turfs)
drop_location = area_turf
break top_level
if(isnull(drop_location))
to_chat(user, span_warning("No valid drop location found in the area!"))
return
if(!A)
return
user.mob.abstract_move(drop_location)
log_admin("[key_name(user)] jumped to [AREACOORD(drop_location)]")
message_admins("[key_name_admin(user)] jumped to [AREACOORD(drop_location)]")
BLACKBOX_LOG_ADMIN_VERB("Jump To Area")
var/list/turfs = list()
for (var/list/zlevel_turfs as anything in A.get_zlevel_turf_lists())
for (var/turf/area_turf as anything in zlevel_turfs)
if(!area_turf.density)
turfs.Add(area_turf)
ADMIN_VERB(jump_to_turf, R_ADMIN, "Jump To Turf", "Jump to any turf in the game. This will lag your client.", ADMIN_CATEGORY_GAME, turf/locale in world)
if(!isobserver(user.mob))
SSadmin_verbs.dynamic_invoke_verb(user, /datum/admin_verb/admin_ghost)
if(length(turfs))
var/turf/T = pick(turfs)
usr.forceMove(T)
log_admin("[key_name(usr)] jumped to [AREACOORD(T)]")
message_admins("[key_name_admin(usr)] jumped to [AREACOORD(T)]")
BLACKBOX_LOG_ADMIN_VERB("Jump To Area")
else
to_chat(src, "Nowhere to jump to!", confidential = TRUE)
return
/client/proc/jumptoturf(turf/T in world)
set name = "Jump to Turf"
set category = "Admin.Game"
if(!src.holder)
to_chat(src, "Only administrators may use this command.", confidential = TRUE)
return
log_admin("[key_name(usr)] jumped to [AREACOORD(T)]")
message_admins("[key_name_admin(usr)] jumped to [AREACOORD(T)]")
usr.forceMove(T)
log_admin("[key_name(user)] jumped to [AREACOORD(locale)]")
message_admins("[key_name_admin(user)] jumped to [AREACOORD(locale)]")
user.mob.abstract_move(locale)
BLACKBOX_LOG_ADMIN_VERB("Jump To Turf")
return
/client/proc/jumptomob(mob/M in GLOB.mob_list)
set category = "Admin.Game"
set name = "Jump to Mob"
ADMIN_VERB(jump_to_mob, R_ADMIN, "Jump To Mob", "Jump to any mob in the game.", ADMIN_CATEGORY_GAME, mob/target in world)
if(!isobserver(user.mob))
SSadmin_verbs.dynamic_invoke_verb(user, /datum/admin_verb/admin_ghost)
user.mob.abstract_move(target.loc)
log_admin("[key_name(user)] jumped to [key_name(target)]")
message_admins("[key_name_admin(user)] jumped to [ADMIN_LOOKUPFLW(target)] at [AREACOORD(target)]")
BLACKBOX_LOG_ADMIN_VERB("Jump To Mob")
if(!src.holder)
to_chat(src, "Only administrators may use this command.", confidential = TRUE)
ADMIN_VERB(jump_to_coord, R_ADMIN, "Jump To Coordinate", "Jump to a specific coordinate in the game world.", ADMIN_CATEGORY_GAME, cx as num, cy as num, cz as num)
if(!isobserver(user.mob))
SSadmin_verbs.dynamic_invoke_verb(user, /datum/admin_verb/admin_ghost)
var/turf/where_we_droppin = locate(cx, cy, cz)
if(isnull(where_we_droppin))
to_chat(user, span_warning("Invalid coordinates."))
return
log_admin("[key_name(usr)] jumped to [key_name(M)]")
message_admins("[key_name_admin(usr)] jumped to [ADMIN_LOOKUPFLW(M)] at [AREACOORD(M)]")
if(src.mob)
var/mob/A = src.mob
var/turf/T = get_turf(M)
if(T && isturf(T))
BLACKBOX_LOG_ADMIN_VERB("Jump To Mob")
A.forceMove(M.loc)
else
to_chat(A, "This mob is not located in the game world.", confidential = TRUE)
user.mob.abstract_move(where_we_droppin)
message_admins("[key_name_admin(user)] jumped to coordinates [cx], [cy], [cz]")
BLACKBOX_LOG_ADMIN_VERB("Jump To Coordiate")
/client/proc/jumptocoord(tx as num, ty as num, tz as num)
set category = "Admin.Game"
set name = "Jump to Coordinate"
if (!holder)
to_chat(src, "Only administrators may use this command.", confidential = TRUE)
return
if(src.mob)
var/mob/A = src.mob
var/turf/T = locate(tx,ty,tz)
A.forceMove(T)
BLACKBOX_LOG_ADMIN_VERB("Jump To Coordiate")
message_admins("[key_name_admin(usr)] jumped to coordinates [tx], [ty], [tz]")
/client/proc/jumptokey()
set category = "Admin.Game"
set name = "Jump to Key"
if(!src.holder)
to_chat(src, "Only administrators may use this command.", confidential = TRUE)
return
ADMIN_VERB(jump_to_key, R_ADMIN, "Jump To Key", "Jump to a specific player.", ADMIN_CATEGORY_GAME)
if(!isobserver(user.mob))
SSadmin_verbs.dynamic_invoke_verb(user, /datum/admin_verb/admin_ghost)
var/list/keys = list()
for(var/mob/M in GLOB.player_list)
keys += M.client
var/client/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sort_key(keys)
var/client/selection = input(user, "Please, select a player!", "Admin Jumping") as null|anything in sort_key(keys)
if(!selection)
to_chat(src, "No keys found.", confidential = TRUE)
to_chat(user, "No keys found.", confidential = TRUE)
return
var/mob/M = selection.mob
log_admin("[key_name(usr)] jumped to [key_name(M)]")
message_admins("[key_name_admin(usr)] jumped to [ADMIN_LOOKUPFLW(M)]")
usr.forceMove(M.loc)
log_admin("[key_name(user)] jumped to [key_name(M)]")
message_admins("[key_name_admin(user)] jumped to [ADMIN_LOOKUPFLW(M)]")
user.mob.abstract_move(M.loc)
BLACKBOX_LOG_ADMIN_VERB("Jump To Key")
/client/proc/Getmob(mob/M in GLOB.mob_list - GLOB.dummy_mob_list)
set category = "Admin.Game"
set name = "Get Mob"
set desc = "Mob to teleport"
if(!src.holder)
to_chat(src, "Only administrators may use this command.", confidential = TRUE)
return
var/atom/loc = get_turf(usr)
M.admin_teleport(loc)
ADMIN_VERB_AND_CONTEXT_MENU(get_mob, R_ADMIN, "Get Mob", "Teleport a mob to your location.", ADMIN_CATEGORY_GAME, mob/target in world)
var/atom/loc = get_turf(user.mob)
target.admin_teleport(loc)
BLACKBOX_LOG_ADMIN_VERB("Get Mob")
/// Proc to hook user-enacted teleporting behavior and keep logging of the event.
/atom/movable/proc/admin_teleport(atom/new_location)
if(isnull(new_location))
@@ -126,56 +87,41 @@
admin_ticket_log(src, msg)
return ..()
/client/proc/Getkey()
set category = "Admin.Game"
set name = "Get Key"
set desc = "Key to teleport"
if(!src.holder)
to_chat(src, "Only administrators may use this command.", confidential = TRUE)
return
ADMIN_VERB(get_key, R_ADMIN, "Get Key", "Teleport the player with the provided key to you.", ADMIN_CATEGORY_GAME)
var/list/keys = list()
for(var/mob/M in GLOB.player_list)
keys += M.client
var/client/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sort_key(keys)
var/client/selection = input(user, "Please, select a player!", "Admin Jumping") as null|anything in sort_key(keys)
if(!selection)
return
var/mob/M = selection.mob
if(!M)
return
log_admin("[key_name(usr)] teleported [key_name(M)]")
var/msg = "[key_name_admin(usr)] teleported [ADMIN_LOOKUPFLW(M)]"
log_admin("[key_name(user)] teleported [key_name(M)]")
var/msg = "[key_name_admin(user)] teleported [ADMIN_LOOKUPFLW(M)]"
message_admins(msg)
admin_ticket_log(M, msg)
if(M)
M.forceMove(get_turf(usr))
usr.forceMove(M.loc)
M.forceMove(get_turf(user))
BLACKBOX_LOG_ADMIN_VERB("Get Key")
/client/proc/sendmob(mob/jumper in sort_mobs())
set category = "Admin.Game"
set name = "Send Mob"
if(!src.holder)
to_chat(src, "Only administrators may use this command.", confidential = TRUE)
return
ADMIN_VERB(send_mob, R_ADMIN, "Send Mob", "Teleport the specified mob to an area of your choosing.", ADMIN_CATEGORY_GAME, mob/jumper)
var/list/sorted_areas = get_sorted_areas()
if(!length(sorted_areas))
to_chat(src, "No areas found.", confidential = TRUE)
to_chat(user, "No areas found.", confidential = TRUE)
return
var/area/target_area = tgui_input_list(src, "Pick an area", "Send Mob", sorted_areas)
var/area/target_area = tgui_input_list(user, "Pick an area", "Send Mob", sorted_areas)
if(isnull(target_area))
return
if(!istype(target_area))
return
var/list/turfs = get_area_turfs(target_area)
if(length(turfs) && jumper.forceMove(pick(turfs)))
log_admin("[key_name(usr)] teleported [key_name(jumper)] to [AREACOORD(jumper)]")
var/msg = "[key_name_admin(usr)] teleported [ADMIN_LOOKUPFLW(jumper)] to [AREACOORD(jumper)]"
log_admin("[key_name(user)] teleported [key_name(jumper)] to [AREACOORD(jumper)]")
var/msg = "[key_name_admin(user)] teleported [ADMIN_LOOKUPFLW(jumper)] to [AREACOORD(jumper)]"
message_admins(msg)
admin_ticket_log(jumper, msg)
else
to_chat(src, "Failed to move mob to a valid location.", confidential = TRUE)
to_chat(user, "Failed to move mob to a valid location.", confidential = TRUE)
BLACKBOX_LOG_ADMIN_VERB("Send Mob")

View File

@@ -13,36 +13,19 @@
// We also make SURE to fail loud, IE: if something stops the message from reaching the recipient, the sender HAS to know
// If you "refactor" this to make it "cleaner" I will send you to hell
/// 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 in GLOB.mob_list)
set category = null
set name = "Admin PM Mob"
if(!holder)
to_chat(src,
type = MESSAGE_TYPE_ADMINPM,
html = span_danger("Error: Admin-PM-Context: Only administrators may use this command."),
confidential = TRUE)
return
if(!ismob(M))
to_chat(src,
ADMIN_VERB_ONLY_CONTEXT_MENU(cmd_admin_pm_context, R_NONE, "Admin PM Mob", mob/target in world)
if(!ismob(target))
to_chat(
src,
type = MESSAGE_TYPE_ADMINPM,
html = span_danger("Error: Admin-PM-Context: Target mob is not a mob, somehow."),
confidential = TRUE)
confidential = TRUE,
)
return
cmd_admin_pm(M.client, null)
user.cmd_admin_pm(target.client, null)
BLACKBOX_LOG_ADMIN_VERB("Admin PM Mob")
/// 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"
if(!holder)
to_chat(src,
type = MESSAGE_TYPE_ADMINPM,
html = span_danger("Error: Admin-PM-Panel: Only administrators may use this command."),
confidential = TRUE)
return
ADMIN_VERB(cmd_admin_pm_panel, R_NONE, "Admin PM", "Show a list of clients to PM", ADMIN_CATEGORY_MAIN)
var/list/targets = list()
for(var/client/client in GLOB.clients)
var/nametag = ""
@@ -62,7 +45,7 @@
var/target = input(src,"To whom shall we send a message?", "Admin PM", null) as null|anything in sort_list(targets)
if (isnull(target))
return
cmd_admin_pm(targets[target], null)
user.cmd_admin_pm(targets[target], null)
BLACKBOX_LOG_ADMIN_VERB("Admin PM")
/// Replys to some existing ahelp, reply to whom, which can be a client or ckey

View File

@@ -1,18 +1,12 @@
/client/proc/cmd_admin_say(msg as text)
set category = "Admin"
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 = TRUE
if(!check_rights(0))
ADMIN_VERB(cmd_admin_say, R_NONE, "ASay", "Send a message to other admins", ADMIN_CATEGORY_MAIN, message as text)
message = emoji_parse(copytext_char(sanitize(message), 1, MAX_MESSAGE_LEN))
if(!message)
return
msg = emoji_parse(copytext_char(sanitize(msg), 1, MAX_MESSAGE_LEN))
if(!msg)
return
if(findtext(msg, "@") || findtext(msg, "#"))
var/list/link_results = check_asay_links(msg)
if(findtext(message, "@") || findtext(message, "#"))
var/list/link_results = check_asay_links(message)
if(length(link_results))
msg = link_results[ASAY_LINK_NEW_MESSAGE_INDEX]
message = link_results[ASAY_LINK_NEW_MESSAGE_INDEX]
link_results[ASAY_LINK_NEW_MESSAGE_INDEX] = null
var/list/pinged_admin_clients = link_results[ASAY_LINK_PINGED_ADMINS_INDEX]
for(var/iter_ckey in pinged_admin_clients)
@@ -22,18 +16,18 @@
window_flash(iter_admin_client)
SEND_SOUND(iter_admin_client.mob, sound('sound/misc/asay_ping.ogg'))
mob.log_talk(msg, LOG_ASAY)
msg = keywords_lookup(msg)
var/asay_color = prefs.read_preference(/datum/preference/color/asay_color)
user.mob.log_talk(message, LOG_ASAY)
message = keywords_lookup(message)
var/asay_color = user.prefs.read_preference(/datum/preference/color/asay_color)
var/custom_asay_color = (CONFIG_GET(flag/allow_admin_asaycolor) && asay_color) ? "<font color=[asay_color]>" : "<font color='[DEFAULT_ASAY_COLOR]'>"
msg = "[span_adminsay("[span_prefix("ADMIN:")] <EM>[key_name(usr, 1)]</EM> [ADMIN_FLW(mob)]: [custom_asay_color]<span class='message linkify'>[msg]")]</span>[custom_asay_color ? "</font>":null]"
message = "[span_adminsay("[span_prefix("ADMIN:")] <EM>[key_name_admin(user)]</EM> [ADMIN_FLW(user.mob)]: [custom_asay_color]<span class='message linkify'>[message]")]</span>[custom_asay_color ? "</font>":null]"
to_chat(GLOB.admins,
type = MESSAGE_TYPE_ADMINCHAT,
html = msg,
html = message,
confidential = TRUE)
BLACKBOX_LOG_ADMIN_VERB("Asay")
/client/proc/get_admin_say()
var/msg = input(src, null, "asay \"text\"") as text|null
cmd_admin_say(msg)
SSadmin_verbs.dynamic_invoke_verb(src, /datum/admin_verb/cmd_admin_say, msg)

View File

@@ -1,35 +1,27 @@
/client/proc/atmosscan()
set category = "Mapping"
set name = "Check Plumbing"
if(!src.holder)
to_chat(src, "Only administrators may use this command.", confidential = TRUE)
return
ADMIN_VERB_VISIBILITY(atmos_debug, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(atmos_debug, R_DEBUG, "Check Plumbing", "Verifies the integrity of the plumbing network.", ADMIN_CATEGORY_MAPPING)
BLACKBOX_LOG_ADMIN_VERB("Check Plumbing")
//all plumbing - yes, some things might get stated twice, doesn't matter.
for(var/obj/machinery/atmospherics/components/pipe as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/atmospherics/components))
if(pipe.z && (!pipe.nodes || !pipe.nodes.len || (null in pipe.nodes)))
to_chat(usr, "Unconnected [pipe.name] located at [ADMIN_VERBOSEJMP(pipe)]", confidential = TRUE)
to_chat(user, "Unconnected [pipe.name] located at [ADMIN_VERBOSEJMP(pipe)]", confidential = TRUE)
//Pipes
for(var/obj/machinery/atmospherics/pipe/pipe as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/atmospherics/pipe))
if(istype(pipe, /obj/machinery/atmospherics/pipe/smart) || istype(pipe, /obj/machinery/atmospherics/pipe/layer_manifold))
continue
if(pipe.z && (!pipe.nodes || !pipe.nodes.len || (null in pipe.nodes)))
to_chat(usr, "Unconnected [pipe.name] located at [ADMIN_VERBOSEJMP(pipe)]", confidential = TRUE)
to_chat(user, "Unconnected [pipe.name] located at [ADMIN_VERBOSEJMP(pipe)]", confidential = TRUE)
//Nodes
for(var/obj/machinery/atmospherics/node1 as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/atmospherics))
for(var/obj/machinery/atmospherics/node2 in node1.nodes)
if(!(node1 in node2.nodes))
to_chat(usr, "One-way connection in [node1.name] located at [ADMIN_VERBOSEJMP(node1)]", confidential = TRUE)
to_chat(user, "One-way connection in [node1.name] located at [ADMIN_VERBOSEJMP(node1)]", confidential = TRUE)
/client/proc/powerdebug()
set category = "Mapping"
set name = "Check Power"
if(!src.holder)
to_chat(src, "Only administrators may use this command.", confidential = TRUE)
return
ADMIN_VERB_VISIBILITY(power_debug, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(power_debug, R_DEBUG, "Check Power", "Verifies the integrity of the power network.", ADMIN_CATEGORY_MAPPING)
BLACKBOX_LOG_ADMIN_VERB("Check Power")
var/list/results = list()
@@ -56,4 +48,4 @@
var/obj/structure/cable/C = locate(/obj/structure/cable) in T.contents
if(!C)
results += "Unwired terminal at [ADMIN_VERBOSEJMP(term)]"
to_chat(usr, "[results.Join("\n")]", confidential = TRUE)
to_chat(user, "[results.Join("\n")]", confidential = TRUE)

View File

@@ -60,14 +60,11 @@
reagents.add_reagent(reagenttype, amount)
return container
/datum/admins/proc/beaker_panel()
set category = "Admin.Events"
set name = "Spawn reagent container"
if(!check_rights())
return
ADMIN_VERB(beaker_panel, R_SPAWN, "Spawn Reagent Container", "Spawn a reagent container.", ADMIN_CATEGORY_EVENTS)
var/datum/asset/asset_datum = get_asset_datum(/datum/asset/simple/namespaced/common)
asset_datum.send(usr)
asset_datum.send(user)
//Could somebody tell me why this isn't using the browser datum, given that it copypastes all of browser datum's html
// fuck if I know, but im not touching it
var/dat = {"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
@@ -320,4 +317,4 @@
</html>
"}
usr << browse(dat, "window=beakerpanel;size=1100x720")
user << browse(dat, "window=beakerpanel;size=1100x720")

View File

@@ -1,21 +1,6 @@
/datum/admins/proc/open_borgopanel(borgo in GLOB.silicon_mobs)
set category = "Admin.Game"
set name = "Show Borg Panel"
set desc = "Show borg panel"
if(!check_rights(R_ADMIN))
return
if (!iscyborg(borgo))
borgo = input("Select a borg", "Select a borg", null, null) as null|anything in sort_names(GLOB.silicon_mobs)
if (!iscyborg(borgo))
to_chat(usr, span_warning("Borg is required for borgpanel"), confidential = TRUE)
var/datum/borgpanel/borgpanel = new(usr, borgo)
borgpanel.ui_interact(usr)
ADMIN_VERB(borg_panel, R_ADMIN, "Show Borg Panel", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, mob/living/silicon/robot/borgo)
var/datum/borgpanel/borgpanel = new(user.mob, borgo)
borgpanel.ui_interact(user.mob)
/datum/borgpanel
var/mob/living/silicon/robot/borg

View File

@@ -1,20 +1,9 @@
///Manipulate the events that are gonna run/are running on the escape shuttle
/datum/admins/proc/change_shuttle_events()
set category = "Admin.Events"
set name = "Change Shuttle Events"
set desc = "Allows you to change the events on a shuttle."
if (!istype(src, /datum/admins))
src = usr.client.holder
if (!istype(src, /datum/admins))
to_chat(usr, "Error: you are not an admin!", confidential = TRUE)
return
ADMIN_VERB(change_shuttle_events, R_ADMIN|R_FUN, "Change Shuttle Events", "Change the events on a shuttle.", ADMIN_CATEGORY_EVENTS)
//At least for now, just letting admins modify the emergency shuttle is fine
var/obj/docking_port/mobile/port = SSshuttle.emergency
if(!port)
to_chat(usr, span_admin("Uh oh, couldn't find the escape shuttle!"))
to_chat(user, span_admin("Uh oh, couldn't find the escape shuttle!"))
var/list/options = list("Clear"="Clear")
@@ -27,16 +16,16 @@
options[((event in active) ? "(Remove)" : "(Add)") + initial(event.name)] = event
//Throw up an ugly menu with the shuttle events and the options to add or remove them, or clear them all
var/result = input(usr, "Choose an event to add/remove", "Shuttle Events") as null|anything in sort_list(options)
var/result = input(user, "Choose an event to add/remove", "Shuttle Events") as null|anything in sort_list(options)
if(result == "Clear")
port.event_list.Cut()
message_admins("[key_name_admin(usr)] has cleared the shuttle events on: [port]")
message_admins("[key_name_admin(user)] has cleared the shuttle events on: [port]")
else if(options[result])
var/typepath = options[result]
if(typepath in active)
port.event_list.Remove(active[options[result]])
message_admins("[key_name_admin(usr)] has removed '[active[result]]' from [port].")
message_admins("[key_name_admin(user)] has removed '[active[result]]' from [port].")
else
port.event_list.Add(new typepath (port))
message_admins("[key_name_admin(usr)] has added '[typepath]' to [port].")
message_admins("[key_name_admin(user)] has added '[typepath]' to [port].")

View File

@@ -1,14 +1,10 @@
/client/proc/cinematic()
set name = "Cinematic"
set category = "Admin.Fun"
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 = TRUE
if(!SSticker)
return
var/datum/cinematic/choice = tgui_input_list(usr, "Chose a cinematic to play to everyone in the server.", "Choose Cinematic", sort_list(subtypesof(/datum/cinematic), GLOBAL_PROC_REF(cmp_typepaths_asc)))
ADMIN_VERB(cinematic, R_FUN, "Cinematic", "Show a cinematic to all players.", ADMIN_CATEGORY_FUN)
var/datum/cinematic/choice = tgui_input_list(
user,
"Chose a cinematic to play to everyone in the server.",
"Choose Cinematic",
sort_list(subtypesof(/datum/cinematic), GLOBAL_PROC_REF(cmp_typepaths_asc)),
)
if(!choice || !ispath(choice, /datum/cinematic))
return
play_cinematic(choice, world)

View File

@@ -7,32 +7,19 @@
#define WIZARD_PRESET "The Wizard Federation"
#define CUSTOM_PRESET "Custom Command Name"
/// Verb to change the global command name.
/client/proc/cmd_change_command_name()
set category = "Admin.Events"
set name = "Change Command Name"
if(!check_rights(R_ADMIN))
return
var/input = input(usr, "Please input a new name for Central Command.", "What?", "") as text|null
ADMIN_VERB(change_command_name, R_ADMIN, "Change Command Name", "Change the name of Central Command.", ADMIN_CATEGORY_EVENTS)
var/input = input(user, "Please input a new name for Central Command.", "What?", "") as text|null
if(!input)
return
change_command_name(input)
message_admins("[key_name_admin(src)] has changed Central Command's name to [input]")
log_admin("[key_name(src)] has changed the Central Command name to: [input]")
message_admins("[key_name_admin(user)] has changed Central Command's name to [input]")
log_admin("[key_name(user)] has changed the Central Command name to: [input]")
/// Verb to open the create command report window and send command reports.
/client/proc/cmd_admin_create_centcom_report()
set category = "Admin.Events"
set name = "Create Command Report"
if(!check_rights(R_ADMIN))
return
ADMIN_VERB(create_command_report, R_ADMIN, "Create Command Report", "Create a command report to be sent to the station.", ADMIN_CATEGORY_EVENTS)
BLACKBOX_LOG_ADMIN_VERB("Create Command Report")
var/datum/command_report_menu/tgui = new(usr)
tgui.ui_interact(usr)
var/datum/command_report_menu/tgui = new /datum/command_report_menu(user.mob)
tgui.ui_interact(user.mob)
/// Datum for holding the TGUI window for command reports.
/datum/command_report_menu

View File

@@ -1,19 +1,14 @@
/// Verbs created to help server operators with generating certain config files.
#define GENERATE_JOB_CONFIG_VERB_DESC "Generate a job configuration (jobconfig.toml) file for the server. If TOML file already exists, will re-generate it based off the already existing config values. Will migrate from the old jobs.txt format if necessary."
/client/proc/generate_job_config()
set name = "Generate Job Configuration"
set category = "Server"
set desc = "Generate a job configuration (jobconfig.toml) file for the server. If TOML file already exists, will re-generate it based off the already existing config values. Will migrate from the old jobs.txt format if necessary."
if(!check_rights(R_SERVER))
ADMIN_VERB(generate_job_config, R_SERVER, "Generate Job Configuration", GENERATE_JOB_CONFIG_VERB_DESC, ADMIN_CATEGORY_SERVER)
if(tgui_alert(user, "This verb is not at all useful if you are not a server operator with access to the configuration folder. Do you wish to proceed?", "Generate jobconfig.toml for download", list("Yes", "No")) != "Yes")
return
if(tgui_alert(usr, "This verb is not at all useful if you are not a server operator with access to the configuration folder. Do you wish to proceed?", "Generate jobconfig.toml for download", list("Yes", "No")) != "Yes")
return
if(SSjob.generate_config(usr))
to_chat(usr, span_notice("Job configuration file generated. Download prompt should appear now."))
if(SSjob.generate_config(user))
to_chat(user, span_notice("Job configuration file generated. Download prompt should appear now."))
else
to_chat(usr, span_warning("Job configuration file could not be generated. Check the server logs / runtimes / above warning messages for more information."))
to_chat(user, span_warning("Job configuration file could not be generated. Check the server logs / runtimes / above warning messages for more information."))
BLACKBOX_LOG_ADMIN_VERB("Generate Job Configuration")
#undef GENERATE_JOB_CONFIG_VERB_DESC

View File

@@ -1,39 +1,30 @@
/client/proc/dsay(msg as text)
set category = "Admin.Game"
set name = "Dsay"
set hidden = TRUE
if(!holder)
to_chat(src, "Only administrators may use this command.", confidential = TRUE)
return
if(!mob)
return
if(prefs.muted & MUTE_DEADCHAT)
to_chat(src, span_danger("You cannot send DSAY messages (muted)."), confidential = TRUE)
ADMIN_VERB(dsay, R_NONE, "DSay", "Speak to the dead.", ADMIN_CATEGORY_GAME, message as text)
if(user.prefs.muted & MUTE_DEADCHAT)
to_chat(user, span_danger("You cannot send DSAY messages (muted)."), confidential = TRUE)
return
if (handle_spam_prevention(msg,MUTE_DEADCHAT))
if (user.handle_spam_prevention(message,MUTE_DEADCHAT))
return
msg = copytext_char(sanitize(msg), 1, MAX_MESSAGE_LEN)
mob.log_talk(msg, LOG_DSAY)
message = copytext_char(sanitize(message), 1, MAX_MESSAGE_LEN)
user.mob.log_talk(message, LOG_DSAY)
if (!msg)
if (!message)
return
var/rank_name = holder.rank_names()
var/admin_name = key
if(holder.fakekey)
var/rank_name = user.holder.rank_names()
var/admin_name = user.key
if(user.holder.fakekey)
rank_name = pick(strings("admin_nicknames.json", "ranks", "config"))
admin_name = pick(strings("admin_nicknames.json", "names", "config"))
var/name_and_rank = "[span_tooltip(rank_name, "STAFF")] ([admin_name])"
deadchat_broadcast("[span_prefix("DEAD:")] [name_and_rank] says, <span class='message'>\"[emoji_parse(msg)]\"</span>")
deadchat_broadcast("[span_prefix("DEAD:")] [name_and_rank] says, <span class='message'>\"[emoji_parse(message)]\"</span>")
BLACKBOX_LOG_ADMIN_VERB("Dsay")
/client/proc/get_dead_say()
var/msg = input(src, null, "dsay \"text\"") as text|null
if (isnull(msg))
return
dsay(msg)
SSadmin_verbs.dynamic_invoke_verb(src, /datum/admin_verb/dsay, msg)

View File

@@ -1,40 +1,27 @@
/client/proc/Debug2()
set category = "Debug"
set name = "Debug-Game"
if(!check_rights(R_DEBUG))
return
if(GLOB.Debug2)
GLOB.Debug2 = 0
message_admins("[key_name(src)] toggled debugging off.")
log_admin("[key_name(src)] toggled debugging off.")
else
GLOB.Debug2 = 1
message_admins("[key_name(src)] toggled debugging on.")
log_admin("[key_name(src)] toggled debugging on.")
ADMIN_VERB(toggle_game_debug, R_DEBUG, "Debug-Game", "Toggles game debugging.", ADMIN_CATEGORY_DEBUG)
GLOB.Debug2 = !GLOB.Debug2
var/message = "toggled debugging [(GLOB.Debug2 ? "ON" : "OFF")]"
message_admins("[key_name_admin(user)] [message].")
log_admin("[key_name(user)] [message].")
BLACKBOX_LOG_ADMIN_VERB("Toggle Debug Two")
/client/proc/Cell()
set category = "Debug"
set name = "Air Status in Location"
if(!mob)
ADMIN_VERB_VISIBILITY(air_status, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(air_status, R_DEBUG, "Air Status In Location", "Gets the air status for your current turf.", ADMIN_CATEGORY_DEBUG)
var/turf/user_turf = get_turf(user.mob)
if(!isturf(user_turf))
return
var/turf/T = get_turf(mob)
if(!isturf(T))
return
atmos_scan(user=usr, target=T, silent=TRUE)
atmos_scan(user.mob, user_turf, silent = TRUE)
BLACKBOX_LOG_ADMIN_VERB("Air Status In Location")
/client/proc/cmd_admin_robotize(mob/M in GLOB.mob_list)
set category = "Admin.Fun"
set name = "Make Cyborg"
ADMIN_VERB(cmd_admin_robotize, R_FUN, "Make Cyborg", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, mob/target)
if(!SSticker.HasRoundStarted())
tgui_alert(usr,"Wait until the game starts")
tgui_alert(user, "Wait until the game starts")
return
log_admin("[key_name(src)] has robotized [M.key].")
INVOKE_ASYNC(M, TYPE_PROC_REF(/mob, Robotize))
if(issilicon(target))
tgui_alert(user, "They are already a cyborg.")
return
log_admin("[key_name(user)] has robotized [target.key].")
INVOKE_ASYNC(target, TYPE_PROC_REF(/mob, Robotize))
/client/proc/poll_type_to_del(search_string)
var/list/types = get_fancy_list_of_atom_types()
@@ -50,13 +37,8 @@
return
return types[key]
//TODO: merge the vievars version into this or something maybe mayhaps
/client/proc/cmd_debug_del_all(object as text)
set category = "Debug"
set name = "Del-All"
var/type_to_del = poll_type_to_del(object)
ADMIN_VERB(cmd_del_all, R_DEBUG|R_SPAWN, "Del-All", "Delete all datums with the specified type.", ADMIN_CATEGORY_DEBUG, object as text)
var/type_to_del = user.poll_type_to_del(object)
if(!type_to_del)
return
@@ -66,16 +48,12 @@
counter++
qdel(O)
CHECK_TICK
log_admin("[key_name(src)] has deleted all ([counter]) instances of [type_to_del].")
message_admins("[key_name_admin(src)] has deleted all ([counter]) instances of [type_to_del].")
log_admin("[key_name(user)] has deleted all ([counter]) instances of [type_to_del].")
message_admins("[key_name_admin(user)] has deleted all ([counter]) instances of [type_to_del].")
BLACKBOX_LOG_ADMIN_VERB("Delete All")
/client/proc/cmd_debug_force_del_all(object as text)
set category = "Debug"
set name = "Force-Del-All"
var/type_to_del = poll_type_to_del(object)
ADMIN_VERB(cmd_del_all_force, R_DEBUG|R_SPAWN, "Force-Del-All", "Forcibly delete all datums with the specified type.", ADMIN_CATEGORY_DEBUG, object as text)
var/type_to_del = user.poll_type_to_del(object)
if(!type_to_del)
return
@@ -85,29 +63,25 @@
counter++
qdel(O, force = TRUE)
CHECK_TICK
log_admin("[key_name(src)] has force-deleted all ([counter]) instances of [type_to_del].")
message_admins("[key_name_admin(src)] has force-deleted all ([counter]) instances of [type_to_del].")
log_admin("[key_name(user)] has force-deleted all ([counter]) instances of [type_to_del].")
message_admins("[key_name_admin(user)] has force-deleted all ([counter]) instances of [type_to_del].")
BLACKBOX_LOG_ADMIN_VERB("Force-Delete All")
/client/proc/cmd_debug_hard_del_all(object as text)
set category = "Debug"
set name = "Hard-Del-All"
var/type_to_del = poll_type_to_del(object)
ADMIN_VERB(cmd_del_all_hard, R_DEBUG|R_SPAWN, "Hard-Del-All", "Hard delete all datums with the specified type.", ADMIN_CATEGORY_DEBUG, object as text)
var/type_to_del = user.poll_type_to_del(object)
if(!type_to_del)
return
var/choice = alert("ARE YOU SURE that you want to hard delete this type? It will cause MASSIVE lag.", "Hoooo lad what happen?", "Yes", "No")
var/choice = alert(user, "ARE YOU SURE that you want to hard delete this type? It will cause MASSIVE lag.", "Hoooo lad what happen?", "Yes", "No")
if(choice != "Yes")
return
choice = alert("Do you want to pre qdelete the atom? This will speed things up significantly, but may break depending on your level of fuckup.", "How do you even get it that bad", "Yes", "No")
choice = alert(user, "Do you want to pre qdelete the atom? This will speed things up significantly, but may break depending on your level of fuckup.", "How do you even get it that bad", "Yes", "No")
var/should_pre_qdel = TRUE
if(choice == "No")
should_pre_qdel = FALSE
choice = alert("Ok one last thing, do you want to yield to the game? or do it all at once. These are hard deletes remember.", "Jesus christ man", "Yield", "Ignore the server")
choice = alert(user, "Ok one last thing, do you want to yield to the game? or do it all at once. These are hard deletes remember.", "Jesus christ man", "Yield", "Ignore the server")
var/should_check_tick = TRUE
if(choice == "Ignore the server")
should_check_tick = FALSE
@@ -129,24 +103,20 @@
qdel(O)
del(O)
CHECK_TICK
log_admin("[key_name(src)] has hard deleted all ([counter]) instances of [type_to_del].")
message_admins("[key_name_admin(src)] has hard deleted all ([counter]) instances of [type_to_del].")
log_admin("[key_name(user)] has hard deleted all ([counter]) instances of [type_to_del].")
message_admins("[key_name_admin(user)] has hard deleted all ([counter]) instances of [type_to_del].")
BLACKBOX_LOG_ADMIN_VERB("Hard Delete All")
/client/proc/cmd_debug_make_powernets()
set category = "Debug"
set name = "Make Powernets"
ADMIN_VERB(cmd_debug_make_powernets, R_DEBUG|R_SERVER, "Make Powernets", "Regenerates all powernets for all cables.", ADMIN_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.")
log_admin("[key_name(user)] has remade the powernet. makepowernets() called.")
message_admins("[key_name_admin(user)] has remade the powernets. makepowernets() called.")
BLACKBOX_LOG_ADMIN_VERB("Make Powernets")
/client/proc/cmd_admin_grantfullaccess(mob/M in GLOB.mob_list)
set category = "Debug"
set name = "Grant Full Access"
ADMIN_VERB_VISIBILITY(cmd_admin_grantfullaccess, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(cmd_admin_grantfullaccess, R_DEBUG, "Grant Full Access", "Grant full access to a mob.", ADMIN_CATEGORY_DEBUG, mob/M in world)
if(!SSticker.HasRoundStarted())
tgui_alert(usr,"Wait until the game starts")
tgui_alert(user, "Wait until the game starts")
return
if(ishuman(M))
var/mob/living/carbon/human/H = M
@@ -180,51 +150,44 @@
H.equip_to_slot(id, ITEM_SLOT_ID)
else
tgui_alert(usr,"Invalid mob")
tgui_alert(user,"Invalid mob")
BLACKBOX_LOG_ADMIN_VERB("Grant Full Access")
log_admin("[key_name(src)] has granted [M.key] full access.")
message_admins(span_adminnotice("[key_name_admin(usr)] has granted [M.key] full access."))
/client/proc/cmd_assume_direct_control(mob/M in GLOB.mob_list)
set category = "Admin.Game"
set name = "Assume direct control"
set desc = "Direct intervention"
log_admin("[key_name(user)] has granted [M.key] full access.")
message_admins(span_adminnotice("[key_name_admin(user)] has granted [M.key] full access."))
ADMIN_VERB(cmd_assume_direct_control, R_ADMIN, "Assume Direct Control", "Assume direct control of a mob.", ADMIN_CATEGORY_DEBUG, mob/M)
if(M.ckey)
if(tgui_alert(usr,"This mob is being controlled by [M.key]. Are you sure you wish to assume control of it? [M.key] will be made a ghost.",,list("Yes","No")) != "Yes")
if(tgui_alert(user,"This mob is being controlled by [M.key]. Are you sure you wish to assume control of it? [M.key] will be made a ghost.",,list("Yes","No")) != "Yes")
return
if(!M || QDELETED(M))
to_chat(usr, span_warning("The target mob no longer exists."))
to_chat(user, span_warning("The target mob no longer exists."))
return
message_admins(span_adminnotice("[key_name_admin(usr)] assumed direct control of [M]."))
log_admin("[key_name(usr)] assumed direct control of [M].")
var/mob/adminmob = mob
message_admins(span_adminnotice("[key_name_admin(user)] assumed direct control of [M]."))
log_admin("[key_name(user)] assumed direct control of [M].")
var/mob/adminmob = user.mob
if(M.ckey)
M.ghostize(FALSE)
M.key = key
init_verbs()
M.key = user.key
user.init_verbs()
if(isobserver(adminmob))
qdel(adminmob)
BLACKBOX_LOG_ADMIN_VERB("Assume Direct Control")
/client/proc/cmd_give_direct_control(mob/M in GLOB.mob_list)
set category = "Admin.Game"
set name = "Give direct control"
ADMIN_VERB(cmd_give_direct_control, R_ADMIN, "Give Direct Control", "Give direct control of a mob to another player.", ADMIN_CATEGORY_GAME, mob/M)
if(!M)
return
if(M.ckey)
if(tgui_alert(usr,"This mob is being controlled by [M.key]. Are you sure you wish to give someone else control of it? [M.key] will be made a ghost.",,list("Yes","No")) != "Yes")
if(tgui_alert(user,"This mob is being controlled by [M.key]. Are you sure you wish to give someone else control of it? [M.key] will be made a ghost.",,list("Yes","No")) != "Yes")
return
var/client/newkey = input(src, "Pick the player to put in control.", "New player") as null|anything in sort_list(GLOB.clients)
var/client/newkey = input(user, "Pick the player to put in control.", "New player") as null|anything in sort_list(GLOB.clients)
if(isnull(newkey))
return
var/mob/oldmob = newkey.mob
var/delmob = FALSE
if((isobserver(oldmob) || tgui_alert(usr,"Do you want to delete [newkey]'s old mob?","Delete?",list("Yes","No")) != "No"))
if((isobserver(oldmob) || tgui_alert(user,"Do you want to delete [newkey]'s old mob?","Delete?",list("Yes","No")) != "No"))
delmob = TRUE
if(!M || QDELETED(M))
to_chat(usr, span_warning("The target mob no longer exists, aborting."))
to_chat(user, span_warning("The target mob no longer exists, aborting."))
return
if(M.ckey)
M.ghostize(FALSE)
@@ -232,14 +195,12 @@
M.client?.init_verbs()
if(delmob)
qdel(oldmob)
message_admins(span_adminnotice("[key_name_admin(usr)] gave away direct control of [M] to [newkey]."))
log_admin("[key_name(usr)] gave away direct control of [M] to [newkey].")
message_admins(span_adminnotice("[key_name_admin(user)] gave away direct control of [M] to [newkey]."))
log_admin("[key_name(user)] gave away direct control of [M] to [newkey].")
BLACKBOX_LOG_ADMIN_VERB("Give Direct Control")
/client/proc/cmd_admin_areatest(on_station, filter_maint)
set category = "Mapping"
set name = "Test Areas"
ADMIN_VERB_VISIBILITY(cmd_admin_areatest, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(cmd_admin_areatest, R_DEBUG, "Test Areas", "Tests the areas for various machinery.", ADMIN_CATEGORY_MAPPING, on_station as num, filter_maint as num)
var/list/dat = list()
var/list/areas_all = list()
var/list/areas_with_APC = list()
@@ -270,7 +231,7 @@
))
if(SSticker.current_state == GAME_STATE_STARTUP)
to_chat(usr, "Game still loading, please hold!", confidential = TRUE)
to_chat(user, "Game still loading, please hold!", confidential = TRUE)
return
var/log_message
@@ -283,8 +244,8 @@
dat += "<b>Maintenance Areas Filtered Out</b>"
log_message += ", with no maintenance areas"
message_admins(span_adminnotice("[key_name_admin(usr)] used the Test Areas debug command checking [log_message]."))
log_admin("[key_name(usr)] used the Test Areas debug command checking [log_message].")
message_admins(span_adminnotice("[key_name_admin(user)] used the Test Areas debug command checking [log_message]."))
log_admin("[key_name(user)] used the Test Areas debug command checking [log_message].")
for(var/area/A as anything in GLOB.areas)
if(on_station)
@@ -425,28 +386,23 @@
if(!(areas_with_APC.len || areas_with_multiple_APCs.len || areas_with_air_alarm.len || areas_with_RC.len || areas_with_light.len || areas_with_LS.len || areas_with_intercom.len || areas_with_camera.len))
dat += "<b>No problem areas!</b>"
var/datum/browser/popup = new(usr, "testareas", "Test Areas", 500, 750)
var/datum/browser/popup = new(user.mob, "testareas", "Test Areas", 500, 750)
popup.set_content(dat.Join())
popup.open()
ADMIN_VERB_VISIBILITY(cmd_admin_areatest_station, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(cmd_admin_areatest_station, R_DEBUG, "Test Areas (STATION ONLY)", "Tests the areas for various machinery on station z-levels.", ADMIN_CATEGORY_MAPPING)
SSadmin_verbs.dynamic_invoke_verb(user, /datum/admin_verb/cmd_admin_areatest, /* on_station = */ TRUE)
/client/proc/cmd_admin_areatest_station()
set category = "Mapping"
set name = "Test Areas (STATION ONLY)"
cmd_admin_areatest(TRUE)
ADMIN_VERB_VISIBILITY(cmd_admin_areatest_station_no_maintenance, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(cmd_admin_areatest_station_no_maintenance, R_DEBUG, "Test Areas (STATION - NO MAINT)", "Tests the areas for various machinery on station z-levels, excluding maintenance areas.", ADMIN_CATEGORY_MAPPING)
SSadmin_verbs.dynamic_invoke_verb(user, /datum/admin_verb/cmd_admin_areatest, /* on_station = */ TRUE, /* filter_maint = */ TRUE)
/client/proc/cmd_admin_areatest_station_no_maintenance()
set category = "Mapping"
set name = "Test Areas (STATION - NO MAINT)"
cmd_admin_areatest(on_station = TRUE, filter_maint = TRUE)
/client/proc/cmd_admin_areatest_all()
set category = "Mapping"
set name = "Test Areas (ALL)"
cmd_admin_areatest(FALSE)
ADMIN_VERB_VISIBILITY(cmd_admin_areatest_all, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(cmd_admin_areatest_all, R_DEBUG, "Test Areas (ALL)", "Tests the areas for various machinery on all z-levels.", ADMIN_CATEGORY_MAPPING)
SSadmin_verbs.dynamic_invoke_verb(user, /datum/admin_verb/cmd_admin_areatest)
/client/proc/robust_dress_shop()
var/list/baseoutfits = list("Naked","Custom","As Job...", "As Plasmaman...")
var/list/outfits = list()
var/list/paths = subtypesof(/datum/outfit) - typesof(/datum/outfit/job) - typesof(/datum/outfit/plasmaman)
@@ -497,52 +453,29 @@
return dresscode
/client/proc/cmd_admin_rejuvenate(mob/living/M in GLOB.mob_list)
set category = "Debug"
set name = "Rejuvenate"
if(!check_rights(R_ADMIN))
return
if(!mob)
return
ADMIN_VERB_ONLY_CONTEXT_MENU(cmd_admin_rejuvenate, R_ADMIN, "Rejuvenate", mob/living/M in world)
if(!istype(M))
tgui_alert(usr,"Cannot revive a ghost")
tgui_alert(user,"Cannot revive a ghost")
return
M.revive(ADMIN_HEAL_ALL)
log_admin("[key_name(usr)] healed / revived [key_name(M)]")
var/msg = span_danger("Admin [key_name_admin(usr)] healed / revived [ADMIN_LOOKUPFLW(M)]!")
log_admin("[key_name(user)] healed / revived [key_name(M)]")
var/msg = span_danger("Admin [key_name_admin(user)] healed / revived [ADMIN_LOOKUPFLW(M)]!")
message_admins(msg)
admin_ticket_log(M, msg)
BLACKBOX_LOG_ADMIN_VERB("Rejuvenate")
/client/proc/cmd_admin_delete(atom/A as obj|mob|turf in world)
set category = "Debug"
set name = "Delete"
ADMIN_VERB_AND_CONTEXT_MENU(cmd_admin_delete, R_DEBUG|R_SPAWN, "Delete", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, atom/target as obj|mob|turf in world)
user.admin_delete(target)
if(!check_rights(R_SPAWN|R_DEBUG))
return
admin_delete(A)
/client/proc/cmd_admin_check_contents(mob/living/M in GLOB.mob_list)
set category = "Debug"
set name = "Check Contents"
var/list/L = M.get_contents()
for(var/t in L)
to_chat(usr, "[t] [ADMIN_VV(t)] [ADMIN_TAG(t)]", confidential = TRUE)
ADMIN_VERB_AND_CONTEXT_MENU(cmd_check_contents, R_ADMIN, "Check Contents", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, mob/living/mob)
var/list/mob_contents = mob.get_contents()
for(var/content in mob_contents)
to_chat(user, "[content] [ADMIN_VV(content)] [ADMIN_TAG(content)]", confidential = TRUE)
BLACKBOX_LOG_ADMIN_VERB("Check Contents")
/client/proc/modify_goals()
set category = "Debug"
set name = "Modify goals"
if(!check_rights(R_ADMIN))
return
holder.modify_goals()
ADMIN_VERB(modify_goals, R_ADMIN, "Modify Goals", "Modify the station goals for the shift.", ADMIN_CATEGORY_DEBUG)
user.holder.modify_goals()
/datum/admins/proc/modify_goals()
var/dat = ""
@@ -551,34 +484,27 @@
dat += "<br><a href='?src=[REF(src)];[HrefToken()];add_station_goal=1'>Add New Goal</a>"
usr << browse(dat, "window=goals;size=400x400")
/client/proc/cmd_debug_mob_lists()
set category = "Debug"
set name = "Debug Mob Lists"
set desc = "For when you just gotta know"
var/chosen_list = tgui_input_list(usr, "Which list?", "Select List", list("Players","Admins","Mobs","Living Mobs","Dead Mobs","Clients","Joined Clients"))
ADMIN_VERB(debug_mob_lists, R_DEBUG, "Debug Mob Lists", "For when you just gotta know.", ADMIN_CATEGORY_DEBUG)
var/chosen_list = tgui_input_list(user, "Which list?", "Select List", list("Players","Admins","Mobs","Living Mobs","Dead Mobs","Clients","Joined Clients"))
if(isnull(chosen_list))
return
switch(chosen_list)
if("Players")
to_chat(usr, jointext(GLOB.player_list,","), confidential = TRUE)
to_chat(user, jointext(GLOB.player_list,","), confidential = TRUE)
if("Admins")
to_chat(usr, jointext(GLOB.admins,","), confidential = TRUE)
to_chat(user, jointext(GLOB.admins,","), confidential = TRUE)
if("Mobs")
to_chat(usr, jointext(GLOB.mob_list,","), confidential = TRUE)
to_chat(user, jointext(GLOB.mob_list,","), confidential = TRUE)
if("Living Mobs")
to_chat(usr, jointext(GLOB.alive_mob_list,","), confidential = TRUE)
to_chat(user, jointext(GLOB.alive_mob_list,","), confidential = TRUE)
if("Dead Mobs")
to_chat(usr, jointext(GLOB.dead_mob_list,","), confidential = TRUE)
to_chat(user, jointext(GLOB.dead_mob_list,","), confidential = TRUE)
if("Clients")
to_chat(usr, jointext(GLOB.clients,","), confidential = TRUE)
to_chat(user, jointext(GLOB.clients,","), confidential = TRUE)
if("Joined Clients")
to_chat(usr, jointext(GLOB.joined_player_list,","), confidential = TRUE)
/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."
to_chat(user, jointext(GLOB.joined_player_list,","), confidential = TRUE)
ADMIN_VERB(del_log, R_DEBUG, "Display del() Log", "Display del's log of everything that's passed through it.", ADMIN_CATEGORY_DEBUG)
var/list/dellog = list("<B>List of things that have gone through qdel this round</B><BR><BR><ol>")
sortTim(SSgarbage.items, cmp=/proc/cmp_qdel_item_time, associative = TRUE)
for(var/path in SSgarbage.items)
@@ -609,37 +535,19 @@
dellog += "</ol>"
usr << browse(dellog.Join(), "window=dellog")
user << browse(dellog.Join(), "window=dellog")
/client/proc/cmd_display_overlay_log()
set category = "Debug"
set name = "Display overlay Log"
set desc = "Display SSoverlays log of everything that's passed through it."
ADMIN_VERB(display_overlay_log, R_DEBUG, "Display Overlay Log", "Display SSoverlays log of everything that's passed through it.", ADMIN_CATEGORY_DEBUG)
render_stats(SSoverlays.stats, user)
render_stats(SSoverlays.stats, src)
ADMIN_VERB(init_log, R_DEBUG, "Display Initialize() Log", "Displays a list of things that didn't handle Initialize() properly.", ADMIN_CATEGORY_DEBUG)
user << browse(replacetext(SSatoms.InitLog(), "\n", "<br>"), "window=initlog")
/client/proc/cmd_display_init_log()
set category = "Debug"
set name = "Display Initialize() Log"
set desc = "Displays a list of things that didn't handle Initialize() properly"
ADMIN_VERB(debug_color_test, R_DEBUG, "Colorblind Testing", "Change your view to a budget version of colorblindness to test for usability.", ADMIN_CATEGORY_DEBUG)
user.holder.color_test.ui_interact(user.mob)
usr << browse(replacetext(SSatoms.InitLog(), "\n", "<br>"), "window=initlog")
/client/proc/open_colorblind_test()
set category = "Debug"
set name = "Colorblind Testing"
set desc = "Change your view to a budget version of colorblindness to test for usability"
if(!holder)
return
holder.color_test.ui_interact(mob)
/client/proc/debug_plane_masters()
set category = "Debug"
set name = "Edit/Debug Planes"
set desc = "Edit and visualize plane masters and their connections (relays)"
edit_plane_masters()
ADMIN_VERB(debug_plane_masters, R_DEBUG, "Edit/Debug Planes", "Edit and visualize plane masters and their connections (relays).", ADMIN_CATEGORY_DEBUG)
user.edit_plane_masters()
/client/proc/edit_plane_masters(mob/debug_on)
if(!holder)
@@ -651,21 +559,10 @@
holder.plane_debug.set_mirroring(FALSE)
holder.plane_debug.ui_interact(mob)
/client/proc/debug_huds(i as num)
set category = "Debug"
set name = "Debug HUDs"
set desc = "Debug the data or antag HUDs"
ADMIN_VERB(debug_huds, R_DEBUG, "Debug HUDs", "Debug the data or antag HUDs.", ADMIN_CATEGORY_DEBUG, i as num)
SSadmin_verbs.dynamic_invoke_verb(user, /datum/admin_verb/debug_variables, GLOB.huds[i])
if(!holder)
return
debug_variables(GLOB.huds[i])
/client/proc/jump_to_ruin()
set category = "Debug"
set name = "Jump to Ruin"
set desc = "Displays a list of all placed ruins to teleport to."
if(!holder)
return
ADMIN_VERB(jump_to_ruin, R_DEBUG, "Jump to Ruin", "Displays a list of all placed ruins to teleport to.", ADMIN_CATEGORY_DEBUG)
var/list/names = list()
for(var/obj/effect/landmark/ruin/ruin_landmark as anything in GLOB.ruin_landmarks)
var/datum/map_template/ruin/template = ruin_landmark.ruin_template
@@ -680,23 +577,17 @@
names[name] = ruin_landmark
var/ruinname = tgui_input_list(usr, "Select ruin", "Jump to Ruin", sort_list(names))
var/ruinname = tgui_input_list(user, "Select ruin", "Jump to Ruin", sort_list(names))
var/obj/effect/landmark/ruin/landmark = names[ruinname]
if(istype(landmark))
var/datum/map_template/ruin/template = landmark.ruin_template
usr.forceMove(get_turf(landmark))
to_chat(usr, span_name("[template.name]"), confidential = TRUE)
to_chat(usr, "<span class='italics'>[template.description]</span>", confidential = TRUE)
/client/proc/place_ruin()
set category = "Debug"
set name = "Spawn Ruin"
set desc = "Attempt to randomly place a specific ruin."
if (!holder)
if(!istype(landmark))
return
var/datum/map_template/ruin/template = landmark.ruin_template
user.mob.forceMove(get_turf(landmark))
to_chat(user, span_name("[template.name]"), confidential = TRUE)
to_chat(user, "<span class='italics'>[template.description]</span>", confidential = TRUE)
ADMIN_VERB_VISIBILITY(place_ruin, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(place_ruin, R_DEBUG, "Spawn Ruin", "Attempt to randomly place a specific ruin.", ADMIN_CATEGORY_MAPPING)
var/list/exists = list()
for(var/landmark in GLOB.ruin_landmarks)
var/obj/effect/landmark/ruin/L = landmark
@@ -714,15 +605,15 @@
themed_names[name] = list(ruin, theme, list(ruin.default_area))
names += sort_list(themed_names)
var/ruinname = tgui_input_list(usr, "Select ruin", "Spawn Ruin", sort_list(names))
var/ruinname = tgui_input_list(user, "Select ruin", "Spawn Ruin", sort_list(names))
var/data = names[ruinname]
if (!data)
return
var/datum/map_template/ruin/template = data[1]
if (exists[template])
var/response = tgui_alert(usr,"There is already a [template] in existence.", "Spawn Ruin", list("Jump", "Place Another", "Cancel"))
var/response = tgui_alert(user,"There is already a [template] in existence.", "Spawn Ruin", list("Jump", "Place Another", "Cancel"))
if (response == "Jump")
usr.forceMove(get_turf(exists[template]))
user.mob.forceMove(get_turf(exists[template]))
return
else if (response == "Cancel")
return
@@ -731,25 +622,17 @@
seedRuins(SSmapping.levels_by_trait(data[2]), max(1, template.cost), data[3], list(ruinname = template))
if (GLOB.ruin_landmarks.len > len)
var/obj/effect/landmark/ruin/landmark = GLOB.ruin_landmarks[GLOB.ruin_landmarks.len]
log_admin("[key_name(src)] randomly spawned ruin [ruinname] at [COORD(landmark)].")
usr.forceMove(get_turf(landmark))
to_chat(src, span_name("[template.name]"), confidential = TRUE)
to_chat(src, "<span class='italics'>[template.description]</span>", confidential = TRUE)
log_admin("[key_name(user)] randomly spawned ruin [ruinname] at [COORD(landmark)].")
user.mob.forceMove(get_turf(landmark))
to_chat(user, span_name("[template.name]"), confidential = TRUE)
to_chat(user, "<span class='italics'>[template.description]</span>", confidential = TRUE)
else
to_chat(src, span_warning("Failed to place [template.name]."), confidential = TRUE)
to_chat(user, span_warning("Failed to place [template.name]."), confidential = TRUE)
/client/proc/unload_ctf()
set category = "Debug"
set name = "Unload CTF"
set desc = "Despawns the majority of CTF"
toggle_id_ctf(usr, CTF_GHOST_CTF_GAME_ID, unload=TRUE)
/client/proc/run_empty_query(val as num)
set category = "Debug"
set name = "Run empty query"
set desc = "Amount of queries to run"
ADMIN_VERB(unload_ctf, R_DEBUG, "Unload CTF", "Despawns the majority of CTF.", ADMIN_CATEGORY_DEBUG)
toggle_id_ctf(user, CTF_GHOST_CTF_GAME_ID, unload=TRUE)
ADMIN_VERB(run_empty_query, R_DEBUG, "Run Empty Query", "Runs a specified number of empty queries.", ADMIN_CATEGORY_DEBUG, val as num)
var/list/queries = list()
for(var/i in 1 to val)
var/datum/db_query/query = SSdbcore.NewQuery("NULL")
@@ -761,45 +644,31 @@
qdel(query)
queries.Cut()
message_admins("[key_name_admin(src)] ran [val] empty queries.")
message_admins("[key_name_admin(user)] ran [val] empty queries.")
/client/proc/clear_dynamic_transit()
set category = "Debug"
set name = "Clear Dynamic Turf Reservations"
set desc = "Deallocates all reserved space, restoring it to round start conditions."
if(!holder)
return
var/answer = tgui_alert(usr,"WARNING: THIS WILL WIPE ALL RESERVED SPACE TO A CLEAN SLATE! ANY MOVING SHUTTLES, ELEVATORS, OR IN-PROGRESS PHOTOGRAPHY WILL BE DELETED!", "Really wipe dynamic turfs?", list("YES", "NO"))
ADMIN_VERB(clear_turf_reservations, R_DEBUG, "Clear Dynamic Turf Reservations", "Deallocates all reserved space, restoring it to round start conditions.", ADMIN_CATEGORY_DEBUG)
var/answer = tgui_alert(
user,
"WARNING: THIS WILL WIPE ALL RESERVED SPACE TO A CLEAN SLATE! ANY MOVING SHUTTLES, ELEVATORS, OR IN-PROGRESS PHOTOGRAPHY WILL BE DELETED!",
"Really wipe dynamic turfs?",
list("YES", "NO"),
)
if(answer != "YES")
return
message_admins(span_adminnotice("[key_name_admin(src)] cleared dynamic transit space."))
BLACKBOX_LOG_ADMIN_VERB("Clear Dynamic Transit")
log_admin("[key_name(src)] cleared dynamic transit space.")
message_admins(span_adminnotice("[key_name_admin(user)] cleared dynamic transit space."))
BLACKBOX_LOG_ADMIN_VERB("Clear Dynamic Turf Reservations")
log_admin("[key_name(user)] cleared dynamic turf reservations.")
SSmapping.wipe_reservations() //this goes after it's logged, incase something horrible happens.
/client/proc/toggle_medal_disable()
set category = "Debug"
set name = "Toggle Medal Disable"
set desc = "Toggles the safety lock on trying to contact the medal hub."
if(!check_rights(R_DEBUG))
return
ADMIN_VERB(toggle_medal_disable, R_DEBUG, "Toggle Medal Disable", "Toggles the safety lock on trying to contact the medal hub.", ADMIN_CATEGORY_DEBUG)
SSachievements.achievements_enabled = !SSachievements.achievements_enabled
message_admins(span_adminnotice("[key_name_admin(src)] [SSachievements.achievements_enabled ? "disabled" : "enabled"] the medal hub lockout."))
message_admins(span_adminnotice("[key_name_admin(user)] [SSachievements.achievements_enabled ? "disabled" : "enabled"] the medal hub lockout."))
BLACKBOX_LOG_ADMIN_VERB("Toggle Medal Disable")
log_admin("[key_name(src)] [SSachievements.achievements_enabled ? "disabled" : "enabled"] the medal hub lockout.")
log_admin("[key_name(user)] [SSachievements.achievements_enabled ? "disabled" : "enabled"] the medal hub lockout.")
/client/proc/view_runtimes()
set category = "Debug"
set name = "View Runtimes"
set desc = "Open the runtime Viewer"
if(!holder)
return
GLOB.error_cache.show_to(src)
ADMIN_VERB(view_runtimes, R_DEBUG, "View Runtimes", "Opens the runtime viewer.", ADMIN_CATEGORY_DEBUG)
GLOB.error_cache.show_to(user)
// The runtime viewer has the potential to crash the server if there's a LOT of runtimes
// this has happened before, multiple times, so we'll just leave an alert on it
@@ -808,80 +677,54 @@
if(GLOB.total_runtimes >= 100000)
warning = "There are a TON of runtimes, clicking any button (especially \"linear\") WILL LIKELY crash the server"
// Not using TGUI alert, because it's view runtimes, stuff is probably broken
alert(usr, "[warning]. Proceed with caution. If you really need to see the runtimes, download the runtime log and view it in a text editor.", "HEED THIS WARNING CAREFULLY MORTAL")
/client/proc/pump_random_event()
set category = "Debug"
set name = "Pump Random Event"
set desc = "Schedules the event subsystem to fire a new random event immediately. Some events may fire without notification."
if(!holder)
return
alert(user, "[warning]. Proceed with caution. If you really need to see the runtimes, download the runtime log and view it in a text editor.", "HEED THIS WARNING CAREFULLY MORTAL")
ADMIN_VERB(pump_random_event, R_DEBUG, "Pump Random Event", "Schedules the event subsystem to fire a new random event immediately. Some events may fire without notification.", ADMIN_CATEGORY_DEBUG)
SSevents.scheduled = world.time
message_admins(span_adminnotice("[key_name_admin(src)] pumped a random event."))
message_admins(span_adminnotice("[key_name_admin(user)] pumped a random event."))
BLACKBOX_LOG_ADMIN_VERB("Pump Random Event")
log_admin("[key_name(src)] pumped a random event.")
/client/proc/start_line_profiling()
set category = "Profile"
set name = "Start Line Profiling"
set desc = "Starts tracking line by line profiling for code lines that support it"
log_admin("[key_name(user)] pumped a random event.")
ADMIN_VERB_VISIBILITY(start_line_profiling, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(start_line_profiling, R_DEBUG, "Start Line Profiling", "Starts tracking line by line profiling for code lines that support it.", ADMIN_CATEGORY_PROFILE)
LINE_PROFILE_START
message_admins(span_adminnotice("[key_name_admin(src)] started line by line profiling."))
message_admins(span_adminnotice("[key_name_admin(user)] started line by line profiling."))
BLACKBOX_LOG_ADMIN_VERB("Start Line Profiling")
log_admin("[key_name(src)] started line by line profiling.")
/client/proc/stop_line_profiling()
set category = "Profile"
set name = "Stops Line Profiling"
set desc = "Stops tracking line by line profiling for code lines that support it"
log_admin("[key_name(user)] started line by line profiling.")
ADMIN_VERB_VISIBILITY(stop_line_profiling, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(stop_line_profiling, R_DEBUG, "Stop Line Profiling", "Stops tracking line by line profiling for code lines that support it.", ADMIN_CATEGORY_PROFILE)
LINE_PROFILE_STOP
message_admins(span_adminnotice("[key_name_admin(src)] stopped line by line profiling."))
message_admins(span_adminnotice("[key_name_admin(user)] stopped line by line profiling."))
BLACKBOX_LOG_ADMIN_VERB("Stop Line Profiling")
log_admin("[key_name(src)] stopped line by line profiling.")
/client/proc/show_line_profiling()
set category = "Profile"
set name = "Show Line Profiling"
set desc = "Shows tracked profiling info from code lines that support it"
log_admin("[key_name(user)] stopped line by line profiling.")
ADMIN_VERB_VISIBILITY(show_line_profiling, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(show_line_profiling, R_DEBUG, "Show Line Profiling", "Shows tracked profiling info from code lines that support it.", ADMIN_CATEGORY_PROFILE)
var/sortlist = list(
"Avg time" = GLOBAL_PROC_REF(cmp_profile_avg_time_dsc),
"Total Time" = GLOBAL_PROC_REF(cmp_profile_time_dsc),
"Call Count" = GLOBAL_PROC_REF(cmp_profile_count_dsc)
)
var/sort = input(src, "Sort type?", "Sort Type", "Avg time") as null|anything in sortlist
var/sort = input(user, "Sort type?", "Sort Type", "Avg time") as null|anything in sortlist
if (!sort)
return
sort = sortlist[sort]
profile_show(src, sort)
profile_show(user, sort)
/client/proc/reload_configuration()
set category = "Debug"
set name = "Reload Configuration"
set desc = "Force config reload to world default"
if(!check_rights(R_DEBUG))
return
if(tgui_alert(usr, "Are you absolutely sure you want to reload the configuration from the default path on the disk, wiping any in-round modifications?", "Really reset?", list("No", "Yes")) == "Yes")
config.admin_reload()
/// A debug verb to check the sources of currently running timers
/client/proc/check_timer_sources()
set category = "Debug"
set name = "Check Timer Sources"
set desc = "Checks the sources of the running timers"
if (!check_rights(R_DEBUG))
ADMIN_VERB(reload_configuration, R_DEBUG, "Reload Configuration", "Reloads the configuration from the default path on the disk, wiping any in-round modifications.", ADMIN_CATEGORY_DEBUG)
if(!tgui_alert(user, "Are you absolutely sure you want to reload the configuration from the default path on the disk, wiping any in-round modifications?", "Really reset?", list("No", "Yes")) == "Yes")
return
config.admin_reload()
ADMIN_VERB(check_timer_sources, R_DEBUG, "Check Timer Sources", "Checks the sources of running timers.", ADMIN_CATEGORY_DEBUG)
var/bucket_list_output = generate_timer_source_output(SStimer.bucket_list)
var/second_queue = generate_timer_source_output(SStimer.second_queue)
usr << browse({"
user << browse({"
<h3>bucket_list</h3>
[bucket_list_output]
@@ -889,24 +732,16 @@
[second_queue]
"}, "window=check_timer_sources;size=700x700")
/// A debug verb to try and re-establish a connection with the TTS server and to refetch TTS voices.
/// Since voices are cached beforehand, this is unlikely to update preferences.
/client/proc/reestablish_tts_connection()
set category = "Debug"
set name = "Re-establish Connection To TTS"
set desc = "Re-establishes connection to the TTS server if possible"
if (!check_rights(R_DEBUG))
return
message_admins("[key_name_admin(usr)] attempted to re-establish connection to the TTS HTTP server.")
log_admin("[key_name(usr)] attempted to re-establish connection to the TTS HTTP server.")
ADMIN_VERB(reestablish_tts_connection, R_DEBUG, "Re-establish Connection To TTS", "Re-establishes connection to the TTS server if possible", ADMIN_CATEGORY_DEBUG)
message_admins("[key_name_admin(user)] attempted to re-establish connection to the TTS HTTP server.")
log_admin("[key_name(user)] attempted to re-establish connection to the TTS HTTP server.")
var/success = SStts.establish_connection_to_tts()
if(!success)
message_admins("[key_name_admin(usr)] failed to re-established the connection to the TTS HTTP server.")
log_admin("[key_name(usr)] failed to re-established the connection to the TTS HTTP server.")
message_admins("[key_name_admin(user)] failed to re-established the connection to the TTS HTTP server.")
log_admin("[key_name(user)] failed to re-established the connection to the TTS HTTP server.")
return
message_admins("[key_name_admin(usr)] successfully re-established the connection to the TTS HTTP server.")
log_admin("[key_name(usr)] successfully re-established the connection to the TTS HTTP server.")
message_admins("[key_name_admin(user)] successfully re-established the connection to the TTS HTTP server.")
log_admin("[key_name(user)] successfully re-established the connection to the TTS HTTP server.")
/proc/generate_timer_source_output(list/datum/timedevent/events)
var/list/per_source = list()
@@ -950,10 +785,14 @@
return b["count"] - a["count"]
#ifdef TESTING
/client/proc/check_missing_sprites()
set category = "Debug"
set name = "Debug Worn Item Sprites"
set desc = "We're cancelling the Spritemageddon. (This will create a LOT of runtimes! Don't use on a live server!)"
ADMIN_VERB_CUSTOM_EXIST_CHECK(check_missing_sprites)
return TRUE
#else
ADMIN_VERB_CUSTOM_EXIST_CHECK(check_missing_sprites)
return FALSE
#endif
ADMIN_VERB(check_missing_sprites, R_DEBUG, "Debug Worn Item Sprites", "We're cancelling the Spritemageddon. (This will create a LOT of runtimes! Don't use on a live server!)", ADMIN_CATEGORY_DEBUG)
var/actual_file_name
for(var/test_obj in subtypesof(/obj/item))
var/obj/item/sprite = new test_obj
@@ -962,55 +801,54 @@
//Is there an explicit worn_icon to pick against the worn_icon_state? Easy street expected behavior.
if(sprite.worn_icon)
if(!(sprite.icon_state in icon_states(sprite.worn_icon)))
to_chat(src, span_warning("ERROR sprites for [sprite.type]. Slot Flags are [sprite.slot_flags]."), confidential = TRUE)
to_chat(user, span_warning("ERROR sprites for [sprite.type]. Slot Flags are [sprite.slot_flags]."), confidential = TRUE)
else if(sprite.worn_icon_state)
if(sprite.slot_flags & ITEM_SLOT_MASK)
actual_file_name = 'icons/mob/clothing/mask.dmi'
if(!(sprite.worn_icon_state in icon_states(actual_file_name)))
to_chat(src, span_warning("ERROR sprites for [sprite.type]. Mask slot."), confidential = TRUE)
to_chat(user, span_warning("ERROR sprites for [sprite.type]. Mask slot."), confidential = TRUE)
if(sprite.slot_flags & ITEM_SLOT_NECK)
actual_file_name = 'icons/mob/clothing/neck.dmi'
if(!(sprite.worn_icon_state in icon_states(actual_file_name)))
to_chat(src, span_warning("ERROR sprites for [sprite.type]. Neck slot."), confidential = TRUE)
to_chat(user, span_warning("ERROR sprites for [sprite.type]. Neck slot."), confidential = TRUE)
if(sprite.slot_flags & ITEM_SLOT_BACK)
actual_file_name = 'icons/mob/clothing/back.dmi'
if(!(sprite.worn_icon_state in icon_states(actual_file_name)))
to_chat(src, span_warning("ERROR sprites for [sprite.type]. Back slot."), confidential = TRUE)
to_chat(user, span_warning("ERROR sprites for [sprite.type]. Back slot."), confidential = TRUE)
if(sprite.slot_flags & ITEM_SLOT_HEAD)
actual_file_name = 'icons/mob/clothing/head/default.dmi'
if(!(sprite.worn_icon_state in icon_states(actual_file_name)))
to_chat(src, span_warning("ERROR sprites for [sprite.type]. Head slot."), confidential = TRUE)
to_chat(user, span_warning("ERROR sprites for [sprite.type]. Head slot."), confidential = TRUE)
if(sprite.slot_flags & ITEM_SLOT_BELT)
actual_file_name = 'icons/mob/clothing/belt.dmi'
if(!(sprite.worn_icon_state in icon_states(actual_file_name)))
to_chat(src, span_warning("ERROR sprites for [sprite.type]. Belt slot."), confidential = TRUE)
to_chat(user, span_warning("ERROR sprites for [sprite.type]. Belt slot."), confidential = TRUE)
if(sprite.slot_flags & ITEM_SLOT_SUITSTORE)
actual_file_name = 'icons/mob/clothing/belt_mirror.dmi'
if(!(sprite.worn_icon_state in icon_states(actual_file_name)))
to_chat(src, span_warning("ERROR sprites for [sprite.type]. Suit Storage slot."), confidential = TRUE)
to_chat(user, span_warning("ERROR sprites for [sprite.type]. Suit Storage slot."), confidential = TRUE)
else if(sprite.icon_state)
if(sprite.slot_flags & ITEM_SLOT_MASK)
actual_file_name = 'icons/mob/clothing/mask.dmi'
if(!(sprite.icon_state in icon_states(actual_file_name)))
to_chat(src, span_warning("ERROR sprites for [sprite.type]. Mask slot."), confidential = TRUE)
to_chat(user, span_warning("ERROR sprites for [sprite.type]. Mask slot."), confidential = TRUE)
if(sprite.slot_flags & ITEM_SLOT_NECK)
actual_file_name = 'icons/mob/clothing/neck.dmi'
if(!(sprite.icon_state in icon_states(actual_file_name)))
to_chat(src, span_warning("ERROR sprites for [sprite.type]. Neck slot."), confidential = TRUE)
to_chat(user, span_warning("ERROR sprites for [sprite.type]. Neck slot."), confidential = TRUE)
if(sprite.slot_flags & ITEM_SLOT_BACK)
actual_file_name = 'icons/mob/clothing/back.dmi'
if(!(sprite.icon_state in icon_states(actual_file_name)))
to_chat(src, span_warning("ERROR sprites for [sprite.type]. Back slot."), confidential = TRUE)
to_chat(user, span_warning("ERROR sprites for [sprite.type]. Back slot."), confidential = TRUE)
if(sprite.slot_flags & ITEM_SLOT_HEAD)
actual_file_name = 'icons/mob/clothing/head/default.dmi'
if(!(sprite.icon_state in icon_states(actual_file_name)))
to_chat(src, span_warning("ERROR sprites for [sprite.type]. Head slot."), confidential = TRUE)
to_chat(user, span_warning("ERROR sprites for [sprite.type]. Head slot."), confidential = TRUE)
if(sprite.slot_flags & ITEM_SLOT_BELT)
actual_file_name = 'icons/mob/clothing/belt.dmi'
if(!(sprite.icon_state in icon_states(actual_file_name)))
to_chat(src, span_warning("ERROR sprites for [sprite.type]. Belt slot."), confidential = TRUE)
to_chat(user, span_warning("ERROR sprites for [sprite.type]. Belt slot."), confidential = TRUE)
if(sprite.slot_flags & ITEM_SLOT_SUITSTORE)
actual_file_name = 'icons/mob/clothing/belt_mirror.dmi'
if(!(sprite.icon_state in icon_states(actual_file_name)))
to_chat(src, span_warning("ERROR sprites for [sprite.type]. Suit Storage slot."), confidential = TRUE)
#endif
to_chat(user, span_warning("ERROR sprites for [sprite.type]. Suit Storage slot."), confidential = TRUE)

View File

@@ -1,15 +1,10 @@
/client/proc/air_status(turf/target)
set category = "Debug"
set name = "Display Air Status"
if(!isturf(target))
return
atmos_scan(user=usr, target=target, silent=TRUE)
ADMIN_VERB_VISIBILITY(debug_air_status, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(debug_air_status, R_DEBUG, "Debug Air Status" , ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, turf/target in world)
atmos_scan(user.mob, target, silent = TRUE)
BLACKBOX_LOG_ADMIN_VERB("Show Air Status")
/client/proc/fix_next_move()
set category = "Debug"
set name = "Unfreeze Everyone"
ADMIN_VERB_VISIBILITY(fix_next_move, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(fix_next_move, R_DEBUG, "Fix Next Move", "Unfreezes all frozen mobs.", ADMIN_CATEGORY_DEBUG)
var/largest_move_time = 0
var/largest_click_time = 0
var/mob/largest_move_mob = null
@@ -34,12 +29,9 @@
message_admins("[ADMIN_LOOKUPFLW(largest_click_mob)] had the largest click delay with [largest_click_time] frames / [DisplayTimeText(largest_click_time)]!")
message_admins("world.time = [world.time]")
BLACKBOX_LOG_ADMIN_VERB("Unfreeze Everyone")
return
/client/proc/radio_report()
set category = "Debug"
set name = "Radio report"
ADMIN_VERB_VISIBILITY(radio_report, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(radio_report, R_DEBUG, "Radio Report", "Shows a report of all radio devices and their filters.", ADMIN_CATEGORY_DEBUG)
var/output = "<b>Radio Report</b><hr>"
for (var/fq in SSradio.frequencies)
output += "<b>Freq: [fq]</b><br>"
@@ -64,29 +56,21 @@
else
output += "&nbsp;&nbsp;&nbsp;&nbsp;[device]<br>"
usr << browse(output,"window=radioreport")
user << browse(output,"window=radioreport")
BLACKBOX_LOG_ADMIN_VERB("Show Radio Report")
/client/proc/reload_admins()
set name = "Reload Admins"
set category = "Admin"
if(!src.holder)
return
var/confirm = tgui_alert(usr, "Are you sure you want to reload all admins?", "Confirm", list("Yes", "No"))
ADMIN_VERB(reload_admins, R_NONE, "Reload Admins", "Reloads all admins from the database.", ADMIN_CATEGORY_MAIN)
var/confirm = tgui_alert(user, "Are you sure you want to reload all admins?", "Confirm", list("Yes", "No"))
if(confirm != "Yes")
return
load_admins()
BLACKBOX_LOG_ADMIN_VERB("Reload All Admins")
message_admins("[key_name_admin(usr)] manually reloaded admins")
message_admins("[key_name_admin(user)] manually reloaded admins")
/client/proc/toggle_cdn()
set name = "Toggle CDN"
set category = "Server"
ADMIN_VERB(toggle_cdn, R_SERVER|R_DEBUG, "Toggle CDN", "Toggles the CDN for the server.", ADMIN_CATEGORY_SERVER)
var/static/admin_disabled_cdn_transport = null
if (alert(usr, "Are you sure you want to toggle the CDN asset transport?", "Confirm", "Yes", "No") != "Yes")
if (alert(user, "Are you sure you want to toggle the CDN asset transport?", "Confirm", "Yes", "No") != "Yes")
return
var/current_transport = CONFIG_GET(string/asset_transport)
if (!current_transport || current_transport == "simple")
@@ -94,17 +78,17 @@
CONFIG_SET(string/asset_transport, admin_disabled_cdn_transport)
admin_disabled_cdn_transport = null
SSassets.OnConfigLoad()
message_admins("[key_name_admin(usr)] re-enabled the CDN asset transport")
log_admin("[key_name(usr)] re-enabled the CDN asset transport")
message_admins("[key_name_admin(user)] re-enabled the CDN asset transport")
log_admin("[key_name(user)] re-enabled the CDN asset transport")
else
to_chat(usr, span_adminnotice("The CDN is not enabled!"))
if (tgui_alert(usr, "The CDN asset transport is not enabled! If you having issues with assets you can also try disabling filename mutations.", "The CDN asset transport is not enabled!", list("Try disabling filename mutations", "Nevermind")) == "Try disabling filename mutations")
to_chat(user, span_adminnotice("The CDN is not enabled!"))
if (tgui_alert(user, "The CDN asset transport is not enabled! If you having issues with assets you can also try disabling filename mutations.", "The CDN asset transport is not enabled!", list("Try disabling filename mutations", "Nevermind")) == "Try disabling filename mutations")
SSassets.transport.dont_mutate_filenames = !SSassets.transport.dont_mutate_filenames
message_admins("[key_name_admin(usr)] [(SSassets.transport.dont_mutate_filenames ? "disabled" : "re-enabled")] asset filename transforms")
log_admin("[key_name(usr)] [(SSassets.transport.dont_mutate_filenames ? "disabled" : "re-enabled")] asset filename transforms")
message_admins("[key_name_admin(user)] [(SSassets.transport.dont_mutate_filenames ? "disabled" : "re-enabled")] asset filename transforms")
log_admin("[key_name(user)] [(SSassets.transport.dont_mutate_filenames ? "disabled" : "re-enabled")] asset filename transforms")
else
admin_disabled_cdn_transport = current_transport
CONFIG_SET(string/asset_transport, "simple")
SSassets.OnConfigLoad()
message_admins("[key_name_admin(usr)] disabled the CDN asset transport")
log_admin("[key_name(usr)] disabled the CDN asset transport")
message_admins("[key_name_admin(user)] disabled the CDN asset transport")
log_admin("[key_name(user)] disabled the CDN asset transport")

View File

@@ -261,18 +261,14 @@
return
/client/proc/summon_ert()
set category = "Admin.Fun"
set name = "Summon ERT"
set desc = "Summons an emergency response team"
message_admins("[key_name(usr)] is creating a CentCom response team...")
if(holder?.makeEmergencyresponseteam())
message_admins("[key_name(usr)] created a CentCom response team.")
log_admin("[key_name(usr)] created a CentCom response team.")
ADMIN_VERB(summon_ert, R_FUN, "Summon ERT", "Summons an emergency response team.", ADMIN_CATEGORY_FUN)
message_admins("[key_name_admin(user)] is creating a CentCom response team...")
if(user.holder?.makeEmergencyresponseteam())
message_admins("[key_name_admin(user)] created a CentCom response team.")
log_admin("[key_name(user)] created a CentCom response team.")
else
message_admins("[key_name_admin(usr)] tried to create a CentCom response team. Unfortunately, there were not enough candidates available.")
log_admin("[key_name(usr)] failed to create a CentCom response team.")
message_admins("[key_name_admin(user)] tried to create a CentCom response team. Unfortunately, there were not enough candidates available.")
log_admin("[key_name(user)] failed to create a CentCom response team.")
#undef ERT_EXPERIENCED_LEADER_CHOOSE_TOP
#undef DUMMY_HUMAN_SLOT_ADMIN

View File

@@ -1,20 +1,12 @@
// Proc taken from yogstation, credit to nichlas0010 for the original
/client/proc/fix_air(turf/open/T in world)
set name = "Fix Air"
set category = "Admin.Game"
set desc = "Fixes air in specified radius."
ADMIN_VERB(fix_air, R_ADMIN, "Fix Air", "Fixes air in a specified radius.", ADMIN_CATEGORY_GAME, turf/open/locale in world, range = 2 as num)
message_admins("[key_name_admin(user)] fixed air with range [range] in area [locale.loc.name]")
user.mob.log_message("fixed air with range [range] in area [locale.loc.name]", LOG_ADMIN)
if(!holder)
to_chat(src, "Only administrators may use this command.", confidential = TRUE)
return
if(check_rights(R_ADMIN,1))
var/range=input("Enter range:","Num",2) as num
message_admins("[key_name_admin(usr)] fixed air with range [range] in area [T.loc.name]")
usr.log_message("fixed air with range [range] in area [T.loc.name]", LOG_ADMIN)
for(var/turf/open/F in range(range,T))
if(F.blocks_air)
//skip walls
continue
var/datum/gas_mixture/GM = SSair.parse_gas_string(F.initial_gas_mix, /datum/gas_mixture/turf)
F.copy_air(GM)
F.update_visuals()
for(var/turf/open/valid_range_turf in range(range,locale))
if(valid_range_turf.blocks_air)
//skip walls
continue
var/datum/gas_mixture/GM = SSair.parse_gas_string(valid_range_turf.initial_gas_mix, /datum/gas_mixture/turf)
valid_range_turf.copy_air(GM)
valid_range_turf.update_visuals()

View File

@@ -1,14 +1,8 @@
/client/proc/cmd_admin_toggle_fov()
set name = "Enable/Disable Field of View"
set category = "Debug"
if(!check_rights(R_ADMIN) || !check_rights(R_DEBUG))
return
ADMIN_VERB(toggle_fov, R_ADMIN|R_DEBUG, "Enable/Disable Field Of View", "Toggle FOV globally.", ADMIN_CATEGORY_DEBUG)
var/on_off = CONFIG_GET(flag/native_fov)
message_admins("[key_name_admin(usr)] has [on_off ? "disabled" : "enabled"] the Native Field of View configuration..")
log_admin("[key_name(usr)] has [on_off ? "disabled" : "enabled"] the Native Field of View configuration.")
message_admins("[key_name_admin(user)] has [on_off ? "disabled" : "enabled"] the Native Field of View configuration..")
log_admin("[key_name(user)] has [on_off ? "disabled" : "enabled"] the Native Field of View configuration.")
CONFIG_SET(flag/native_fov, !on_off)
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggled Field of View", "[on_off ? "Enabled" : "Disabled"]"))

View File

@@ -1,23 +1,16 @@
//replaces the old Ticklag verb, fps is easier to understand
/client/proc/set_server_fps()
set category = "Debug"
set name = "Set Server FPS"
set desc = "Sets game speed in frames-per-second. Can potentially break the game"
if(!check_rights(R_DEBUG))
return
ADMIN_VERB_VISIBILITY(set_server_fps, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(set_server_fps, R_DEBUG, "Set Server FPS", "Sets game speed in frames-per-second. Can potentially break the game", ADMIN_CATEGORY_DEBUG)
var/cfg_fps = CONFIG_GET(number/fps)
var/new_fps = round(input("Sets game frames-per-second. Can potentially break the game (default: [cfg_fps])","FPS", world.fps) as num|null)
var/new_fps = round(input(user, "Sets game frames-per-second. Can potentially break the game (default: [cfg_fps])","FPS", world.fps) as num|null)
if(new_fps <= 0)
to_chat(src, span_danger("Error: set_server_fps(): Invalid world.fps value. No changes made."), confidential = TRUE)
to_chat(user, span_danger("Error: set_server_fps(): Invalid world.fps value. No changes made."), confidential = TRUE)
return
if(new_fps > cfg_fps * 1.5)
if(tgui_alert(usr, "You are setting fps to a high value:\n\t[new_fps] frames-per-second\n\tconfig.fps = [cfg_fps]","Warning!",list("Confirm","ABORT-ABORT-ABORT")) != "Confirm")
if(tgui_alert(user, "You are setting fps to a high value:\n\t[new_fps] frames-per-second\n\tconfig.fps = [cfg_fps]","Warning!",list("Confirm","ABORT-ABORT-ABORT")) != "Confirm")
return
var/msg = "[key_name(src)] has modified world.fps to [new_fps]"
var/msg = "[key_name(user)] has modified world.fps to [new_fps]"
log_admin(msg, 0)
message_admins(msg, 0)
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Set Server FPS", "[new_fps]")) // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!

View File

@@ -1,17 +1,8 @@
//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"
ADMIN_VERB(get_server_logs, R_ADMIN, "Get Server Logs", "View or retrieve logfiles.", ADMIN_CATEGORY_MAIN)
user.browseserverlogs()
browseserverlogs()
/client/proc/getcurrentlogs()
set name = "Get Current Logs"
set desc = "View/retrieve logfiles for the current round."
set category = "Admin"
browseserverlogs(current=TRUE)
ADMIN_VERB(get_current_logs, R_ADMIN, "Get Current Logs", "View or retrieve logfiles for the current round.", ADMIN_CATEGORY_MAIN)
user.browseserverlogs(current=TRUE)
/client/proc/browseserverlogs(current=FALSE)
var/path = browse_files(current ? BROWSE_ROOT_CURRENT_LOGS : BROWSE_ROOT_ALL_LOGS)
@@ -32,4 +23,3 @@
else
return
to_chat(src, "Attempting to send [path], this may take a fair few minutes if the file is very large.", confidential = TRUE)
return

View File

@@ -1,11 +1,8 @@
//very similar to centcom_podlauncher in terms of how this is coded, so i kept a lot of comments from it
/client/proc/ghost_pool_protection() //Creates a verb for admins to open up the ui
set name = "Ghost Pool Protection"
set desc = "Choose which ways people can get into the round, or just clear it out completely for admin events."
set category = "Admin.Events"
var/datum/ghost_pool_menu/tgui = new(usr)//create the datum
tgui.ui_interact(usr)//datum has a tgui component, here we open the window
ADMIN_VERB(ghost_pool_protection, R_ADMIN, "Ghost Pool Protection", "Choose which ways people can get into the round, or just clear it out completely for admin events.", ADMIN_CATEGORY_EVENTS)
var/datum/ghost_pool_menu/tgui = new(user)
tgui.ui_interact(user.mob)
/datum/ghost_pool_menu
var/client/holder //client of whoever is using this datum

View File

@@ -1,15 +1,9 @@
/client/proc/cmd_admin_law_panel()
set category = "Admin.Events"
set name = "Law Panel"
if(!check_rights(R_ADMIN))
return
if(!isobserver(usr) && SSticker.HasRoundStarted())
message_admins("[key_name_admin(usr)] checked AI laws via the Law Panel.")
ADMIN_VERB(law_panel, R_ADMIN, "Law Panel", "View the AI laws.", ADMIN_CATEGORY_EVENTS)
if(!isobserver(user) && SSticker.HasRoundStarted())
message_admins("[key_name_admin(user)] checked AI laws via the Law Panel.")
var/datum/law_panel/tgui = new
tgui.ui_interact(user.mob)
BLACKBOX_LOG_ADMIN_VERB("Law Panel")
var/datum/law_panel/tgui = new()
tgui.ui_interact(usr)
/datum/law_panel
@@ -211,7 +205,7 @@
switch(action)
if("lawchange_logs")
usr.client?.list_law_changes()
ui.user?.client?.holder?.list_law_changes()
return FALSE
if("force_state_laws")

View File

@@ -233,10 +233,6 @@
. = ..()
qdel(src)
/client/proc/open_lua_editor()
set name = "Open Lua Editor"
set category = "Debug"
if(!check_rights_for(src, R_DEBUG))
return
var/datum/lua_editor/editor = new()
editor.ui_interact(usr)
ADMIN_VERB(lua_editor, R_DEBUG, "Open Lua Editor", "Its codin' time.", ADMIN_CATEGORY_DEBUG)
var/datum/lua_editor/editor = new
editor.ui_interact(user.mob)

View File

@@ -1,13 +1,7 @@
/proc/machine_upgrade(obj/machinery/M in world)
set name = "Tweak Component Ratings"
set category = "Debug"
if (!istype(M))
return
var/new_rating = input("Enter new rating:","Num") as num|null
if(new_rating && M.component_parts)
for(var/obj/item/stock_parts/P in M.component_parts)
ADMIN_VERB(machine_upgrade, R_DEBUG, "Tweak Component Ratings", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, obj/machinery/machine in world)
var/new_rating = input(user, "Enter new rating:","Num") as num|null
if(new_rating && machine.component_parts)
for(var/obj/item/stock_parts/P in machine.component_parts)
P.rating = new_rating
M.RefreshParts()
machine.RefreshParts()
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Machine Upgrade", "[new_rating]")) // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!

View File

@@ -1,7 +1,6 @@
/client/proc/manipulate_organs(mob/living/carbon/carbon_victim in world)
set name = "Manipulate Organs"
set category = "Debug"
var/operation = tgui_input_list(usr, "Select organ operation", "Organ Manipulation", list("add organ", "add implant", "drop organ/implant", "remove organ/implant"))
ADMIN_VERB_VISIBILITY(manipulate_organs, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(manipulate_organs, R_DEBUG, "Manipulate Organs", "Manipulate the organs of a living carbon.", ADMIN_CATEGORY_DEBUG, mob/living/carbon/carbon_victim in world)
var/operation = tgui_input_list(user, "Select organ operation", "Organ Manipulation", list("add organ", "add implant", "drop organ/implant", "remove organ/implant"))
if (isnull(operation))
return
@@ -12,7 +11,7 @@
var/dat = replacetext("[path]", "/obj/item/organ/", ":")
organs[dat] = path
var/obj/item/organ/organ_to_grant = tgui_input_list(usr, "Select organ type", "Organ Manipulation", organs)
var/obj/item/organ/organ_to_grant = tgui_input_list(user, "Select organ type", "Organ Manipulation", organs)
if(isnull(organ_to_grant))
return
if(isnull(organs[organ_to_grant]))
@@ -20,18 +19,18 @@
organ_to_grant = organs[organ_to_grant]
organ_to_grant = new organ_to_grant
if(!organ_to_grant.Insert(carbon_victim))
to_chat(usr, span_notice("[carbon_victim] is unable to carry this organ!"))
to_chat(user, span_notice("[carbon_victim] is unable to carry this organ!"))
qdel(organ_to_grant)
return
log_admin("[key_name(usr)] has added organ [organ_to_grant.type] to [key_name(carbon_victim)]")
message_admins("[key_name_admin(usr)] has added organ [organ_to_grant.type] to [ADMIN_LOOKUPFLW(carbon_victim)]")
log_admin("[key_name(user)] has added organ [organ_to_grant.type] to [key_name(carbon_victim)]")
message_admins("[key_name_admin(user)] has added organ [organ_to_grant.type] to [ADMIN_LOOKUPFLW(carbon_victim)]")
if("add implant")
for(var/path in subtypesof(/obj/item/implant))
var/dat = replacetext("[path]", "/obj/item/implant/", ":")
organs[dat] = path
var/obj/item/implant/implant_to_grant = tgui_input_list(usr, "Select implant type", "Organ Manipulation", organs)
var/obj/item/implant/implant_to_grant = tgui_input_list(user, "Select implant type", "Organ Manipulation", organs)
if(isnull(implant_to_grant))
return
if(isnull(organs[implant_to_grant]))
@@ -39,11 +38,11 @@
implant_to_grant = organs[implant_to_grant]
implant_to_grant = new implant_to_grant
if(!implant_to_grant.implant(carbon_victim))
to_chat(usr, span_notice("[carbon_victim] is unable to hold this implant!"))
to_chat(user, span_notice("[carbon_victim] is unable to hold this implant!"))
qdel(implant_to_grant)
return
log_admin("[key_name(usr)] has added implant [implant_to_grant.type] to [key_name(carbon_victim)]")
message_admins("[key_name_admin(usr)] has added implant [implant_to_grant.type] to [ADMIN_LOOKUPFLW(carbon_victim)]")
log_admin("[key_name(user)] has added implant [implant_to_grant.type] to [key_name(carbon_victim)]")
message_admins("[key_name_admin(user)] has added implant [implant_to_grant.type] to [ADMIN_LOOKUPFLW(carbon_victim)]")
if("drop organ/implant", "remove organ/implant")
for(var/obj/item/organ/user_organs as anything in carbon_victim.organs)
@@ -52,15 +51,15 @@
for(var/obj/item/implant/user_implants as anything in carbon_victim.implants)
organs["[user_implants.name] ([user_implants.type])"] = user_implants
var/obj/item/organ_to_modify = tgui_input_list(usr, "Select organ/implant", "Organ Manipulation", organs)
var/obj/item/organ_to_modify = tgui_input_list(user, "Select organ/implant", "Organ Manipulation", organs)
if(isnull(organ_to_modify))
return
if(isnull(organs[organ_to_modify]))
return
organ_to_modify = organs[organ_to_modify]
log_admin("[key_name(usr)] has removed [organ_to_modify.type] from [key_name(carbon_victim)]")
message_admins("[key_name_admin(usr)] has removed [organ_to_modify.type] from [ADMIN_LOOKUPFLW(carbon_victim)]")
log_admin("[key_name(user)] has removed [organ_to_modify.type] from [key_name(carbon_victim)]")
message_admins("[key_name_admin(user)] has removed [organ_to_modify.type] from [ADMIN_LOOKUPFLW(carbon_victim)]")
var/obj/item/organ/organ_holder
var/obj/item/implant/implant_holder

View File

@@ -1,23 +1,22 @@
/client/proc/map_export()
set category = "Debug"
set name = "Map Export"
set desc = "Select a part of the map by coordinates and download it."
var/z_level = tgui_input_number(usr, "Export Which Z-Level?", "Map Exporter", usr.z || 2)
var/start_x = tgui_input_number(usr, "Start X?", "Map Exporter", usr.x || 1, world.maxx, 1)
var/start_y = tgui_input_number(usr, "Start Y?", "Map Exporter", usr.y || 1, world.maxy, 1)
var/end_x = tgui_input_number(usr, "End X?", "Map Exporter", usr.x || 1, world.maxx, 1)
var/end_y = tgui_input_number(usr, "End Y?", "Map Exporter", usr.y || 1, world.maxy, 1)
ADMIN_VERB(map_export, R_DEBUG, "Map Export", "Select a part of the map by coordinates and download it.", ADMIN_CATEGORY_DEBUG)
var/user_x = user.mob.x
var/user_y = user.mob.y
var/user_z = user.mob.z
var/z_level = tgui_input_number(user, "Export Which Z-Level?", "Map Exporter", user_z || 2)
var/start_x = tgui_input_number(user, "Start X?", "Map Exporter", user_x || 1, world.maxx, 1)
var/start_y = tgui_input_number(user, "Start Y?", "Map Exporter", user_y || 1, world.maxy, 1)
var/end_x = tgui_input_number(user, "End X?", "Map Exporter", user_x || 1, world.maxx, 1)
var/end_y = tgui_input_number(user, "End Y?", "Map Exporter", user_y || 1, world.maxy, 1)
var/date = time2text(world.timeofday, "YYYY-MM-DD_hh-mm-ss")
var/file_name = sanitize_filename(tgui_input_text(usr, "Filename?", "Map Exporter", "exported_map_[date]"))
var/confirm = tgui_alert(usr, "Are you sure you want to do this? This will cause extreme lag!", "Map Exporter", list("Yes", "No"))
var/file_name = sanitize_filename(tgui_input_text(user, "Filename?", "Map Exporter", "exported_map_[date]"))
var/confirm = tgui_alert(user, "Are you sure you want to do this? This will cause extreme lag!", "Map Exporter", list("Yes", "No"))
if(confirm != "Yes" || !check_rights(R_DEBUG))
if(confirm != "Yes")
return
var/map_text = write_map(start_x, start_y, z_level, end_x, end_y, z_level)
log_admin("Build Mode: [key_name(usr)] is exporting the map area from ([start_x], [start_y], [z_level]) through ([end_x], [end_y], [z_level])")
send_exported_map(usr, file_name, map_text)
log_admin("Build Mode: [key_name(user)] is exporting the map area from ([start_x], [start_y], [z_level]) through ([end_x], [end_y], [z_level])")
send_exported_map(user, file_name, map_text)
/**
* A procedure for saving DMM text to a file and then sending it to the user.

View File

@@ -1,20 +1,17 @@
/client/proc/map_template_load()
set category = "Debug"
set name = "Map template - Place"
ADMIN_VERB(map_template_load, R_DEBUG, "Map Template - Place", "Place a map template at your current location.", ADMIN_CATEGORY_DEBUG)
var/datum/map_template/template
var/map = tgui_input_list(usr, "Choose a Map Template to place at your CURRENT LOCATION","Place Map Template", sort_list(SSmapping.map_templates))
var/map = tgui_input_list(user, "Choose a Map Template to place at your CURRENT LOCATION","Place Map Template", sort_list(SSmapping.map_templates))
if(!map)
return
template = SSmapping.map_templates[map]
var/turf/T = get_turf(mob)
var/turf/T = get_turf(user.mob)
if(!T)
return
var/list/preview = list()
var/center
var/centeralert = tgui_alert(usr,"Center Template.","Template Centering",list("Yes","No"))
var/centeralert = tgui_alert(user,"Center Template.","Template Centering",list("Yes","No"))
switch(centeralert)
if("Yes")
center = TRUE
@@ -26,8 +23,8 @@
var/image/item = image('icons/turf/overlays.dmi', place_on,"greenOverlay")
SET_PLANE(item, ABOVE_LIGHTING_PLANE, place_on)
preview += item
images += preview
if(tgui_alert(usr,"Confirm location.","Template Confirm",list("Yes","No")) == "Yes")
user.images += preview
if(tgui_alert(user,"Confirm location.","Template Confirm",list("Yes","No")) == "Yes")
if(template.load(T, centered = center))
var/affected = template.get_affected_turfs(T, centered = center)
for(var/AT in affected)
@@ -36,23 +33,20 @@
template.post_load(P)
break
message_admins(span_adminnotice("[key_name_admin(src)] has placed a map template ([template.name]) at [ADMIN_COORDJMP(T)]"))
message_admins(span_adminnotice("[key_name_admin(user)] has placed a map template ([template.name]) at [ADMIN_COORDJMP(T)]"))
else
to_chat(src, "Failed to place map", confidential = TRUE)
images -= preview
to_chat(user, "Failed to place map", confidential = TRUE)
user.images -= preview
/client/proc/map_template_upload()
set category = "Debug"
set name = "Map Template - Upload"
var/map = input(src, "Choose a Map Template to upload to template storage","Upload Map Template") as null|file
ADMIN_VERB(map_template_upload, R_DEBUG, "Map Template - Upload", "Upload a map template to the server.", ADMIN_CATEGORY_DEBUG)
var/map = input(user, "Choose a Map Template to upload to template storage","Upload Map Template") as null|file
if(!map)
return
if(copytext("[map]", -4) != ".dmm")//4 == length(".dmm")
to_chat(src, span_warning("Filename must end in '.dmm': [map]"), confidential = TRUE)
to_chat(user, span_warning("Filename must end in '.dmm': [map]"), confidential = TRUE)
return
var/datum/map_template/M
switch(tgui_alert(usr, "What kind of map is this?", "Map type", list("Normal", "Shuttle", "Cancel")))
switch(tgui_alert(user, "What kind of map is this?", "Map type", list("Normal", "Shuttle", "Cancel")))
if("Normal")
M = new /datum/map_template(map, "[map]", TRUE)
if("Shuttle")
@@ -60,23 +54,23 @@
else
return
if(!M.cached_map)
to_chat(src, span_warning("Map template '[map]' failed to parse properly."), confidential = TRUE)
to_chat(user, span_warning("Map template '[map]' failed to parse properly."), confidential = TRUE)
return
var/datum/map_report/report = M.cached_map.check_for_errors()
var/report_link
if(report)
report.show_to(src)
report.show_to(user)
report_link = " - <a href='?src=[REF(report)];[HrefToken(forceGlobal = TRUE)];show=1'>validation report</a>"
to_chat(src, span_warning("Map template '[map]' <a href='?src=[REF(report)];[HrefToken()];show=1'>failed validation</a>."), confidential = TRUE)
to_chat(user, span_warning("Map template '[map]' <a href='?src=[REF(report)];[HrefToken()];show=1'>failed validation</a>."), confidential = TRUE)
if(report.loadable)
var/response = tgui_alert(usr, "The map failed validation, would you like to load it anyways?", "Map Errors", list("Cancel", "Upload Anyways"))
var/response = tgui_alert(user, "The map failed validation, would you like to load it anyways?", "Map Errors", list("Cancel", "Upload Anyways"))
if(response != "Upload Anyways")
return
else
tgui_alert(usr, "The map failed validation and cannot be loaded.", "Map Errors", list("Oh Darn"))
tgui_alert(user, "The map failed validation and cannot be loaded.", "Map Errors", list("Oh Darn"))
return
SSmapping.map_templates[M.name] = M
message_admins(span_adminnotice("[key_name_admin(src)] has uploaded a map template '[map]' ([M.width]x[M.height])[report_link]."))
to_chat(src, span_notice("Map template '[map]' ready to place ([M.width]x[M.height])"), confidential = TRUE)
message_admins(span_adminnotice("[key_name_admin(user)] has uploaded a map template '[map]' ([M.width]x[M.height])[report_link]."))
to_chat(user, span_notice("Map template '[map]' ready to place ([M.width]x[M.height])"), confidential = TRUE)

View File

@@ -1,69 +1,5 @@
//- Are all the floors with or without air, as they should be? (regular or airless)
//- Does the area have an APC?
//- Does the area have an Air Alarm?
//- Does the area have a Request Console?
//- Does the area have lights?
//- Does the area have a light switch?
//- Does the area have enough intercoms?
//- Does the area have enough security cameras? (Use the 'Camera Range Display' verb under Debug)
//- Is the area connected to the scrubbers air loop?
//- Is the area connected to the vent air loop? (vent pumps)
//- Is everything wired properly?
//- Does the area have a fire alarm and firedoors?
//- Do all pod doors work properly?
//- Are accesses set properly on doors, pod buttons, etc.
//- Are all items placed properly? (not below vents, scrubbers, tables)
//- Does the disposal system work properly from all the disposal units in this room and all the units, the pipes of which pass through this room?
//- Check for any misplaced or stacked piece of pipe (air and disposal)
//- Check for any misplaced or stacked piece of wire
//- Identify how hard it is to break into the area and where the weak points are
//- Check if the area has too much empty space. If so, make it smaller and replace the rest with maintenance tunnels.
GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list(
/client/proc/camera_view, //-errorage
/client/proc/sec_camera_report, //-errorage
/client/proc/intercom_view, //-errorage
/client/proc/air_status, //Air things
/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, //-errorage
/client/proc/cmd_give_direct_control,
/client/proc/set_server_fps, //allows you to set the ticklag.
/client/proc/cmd_admin_grantfullaccess,
/client/proc/cmd_admin_areatest_all,
/client/proc/cmd_admin_areatest_station,
/client/proc/cmd_admin_areatest_station_no_maintenance,
#ifdef TESTING
/client/proc/see_dirty_varedits,
#endif
/client/proc/cmd_admin_rejuvenate,
/datum/admins/proc/show_traitor_panel,
/client/proc/disable_communication,
/client/proc/show_map_reports,
/client/proc/cmd_show_at_list,
/client/proc/cmd_show_at_markers,
/client/proc/manipulate_organs,
/client/proc/start_line_profiling,
/client/proc/stop_line_profiling,
/client/proc/show_line_profiling,
/client/proc/create_mapping_job_icons,
/client/proc/debug_z_levels,
/client/proc/place_ruin,
/client/proc/station_food_debug,
/client/proc/station_stack_debug,
/client/proc/check_for_obstructed_atmospherics,
/client/proc/modify_lights,
/client/proc/visualize_lights,
))
GLOBAL_PROTECT(admin_verbs_debug_mapping)
/client/proc/camera_view()
set category = "Mapping"
set name = "Camera Range Display"
ADMIN_VERB_VISIBILITY(camera_view, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(camera_view, R_DEBUG, "Camera Range Display", "Shows the range of cameras on the station.", ADMIN_CATEGORY_MAPPING)
var/on = FALSE
for(var/turf/T in world)
if(T.maptext)
@@ -82,28 +18,20 @@ GLOBAL_PROTECT(admin_verbs_debug_mapping)
#ifdef TESTING
GLOBAL_LIST_EMPTY(dirty_vars)
/client/proc/see_dirty_varedits()
set category = "Mapping"
set name = "Dirty Varedits"
ADMIN_VERB_VISIBILITY(see_dirty_varedits, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(see_dirty_varedits, R_DEBUG, "Dirty Varedits", "Shows all dirty varedits.", ADMIN_CATEGORY_MAPPING)
var/list/dat = list()
dat += "<h3>Abandon all hope ye who enter here</h3><br><br>"
for(var/thing in GLOB.dirty_vars)
dat += "[thing]<br>"
CHECK_TICK
var/datum/browser/popup = new(usr, "dirty_vars", "Dirty Varedits", 900, 750)
var/datum/browser/popup = new(user, "dirty_vars", "Dirty Varedits", 900, 750)
popup.set_content(dat.Join())
popup.open()
#endif
/client/proc/sec_camera_report()
set category = "Mapping"
set name = "Camera Report"
if(!Master)
tgui_alert(usr,"Master_controller not found.","Sec Camera Report")
return FALSE
ADMIN_VERB_VISIBILITY(sec_camera_report, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(sec_camera_report, R_DEBUG, "Camera Report", "Get a printout of all camera issues.", ADMIN_CATEGORY_MAPPING)
var/list/obj/machinery/camera/CL = list()
for(var/obj/machinery/camera/C as anything in GLOB.cameranet.cameras)
@@ -133,15 +61,13 @@ GLOBAL_LIST_EMPTY(dirty_vars)
output += "<li><font color='red'>Camera not connected to wall at [ADMIN_VERBOSEJMP(C1)] Network: [json_encode(C1.network)]</font></li>"
output += "</ul>"
usr << browse(output,"window=airreport;size=1000x500")
user << browse(output,"window=airreport;size=1000x500")
BLACKBOX_LOG_ADMIN_VERB("Show Camera Report")
/client/proc/intercom_view()
set category = "Mapping"
set name = "Intercom Range Display"
ADMIN_VERB_VISIBILITY(intercom_view, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(intercom_view, R_DEBUG, "Intercom Range Display", "Shows the range of intercoms on the station.", ADMIN_CATEGORY_MAPPING)
var/static/intercom_range_display_status = FALSE
intercom_range_display_status = !intercom_range_display_status //blame cyberboss if this breaks something //blamed
intercom_range_display_status = !intercom_range_display_status
for(var/obj/effect/abstract/marker/intercom/marker in GLOB.all_abstract_markers)
qdel(marker)
@@ -153,23 +79,17 @@ GLOBAL_LIST_EMPTY(dirty_vars)
new /obj/effect/abstract/marker/intercom(turf)
BLACKBOX_LOG_ADMIN_VERB("Show Intercom Range")
/client/proc/show_map_reports()
set category = "Mapping"
set name = "Show map report list"
set desc = "Displays a list of map reports"
ADMIN_VERB_VISIBILITY(show_map_reports, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(show_map_reports, R_DEBUG, "Show Map Reports", "Displays a list of map reports.", ADMIN_CATEGORY_MAPPING)
var/dat = {"<b>List of all map reports:</b><br>"}
for(var/datum/map_report/report as anything in GLOB.map_reports)
dat += "[report.tag] ([report.original_path]) - <a href='?src=[REF(report)];[HrefToken()];show=1'>View</a><br>"
usr << browse(dat, "window=map_reports")
/client/proc/cmd_show_at_list()
set category = "Mapping"
set name = "Show roundstart AT list"
set desc = "Displays a list of active turfs coordinates at roundstart"
user << browse(dat, "window=map_reports")
ADMIN_VERB_VISIBILITY(cmd_show_at_list, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(cmd_show_at_list, R_DEBUG, "Show roundstart AT list", "Displays a list of active turfs coordinates at roundstart.", ADMIN_CATEGORY_MAPPING)
var/dat = {"<b>Coordinate list of Active Turfs at Roundstart</b>
<br>Real-time Active Turfs list you can see in Air Subsystem at active_turfs var<br>"}
@@ -178,50 +98,39 @@ GLOBAL_LIST_EMPTY(dirty_vars)
dat += "[ADMIN_VERBOSEJMP(T)]\n"
dat += "<br>"
usr << browse(dat, "window=at_list")
user << browse(dat, "window=at_list")
BLACKBOX_LOG_ADMIN_VERB("Show Roundstart Active Turfs")
/client/proc/cmd_show_at_markers()
set category = "Mapping"
set name = "Show roundstart AT markers"
set desc = "Places a marker on all active-at-roundstart turfs"
ADMIN_VERB_VISIBILITY(cmd_show_at_markers, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(cmd_show_at_markers, R_DEBUG, "Show roundstart AT markers", "Places a marker on all active-at-roundstart turfs.", ADMIN_CATEGORY_MAPPING)
var/count = 0
for(var/obj/effect/abstract/marker/at/AT in GLOB.all_abstract_markers)
qdel(AT)
count++
if(count)
to_chat(usr, "[count] AT markers removed.", confidential = TRUE)
to_chat(user, "[count] AT markers removed.", confidential = TRUE)
else
for(var/t in GLOB.active_turfs_startlist)
new /obj/effect/abstract/marker/at(t)
count++
to_chat(usr, "[count] AT markers placed.", confidential = TRUE)
to_chat(user, "[count] AT markers placed.", confidential = TRUE)
BLACKBOX_LOG_ADMIN_VERB("Show Roundstart Active Turf Markers")
/client/proc/enable_mapping_verbs()
set category = "Debug"
set name = "Mapping verbs - Enable"
if(!check_rights(R_DEBUG))
return
remove_verb(src, /client/proc/enable_mapping_verbs)
add_verb(src, list(/client/proc/disable_mapping_verbs, GLOB.admin_verbs_debug_mapping))
ADMIN_VERB(enable_mapping_verbs, R_DEBUG, "Enable Mapping Verbs", "Enable all mapping verbs.", ADMIN_CATEGORY_MAPPING)
SSadmin_verbs.update_visibility_flag(user, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG, TRUE)
BLACKBOX_LOG_ADMIN_VERB("Enable Debug Verbs")
/client/proc/disable_mapping_verbs()
set category = "Debug"
set name = "Mapping verbs - Disable"
remove_verb(src, list(/client/proc/disable_mapping_verbs, GLOB.admin_verbs_debug_mapping))
add_verb(src, /client/proc/enable_mapping_verbs)
ADMIN_VERB_VISIBILITY(disable_mapping_verbs, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(disable_mapping_verbs, R_DEBUG, "Disable Mapping Verbs", "Disable all mapping verbs.", ADMIN_CATEGORY_MAPPING)
SSadmin_verbs.update_visibility_flag(user, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG, FALSE)
BLACKBOX_LOG_ADMIN_VERB("Disable Debug Verbs")
/client/proc/count_objects_on_z_level()
set category = "Mapping"
set name = "Count Objects On Level"
var/level = input("Which z-level?","Level?") as text|null
ADMIN_VERB_VISIBILITY(count_objects_on_z_level, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(count_objects_on_z_level, R_DEBUG, "Count Objects On Z-Level", "Counts the number of objects of a certain type on a specific z-level.", ADMIN_CATEGORY_MAPPING)
var/level = input(user, "Which z-level?","Level?") as text|null
if(!level)
return
var/num_level = text2num(level)
@@ -230,7 +139,7 @@ GLOBAL_LIST_EMPTY(dirty_vars)
if(!isnum(num_level))
return
var/type_text = input("Which type path?","Path?") as text|null
var/type_text = input(user, "Which type path?","Path?") as text|null
if(!type_text)
return
var/type_path = text2path(type_text)
@@ -257,11 +166,9 @@ GLOBAL_LIST_EMPTY(dirty_vars)
to_chat(world, "There are [count] objects of type [type_path] on z-level [num_level]", confidential = TRUE)
BLACKBOX_LOG_ADMIN_VERB("Count Objects Zlevel")
/client/proc/count_objects_all()
set category = "Mapping"
set name = "Count Objects All"
var/type_text = input("Which type path?","") as text|null
ADMIN_VERB_VISIBILITY(count_objects_all, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(count_objects_all, R_DEBUG, "Count Objects All", "Counts the number of objects of a certain type in the game world.", ADMIN_CATEGORY_MAPPING)
var/type_text = input(user, "Which type path?","") as text|null
if(!type_text)
return
var/type_path = text2path(type_text)
@@ -277,23 +184,17 @@ GLOBAL_LIST_EMPTY(dirty_vars)
to_chat(world, "There are [count] objects of type [type_path] in the game world", confidential = TRUE)
BLACKBOX_LOG_ADMIN_VERB("Count Objects All")
//This proc is intended to detect lag problems relating to communication procs
GLOBAL_VAR_INIT(say_disabled, FALSE)
/client/proc/disable_communication()
set category = "Mapping"
set name = "Disable all communication verbs"
ADMIN_VERB_VISIBILITY(disable_communication, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(disable_communication, R_DEBUG, "Disable all communication verbs", "Disables all communication verbs.", ADMIN_CATEGORY_MAPPING)
GLOB.say_disabled = !GLOB.say_disabled
if(GLOB.say_disabled)
message_admins("[key] used 'Disable all communication verbs', killing all communication methods.")
message_admins("[key_name_admin(user)] used 'Disable all communication verbs', killing all communication methods.")
else
message_admins("[key] used 'Disable all communication verbs', restoring all communication methods.")
message_admins("[key_name_admin(user)] used 'Disable all communication verbs', restoring all communication methods.")
//This generates the icon states for job starting location landmarks.
/client/proc/create_mapping_job_icons()
set name = "Generate job landmarks icons"
set category = "Mapping"
ADMIN_VERB_VISIBILITY(create_mapping_job_icons, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(create_mapping_job_icons, R_DEBUG, "Generate job landmarks icons", "Generates job starting location landmarks.", ADMIN_CATEGORY_MAPPING)
var/icon/final = icon()
var/mob/living/carbon/human/dummy/D = new(locate(1,1,1)) //spawn on 1,1,1 so we don't have runtimes when items are deleted
D.setDir(SOUTH)
@@ -317,11 +218,9 @@ GLOBAL_VAR_INIT(say_disabled, FALSE)
final.Insert(icon('icons/hud/screen_gen.dmi', "x[x_number == 1 ? "" : x_number]"), "x[x_number == 1 ? "" : x_number]")
fcopy(final, "icons/mob/landmarks.dmi")
/client/proc/debug_z_levels()
set name = "Debug Z-Levels"
set category = "Mapping"
to_chat(src, examine_block(gather_z_level_information(append_grid = TRUE)), confidential = TRUE)
ADMIN_VERB_VISIBILITY(debug_z_levels, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(debug_z_levels, R_DEBUG, "Debug Z-Levels", "Displays a list of all z-levels and their linkages.", ADMIN_CATEGORY_MAPPING)
to_chat(user, examine_block(gather_z_level_information(append_grid = TRUE)), confidential = TRUE)
/// Returns all necessary z-level information. Argument `append_grid` allows the user to see a table showing all of the z-level linkages, which is only visible and useful in-game.
/proc/gather_z_level_information(append_grid = FALSE)
@@ -383,9 +282,8 @@ GLOBAL_VAR_INIT(say_disabled, FALSE)
return messages.Join("\n")
/client/proc/station_food_debug()
set name = "Count Station Food"
set category = "Mapping"
ADMIN_VERB_VISIBILITY(station_food_debug, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(station_food_debug, R_DEBUG, "Count Station Food", "Counts the number of food items on the station.", ADMIN_CATEGORY_MAPPING)
var/list/foodcount = list()
for(var/obj/item/food/fuck_me in world)
var/turf/location = get_turf(fuck_me)
@@ -402,13 +300,12 @@ GLOBAL_VAR_INIT(say_disabled, FALSE)
var/page_style = "<style>table, th, td {border: 1px solid black;border-collapse: collapse;}</style>"
var/page_contents = "[page_style]<table style=\"width:100%\">[table_header][jointext(table_contents, "")]</table>"
var/datum/browser/popup = new(mob, "fooddebug", "Station Food Count", 600, 400)
var/datum/browser/popup = new(user.mob, "fooddebug", "Station Food Count", 600, 400)
popup.set_content(page_contents)
popup.open()
/client/proc/station_stack_debug()
set name = "Count Station Stacks"
set category = "Mapping"
ADMIN_VERB_VISIBILITY(station_stack_debug, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(station_stack_debug, R_DEBUG, "Count Station Stacks", "Count the stacks of materials on station.", ADMIN_CATEGORY_MAPPING)
var/list/stackcount = list()
for(var/obj/item/stack/fuck_me in world)
var/turf/location = get_turf(fuck_me)
@@ -425,18 +322,13 @@ GLOBAL_VAR_INIT(say_disabled, FALSE)
var/page_style = "<style>table, th, td {border: 1px solid black;border-collapse: collapse;}</style>"
var/page_contents = "[page_style]<table style=\"width:100%\">[table_header][jointext(table_contents, "")]</table>"
var/datum/browser/popup = new(mob, "stackdebug", "Station Stack Count", 600, 400)
var/datum/browser/popup = new(user.mob, "stackdebug", "Station Stack Count", 600, 400)
popup.set_content(page_contents)
popup.open()
/// Check all tiles with a vent or scrubber on it and ensure that nothing is covering it up.
/client/proc/check_for_obstructed_atmospherics()
set name = "Check For Obstructed Atmospherics"
set category = "Mapping"
if(!holder)
to_chat(src, "Only administrators may use this command.", confidential = TRUE)
return
message_admins(span_adminnotice("[key_name_admin(usr)] is checking for obstructed atmospherics through the debug command."))
ADMIN_VERB_VISIBILITY(check_for_obstructed_atmospherics, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(check_for_obstructed_atmospherics, R_DEBUG, "Check For Obstructed Atmospherics", "Checks for obstructions on atmospherics machines.", ADMIN_CATEGORY_MAPPING)
message_admins(span_adminnotice("[key_name_admin(user)] is checking for obstructed atmospherics through the debug command."))
BLACKBOX_LOG_ADMIN_VERB("Check For Obstructed Atmospherics")
var/list/results = list()
@@ -485,17 +377,14 @@ GLOBAL_VAR_INIT(say_disabled, FALSE)
results += "There is an obstruction on top of an atmospherics machine at: [ADMIN_VERBOSEJMP(iterated_turf)].<br>"
if(results.len == 1) // only the header is in the list, we're good
to_chat(src, "No obstructions detected.", confidential = TRUE)
to_chat(user, "No obstructions detected.", confidential = TRUE)
else
var/datum/browser/popup = new(usr, "atmospherics_obstructions", "Atmospherics Obstructions", 900, 750)
var/datum/browser/popup = new(user.mob, "atmospherics_obstructions", "Atmospherics Obstructions", 900, 750)
popup.set_content(results.Join())
popup.open()
/client/proc/modify_lights()
set name = "Toggle Light Debug"
set category = "Mapping"
if(!check_rights(R_DEBUG))
return
ADMIN_VERB_VISIBILITY(modify_lights, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(modify_lights, R_DEBUG, "Toggle Light Debug", "Toggles light debug mode.", ADMIN_CATEGORY_MAPPING)
if(GLOB.light_debug_enabled)
undebug_sources()
return
@@ -507,10 +396,6 @@ GLOBAL_VAR_INIT(say_disabled, FALSE)
CHECK_TICK
debug_sources()
/client/proc/visualize_lights()
set name = "Visualize Lighting Corners"
set category = "Mapping"
if(!check_rights(R_DEBUG))
return
ADMIN_VERB_VISIBILITY(visualize_lights, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
ADMIN_VERB(visualize_lights, R_DEBUG, "Visualize Lighting Corners", "Visualizes the corners of all lights on the station.", ADMIN_CATEGORY_MAPPING)
display_corners()

View File

@@ -1,16 +1,13 @@
/client/proc/forcerandomrotate()
set category = "Server"
set name = "Trigger Random Map Rotation"
var/rotate = tgui_alert(usr,"Force a random map rotation to trigger?", "Rotate map?", list("Yes", "Cancel"))
ADMIN_VERB(force_random_rotate, R_SERVER, "Trigger 'Random' Map Rotation", "Force a map vote.", ADMIN_CATEGORY_SERVER)
var/rotate = tgui_alert(user,"Force a random map rotation to trigger?", "Rotate map?", list("Yes", "Cancel"))
if (rotate != "Yes")
return
message_admins("[key_name_admin(usr)] is forcing a random map rotation.")
log_admin("[key_name(usr)] is forcing a random map rotation.")
message_admins("[key_name_admin(user)] is forcing a random map rotation.")
log_admin("[key_name(user)] is forcing a random map rotation.")
SSmapping.maprotate()
/client/proc/adminchangemap()
set category = "Server"
set name = "Change Map"
ADMIN_VERB(admin_change_map, R_SERVER, "Change Map", "Set the next map.", ADMIN_CATEGORY_SERVER)
var/list/maprotatechoices = list()
for (var/map in config.maplist)
var/datum/map_config/virtual_map = config.maplist[map]
@@ -32,21 +29,21 @@
mapname += "\]"
maprotatechoices[mapname] = virtual_map
var/chosenmap = tgui_input_list(usr, "Choose a map to change to", "Change Map", sort_list(maprotatechoices)|"Custom")
var/chosenmap = tgui_input_list(user, "Choose a map to change to", "Change Map", sort_list(maprotatechoices)|"Custom")
if (isnull(chosenmap))
return
if(chosenmap == "Custom")
message_admins("[key_name_admin(usr)] is changing the map to a custom map")
log_admin("[key_name(usr)] is changing the map to a custom map")
message_admins("[key_name_admin(user)] is changing the map to a custom map")
log_admin("[key_name(user)] is changing the map to a custom map")
var/datum/map_config/virtual_map = new
var/map_file = input("Pick file:", "Map File") as null|file
var/map_file = input(user, "Pick file:", "Map File") as null|file
if(isnull(map_file))
return
if(copytext("[map_file]", -4) != ".dmm")//4 == length(".dmm")
to_chat(src, span_warning("Filename must end in '.dmm': [map_file]"))
to_chat(user, span_warning("Filename must end in '.dmm': [map_file]"))
return
if(fexists("_maps/custom/[map_file]"))
@@ -56,20 +53,20 @@
// This is to make sure the map works so the server does not start without a map.
var/datum/parsed_map/M = new (map_file)
if(!M)
to_chat(src, span_warning("Map '[map_file]' failed to parse properly."))
to_chat(user, span_warning("Map '[map_file]' failed to parse properly."))
return
if(!M.bounds)
to_chat(src, span_warning("Map '[map_file]' has non-existant bounds."))
to_chat(user, span_warning("Map '[map_file]' has non-existant bounds."))
qdel(M)
return
qdel(M)
var/config_file = null
var/list/json_value = list()
var/config = tgui_alert(usr,"Would you like to upload an additional config for this map?", "Map Config", list("Yes", "No"))
var/config = tgui_alert(user,"Would you like to upload an additional config for this map?", "Map Config", list("Yes", "No"))
if(config == "Yes")
config_file = input("Pick file:", "Config JSON File") as null|file
config_file = input(user, "Pick file:", "Config JSON File") as null|file
if(isnull(config_file))
return
if(copytext("[config_file]", -5) != ".json")
@@ -94,18 +91,18 @@
)
else
virtual_map = load_map_config()
virtual_map.map_name = input("Choose the name for the map", "Map Name") as null|text
virtual_map.map_name = input(user, "Choose the name for the map", "Map Name") as null|text
if(isnull(virtual_map.map_name))
virtual_map.map_name = "Custom"
var/shuttles = tgui_alert(usr,"Do you want to modify the shuttles?", "Map Shuttles", list("Yes", "No"))
var/shuttles = tgui_alert(user,"Do you want to modify the shuttles?", "Map Shuttles", list("Yes", "No"))
if(shuttles == "Yes")
for(var/s in virtual_map.shuttles)
var/shuttle = input(s, "Map Shuttles") as null|text
var/shuttle = input(user, s, "Map Shuttles") as null|text
if(!shuttle)
continue
if(!SSmapping.shuttle_templates[shuttle])
to_chat(usr, span_warning("No such shuttle as '[shuttle]' exists, using default."))
to_chat(user, span_warning("No such shuttle as '[shuttle]' exists, using default."))
continue
virtual_map.shuttles[s] = shuttle
@@ -123,13 +120,13 @@
text2file(json_encode(json_value), PATH_TO_NEXT_MAP_JSON)
if(SSmapping.changemap(virtual_map))
message_admins("[key_name_admin(usr)] has changed the map to [virtual_map.map_name]")
message_admins("[key_name_admin(user)] has changed the map to [virtual_map.map_name]")
SSmapping.map_force_chosen = TRUE
fdel("data/custom_map_json/[config_file]")
else
var/datum/map_config/virtual_map = maprotatechoices[chosenmap]
message_admins("[key_name_admin(usr)] is changing the map to [virtual_map.map_name]")
log_admin("[key_name(usr)] is changing the map to [virtual_map.map_name]")
message_admins("[key_name_admin(user)] is changing the map to [virtual_map.map_name]")
log_admin("[key_name(user)] is changing the map to [virtual_map.map_name]")
if (SSmapping.changemap(virtual_map))
message_admins("[key_name_admin(usr)] has changed the map to [virtual_map.map_name]")
message_admins("[key_name_admin(user)] has changed the map to [virtual_map.map_name]")
SSmapping.map_force_chosen = TRUE

View File

@@ -1,8 +1,6 @@
/client/proc/panicbunker()
set category = "Server"
set name = "Toggle Panic Bunker"
ADMIN_VERB(panic_bunker, R_SERVER, "Toggle Panic Bunker", "Toggles the panic bunker for the server.", ADMIN_CATEGORY_SERVER)
if (!CONFIG_GET(flag/sql_enabled))
to_chat(usr, span_adminnotice("The Database is not enabled!"), confidential = TRUE)
to_chat(user, span_adminnotice("The Database is not enabled!"), confidential = TRUE)
return
var/new_pb = !CONFIG_GET(flag/panic_bunker)
@@ -10,28 +8,26 @@
var/time_rec = 0
var/message = ""
if(new_pb)
time_rec = input(src, "How many living minutes should they need to play? 0 to disable.", "Shit's fucked isn't it", CONFIG_GET(number/panic_bunker_living)) as num
message = input(src, "What should they see when they log in?", "MMM", CONFIG_GET(string/panic_bunker_message)) as text
time_rec = input(user, "How many living minutes should they need to play? 0 to disable.", "Shit's fucked isn't it", CONFIG_GET(number/panic_bunker_living)) as num
message = input(user, "What should they see when they log in?", "MMM", CONFIG_GET(string/panic_bunker_message)) as text
message = replacetext(message, "%minutes%", time_rec)
CONFIG_SET(number/panic_bunker_living, time_rec)
CONFIG_SET(string/panic_bunker_message, message)
var/interview_sys = tgui_alert(usr, "Should the interview system be enabled? (Allows players to connect under the hour limit and force them to be manually approved to play)", "Enable interviews?", list("Enable", "Disable"))
var/interview_sys = tgui_alert(user, "Should the interview system be enabled? (Allows players to connect under the hour limit and force them to be manually approved to play)", "Enable interviews?", list("Enable", "Disable"))
interview = interview_sys == "Enable"
CONFIG_SET(flag/panic_bunker_interview, interview)
CONFIG_SET(flag/panic_bunker, new_pb)
log_admin("[key_name(usr)] has toggled the Panic Bunker, it is now [new_pb ? "on and set to [time_rec] with a message of [message]. The interview system is [interview ? "enabled" : "disabled"]" : "off"].")
message_admins("[key_name_admin(usr)] has toggled the Panic Bunker, it is now [new_pb ? "enabled with a living minutes requirement of [time_rec]. The interview system is [interview ? "enabled" : "disabled"]" : "disabled"].")
log_admin("[key_name(user)] has toggled the Panic Bunker, it is now [new_pb ? "on and set to [time_rec] with a message of [message]. The interview system is [interview ? "enabled" : "disabled"]" : "off"].")
message_admins("[key_name_admin(user)] has toggled the Panic Bunker, it is now [new_pb ? "enabled with a living minutes requirement of [time_rec]. The interview system is [interview ? "enabled" : "disabled"]" : "disabled"].")
if (new_pb && !SSdbcore.Connect())
message_admins("The Database is not connected! Panic bunker will not work until the connection is reestablished.")
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Panic Bunker", "[new_pb ? "Enabled" : "Disabled"]")) // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
/client/proc/toggle_interviews()
set category = "Server"
set name = "Toggle PB Interviews"
ADMIN_VERB(toggle_interviews, R_SERVER, "Toggle PB Interviews", "Toggle whether new players will be interviewed or blocked from connecting.", ADMIN_CATEGORY_SERVER)
if (!CONFIG_GET(flag/panic_bunker))
to_chat(usr, span_adminnotice("NOTE: The panic bunker is not enabled, so this change will not effect anything until it is enabled."), confidential = TRUE)
to_chat(user, span_adminnotice("NOTE: The panic bunker is not enabled, so this change will not effect anything until it is enabled."), confidential = TRUE)
var/new_interview = !CONFIG_GET(flag/panic_bunker_interview)
CONFIG_SET(flag/panic_bunker_interview, new_interview)
log_admin("[key_name(usr)] has toggled the Panic Bunker's interview system, it is now [new_interview ? "enabled" : "disabled"].")
message_admins("[key_name(usr)] has toggled the Panic Bunker's interview system, it is now [new_interview ? "enabled" : "disabled"].")
log_admin("[key_name(user)] has toggled the Panic Bunker's interview system, it is now [new_interview ? "enabled" : "disabled"].")
message_admins("[key_name(user)] has toggled the Panic Bunker's interview system, it is now [new_interview ? "enabled" : "disabled"].")

View File

@@ -19,13 +19,8 @@ GENERAL_PROTECT_DATUM(/datum/ticket_log_entry)
GLOBAL_DATUM_INIT(player_ticket_history, /datum/ticket_history_holder, new)
GLOBAL_PROTECT(player_ticket_history)
/client/proc/player_ticket_history()
set name = "Player Ticket History"
set desc = "Allows you to view the ticket history of a player."
set category = "Admin"
if(!check_rights(R_ADMIN))
return
GLOB.player_ticket_history.ui_interact(mob)
ADMIN_VERB(player_ticket_history, R_ADMIN, "Player Ticket History", "Allows you to view the ticket history of a player.", ADMIN_CATEGORY_MAIN)
GLOB.player_ticket_history.ui_interact(user.mob)
/datum/ticket_history_holder
/// Assosciative list of ticket histories. ckey -> list/datum/ticket_history

View File

@@ -3,20 +3,15 @@
#define SHELLEO_STDOUT 2
#define SHELLEO_STDERR 3
/client/proc/play_sound(S as sound)
set category = "Admin.Fun"
set name = "Play Global Sound"
if(!check_rights(R_SOUND))
return
ADMIN_VERB(play_sound, R_SOUND, "Play Global Sound", "Play a sound to all connected players.", ADMIN_CATEGORY_FUN, sound as sound)
var/freq = 1
var/vol = input(usr, "What volume would you like the sound to play at?",, 100) as null|num
var/vol = tgui_input_number(user, "What volume would you like the sound to play at?", max_value = 100)
if(!vol)
return
vol = clamp(vol, 1, 100)
var/sound/admin_sound = new()
admin_sound.file = S
var/sound/admin_sound = new
admin_sound.file = sound
admin_sound.priority = 250
admin_sound.channel = CHANNEL_ADMIN
admin_sound.frequency = freq
@@ -25,15 +20,15 @@
admin_sound.status = SOUND_STREAM
admin_sound.volume = vol
var/res = tgui_alert(usr, "Show the title of this song to the players?",, list("Yes","No", "Cancel"))
var/res = tgui_alert(user, "Show the title of this song to the players?",, list("Yes","No", "Cancel"))
switch(res)
if("Yes")
to_chat(world, span_boldannounce("An admin played: [S]"), confidential = TRUE)
to_chat(world, span_boldannounce("An admin played: [sound]"), confidential = TRUE)
if("Cancel")
return
log_admin("[key_name(src)] played sound [S]")
message_admins("[key_name_admin(src)] played sound [S]")
log_admin("[key_name(user)] played sound [sound]")
message_admins("[key_name_admin(user)] played sound [sound]")
for(var/mob/M in GLOB.player_list)
if(M.client.prefs.read_preference(/datum/preference/toggle/sound_midi))
@@ -43,31 +38,20 @@
BLACKBOX_LOG_ADMIN_VERB("Play Global Sound")
/client/proc/play_local_sound(S as sound)
set category = "Admin.Fun"
set name = "Play Local Sound"
if(!check_rights(R_SOUND))
return
log_admin("[key_name(src)] played a local sound [S]")
message_admins("[key_name_admin(src)] played a local sound [S]")
playsound(get_turf(src.mob), S, 50, FALSE, FALSE)
ADMIN_VERB(play_local_sound, R_SOUND, "Play Local Sound", "Plays a sound only you can hear.", ADMIN_CATEGORY_FUN, sound as sound)
log_admin("[key_name(user)] played a local sound [sound]")
message_admins("[key_name_admin(user)] played a local sound [sound]")
playsound(get_turf(user.mob), sound, 50, FALSE, FALSE)
BLACKBOX_LOG_ADMIN_VERB("Play Local Sound")
/client/proc/play_direct_mob_sound(S as sound, mob/M)
set category = "Admin.Fun"
set name = "Play Direct Mob Sound"
if(!check_rights(R_SOUND))
ADMIN_VERB(play_direct_mob_sound, R_SOUND, "Play Direct Mob Sound", "Play a sound directly to a mob.", ADMIN_CATEGORY_FUN, sound as sound, mob/target in world)
if(!target)
target = input(user, "Choose a mob to play the sound to. Only they will hear it.", "Play Mob Sound") as null|anything in sort_names(GLOB.player_list)
if(QDELETED(target))
return
if(!M)
M = input(usr, "Choose a mob to play the sound to. Only they will hear it.", "Play Mob Sound") as null|anything in sort_names(GLOB.player_list)
if(!M || QDELETED(M))
return
log_admin("[key_name(src)] played a direct mob sound [S] to [M].")
message_admins("[key_name_admin(src)] played a direct mob sound [S] to [ADMIN_LOOKUPFLW(M)].")
SEND_SOUND(M, S)
log_admin("[key_name(user)] played a direct mob sound [sound] to [key_name_admin(target)].")
message_admins("[key_name_admin(user)] played a direct mob sound [sound] to [ADMIN_LOOKUPFLW(target)].")
SEND_SOUND(target, sound)
BLACKBOX_LOG_ADMIN_VERB("Play Direct Mob Sound")
///Takes an input from either proc/play_web_sound or the request manager and runs it through youtube-dl and prompts the user before playing it to the server.
@@ -169,59 +153,41 @@
BLACKBOX_LOG_ADMIN_VERB("Play Internet Sound")
ADMIN_VERB_CUSTOM_EXIST_CHECK(play_web_sound)
return !!CONFIG_GET(string/invoke_youtubedl)
/client/proc/play_web_sound()
set category = "Admin.Fun"
set name = "Play Internet Sound"
if(!check_rights(R_SOUND))
return
var/ytdl = CONFIG_GET(string/invoke_youtubedl)
if(!ytdl)
to_chat(src, span_boldwarning("Youtube-dl was not configured, action unavailable"), confidential = TRUE) //Check config.txt for the INVOKE_YOUTUBEDL value
return
ADMIN_VERB(play_web_sound, R_SOUND, "Play Internet Sound", "Play a given internet sound to all players.", ADMIN_CATEGORY_FUN)
if(S_TIMER_COOLDOWN_TIMELEFT(SStimer, COOLDOWN_INTERNET_SOUND))
if(tgui_alert(usr, "Someone else is already playing an Internet sound! It has [DisplayTimeText(S_TIMER_COOLDOWN_TIMELEFT(SStimer, COOLDOWN_INTERNET_SOUND), 1)] remaining. \
if(tgui_alert(user, "Someone else is already playing an Internet sound! It has [DisplayTimeText(S_TIMER_COOLDOWN_TIMELEFT(SStimer, COOLDOWN_INTERNET_SOUND), 1)] remaining. \
Would you like to override?", "Musicalis Interruptus", list("No","Yes")) != "Yes")
return
var/web_sound_input = tgui_input_text(usr, "Enter content URL (supported sites only, leave blank to stop playing)", "Play Internet Sound", null)
var/web_sound_input = tgui_input_text(user, "Enter content URL (supported sites only, leave blank to stop playing)", "Play Internet Sound", null)
if(length(web_sound_input))
web_sound_input = trim(web_sound_input)
if(findtext(web_sound_input, ":") && !findtext(web_sound_input, GLOB.is_http_protocol))
to_chat(src, span_boldwarning("Non-http(s) URIs are not allowed."), confidential = TRUE)
to_chat(src, span_warning("For youtube-dl shortcuts like ytsearch: please use the appropriate full URL from the website."), confidential = TRUE)
to_chat(user, span_boldwarning("Non-http(s) URIs are not allowed."), confidential = TRUE)
to_chat(user, span_warning("For youtube-dl shortcuts like ytsearch: please use the appropriate full URL from the website."), confidential = TRUE)
return
web_sound(usr, web_sound_input)
web_sound(user.mob, web_sound_input)
else
web_sound(usr, null)
web_sound(user.mob, null)
/client/proc/set_round_end_sound(S as sound)
set category = "Admin.Fun"
set name = "Set Round End Sound"
if(!check_rights(R_SOUND))
return
ADMIN_VERB(set_round_end_sound, R_SOUND, "Set Round End Sound", "Set the sound that plays on round end.", ADMIN_CATEGORY_FUN, sound as sound)
SSticker.SetRoundEndSound(sound)
SSticker.SetRoundEndSound(S)
log_admin("[key_name(src)] set the round end sound to [S]")
message_admins("[key_name_admin(src)] set the round end sound to [S]")
log_admin("[key_name(user)] set the round end sound to [sound]")
message_admins("[key_name_admin(user)] set the round end sound to [sound]")
BLACKBOX_LOG_ADMIN_VERB("Set Round End Sound")
/client/proc/stop_sounds()
set category = "Debug"
set name = "Stop All Playing Sounds"
if(!src.holder)
return
log_admin("[key_name(src)] stopped all currently playing sounds.")
message_admins("[key_name_admin(src)] 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()
ADMIN_VERB(stop_sounds, R_NONE, "Stop All Playing Sounds", "Stops all playing sounds for EVERYONE.", ADMIN_CATEGORY_DEBUG)
log_admin("[key_name(user)] stopped all currently playing sounds.")
message_admins("[key_name_admin(user)] stopped all currently playing sounds.")
for(var/mob/player as anything in GLOB.player_list)
SEND_SOUND(player, sound(null))
var/client/player_client = player.client
player_client?.tgui_panel?.stop_music()
S_TIMER_COOLDOWN_RESET(SStimer, COOLDOWN_INTERNET_SOUND)
BLACKBOX_LOG_ADMIN_VERB("Stop All Playing Sounds")

View File

@@ -1,32 +1,20 @@
/proc/possess(obj/target in world)
set name = "Possess Obj"
set category = "Object"
var/result = usr.AddComponent(/datum/component/object_possession, target)
ADMIN_VERB(possess, R_POSSESS, "Possess Obj", "Possess an object.", ADMIN_CATEGORY_OBJECT, obj/target in world)
var/result = user.mob.AddComponent(/datum/component/object_possession, target)
if(isnull(result)) // trigger a safety movement just in case we yonk
usr.forceMove(get_turf(usr))
user.mob.forceMove(get_turf(user.mob))
return
var/turf/target_turf = get_turf(target)
var/message = "[key_name(usr)] has possessed [target] ([target.type]) at [AREACOORD(target_turf)]"
var/message = "[key_name(user)] has possessed [target] ([target.type]) at [AREACOORD(target_turf)]"
message_admins(message)
log_admin(message)
BLACKBOX_LOG_ADMIN_VERB("Possess Object")
/proc/release()
set name = "Release Obj"
set category = "Object"
qdel(usr.GetComponent(/datum/component/object_possession))
ADMIN_VERB(release, R_POSSESS, "Release Object", "Stop possessing an object.", ADMIN_CATEGORY_OBJECT)
var/possess_component = user.mob.GetComponent(/datum/component/object_possession)
if(!isnull(possess_component))
qdel(possess_component)
BLACKBOX_LOG_ADMIN_VERB("Release Object")
/proc/give_possession_verbs(mob/dude in GLOB.mob_list)
set desc = "Give this guy possess/release verbs"
set category = "Debug"
set name = "Give Possessing Verbs"
add_verb(dude, GLOBAL_PROC_REF(possess))
add_verb(dude, GLOBAL_PROC_REF(release))
BLACKBOX_LOG_ADMIN_VERB("Give Possessing Verbs")

View File

@@ -1,26 +1,24 @@
/client/proc/reestablish_db_connection()
set category = "Server"
set name = "Reestablish DB Connection"
ADMIN_VERB(reestablish_db_connection, R_NONE, "Reestablish DB Connection", "Attempts to (re)establish the DB Connection", ADMIN_CATEGORY_SERVER)
if (!CONFIG_GET(flag/sql_enabled))
to_chat(usr, span_adminnotice("The Database is not enabled!"), confidential = TRUE)
to_chat(user, span_adminnotice("The Database is not enabled!"), confidential = TRUE)
return
if (SSdbcore.IsConnected())
if (!check_rights(R_DEBUG,0))
tgui_alert(usr,"The database is already connected! (Only those with +debug can force a reconnection)", "The database is already connected!")
if (!user.holder.check_for_rights(R_DEBUG))
tgui_alert(user,"The database is already connected! (Only those with +debug can force a reconnection)", "The database is already connected!")
return
var/reconnect = tgui_alert(usr,"The database is already connected! If you *KNOW* that this is incorrect, you can force a reconnection", "The database is already connected!", list("Force Reconnect", "Cancel"))
var/reconnect = tgui_alert(user,"The database is already connected! If you *KNOW* that this is incorrect, you can force a reconnection", "The database is already connected!", list("Force Reconnect", "Cancel"))
if (reconnect != "Force Reconnect")
return
SSdbcore.Disconnect()
log_admin("[key_name(usr)] has forced the database to disconnect")
message_admins("[key_name_admin(usr)] has <b>forced</b> the database to disconnect!")
log_admin("[key_name(user)] has forced the database to disconnect")
message_admins("[key_name_admin(user)] has <b>forced</b> the database to disconnect!")
BLACKBOX_LOG_ADMIN_VERB("Force Reestablished Database Connection")
log_admin("[key_name(usr)] is attempting to re-establish the DB Connection")
message_admins("[key_name_admin(usr)] is attempting to re-establish the DB Connection")
log_admin("[key_name(user)] is attempting to re-establish the DB Connection")
message_admins("[key_name_admin(user)] is attempting to re-establish the DB Connection")
BLACKBOX_LOG_ADMIN_VERB("Reestablished Database Connection")
SSdbcore.failed_connections = 0

View File

@@ -1,7 +1,4 @@
/// Verb for opening the requests manager panel
/client/proc/requests()
set name = "Requests Manager"
set desc = "Open the request manager panel to view all requests during this round"
set category = "Admin.Game"
BLACKBOX_LOG_ADMIN_VERB("Request Manager")
ADMIN_VERB(requests, R_NONE, "Requests Manager", "Open the request manager panel to view all requests during this round", ADMIN_CATEGORY_GAME)
GLOB.requests.ui_interact(usr)
BLACKBOX_LOG_ADMIN_VERB("Request Manager")

View File

@@ -1,12 +1,9 @@
GLOBAL_DATUM(everyone_an_antag, /datum/everyone_is_an_antag_controller)
/client/proc/secrets() //Creates a verb for admins to open up the ui
set name = "Secrets"
set desc = "Abuse harder than you ever have before with this handy dandy semi-misc stuff menu"
set category = "Admin.Game"
ADMIN_VERB(secrets, R_NONE, "Secrets", "Abuse harder than you ever have before with this handy dandy semi-misc stuff menu.", ADMIN_CATEGORY_GAME)
var/datum/secrets_menu/tgui = new(user)
tgui.ui_interact(user.mob)
BLACKBOX_LOG_ADMIN_VERB("Secrets Panel")
var/datum/secrets_menu/tgui = new(usr)//create the datum
tgui.ui_interact(usr)//datum has a tgui component, here we open the window
/datum/secrets_menu
var/client/holder //client of whoever is using this datum
@@ -102,25 +99,25 @@ GLOBAL_DATUM(everyone_an_antag, /datum/everyone_is_an_antag_controller)
D.cure(0)
if("list_bombers")
holder.list_bombers()
holder.holder.list_bombers()
if("list_signalers")
holder.list_signalers()
holder.holder.list_signalers()
if("list_lawchanges")
holder.list_law_changes()
holder.holder.list_law_changes()
if("showailaws")
holder.check_ai_laws()
holder.holder.list_law_changes()
if("manifest")
holder.show_manifest()
holder.holder.show_manifest()
if("dna")
holder.list_dna()
holder.holder.list_dna()
if("fingerprints")
holder.list_fingerprints()
holder.holder.list_fingerprints()
if("ctfbutton")
toggle_id_ctf(holder, CTF_GHOST_CTF_GAME_ID)

View File

@@ -1,10 +1,6 @@
/client/proc/cmd_select_equipment(mob/target in GLOB.mob_list)
set category = "Admin.Events"
set name = "Select equipment"
var/datum/select_equipment/ui = new(usr, target)
ui.ui_interact(usr)
ADMIN_VERB_ONLY_CONTEXT_MENU(select_equipment, R_FUN, "Select Equipment", mob/target in world)
var/datum/select_equipment/ui = new(user, target)
ui.ui_interact(user.mob)
/*
* This is the datum housing the select equipment UI.
@@ -152,7 +148,7 @@
return custom_outfit
/datum/select_equipment/ui_act(action, params)
/datum/select_equipment/ui_act(action, params, datum/tgui/ui, datum/ui_state/state)
if(..())
return
. = TRUE
@@ -181,7 +177,7 @@
user.admin_apply_outfit(target_mob, new_outfit)
if("customoutfit")
user.outfit_manager()
return SSadmin_verbs.dynamic_invoke_verb(ui.user, /datum/admin_verb/outfit_manager)
if("togglefavorite")
var/datum/outfit/outfit_path = resolve_outfit(params["path"])

View File

@@ -1,191 +1,147 @@
// Server Tab - Server Verbs
/client/proc/toggle_random_events()
set category = "Server"
set name = "Toggle random events on/off"
set desc = "Toggles random events such as meteors, black holes, blob (but not space dust) on/off"
ADMIN_VERB(toggle_random_events, R_SERVER, "Toggle Random Events", "Toggles random events on or off.", ADMIN_CATEGORY_SERVER)
var/new_are = !CONFIG_GET(flag/allow_random_events)
CONFIG_SET(flag/allow_random_events, new_are)
message_admins("[key_name_admin(usr)] has [new_are ? "enabled" : "disabled"] random events.")
message_admins("[key_name_admin(user)] has [new_are ? "enabled" : "disabled"] random events.")
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Random Events", "[new_are ? "Enabled" : "Disabled"]")) // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
/client/proc/toggle_hub()
set category = "Server"
set name = "Toggle Hub"
ADMIN_VERB(toggle_hub, R_SERVER, "Toggle Hub", "Toggles the server's visilibility on the BYOND Hub.", ADMIN_CATEGORY_SERVER)
world.update_hub_visibility(!GLOB.hub_visibility)
log_admin("[key_name(usr)] has toggled the server's hub status for the round, it is now [(GLOB.hub_visibility?"on":"off")] the hub.")
message_admins("[key_name_admin(usr)] has toggled the server's hub status for the round, it is now [(GLOB.hub_visibility?"on":"off")] the hub.")
log_admin("[key_name(user)] has toggled the server's hub status for the round, it is now [(GLOB.hub_visibility?"on":"off")] the hub.")
message_admins("[key_name_admin(user)] has toggled the server's hub status for the round, it is now [(GLOB.hub_visibility?"on":"off")] the hub.")
if (GLOB.hub_visibility && !world.reachable)
message_admins("WARNING: The server will not show up on the hub because byond is detecting that a filewall is blocking incoming connections.")
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggled Hub Visibility", "[GLOB.hub_visibility ? "Enabled" : "Disabled"]")) // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
/datum/admins/proc/restart()
set category = "Server"
set name = "Reboot World"
set desc = "Restarts the world immediately"
if (!usr.client.holder)
return
var/localhost_addresses = list("127.0.0.1", "::1")
ADMIN_VERB(restart, R_SERVER, "Reboot World", "Restarts the world immediately.", ADMIN_CATEGORY_SERVER)
var/list/options = list("Regular Restart", "Regular Restart (with delay)", "Hard Restart (No Delay/Feeback Reason)", "Hardest Restart (No actions, just reboot)")
if(world.TgsAvailable())
options += "Server Restart (Kill and restart DD)";
if(SSticker.admin_delay_notice)
if(alert(usr, "Are you sure? An admin has already delayed the round end for the following reason: [SSticker.admin_delay_notice]", "Confirmation", "Yes", "No") != "Yes")
if(alert(user, "Are you sure? An admin has already delayed the round end for the following reason: [SSticker.admin_delay_notice]", "Confirmation", "Yes", "No") != "Yes")
return FALSE
var/result = input(usr, "Select reboot method", "World Reboot", options[1]) as null|anything in options
if(result)
BLACKBOX_LOG_ADMIN_VERB("Reboot World")
var/init_by = "Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key]."
switch(result)
if("Regular Restart")
if(!(isnull(usr.client.address) || (usr.client.address in localhost_addresses)))
if(alert(usr, "Are you sure you want to restart the server?","This server is live", "Restart", "Cancel") != "Restart")
return FALSE
SSticker.Reboot(init_by, "admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]", 10)
if("Regular Restart (with delay)")
var/delay = input("What delay should the restart have (in seconds)?", "Restart Delay", 5) as num|null
if(!delay)
var/result = input(user, "Select reboot method", "World Reboot", options[1]) as null|anything in options
if(isnull(result))
return
BLACKBOX_LOG_ADMIN_VERB("Reboot World")
var/init_by = "Initiated by [user.holder.fakekey ? "Admin" : user.key]."
switch(result)
if("Regular Restart")
if(!user.is_localhost())
if(alert(user, "Are you sure you want to restart the server?","This server is live", "Restart", "Cancel") != "Restart")
return FALSE
if(!(isnull(usr.client.address) || (usr.client.address in localhost_addresses)))
if(alert(usr,"Are you sure you want to restart the server?","This server is live", "Restart", "Cancel") != "Restart")
return FALSE
SSticker.Reboot(init_by, "admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]", delay * 10)
if("Hard Restart (No Delay, No Feeback Reason)")
to_chat(world, "World reboot - [init_by]")
world.Reboot()
if("Hardest Restart (No actions, just reboot)")
to_chat(world, "Hard world reboot - [init_by]")
world.Reboot(fast_track = TRUE)
if("Server Restart (Kill and restart DD)")
to_chat(world, "Server restart - [init_by]")
world.TgsEndProcess()
SSticker.Reboot(init_by, "admin reboot - by [user.key] [user.holder.fakekey ? "(stealth)" : ""]", 10)
if("Regular Restart (with delay)")
var/delay = input("What delay should the restart have (in seconds)?", "Restart Delay", 5) as num|null
if(!delay)
return FALSE
if(!user.is_localhost())
if(alert(user,"Are you sure you want to restart the server?","This server is live", "Restart", "Cancel") != "Restart")
return FALSE
SSticker.Reboot(init_by, "admin reboot - by [user.key] [user.holder.fakekey ? "(stealth)" : ""]", delay * 10)
if("Hard Restart (No Delay, No Feeback Reason)")
to_chat(world, "World reboot - [init_by]")
world.Reboot()
if("Hardest Restart (No actions, just reboot)")
to_chat(world, "Hard world reboot - [init_by]")
world.Reboot(fast_track = TRUE)
if("Server Restart (Kill and restart DD)")
to_chat(world, "Server restart - [init_by]")
world.TgsEndProcess()
/datum/admins/proc/end_round()
set category = "Server"
set name = "End Round"
set desc = "Attempts to produce a round end report and then restart the server organically."
if (!usr.client.holder)
ADMIN_VERB(end_round, R_SERVER, "End Round", "Forcibly ends the round and allows the server to restart normally.", ADMIN_CATEGORY_SERVER)
var/confirm = tgui_alert(user, "End the round and restart the game world?", "End Round", list("Yes", "Cancel"))
if(confirm != "Yes")
return
var/confirm = tgui_alert(usr, "End the round and restart the game world?", "End Round", list("Yes", "Cancel"))
if(confirm == "Cancel")
return
if(confirm == "Yes")
SSticker.force_ending = FORCE_END_ROUND
BLACKBOX_LOG_ADMIN_VERB("End Round")
SSticker.force_ending = FORCE_END_ROUND
BLACKBOX_LOG_ADMIN_VERB("End Round")
/datum/admins/proc/toggleooc()
set category = "Server"
set desc = "Toggle dis bitch"
set name = "Toggle OOC"
ADMIN_VERB(toggle_ooc, R_ADMIN, "Toggle OOC", "Toggle the OOC channel on or off.", ADMIN_CATEGORY_SERVER)
toggle_ooc()
log_admin("[key_name(usr)] toggled OOC.")
message_admins("[key_name_admin(usr)] toggled OOC.")
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle OOC", "[GLOB.ooc_allowed ? "Enabled" : "Disabled"]")) // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
log_admin("[key_name(user)] toggled OOC.")
message_admins("[key_name_admin(user)] toggled OOC.")
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle OOC", "[GLOB.ooc_allowed ? "Enabled" : "Disabled"]"))
/datum/admins/proc/toggleoocdead()
set category = "Server"
set desc = "Toggle dis bitch"
set name = "Toggle Dead OOC"
ADMIN_VERB(toggle_ooc_dead, R_ADMIN, "Toggle Dead OOC", "Toggle the OOC channel for dead players on or off.", ADMIN_CATEGORY_SERVER)
toggle_dooc()
log_admin("[key_name(user)] toggled OOC.")
message_admins("[key_name_admin(user)] toggled Dead OOC.")
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Dead OOC", "[GLOB.dooc_allowed ? "Enabled" : "Disabled"]"))
log_admin("[key_name(usr)] toggled OOC.")
message_admins("[key_name_admin(usr)] toggled Dead OOC.")
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Dead OOC", "[GLOB.dooc_allowed ? "Enabled" : "Disabled"]")) // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
ADMIN_VERB(start_now, R_SERVER, "Start Now", "Start the round RIGHT NOW.", ADMIN_CATEGORY_SERVER)
var/static/list/waiting_states = list(GAME_STATE_PREGAME, GAME_STATE_STARTUP)
if(!(SSticker.current_state in waiting_states))
to_chat(user, span_warning(span_red("The game has already started!")))
return
/datum/admins/proc/startnow()
set category = "Server"
set desc = "Start the round RIGHT NOW"
set name = "Start Now"
if(SSticker.current_state == GAME_STATE_PREGAME || SSticker.current_state == GAME_STATE_STARTUP)
if(!SSticker.start_immediately)
var/localhost_addresses = list("127.0.0.1", "::1")
if(!(isnull(usr.client.address) || (usr.client.address in localhost_addresses)))
if(tgui_alert(usr, "Are you sure you want to start the round?","Start Now",list("Start Now","Cancel")) != "Start Now")
return FALSE
SSticker.start_immediately = TRUE
log_admin("[usr.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("<font color='blue'>[usr.key] has started the game.[msg]</font>")
BLACKBOX_LOG_ADMIN_VERB("Start Now")
return TRUE
if(SSticker.start_immediately)
SSticker.start_immediately = FALSE
SSticker.SetTimeLeft(1800)
to_chat(world, span_infoplain(span_bold("The game will start in 180 seconds.")))
SSticker.SetTimeLeft(3 MINUTES)
to_chat(world, span_big(span_notice("The game will start in 3 minutes.")))
SEND_SOUND(world, sound('sound/ai/default/attention.ogg'))
message_admins("<font color='blue'>[usr.key] has cancelled immediate game start. Game will start in 180 seconds.</font>")
log_admin("[usr.key] has cancelled immediate game start.")
else
to_chat(usr, "<span class='warningplain'><font color='red'>Error: Start Now: Game has already started.</font></span>")
return FALSE
/datum/admins/proc/delay_round_end()
set category = "Server"
set desc = "Prevent the server from restarting"
set name = "Delay Round End"
if(!check_rights(R_SERVER))
message_admins(span_adminnotice("[key_name_admin(user)] has cancelled immediate game start. Game will start in 3 minutes."))
log_admin("[key_name(user)] has cancelled immediate game start.")
return
if(!user.is_localhost())
var/response = tgui_alert(user, "Are you sure you want to start the round?", "Start Now", list("Start Now", "Cancel"))
if(response != "Start Now")
return
SSticker.start_immediately = TRUE
log_admin("[key_name(user)] has started the game.")
message_admins("[key_name_admin(user)] has started the game.")
if(SSticker.current_state == GAME_STATE_STARTUP)
message_admins("The server is still setting up, but the round will be started as soon as possible.")
BLACKBOX_LOG_ADMIN_VERB("Start Now")
ADMIN_VERB(delay_round_end, R_SERVER, "Delay Round End", "Prevent the server from restarting.", ADMIN_CATEGORY_SERVER)
if(SSticker.delay_end)
tgui_alert(usr, "The round end is already delayed. The reason for the current delay is: \"[SSticker.admin_delay_notice]\"", "Alert", list("Ok"))
tgui_alert(user, "The round end is already delayed. The reason for the current delay is: \"[SSticker.admin_delay_notice]\"", "Alert", list("Ok"))
return
var/delay_reason = input(usr, "Enter a reason for delaying the round end", "Round Delay Reason") as null|text
var/delay_reason = input(user, "Enter a reason for delaying the round end", "Round Delay Reason") as null|text
if(isnull(delay_reason))
return
if(SSticker.delay_end)
tgui_alert(usr, "The round end is already delayed. The reason for the current delay is: \"[SSticker.admin_delay_notice]\"", "Alert", list("Ok"))
tgui_alert(user, "The round end is already delayed. The reason for the current delay is: \"[SSticker.admin_delay_notice]\"", "Alert", list("Ok"))
return
SSticker.delay_end = TRUE
SSticker.admin_delay_notice = delay_reason
log_admin("[key_name(usr)] delayed the round end for reason: [SSticker.admin_delay_notice]")
message_admins("[key_name_admin(usr)] delayed the round end for reason: [SSticker.admin_delay_notice]")
log_admin("[key_name(user)] delayed the round end for reason: [SSticker.admin_delay_notice]")
message_admins("[key_name_admin(user)] delayed the round end for reason: [SSticker.admin_delay_notice]")
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Delay Round End", "Reason: [delay_reason]")) // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
/datum/admins/proc/toggleenter()
set category = "Server"
set desc = "People can't enter"
set name = "Toggle Entering"
ADMIN_VERB(toggle_enter, R_SERVER, "Toggle Entering", "Toggle the ability to enter the game.", ADMIN_CATEGORY_SERVER)
if(!SSlag_switch.initialized)
return
SSlag_switch.set_measure(DISABLE_NON_OBSJOBS, !SSlag_switch.measures[DISABLE_NON_OBSJOBS])
log_admin("[key_name(usr)] toggled new player game entering. Lag Switch at index ([DISABLE_NON_OBSJOBS])")
message_admins("[key_name_admin(usr)] toggled new player game entering [SSlag_switch.measures[DISABLE_NON_OBSJOBS] ? "OFF" : "ON"].")
log_admin("[key_name(user)] toggled new player game entering. Lag Switch at index ([DISABLE_NON_OBSJOBS])")
message_admins("[key_name_admin(user)] toggled new player game entering [SSlag_switch.measures[DISABLE_NON_OBSJOBS] ? "OFF" : "ON"].")
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Entering", "[!SSlag_switch.measures[DISABLE_NON_OBSJOBS] ? "Enabled" : "Disabled"]")) // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
/datum/admins/proc/toggleAI()
set category = "Server"
set desc = "People can't be AI"
set name = "Toggle AI"
ADMIN_VERB(toggle_ai, R_SERVER, "Toggle AI", "Toggle the ability to choose AI jobs.", ADMIN_CATEGORY_SERVER)
var/alai = CONFIG_GET(flag/allow_ai)
CONFIG_SET(flag/allow_ai, !alai)
if (alai)
to_chat(world, span_bold("The AI job is no longer chooseable."), confidential = TRUE)
else
to_chat(world, span_bold("The AI job is chooseable now."), confidential = TRUE)
log_admin("[key_name(usr)] toggled AI allowed.")
to_chat(world, "<B>The AI job is chooseable now.</B>", confidential = TRUE)
log_admin("[key_name(user)] toggled AI allowed.")
world.update_status()
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle AI", "[!alai ? "Disabled" : "Enabled"]")) // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
/datum/admins/proc/toggleaban()
set category = "Server"
set desc = "Respawn basically"
set name = "Toggle Respawn"
ADMIN_VERB(toggle_respawn, R_SERVER, "Toggle Respawn", "Toggle the ability to respawn.", ADMIN_CATEGORY_SERVER)
var/respawn_state = CONFIG_GET(flag/allow_respawn)
var/new_state = -1
var/new_state_text = ""
@@ -203,80 +159,71 @@
if(RESPAWN_FLAG_NEW_CHARACTER) // respawn currently enabled for different slot characters only
new_state = RESPAWN_FLAG_DISABLED
new_state_text = "Disabled"
to_chat(world, span_bold("You may no longer respawn :("), confidential = TRUE)
to_chat(world, span_bold("You may no longer respawn."), confidential = TRUE)
else
WARNING("Invalid respawn state in config: [respawn_state]")
if(new_state == -1)
to_chat(usr, span_warning("The config for respawn is set incorrectly, please complain to your nearest server host (or fix it yourself). \
to_chat(user, span_warning("The config for respawn is set incorrectly, please complain to your nearest server host (or fix it yourself). \
In the meanwhile respawn has been set to \"Off\"."))
new_state = RESPAWN_FLAG_DISABLED
new_state_text = "Disabled"
CONFIG_SET(flag/allow_respawn, new_state)
message_admins(span_adminnotice("[key_name_admin(usr)] toggled respawn to \"[new_state_text]\"."))
log_admin("[key_name(usr)] toggled respawn to \"[new_state_text]\".")
message_admins(span_adminnotice("[key_name_admin(user)] toggled respawn to \"[new_state_text]\"."))
log_admin("[key_name(user)] toggled respawn to \"[new_state_text]\".")
world.update_status()
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Respawn", "[new_state_text]")) // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
/datum/admins/proc/delay()
set category = "Server"
set desc = "Delay the game start"
set name = "Delay Pre-Game"
var/newtime = input("Set a new time in seconds. Set -1 for indefinite delay.","Set Delay",round(SSticker.GetTimeLeft()/10)) as num|null
ADMIN_VERB(delay, R_SERVER, "Delay Pre-Game", "Delay the game start.", ADMIN_CATEGORY_SERVER)
var/newtime = input(user, "Set a new time in seconds. Set -1 for indefinite delay.", "Set Delay", round(SSticker.GetTimeLeft()/10)) as num|null
if(!newtime)
return
if(SSticker.current_state > GAME_STATE_PREGAME)
return tgui_alert(usr, "Too late... The game has already started!")
return tgui_alert(user, "Too late... The game has already started!")
newtime = newtime*10
SSticker.SetTimeLeft(newtime)
SSticker.start_immediately = FALSE
if(newtime < 0)
to_chat(world, span_infoplain(span_bold("The game start has been delayed.")), confidential = TRUE)
log_admin("[key_name(usr)] delayed the round start.")
to_chat(world, "<span class='infoplain'><b>The game start has been delayed.</b></span>", confidential = TRUE)
log_admin("[key_name(user)] delayed the round start.")
else
to_chat(world, span_infoplain(span_bold("The game will start in [DisplayTimeText(newtime)].")), confidential = TRUE)
SEND_SOUND(world, sound('sound/ai/default/attention.ogg'))
log_admin("[key_name(usr)] set the pre-game delay to [DisplayTimeText(newtime)].")
log_admin("[key_name(user)] set the pre-game delay to [DisplayTimeText(newtime)].")
BLACKBOX_LOG_ADMIN_VERB("Delay Game Start")
/datum/admins/proc/set_admin_notice()
set category = "Server"
set name = "Set Admin Notice"
set desc ="Set an announcement that appears to everyone who joins the server. Only lasts this round"
if(!check_rights(0))
return
var/new_admin_notice = input(src,"Set a public notice for this round. Everyone who joins the server will see it.\n(Leaving it blank will delete the current notice):","Set Notice",GLOB.admin_notice) as message|null
ADMIN_VERB(set_admin_notice, R_SERVER, "Set Admin Notice", "Set an announcement that appears to everyone who joins the server. Only lasts this round.", ADMIN_CATEGORY_SERVER)
var/new_admin_notice = input(
user,
"Set a public notice for this round. Everyone who joins the server will see it.\n(Leaving it blank will delete the current notice):",
"Set Notice",
GLOB.admin_notice,
) as message|null
if(new_admin_notice == null)
return
if(new_admin_notice == GLOB.admin_notice)
return
if(new_admin_notice == "")
message_admins("[key_name(usr)] removed the admin notice.")
log_admin("[key_name(usr)] removed the admin notice:\n[GLOB.admin_notice]")
message_admins("[key_name(user)] removed the admin notice.")
log_admin("[key_name(user)] removed the admin notice:\n[GLOB.admin_notice]")
else
message_admins("[key_name(usr)] set the admin notice.")
log_admin("[key_name(usr)] set the admin notice:\n[new_admin_notice]")
message_admins("[key_name(user)] set the admin notice.")
log_admin("[key_name(user)] set the admin notice:\n[new_admin_notice]")
to_chat(world, span_adminnotice("<b>Admin Notice:</b>\n \t [new_admin_notice]"), confidential = TRUE)
BLACKBOX_LOG_ADMIN_VERB("Set Admin Notice")
GLOB.admin_notice = new_admin_notice
return
/datum/admins/proc/toggleguests()
set category = "Server"
set desc = "Guests can't enter"
set name = "Toggle guests"
ADMIN_VERB(toggle_guests, R_SERVER, "Toggle Guests", "Toggle the ability for guests to enter the game.", ADMIN_CATEGORY_SERVER)
var/new_guest_ban = !CONFIG_GET(flag/guest_ban)
CONFIG_SET(flag/guest_ban, new_guest_ban)
if (new_guest_ban)
to_chat(world, span_bold("Guests may no longer enter the game."), confidential = TRUE)
else
to_chat(world, span_bold("Guests may now enter the game."), confidential = TRUE)
log_admin("[key_name(usr)] toggled guests game entering [!new_guest_ban ? "" : "dis"]allowed.")
message_admins(span_adminnotice("[key_name_admin(usr)] toggled guests game entering [!new_guest_ban ? "" : "dis"]allowed."))
to_chat(world, "<B>Guests may now enter the game.</B>", confidential = TRUE)
log_admin("[key_name(user)] toggled guests game entering [!new_guest_ban ? "" : "dis"]allowed.")
message_admins(span_adminnotice("[key_name_admin(user)] toggled guests game entering [!new_guest_ban ? "" : "dis"]allowed."))
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Guests", "[!new_guest_ban ? "Enabled" : "Disabled"]")) // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!

View File

@@ -1,13 +1,5 @@
/datum/admins/proc/open_shuttlepanel()
set category = "Admin.Events"
set name = "Shuttle Manipulator"
set desc = "Opens the shuttle manipulator UI."
if(!check_rights(R_ADMIN))
return
SSshuttle.ui_interact(usr)
ADMIN_VERB(shuttle_panel, R_ADMIN, "Shuttle Manipulator", "Opens the shuttle manipulator UI.", ADMIN_CATEGORY_EVENTS)
SSshuttle.ui_interact(user.mob)
/obj/docking_port/mobile/proc/admin_fly_shuttle(mob/user)
var/list/options = list()

View File

@@ -1,11 +1,4 @@
/datum/admins/proc/spawn_objasmob(object as text)
set category = "Debug"
set desc = "(obj path) Spawn object-mob"
set name = "Spawn object-mob"
if(!check_rights(R_SPAWN))
return
ADMIN_VERB(spawn_obj_as_mob, R_SPAWN, "Spawn Object-Mob", "Spawn an object as if it were a mob.", ADMIN_CATEGORY_DEBUG, object as text)
var/chosen = pick_closest_path(object, make_types_fancy(subtypesof(/obj)))
if (!chosen)
@@ -15,21 +8,63 @@
var/obj/chosen_obj = text2path(chosen)
var/list/settings = list(
"mainsettings" = list(
"name" = list("desc" = "Name", "type" = "string", "value" = "Bob"),
"maxhealth" = list("desc" = "Max. health", "type" = "number", "value" = 100),
"access" = list("desc" = "Access ID", "type" = "datum", "path" = "/obj/item/card/id", "value" = "Default"),
"objtype" = list("desc" = "Base obj type", "type" = "datum", "path" = "/obj", "value" = "[chosen]"),
"googlyeyes" = list("desc" = "Googly eyes", "type" = "boolean", "value" = "No"),
"disableai" = list("desc" = "Disable AI", "type" = "boolean", "value" = "Yes"),
"idledamage" = list("desc" = "Damaged while idle", "type" = "boolean", "value" = "No"),
"dropitem" = list("desc" = "Drop obj on death", "type" = "boolean", "value" = "Yes"),
"mobtype" = list("desc" = "Base mob type", "type" = "datum", "path" = "/mob/living/simple_animal/hostile/mimic/copy", "value" = "/mob/living/simple_animal/hostile/mimic/copy"),
"ckey" = list("desc" = "ckey", "type" = "ckey", "value" = "none"),
var/list/settings = list("mainsettings" = list(
"name" = list(
"desc" = "Name",
"type" = "string",
"value" = "Bob",
),
"maxhealth" = list(
"desc" = "Max. health",
"type" = "number",
"value" = 100,
),
"access" = list(
"desc" = "Access ID",
"type" = "datum",
"path" = "/obj/item/card/id",
"value" = "Default",
),
"objtype" = list(
"desc" = "Base obj type",
"type" = "datum",
"path" = "/obj",
"value" = "[chosen]",
),
"googlyeyes" = list(
"desc" = "Googly eyes",
"type" = "boolean",
"value" = "No",
),
"disableai" = list(
"desc" = "Disable AI",
"type" = "boolean",
"value" = "Yes",
),
"idledamage" = list(
"desc" = "Damaged while idle",
"type" = "boolean",
"value" = "No",
),
"dropitem" = list(
"desc" = "Drop obj on death",
"type" = "boolean",
"value" = "Yes",
),
"mobtype" = list(
"desc" = "Base mob type",
"type" = "datum",
"path" = "/mob/living/simple_animal/hostile/mimic/copy",
"value" = "/mob/living/simple_animal/hostile/mimic/copy",
),
"ckey" = list(
"desc" = "ckey",
"type" = "ckey",
"value" = "none",
),
))
var/list/prefreturn = presentpreflikepicker(usr,"Customize mob", "Customize mob", Button1="Ok", width = 450, StealFocus = 1,Timeout = 0, settings=settings)
var/list/prefreturn = presentpreflikepicker(user.mob,"Customize mob", "Customize mob", Button1="Ok", width = 450, StealFocus = 1,Timeout = 0, settings=settings)
if (prefreturn["button"] == 1)
settings = prefreturn["settings"]
var/mainsettings = settings["mainsettings"]
@@ -37,9 +72,9 @@
basemob = text2path(mainsettings["mobtype"]["value"])
if (!ispath(basemob, /mob/living/simple_animal/hostile/mimic/copy) || !ispath(chosen_obj, /obj))
to_chat(usr, "Mob or object path invalid", confidential = TRUE)
to_chat(user.mob, "Mob or object path invalid", confidential = TRUE)
basemob = new basemob(get_turf(usr), new chosen_obj(get_turf(usr)), usr, mainsettings["dropitem"]["value"] == "Yes" ? FALSE : TRUE, (mainsettings["googlyeyes"]["value"] == "Yes" ? FALSE : TRUE))
basemob = new basemob(get_turf(user.mob), new chosen_obj(get_turf(user.mob)), user.mob, mainsettings["dropitem"]["value"] == "Yes" ? FALSE : TRUE, (mainsettings["googlyeyes"]["value"] == "Yes" ? FALSE : TRUE))
if (mainsettings["disableai"]["value"] == "Yes")
basemob.toggle_ai(AI_OFF)
@@ -65,5 +100,5 @@
basemob.ckey = mainsettings["ckey"]["value"]
log_admin("[key_name(usr)] spawned a sentient object-mob [basemob] from [chosen_obj] at [AREACOORD(usr)]")
log_admin("[key_name(user.mob)] spawned a sentient object-mob [basemob] from [chosen_obj] at [AREACOORD(user.mob)]")
BLACKBOX_LOG_ADMIN_VERB("Spawn object-mob")

View File

@@ -0,0 +1,43 @@
// Admin Verbs in this file are special and cannot use the AVD system for some reason or another.
/client/proc/show_verbs()
set name = "Adminverbs - Show"
set category = ADMIN_CATEGORY_MAIN
remove_verb(src, /client/proc/show_verbs)
add_admin_verbs()
to_chat(src, span_interface("All of your adminverbs are now visible."), confidential = TRUE)
BLACKBOX_LOG_ADMIN_VERB("Show Adminverbs")
/client/proc/readmin()
set name = "Readmin"
set category = "Admin"
set desc = "Regain your admin powers."
var/datum/admins/A = GLOB.deadmins[ckey]
if(!A)
A = GLOB.admin_datums[ckey]
if (!A)
var/msg = " is trying to readmin but they have no deadmin entry"
message_admins("[key_name_admin(src)][msg]")
log_admin_private("[key_name(src)][msg]")
return
A.associate(src)
if (!holder)
return //This can happen if an admin attempts to vv themself into somebody elses's deadmin datum by getting ref via brute force
to_chat(src, span_interface("You are now an admin."), confidential = TRUE)
message_admins("[src] re-adminned themselves.")
log_admin("[src] re-adminned themselves.")
BLACKBOX_LOG_ADMIN_VERB("Readmin")
/client/proc/admin_2fa_verify()
set name = "Verify Admin"
set category = "Admin"
var/datum/admins/admin = GLOB.admin_datums[ckey]
admin?.associate(src)

View File

@@ -8,10 +8,8 @@
holder.RegisterSignal(holder.marked_datum, COMSIG_QDELETING, TYPE_PROC_REF(/datum/admins, handle_marked_del))
vv_update_display(D, "marked", VV_MSG_MARKED)
/client/proc/mark_datum_mapview(datum/D as mob|obj|turf|area in view(view))
set category = "Debug"
set name = "Mark Object"
mark_datum(D)
ADMIN_VERB_ONLY_CONTEXT_MENU(mark_datum, R_NONE, "Mark Object", datum/target as mob|obj|turf|area in view())
user.mark_datum(target)
/datum/admins/proc/handle_marked_del(datum/source)
SIGNAL_HANDLER

View File

@@ -12,7 +12,5 @@
else
holder.add_tagged_datum(target_datum)
/client/proc/tag_datum_mapview(datum/target_datum as mob|obj|turf|area in view(view))
set category = "Debug"
set name = "Tag Datum"
tag_datum(target_datum)
ADMIN_VERB_ONLY_CONTEXT_MENU(tag_datum, R_NONE, "Tag Datum", datum/target_datum as mob|obj|turf|area in view())
user.tag_datum(target_datum)

View File

@@ -140,6 +140,7 @@
return
var/datum/greyscale_modify_menu/menu = new(target, usr, SSgreyscale.configurations, unlocked = TRUE)
menu.ui_interact(usr)
if(href_list[VV_HK_CALLPROC])
usr.client.callproc_datum(target)
if(href_list[VV_HK_CALLPROC])
return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/call_proc_datum, target)

View File

@@ -1,3 +1,7 @@
ADMIN_VERB_AND_CONTEXT_MENU(debug_variables, R_NONE, "View Variables", "View the variables of a datum.", ADMIN_CATEGORY_DEBUG, datum/thing in world)
user.debug_variables(thing)
// This is kept as a seperate proc because admins are able to show VV to non-admins
/client/proc/debug_variables(datum/thing in world)
set category = "Debug"
set name = "View Variables"

View File

@@ -1,11 +1,5 @@
/client/proc/cmd_admin_debug_traitor_objectives()
set name = "Debug Traitor Objectives"
set category = "Debug"
if(!check_rights(R_DEBUG))
return
SStraitor.traitor_debug_panel?.ui_interact(usr)
ADMIN_VERB(debug_traitor_objectives, R_DEBUG, "Debug Traitor Objectives", "Verify functionality of traitor goals.", ADMIN_CATEGORY_DEBUG)
SStraitor.traitor_debug_panel?.ui_interact(user.mob)
/datum/traitor_objective_debug
var/list/all_objectives

View File

@@ -1,7 +1,4 @@
/client/proc/GeneratePipeSpritesheet()
set name = "Generate Pipe Spritesheet"
set category = "Debug"
ADMIN_VERB(generate_pipe_spritesheet, R_DEBUG, "Generate Pipe Spritesheet", "Generates the pipe spritesheets.", ADMIN_CATEGORY_DEBUG)
var/datum/pipe_icon_generator/generator = new
generator.Start()
fcopy(generator.generated_icons, "icons/obj/pipes_n_cables/!pipes_bitmask.dmi")

View File

@@ -16,11 +16,8 @@
//The user can change properties of the supplypod using the UI, and change the way that items are taken from the bay (One at a time, ordered, random, etc)
//Many of the effects of the supplypod set here are put into action in supplypod.dm
/client/proc/centcom_podlauncher() //Creates a verb for admins to open up the ui
set name = "Config/Launch Supplypod"
set desc = "Configure and launch a CentCom supplypod full of whatever your heart desires!"
set category = "Admin.Events"
new /datum/centcom_podlauncher(usr)//create the datum
ADMIN_VERB(centcom_podlauncher, R_ADMIN, "Config/Launch Supplypod", "Configure and launch a CentCom supplypod full of whatever your heart desires!", ADMIN_CATEGORY_EVENTS)
new /datum/centcom_podlauncher(user.mob)
//Variables declared to change how items in the launch bay are picked and launched. (Almost) all of these are changed in the ui_act proc
//Some effect groups are choices, while other are booleans. This is because some effects can stack, while others dont (ex: you can stack explosion and quiet, but you cant stack ordered launch and random launch)

View File

@@ -153,6 +153,15 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
to_chat(src, "Become a BYOND member to access member-perks and features, as well as support the engine that makes this game possible. Only 10 bucks for 3 months! <a href=\"https://secure.byond.com/membership\">Click Here to find out more</a>.")
return FALSE
return TRUE
/client/proc/is_localhost()
var/static/localhost_addresses = list(
"127.0.0.1",
"::1",
null,
)
return address in localhost_addresses
/*
* Call back proc that should be checked in all paths where a client can send messages
*
@@ -250,27 +259,6 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
GLOB.ahelp_tickets.ClientLogin(src)
GLOB.interviews.client_login(src)
GLOB.requests.client_login(src)
var/connecting_admin = FALSE //because de-admined admins connecting should be treated like admins.
//Admin Authorisation
var/datum/admins/admin_datum = GLOB.admin_datums[ckey]
if (!isnull(admin_datum))
admin_datum.associate(src)
connecting_admin = TRUE
else if(GLOB.deadmins[ckey])
add_verb(src, /client/proc/readmin)
connecting_admin = TRUE
if(CONFIG_GET(flag/autoadmin))
if(!GLOB.admin_datums[ckey])
var/list/autoadmin_ranks = ranks_from_rank_name(CONFIG_GET(string/autoadmin_rank))
if (autoadmin_ranks.len == 0)
to_chat(GLOB.admins, "Autoadmin rank not found")
else
new /datum/admins(autoadmin_ranks, ckey)
if(CONFIG_GET(flag/enable_localhost_rank) && !connecting_admin)
var/localhost_addresses = list("127.0.0.1", "::1")
if(isnull(address) || (address in localhost_addresses))
var/datum/admin_rank/localhost_rank = new("!localhost!", R_EVERYTHING, R_DBRANKS, R_EVERYTHING) //+EVERYTHING -DBRANKS *EVERYTHING
new /datum/admins(list(localhost_rank), ckey, 1, 1)
//preferences datum - also holds some persistent data for the client (because we may as well keep these datums to a minimum)
prefs = GLOB.preferences_datums[ckey]
if(prefs)
@@ -343,6 +331,29 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
. = ..() //calls mob.Login()
// Admin Verbs need the client's mob to exist. Must be after ..()
var/connecting_admin = FALSE //because de-admined admins connecting should be treated like admins.
//Admin Authorisation
var/datum/admins/admin_datum = GLOB.admin_datums[ckey]
if (!isnull(admin_datum))
admin_datum.associate(src)
connecting_admin = TRUE
else if(GLOB.deadmins[ckey])
add_verb(src, /client/proc/readmin)
connecting_admin = TRUE
if(CONFIG_GET(flag/autoadmin))
if(!GLOB.admin_datums[ckey])
var/list/autoadmin_ranks = ranks_from_rank_name(CONFIG_GET(string/autoadmin_rank))
if (autoadmin_ranks.len == 0)
to_chat(world, "Autoadmin rank not found")
else
new /datum/admins(autoadmin_ranks, ckey)
if(CONFIG_GET(flag/enable_localhost_rank) && !connecting_admin && is_localhost())
var/datum/admin_rank/localhost_rank = new("!localhost!", R_EVERYTHING, R_DBRANKS, R_EVERYTHING) //+EVERYTHING -DBRANKS *EVERYTHING
new /datum/admins(list(localhost_rank), ckey, 1, 1)
if (length(GLOB.stickybanadminexemptions))
GLOB.stickybanadminexemptions -= ckey
if (!length(GLOB.stickybanadminexemptions))
@@ -1175,13 +1186,10 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
/// Attempts to make the client orbit the given object, for administrative purposes.
/// If they are not an observer, will try to aghost them.
/client/proc/admin_follow(atom/movable/target)
var/can_ghost = TRUE
if (!isobserver(mob))
can_ghost = admin_ghost()
if(!can_ghost)
return FALSE
if(!isobserver(mob))
SSadmin_verbs.dynamic_invoke_verb(src, /datum/admin_verb/admin_ghost)
if(!isobserver(mob))
return
var/mob/dead/observer/observer = mob
observer.ManualFollow(target)

View File

@@ -139,33 +139,28 @@ GLOBAL_VAR_INIT(normal_ooc_colour, "#002eb8")
set category = "Server"
if(IsAdminAdvancedProcCall())
return
var/newColor = input(src, "Please select the new player OOC color.", "OOC color") as color|null
ADMIN_VERB(set_ooc_color, R_FUN, "Set Player OOC Color", "Modifies the global OOC color.", ADMIN_CATEGORY_SERVER)
var/newColor = input(user, "Please select the new player OOC color.", "OOC color") as color|null
if(isnull(newColor))
return
if(!check_rights(R_FUN))
message_admins("[usr.key] has attempted to use the Set Player OOC Color verb!")
log_admin("[key_name(usr)] tried to set player ooc color without authorization.")
return
var/new_color = sanitize_color(newColor)
message_admins("[key_name_admin(usr)] has set the players' ooc color to [new_color].")
log_admin("[key_name_admin(usr)] has set the player ooc color to [new_color].")
message_admins("[key_name_admin(user)] has set the players' ooc color to [new_color].")
log_admin("[key_name_admin(user)] has set the player ooc color to [new_color].")
GLOB.OOC_COLOR = new_color
/client/proc/reset_ooc()
set name = "Reset Player OOC Color"
set desc = "Returns player OOC Color to default"
set category = "Server"
if(IsAdminAdvancedProcCall())
return
if(tgui_alert(usr, "Are you sure you want to reset the OOC color of all players?", "Reset Player OOC Color", list("Yes", "No")) != "Yes")
ADMIN_VERB(reset_ooc_color, R_FUN, "Reset Player OOC Color", "Returns player OOC color to default.", ADMIN_CATEGORY_SERVER)
if(tgui_alert(user, "Are you sure you want to reset the OOC color of all players?", "Reset Player OOC Color", list("Yes", "No")) != "Yes")
return
if(!check_rights(R_FUN))
message_admins("[usr.key] has attempted to use the Reset Player OOC Color verb!")
log_admin("[key_name(usr)] tried to reset player ooc color without authorization.")
return
message_admins("[key_name_admin(usr)] has reset the players' ooc color.")
log_admin("[key_name_admin(usr)] has reset player ooc color.")
message_admins("[key_name_admin(user)] has reset the players' ooc color.")
log_admin("[key_name_admin(user)] has reset player ooc color.")
GLOB.OOC_COLOR = null
//Checks admin notice

View File

@@ -83,11 +83,6 @@
. = ..()
QDEL_NULL(temp_adventure)
/client/proc/adventure_manager()
set category = "Debug"
set name = "Adventure Manager"
if(!check_rights(R_DEBUG))
return
ADMIN_VERB(adventure_manager, R_DEBUG, "Adventure Manager", "View and edit adventures.", ADMIN_CATEGORY_DEBUG)
var/datum/adventure_browser/browser = new()
browser.ui_interact(usr)
browser.ui_interact(user.mob)

View File

@@ -1,12 +1,6 @@
// Helper tool to see fishing probabilities with different setups
/datum/admins/proc/fishing_calculator()
set name = "Fishing Calculator"
set category = "Debug"
if(!check_rights(R_DEBUG))
return
var/datum/fishing_calculator/ui = new(usr)
ui.ui_interact(usr)
ADMIN_VERB(fishing_calculator, R_DEBUG, "Fishing Calculator", "A calculator... for fishes?", ADMIN_CATEGORY_DEBUG)
var/datum/fishing_calculator/ui = new
ui.ui_interact(user.mob)
/datum/fishing_calculator
var/list/current_table

View File

@@ -32,10 +32,8 @@ GLOBAL_REAL(logger, /datum/log_holder)
GENERAL_PROTECT_DATUM(/datum/log_holder)
/client/proc/log_viewer_new()
set name = "View Round Logs"
set category = "Admin"
logger.ui_interact(mob)
ADMIN_VERB(log_viewer_new, R_ADMIN|R_DEBUG, "View Round Logs", "View the rounds logs.", ADMIN_CATEGORY_MAIN)
logger.ui_interact(user.mob)
/datum/log_holder/ui_interact(mob/user, datum/tgui/ui)
if(!check_rights_for(user.client, R_ADMIN))

View File

@@ -44,9 +44,9 @@
message = trim_left(copytext_char(message, length(message_mods[RADIO_KEY]) + 2))
switch(message_mods[RADIO_EXTENSION])
if(MODE_ADMIN)
client.cmd_admin_say(message)
SSadmin_verbs.dynamic_invoke_verb(client, /datum/admin_verb/cmd_admin_say, message)
if(MODE_DEADMIN)
client.dsay(message)
SSadmin_verbs.dynamic_invoke_verb(client, /datum/admin_verb/dsay, message)
if(MODE_PUPPET)
if(!mind.current.say(message))
to_chat(src, span_warning("Your linked body was unable to speak!"))

View File

@@ -1161,9 +1161,7 @@
admin_ticket_log("[key_name_admin(usr)] has attempted to modify the bodyparts of [src]")
if(href_list[VV_HK_MODIFY_ORGANS])
if(!check_rights(NONE))
return
usr.client.manipulate_organs(src)
return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/manipulate_organs, src)
if(href_list[VV_HK_MARTIAL_ART])
if(!check_rights(NONE))

View File

@@ -122,11 +122,11 @@ GLOBAL_LIST_INIT(message_modes_stat_limits, list(
return
if(message_mods[RADIO_EXTENSION] == MODE_ADMIN)
client?.cmd_admin_say(message)
SSadmin_verbs.dynamic_invoke_verb(client, /datum/admin_verb/cmd_admin_say, message)
return
if(message_mods[RADIO_EXTENSION] == MODE_DEADMIN)
client?.dsay(message)
SSadmin_verbs.dynamic_invoke_verb(client, /datum/admin_verb/dsay, message)
return
// dead is the only state you can never emote

View File

@@ -1414,9 +1414,7 @@
regenerate_icons()
if(href_list[VV_HK_PLAYER_PANEL])
if(!check_rights(NONE))
return
usr.client.holder.show_player_panel(src)
return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/show_player_panel, src)
if(href_list[VV_HK_GODMODE])
if(!check_rights(R_ADMIN))
@@ -1424,34 +1422,22 @@
usr.client.cmd_admin_godmode(src)
if(href_list[VV_HK_GIVE_MOB_ACTION])
if(!check_rights(NONE))
return
usr.client.give_mob_action(src)
return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/give_mob_action, src)
if(href_list[VV_HK_REMOVE_MOB_ACTION])
if(!check_rights(NONE))
return
usr.client.remove_mob_action(src)
return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/remove_mob_action, src)
if(href_list[VV_HK_GIVE_SPELL])
if(!check_rights(NONE))
return
usr.client.give_spell(src)
return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/give_spell, src)
if(href_list[VV_HK_REMOVE_SPELL])
if(!check_rights(NONE))
return
usr.client.remove_spell(src)
return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/remove_spell, src)
if(href_list[VV_HK_GIVE_DISEASE])
if(!check_rights(NONE))
return
usr.client.give_disease(src)
return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/give_disease, src)
if(href_list[VV_HK_GIB])
if(!check_rights(R_FUN))
return
usr.client.cmd_admin_gib(src)
return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/gib_them, src)
if(href_list[VV_HK_BUILDMODE])
if(!check_rights(R_BUILD))
@@ -1459,19 +1445,13 @@
togglebuildmode(src)
if(href_list[VV_HK_DROP_ALL])
if(!check_rights(NONE))
return
usr.client.cmd_admin_drop_everything(src)
return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/drop_everything, src)
if(href_list[VV_HK_DIRECT_CONTROL])
if(!check_rights(NONE))
return
usr.client.cmd_assume_direct_control(src)
return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/cmd_assume_direct_control, src)
if(href_list[VV_HK_GIVE_DIRECT_CONTROL])
if(!check_rights(NONE))
return
usr.client.cmd_give_direct_control(src)
return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/cmd_give_direct_control, src)
if(href_list[VV_HK_OFFER_GHOSTS])
if(!check_rights(NONE))

View File

@@ -136,40 +136,36 @@
// HERE BE DEBUG DRAGONS //
///////////////////////////
/client/proc/debugNatureMapGenerator()
set name = "Test Nature Map Generator"
set category = "Debug"
ADMIN_VERB(debug_nature_map_generator, R_DEBUG, "Test Nature Map Generator", "Test the nature map generator", ADMIN_CATEGORY_DEBUG)
var/datum/map_generator/nature/N = new()
var/startInput = input(usr, "Start turf of Map, (X;Y;Z)", "Map Gen Settings", "1;1;1") as text|null
var/startInput = input(user, "Start turf of Map, (X;Y;Z)", "Map Gen Settings", "1;1;1") as text|null
if (isnull(startInput))
return
var/endInput = input(usr, "End turf of Map (X;Y;Z)", "Map Gen Settings", "[world.maxx];[world.maxy];[mob ? mob.z : 1]") as text|null
var/endInput = input(user, "End turf of Map (X;Y;Z)", "Map Gen Settings", "[world.maxx];[world.maxy];[user.mob.z]") as text|null
if (isnull(endInput))
return
//maxx maxy and current z so that if you fuck up, you only fuck up one entire z level instead of the entire universe
if(!startInput || !endInput)
to_chat(src, "Missing Input")
to_chat(user, "Missing Input")
return
var/list/startCoords = splittext(startInput, ";")
var/list/endCoords = splittext(endInput, ";")
if(!startCoords || !endCoords)
to_chat(src, "Invalid Coords")
to_chat(src, "Start Input: [startInput]")
to_chat(src, "End Input: [endInput]")
to_chat(user, "Invalid Coords")
to_chat(user, "Start Input: [startInput]")
to_chat(user, "End Input: [endInput]")
return
var/turf/Start = locate(text2num(startCoords[1]),text2num(startCoords[2]),text2num(startCoords[3]))
var/turf/End = locate(text2num(endCoords[1]),text2num(endCoords[2]),text2num(endCoords[3]))
if(!Start || !End)
to_chat(src, "Invalid Turfs")
to_chat(src, "Start Coords: [startCoords[1]] - [startCoords[2]] - [startCoords[3]]")
to_chat(src, "End Coords: [endCoords[1]] - [endCoords[2]] - [endCoords[3]]")
to_chat(user, "Invalid Turfs")
to_chat(user, "Start Coords: [startCoords[1]] - [startCoords[2]] - [startCoords[3]]")
to_chat(user, "End Coords: [endCoords[1]] - [endCoords[2]] - [endCoords[3]]")
return
var/static/list/clusters = list(
@@ -191,7 +187,7 @@
var/theCluster = 0
if(moduleClusters != "None")
if(!clusters[moduleClusters])
to_chat(src, "Invalid Cluster Flags")
to_chat(user, "Invalid Cluster Flags")
return
theCluster = clusters[moduleClusters]
else
@@ -202,9 +198,9 @@
M.clusterCheckFlags = theCluster
to_chat(src, "Defining Region")
to_chat(user, "Defining Region")
N.defineRegion(Start, End)
to_chat(src, "Region Defined")
to_chat(src, "Generating Region")
to_chat(user, "Region Defined")
to_chat(user, "Generating Region")
N.generate()
to_chat(src, "Generated Region")
to_chat(user, "Generated Region")

View File

@@ -1,10 +1,6 @@
//Generates a wikitable txt file for use with the wiki - does not support productless reactions at the moment
/client/proc/generate_wikichem_list()
set category = "Debug"
set name = "Parse Wikichems"
ADMIN_VERB(generate_wikichem_list, R_DEBUG, "Parse Wikichems", "Parse and generate a text file for wikichem.", ADMIN_CATEGORY_DEBUG)
//If we're a reaction product
var/prefix_reaction = {"{| class=\"wikitable sortable\" style=\"width:100%; text-align:left; border: 3px solid #FFDD66; cellspacing=0; cellpadding=2; background-color:white;\"
var/static/prefix_reaction = {"{| class=\"wikitable sortable\" style=\"width:100%; text-align:left; border: 3px solid #FFDD66; cellspacing=0; cellpadding=2; background-color:white;\"
! scope=\"col\" style='width:150px; background-color:#FFDD66;'|Name
! scope=\"col\" class=\"unsortable\" style='background-color:#FFDD66;'|Formula
! scope=\"col\" class=\"unsortable\" style='background-color:#FFDD66; width:170px;'|Reaction conditions
@@ -13,9 +9,9 @@
|-
"}
var/input_text = tgui_input_text(usr, "Input a name of a reagent, or a series of reagents split with a comma (no spaces) to get it's wiki table entry", "Recipe") //95% of the time, the reagent type is a lowercase, no spaces / underscored version of the name
var/input_text = tgui_input_text(user, "Input a name of a reagent, or a series of reagents split with a comma (no spaces) to get it's wiki table entry", "Recipe") //95% of the time, the reagent type is a lowercase, no spaces / underscored version of the name
if(!input_text)
to_chat(usr, "Input was blank!")
to_chat(user, "Input was blank!")
return
text2file(prefix_reaction, "[GLOB.log_directory]/chem_parse.txt")
var/list/names = splittext("[input_text]", ",")
@@ -23,13 +19,13 @@
for(var/name in names)
var/datum/reagent/reagent = find_reagent_object_from_type(get_chem_id(name))
if(!reagent)
to_chat(usr, "Could not find [name]. Skipping.")
to_chat(user, "Could not find [name]. Skipping.")
continue
//Get reaction
var/list/reactions = GLOB.chemical_reactions_list_product_index[reagent.type]
if(!length(reactions))
to_chat(usr, "Could not find [name] reaction! Continuing anyways.")
to_chat(user, "Could not find [name] reaction! Continuing anyways.")
var/single_parse = generate_chemwiki_line(reagent, null)
text2file(single_parse, "[GLOB.log_directory]/chem_parse.txt")
continue
@@ -38,8 +34,7 @@
var/single_parse = generate_chemwiki_line(reagent, reaction)
text2file(single_parse, "[GLOB.log_directory]/chem_parse.txt")
text2file("|}", "[GLOB.log_directory]/chem_parse.txt") //Cap off the table
to_chat(usr, "Done! Saved file to (wherever your root folder is, i.e. where the DME is)/[GLOB.log_directory]/chem_parse.txt OR use the Get Current Logs verb under the Admin tab. (if you click Open, and it does nothing, that's because you've not set a .txt default program! Try downloading it instead, and use that file to set a default program! Have a nice day!")
to_chat(user, "Done! Saved file to (wherever your root folder is, i.e. where the DME is)/[GLOB.log_directory]/chem_parse.txt OR use the Get Current Logs verb under the Admin tab. (if you click Open, and it does nothing, that's because you've not set a .txt default program! Try downloading it instead, and use that file to set a default program! Have a nice day!")
/// Generate the big list of reagent based reactions.
/proc/generate_chemwiki_line(datum/reagent/reagent, datum/chemical_reaction/reaction)

View File

@@ -163,17 +163,18 @@ GLOBAL_DATUM_INIT(requests, /datum/request_manager, new)
switch(action)
if ("pp")
var/mob/M = request.owner?.mob
usr.client.holder.show_player_panel(M)
SSadmin_verbs.dynamic_invoke_verb(ui.user, /datum/admin_verb/show_player_panel, request.owner?.mob)
return TRUE
if ("vv")
var/mob/M = request.owner?.mob
usr.client.debug_variables(M)
return TRUE
if ("sm")
var/mob/M = request.owner?.mob
usr.client.cmd_admin_subtle_message(M)
SSadmin_verbs.dynamic_invoke_verb(ui.user, /datum/admin_verb/cmd_admin_subtle_message, request.owner?.mob)
return TRUE
if ("flw")
var/mob/M = request.owner?.mob
usr.client.admin_follow(M)
@@ -192,8 +193,9 @@ GLOBAL_DATUM_INIT(requests, /datum/request_manager, new)
D.traitor_panel()
return TRUE
else
usr.client.holder.show_traitor_panel(M)
SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/show_traitor_panel, M)
return TRUE
if ("logs")
var/mob/M = request.owner?.mob
if(!ismob(M))
@@ -201,16 +203,11 @@ GLOBAL_DATUM_INIT(requests, /datum/request_manager, new)
return TRUE
show_individual_logging_panel(M, null, null)
return TRUE
if ("smite")
if(!check_rights(R_FUN))
to_chat(usr, "Insufficient permissions to smite, you require +FUN", confidential = TRUE)
return TRUE
var/mob/living/carbon/human/H = request.owner?.mob
if (!H || !istype(H))
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human", confidential = TRUE)
return TRUE
usr.client.smite(H)
SSadmin_verbs.dynamic_invoke_verb(ui.user, /datum/admin_verb/admin_smite, request.owner?.mob)
return TRUE
if ("rply")
if (request.req_type == REQUEST_PRAYER)
to_chat(usr, "Cannot reply to a prayer", confidential = TRUE)

View File

@@ -45,7 +45,7 @@
client.ooc(entry)
return TRUE
if(ADMIN_CHANNEL)
client.cmd_admin_say(entry)
SSadmin_verbs.dynamic_invoke_verb(client, /datum/admin_verb/cmd_admin_say, entry)
return TRUE
return FALSE

Some files were not shown because too many files have changed in this diff Show More