diff --git a/code/ATMOSPHERICS/_atmospherics_helpers.dm b/code/ATMOSPHERICS/_atmospherics_helpers.dm
index da777c2581..b2154735bb 100644
--- a/code/ATMOSPHERICS/_atmospherics_helpers.dm
+++ b/code/ATMOSPHERICS/_atmospherics_helpers.dm
@@ -15,11 +15,9 @@
/obj/machinery/atmospherics/var/debug = 0
-/client/proc/atmos_toggle_debug(var/obj/machinery/atmospherics/M in view())
- set name = "Toggle Debug Messages"
- set category = "Debug.Misc"
- M.debug = !M.debug
- to_chat(usr, "[M]: Debug messages toggled [M.debug? "on" : "off"].")
+ADMIN_VERB(atmos_toggle_debug, R_DEBUG, "Toggle Debug Messages", "Allows to toggle receiving debug messages.", ADMIN_CATEGORY_DEBUG_MISC, obj/machinery/atmospherics/machine in view())
+ machine.debug = !machine.debug
+ to_chat(user, span_debug_info("[machine]: Debug messages toggled [machine.debug? "on" : "off"]."))
//Generalized gas pumping proc.
//Moves gas from one gas_mixture to another and returns the amount of power needed (assuming 1 second), or -1 if no gas was pumped.
diff --git a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
index cb39381e4b..ec2debcc1e 100644
--- a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
@@ -200,7 +200,7 @@
update_icon()
return
-/obj/machinery/atmospherics/binary/passive_gate/attack_hand(user as mob)
+/obj/machinery/atmospherics/binary/passive_gate/attack_hand(mob/user)
if(..())
return
add_fingerprint(user)
diff --git a/code/ZAS/Diagnostic.dm b/code/ZAS/Diagnostic.dm
index 9b32bb1313..06388d31b5 100644
--- a/code/ZAS/Diagnostic.dm
+++ b/code/ZAS/Diagnostic.dm
@@ -1,42 +1,24 @@
-/client/proc/ZoneTick()
- set category = "Debug.Misc"
- set name = "Process Atmos"
- set desc = "Manually run a single tick of the air subsystem"
-
- // TODO - This might be a useful diagnostic tool. However its complicated to do with StonedMC
- // Therefore it is left unimplemented for now until its use actually becomes required. ~Leshana
- /*
- if(!check_rights(R_DEBUG)) return
-
- var/result = SSair.Tick()
- if(result)
- to_chat(src, "Successfully Processed.")
-
- else
- to_chat(src, "Failed to process! ([SSair.tick_progress])")
- */
-
-/client/proc/Zone_Info(turf/T as null|turf)
- set category = "Debug.Misc"
+ADMIN_VERB_VISIBILITY(Zone_Info, ADMIN_VERB_VISIBLITY_FLAG_LOCALHOST)
+ADMIN_VERB(Zone_Info, R_DEBUG, "ZAS Zone Info", "Prints the ZAS information of the zone (Only use on a test server).", ADMIN_CATEGORY_MAPPING_ZAS, turf/T)
if(T)
if(istype(T,/turf/simulated) && T:zone)
- T:zone:dbg_data(src)
+ T:zone:dbg_data(user)
else
- to_chat(mob, "No zone here.")
+ to_chat(user, span_debug_warning("No zone here."))
var/datum/gas_mixture/mix = T.return_air()
- to_chat(mob, "[mix.return_pressure()] kPa [mix.temperature]C")
+ to_chat(user, span_debug_info("[mix.return_pressure()] kPa [mix.temperature]C"))
for(var/g in mix.gas)
- to_chat(mob, "[g]: [mix.gas[g]]\n")
+ to_chat(user, span_debug_info("[g]: [mix.gas[g]]\n"))
else
- if(zone_debug_images)
- for(var/zone in zone_debug_images)
- images -= zone_debug_images[zone]
- zone_debug_images = null
+ if(user.zone_debug_images)
+ for(var/zone in user.zone_debug_images)
+ user.images -= user.zone_debug_images[zone]
+ user.zone_debug_images = null
/client/var/list/zone_debug_images
-/client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf)
- set category = "Debug.Misc"
+ADMIN_VERB_VISIBILITY(Test_ZAS_Connection, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
+ADMIN_VERB(Test_ZAS_Connection, R_DEBUG, "Test ZAS Connection", "Tests the ZAS zone connection (Only use on a test server).", ADMIN_CATEGORY_MAPPING_ZAS, turf/simulated/T)
if(!istype(T))
return
@@ -50,15 +32,15 @@
"Down" = DOWN,\
#endif
"N/A" = null)
- var/direction = tgui_input_list(usr, "What direction do you wish to test?","Set direction", direction_list)
+ var/direction = tgui_input_list(user, "What direction do you wish to test?","Set direction", direction_list)
if(!direction)
return
if(direction == "N/A")
if(!(T.self_airblock() & AIR_BLOCKED))
- to_chat(mob, "The turf can pass air! :D")
+ to_chat(user, span_debug_info("The turf can pass air! :D"))
else
- to_chat(mob, "No air passage :x")
+ to_chat(user, span_debug_warning("No air passage :x"))
return
var/turf/simulated/other_turf = get_step(T, direction_list[direction])
@@ -70,31 +52,30 @@
if(o_block & AIR_BLOCKED)
if(t_block & AIR_BLOCKED)
- to_chat(mob, "Neither turf can connect. :(")
+ to_chat(user, span_debug_warning("Neither turf can connect. :("))
else
- to_chat(mob, "The initial turf only can connect. :\\")
+ to_chat(user, span_debug_warning("The initial turf only can connect. :\\"))
else
if(t_block & AIR_BLOCKED)
- to_chat(mob, "The other turf can connect, but not the initial turf. :/")
+ to_chat(user, span_debug_warning("The other turf can connect, but not the initial turf. :/"))
else
- to_chat(mob, "Both turfs can connect! :)")
+ to_chat(user, span_debug_info("Both turfs can connect! :)"))
- to_chat(mob, "Additionally, \...")
+ to_chat(user, span_debug_info("Additionally, \..."))
if(o_block & ZONE_BLOCKED)
if(t_block & ZONE_BLOCKED)
- to_chat(mob, "neither turf can merge.")
+ to_chat(user, span_debug_warning("neither turf can merge."))
else
- to_chat(mob, "the other turf cannot merge.")
+ to_chat(user, span_debug_warning("the other turf cannot merge."))
else
if(t_block & ZONE_BLOCKED)
- to_chat(mob, "the initial turf cannot merge.")
+ to_chat(user, span_debug_warning("the initial turf cannot merge."))
else
- to_chat(mob, "both turfs can merge.")
+ to_chat(user, span_debug_warning("both turfs can merge."))
-/client/proc/ZASSettings()
- set category = "Debug.Dangerous"
-
- GLOB.vsc.SetDefault(mob)
+ADMIN_VERB_VISIBILITY(Test_ZAS_Connection, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
+ADMIN_VERB(ZASSettings, R_ADMIN, "ZAS Settings", "Access the ZAS settings.", ADMIN_CATEGORY_DEBUG_DANGEROUS, turf/simulated/T)
+ GLOB.vsc.SetDefault(user.mob)
diff --git a/code/__defines/admin_verb.dm b/code/__defines/admin_verb.dm
index 3cb2af3313..ac34a29252 100644
--- a/code/__defines/admin_verb.dm
+++ b/code/__defines/admin_verb.dm
@@ -77,6 +77,7 @@ _ADMIN_VERB(verb_path_name, verb_permissions, verb_name, verb_desc, verb_categor
// Admin verb categories
#define ADMIN_CATEGORY_MAIN "Admin"
+#define ADMIN_CATEGORY_CHAT "Admin.Chat"
#define ADMIN_CATEGORY_EVENTS "Admin.Events"
#define ADMIN_CATEGORY_FUN "Admin.Fun"
#define ADMIN_CATEGORY_GAME "Admin.Game"
@@ -84,26 +85,36 @@ _ADMIN_VERB(verb_path_name, verb_permissions, verb_name, verb_desc, verb_categor
#define ADMIN_CATEGORY_LOGS "Admin.Logs"
#define ADMIN_CATEGORY_MISC "Admin.Misc"
#define ADMIN_CATEGORY_SECRETS "Admin.Secrets"
+#define ADMIN_CATEGORY_SILICON "Admin.Silicon"
#define ADMIN_CATEGORY_INVESTIGATE "Admin.Investigate"
+#define ADMIN_CATEGORY_IPINTEL "Admin.IPIntel"
// Special categories that are separated
#define ADMIN_CATEGORY_DEBUG "Debug"
+#define ADMIN_CATEGORY_DEBUG_ASSETS "Debug.Assets"
#define ADMIN_CATEGORY_DEBUG_INVESTIGATE "Debug.Investigate"
#define ADMIN_CATEGORY_DEBUG_DANGEROUS "Debug.Dangerous"
+#define ADMIN_CATEGORY_DEBUG_EVENTS "Debug.Evemts"
#define ADMIN_CATEGORY_DEBUG_GAME "Debug.Game"
#define ADMIN_CATEGORY_DEBUG_SERVER "Debug.Server"
+#define ADMIN_CATEGORY_DEBUG_SPRITES "Debug.Sprites"
+#define ADMIN_CATEGORY_DEBUG_MISC "Debug.Misc"
+
#define ADMIN_CATEGORY_OBJECT "Object"
#define ADMIN_CATEGORY_MAPPING "Mapping"
+#define ADMIN_CATEGORY_MAPPING_TESTS "Mapping.Testserver Only"
+#define ADMIN_CATEGORY_MAPPING_ZAS "Mapping.ZAS"
#define ADMIN_CATEGORY_PROFILE "Profile"
-#define ADMIN_CATEGORY_IPINTEL "Admin.IPIntel"
// Server Categories
#define ADMIN_CATEGORY_SERVER "Server"
+#define ADMIN_CATEGORY_SERVER_CHAT "Server.Chat"
#define ADMIN_CATEGORY_SERVER_GAME "Server.Game"
#define ADMIN_CATEGORY_SERVER_ADMIN "Server.Admin"
#define ADMIN_CATEGORY_SERVER_CONFIG "Server.Config"
// Fun categories
+#define ADMIN_CATEGORY_FUN_ADD_NIF "Fun.Add Nif"
#define ADMIN_CATEGORY_FUN_EVENT_KIT "Fun.Event Kit"
#define ADMIN_CATEGORY_FUN_DROP_POD "Fun.Drop Pod"
#define ADMIN_CATEGORY_FUN_DO_NOT "Fun.Do Not"
@@ -113,3 +124,4 @@ _ADMIN_VERB(verb_path_name, verb_permissions, verb_name, verb_desc, verb_categor
// Visibility flags
#define ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG "Map-Debug"
+#define ADMIN_VERB_VISIBLITY_FLAG_LOCALHOST "Localhost"
diff --git a/code/_global_vars/mobs.dm b/code/_global_vars/mobs.dm
index 7e60dc71ea..10d829904a 100644
--- a/code/_global_vars/mobs.dm
+++ b/code/_global_vars/mobs.dm
@@ -5,4 +5,3 @@ GLOBAL_LIST_EMPTY(stealthminID)
GLOBAL_LIST_EMPTY(directory) //all ckeys with associated client
GLOBAL_LIST_EMPTY(clients)
GLOBAL_LIST_EMPTY(players_by_zlevel)
-GLOBAL_LIST_EMPTY(round_text_log)
diff --git a/code/controllers/subsystems/admin_verbs.dm b/code/controllers/subsystems/admin_verbs.dm
index fabb7eff7b..0885381453 100644
--- a/code/controllers/subsystems/admin_verbs.dm
+++ b/code/controllers/subsystems/admin_verbs.dm
@@ -131,6 +131,8 @@ SUBSYSTEM_DEF(admin_verbs)
// refresh their verbs
admin_visibility_flags[admin.ckey] ||= list()
+ if(admin.is_localhost())
+ admin_visibility_flags[admin.ckey] |= list(ADMIN_VERB_VISIBLITY_FLAG_LOCALHOST)
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()
diff --git a/code/controllers/subsystems/game_master.dm b/code/controllers/subsystems/game_master.dm
index 7430187c81..ff9979a270 100644
--- a/code/controllers/subsystems/game_master.dm
+++ b/code/controllers/subsystems/game_master.dm
@@ -148,15 +148,8 @@ SUBSYSTEM_DEF(game_master)
var/ignore_time_restrictions = FALSE // Useful for debugging without needing to wait 20 minutes each time.
var/ignore_round_chaos = FALSE // If true, the system will happily choose back to back intense events like meteors and blobs, Dwarf Fortress style.
-/client/proc/show_gm_status()
- set category = "Debug"
- set name = "Show GM Status"
- set desc = "Shows you what the GM is thinking. If only that existed in real life..."
-
- if(check_rights(R_ADMIN|R_EVENT|R_DEBUG))
- SSgame_master.interact(usr)
- else
- to_chat(usr, span_warning("You do not have sufficient rights to view the GM panel, sorry."))
+ADMIN_VERB(show_gm_status, R_ADMIN|R_EVENT|R_DEBUG, "Show GM Status", "Shows you what the GM is thinking. If only that existed in real life...", ADMIN_CATEGORY_DEBUG_GAME)
+ SSgame_master.interact(user)
/datum/controller/subsystem/game_master/proc/interact(var/client/user)
if(!user)
diff --git a/code/datums/diseases/_MobProcs.dm b/code/datums/diseases/_MobProcs.dm
index 8d82327652..59aaf22166 100644
--- a/code/datums/diseases/_MobProcs.dm
+++ b/code/datums/diseases/_MobProcs.dm
@@ -220,20 +220,13 @@
danger = disease.danger
return danger
-/client/proc/ReleaseVirus()
- set category = "Fun.Event Kit"
- set name = "Release Virus"
- set desc = "Release a pre-set virus."
-
- if(!check_rights(R_FUN|R_EVENT))
- return FALSE
-
- var/disease = tgui_input_list(usr, "Choose virus", "Viruses", subtypesof(/datum/disease), subtypesof(/datum/disease))
+ADMIN_VERB(ReleaseVirus, R_SPAWN|R_EVENT, "Release Virus", "Release a pre-set virus.", ADMIN_CATEGORY_FUN_EVENT_KIT)
+ var/disease = tgui_input_list(user, "Choose virus", "Viruses", subtypesof(/datum/disease), subtypesof(/datum/disease))
if(isnull(disease))
return FALSE
- var/mob/living/carbon/human/H = tgui_input_list(usr, "Choose infectee", "Characters", GLOB.human_mob_list)
+ var/mob/living/carbon/human/H = tgui_input_list(user, "Choose infectee", "Characters", GLOB.human_mob_list)
if(isnull(H))
return FALSE
@@ -243,10 +236,8 @@
if(!H.HasDisease(D))
H.ForceContractDisease(D)
- message_admins("[key_name_admin(usr)] has triggered a virus outbreak of [D.name]! Affected mob: [key_name_admin(H)]")
- log_admin("[key_name_admin(usr)] infected [key_name_admin(H)] with [D.name]")
+ message_admins("[key_name_admin(user)] has triggered a virus outbreak of [D.name]! Affected mob: [key_name_admin(H)]")
+ log_admin("[key_name_admin(user)] infected [key_name_admin(H)] with [D.name]")
if(!GLOB.archive_diseases[D.GetDiseaseID()])
GLOB.archive_diseases[D.GetDiseaseID()] = D
-
- return TRUE
diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm
index c42baca7e0..07e6338b32 100644
--- a/code/datums/diseases/advance/advance.dm
+++ b/code/datums/diseases/advance/advance.dm
@@ -479,14 +479,7 @@ GLOBAL_LIST_INIT(advance_cures, list(
if(length(preserve))
R.data["viruses"] = preserve
-/client/proc/AdminCreateVirus()
- set category = "Fun.Event Kit"
- set name = "Create Advanced Virus"
- set desc = "Create an advanced virus and release it."
-
- if(!is_admin(usr))
- return FALSE
-
+ADMIN_VERB(AdminCreateVirus, R_SPAWN|R_EVENT, "Create Advanced Virus", "Create an advanced virus and release it.", ADMIN_CATEGORY_FUN_EVENT_KIT)
var/i = VIRUS_SYMPTOM_LIMIT
var/mob/living/carbon/human/H = null
@@ -497,22 +490,23 @@ GLOBAL_LIST_INIT(advance_cures, list(
symptoms += "Done"
symptoms += GLOB.list_symptoms.Copy()
do
- if(src)
- var/symptom = tgui_input_list(src, "Choose a symptom to add ([i] remaining)", "Choose a Symptom", symptoms)
- if(isnull(symptom))
- return
- else if(istext(symptom))
- i = 0
- else if(ispath(symptom))
- var/datum/symptom/S = new symptom
- if(!D.HasSymptom(S))
- D.symptoms += S
- i -= 1
+ if(!user)
+ return
+ var/symptom = tgui_input_list(user, "Choose a symptom to add ([i] remaining)", "Choose a Symptom", symptoms)
+ if(isnull(symptom))
+ return
+ else if(istext(symptom))
+ i = 0
+ else if(ispath(symptom))
+ var/datum/symptom/S = new symptom
+ if(!D.HasSymptom(S))
+ D.symptoms += S
+ i -= 1
while(i > 0)
if(length(D.symptoms) > 0)
- var/new_name = tgui_input_text(src, "Name your new disease.", "New Name")
+ var/new_name = tgui_input_text(user, "Name your new disease.", "New Name")
if(!new_name)
return FALSE
D.AssignName(new_name)
@@ -521,7 +515,7 @@ GLOBAL_LIST_INIT(advance_cures, list(
for(var/datum/disease/advance/AD in GLOB.active_diseases)
AD.Refresh()
- H = tgui_input_list(src, "Choose infectee", "Infectees", GLOB.human_mob_list)
+ H = tgui_input_list(user, "Choose infectee", "Infectees", GLOB.human_mob_list)
if(isnull(H))
return FALSE
@@ -532,10 +526,8 @@ GLOBAL_LIST_INIT(advance_cures, list(
var/list/name_symptoms = list()
for(var/datum/symptom/S in D.symptoms)
name_symptoms += S.name
- message_admins("[key_name_admin(src)] has triggered a custom virus outbreak of [D.name]! It has these symptoms: [english_list(name_symptoms)]")
- log_admin("[key_name_admin(src)] infected [key_name_admin(H)] with [D.name]. It has these symptoms: [english_list(name_symptoms)]")
-
- return TRUE
+ message_admins("[key_name_admin(user)] has triggered a custom virus outbreak of [D.name]! It has these symptoms: [english_list(name_symptoms)]")
+ log_admin("[key_name_admin(user)] infected [key_name_admin(H)] with [D.name]. It has these symptoms: [english_list(name_symptoms)]")
/datum/disease/advance/infect(mob/living/infectee, make_copy = TRUE)
var/datum/disease/advance/A = make_copy ? Copy() : src
diff --git a/code/datums/managed_browsers/feedback_viewer.dm b/code/datums/managed_browsers/feedback_viewer.dm
index 6b9bc8c13d..e3f11ff828 100644
--- a/code/datums/managed_browsers/feedback_viewer.dm
+++ b/code/datums/managed_browsers/feedback_viewer.dm
@@ -1,18 +1,15 @@
/client
var/datum/managed_browser/feedback_viewer/feedback_viewer = null
-/datum/admins/proc/view_feedback()
- set category = "Admin.Misc"
- set name = "View Feedback"
- set desc = "Open the Feedback Viewer"
-
- if(!check_rights(R_ADMIN|R_DEBUG|R_EVENT))
+ADMIN_VERB(view_feedback, R_ADMIN|R_DEBUG|R_EVENT, "View Feedback", "Open the Feedback Viewer.", ADMIN_CATEGORY_MISC)
+ if(!check_rights())
return
- if(usr.client.feedback_viewer)
- usr.client.feedback_viewer.display()
- else
- usr.client.feedback_viewer = new(usr.client)
+ if(user.feedback_viewer)
+ user.feedback_viewer.display()
+ return
+
+ user.feedback_viewer = new(user)
// This object holds the code to run the admin feedback viewer.
/datum/managed_browser/feedback_viewer
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index 658773bbda..4c76546b8d 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -127,9 +127,9 @@
popup.set_content(output)
popup.open()
-/datum/mind/proc/edit_memory()
+/datum/mind/proc/edit_memory(mob/user)
if(!SSticker || !SSticker.mode)
- tgui_alert_async(usr, "Not before round-start!", "Alert")
+ tgui_alert_async(user, "Not before round-start!", "Alert")
return
var/out = span_bold("[name]") + "[(current&&(current.real_name!=name))?" (as [current.real_name])":""]
"
@@ -161,12 +161,13 @@
out += "
\[add\]
"
out += span_bold("Ambitions:") + " [ambitions ? ambitions : "None"] \[edit\]"
- var/datum/browser/popup = new(usr, "edit_memory[src]", "Edit Memory")
+ var/datum/browser/popup = new(user, "edit_memory[src]", "Edit Memory")
popup.set_content(out)
popup.open()
/datum/mind/Topic(href, href_list)
- if(!check_rights(R_ADMIN|R_FUN|R_EVENT)) return
+ if(!check_rights(R_ADMIN|R_FUN|R_EVENT))
+ return
if(href_list["add_antagonist"])
var/datum/antagonist/antag = GLOB.all_antag_types[href_list["add_antagonist"]]
@@ -428,7 +429,7 @@
for(var/datum/objective/objective in objectives)
to_chat(current, span_bold("Objective #[obj_count]") + ": [objective.explanation_text]")
obj_count++
- edit_memory()
+ edit_memory(usr)
/datum/mind/proc/find_syndicate_uplink()
var/list/L = current.get_contents()
diff --git a/code/game/gamemodes/events/holidays/Holidays.dm b/code/game/gamemodes/events/holidays/Holidays.dm
index 16a873073e..a2d44e7014 100644
--- a/code/game/gamemodes/events/holidays/Holidays.dm
+++ b/code/game/gamemodes/events/holidays/Holidays.dm
@@ -235,18 +235,13 @@ GLOBAL_LIST_EMPTY(Holiday) //Holidays are lists now, so we can have more than on
GLOB.Holiday["Friday the 13th"] = "Friday the 13th is a superstitious day, associated with bad luck and misfortune."
//Allows GA and GM to set the Holiday variable
-/client/proc/Set_Holiday()
- set name = "Set Holiday"
- set category = "Fun.Event Kit"
- set desc = "Force-set the Holiday variable to make the game think it's a certain day."
- if(!check_rights(R_SERVER)) return
-
+ADMIN_VERB(Set_Holiday, R_SERVER, "Set Holiday", "Force-set the Holiday variable to make the game think it's a certain day.", ADMIN_CATEGORY_FUN_EVENT_KIT)
GLOB.Holiday = list()
- var/H = tgui_input_text(src,"What holiday is it today?","Set Holiday")
+ var/H = tgui_input_text(user,"What holiday is it today?","Set Holiday")
if(!H)
return
- var/B = tgui_input_text(src,"Now explain what the holiday is about","Set Holiday", multiline = TRUE, prevent_enter = TRUE)
+ var/B = tgui_input_text(user,"Now explain what the holiday is about","Set Holiday", multiline = TRUE, prevent_enter = TRUE)
if(!B)
return
@@ -257,8 +252,8 @@ GLOBAL_LIST_EMPTY(Holiday) //Holidays are lists now, so we can have more than on
world.update_status()
Holiday_Game_Start()
- message_admins(span_notice("ADMIN: Event: [key_name(src)] force-set Holiday to \"[GLOB.Holiday]\""))
- log_admin("[key_name(src)] force-set Holiday to \"[GLOB.Holiday]\"")
+ message_admins(span_notice("ADMIN: Event: [key_name(user)] force-set Holiday to \"[GLOB.Holiday]\""))
+ log_admin("[key_name(user)] force-set Holiday to \"[GLOB.Holiday]\"")
//Run at the start of a round
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index b7c7063ce2..4ae2c707d5 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -109,12 +109,7 @@ GLOBAL_LIST_EMPTY(additional_antag_types)
SSticker.mode.antag_templates |= antag
message_admins("Admin [key_name_admin(usr)] added [antag.role_text] template to game mode.")
- // I am very sure there's a better way to do this, but I'm not sure what it might be. ~Z
- spawn(1)
- for(var/datum/admins/admin in world)
- if(usr.client == admin.owner)
- admin.show_game_mode(usr)
- return
+ SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/show_game_mode)
/datum/game_mode/proc/announce() //to be called when round starts
to_chat(world, span_world("The current game mode is [capitalize(name)]!"))
diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm
index 939a13b8fb..269ca89b59 100644
--- a/code/game/machinery/computer/ai_core.dm
+++ b/code/game/machinery/computer/ai_core.dm
@@ -223,7 +223,8 @@ GLOBAL_LIST_BOILERPLATE(all_deactivated_AI_cores, /obj/structure/AIcore/deactiva
qdel(src)
/obj/structure/AIcore/deactivated/proc/check_malf(var/mob/living/silicon/ai/ai)
- if(!ai) return
+ if(!ai)
+ return
for (var/datum/mind/malfai in GLOB.malf.current_antagonists)
if (ai.mind == malfai)
return 1
@@ -238,7 +239,8 @@ GLOBAL_LIST_BOILERPLATE(all_deactivated_AI_cores, /obj/structure/AIcore/deactiva
else
to_chat(user, span_danger("ERROR:") + " Unable to locate artificial intelligence.")
return
- else if(W.has_tool_quality(TOOL_WRENCH))
+
+ if(W.has_tool_quality(TOOL_WRENCH))
if(anchored)
user.visible_message(span_bold("\The [user]") + " starts to unbolt \the [src] from the plating...")
playsound(src, W.usesound, 50, 1)
@@ -248,35 +250,34 @@ GLOBAL_LIST_BOILERPLATE(all_deactivated_AI_cores, /obj/structure/AIcore/deactiva
user.visible_message(span_bold("\The [user]") + " finishes unfastening \the [src]!")
anchored = FALSE
return
- else
- user.visible_message(span_bold("\The [user]") + " starts to bolt \the [src] to the plating...")
- playsound(src, W.usesound, 50, 1)
- if(!do_after(user, 4 SECONDS * W.toolspeed, target = src))
- user.visible_message(span_bold("\The [user]") + " decides not to bolt \the [src].")
- return
- user.visible_message(span_bold("\The [user]") + " finishes fastening down \the [src]!")
- anchored = TRUE
+
+ user.visible_message(span_bold("\The [user]") + " starts to bolt \the [src] to the plating...")
+ playsound(src, W.usesound, 50, 1)
+ if(!do_after(user, 4 SECONDS * W.toolspeed, target = src))
+ user.visible_message(span_bold("\The [user]") + " decides not to bolt \the [src].")
return
- else
- return ..()
+ user.visible_message(span_bold("\The [user]") + " finishes fastening down \the [src]!")
+ anchored = TRUE
+ return
-/client/proc/empty_ai_core_toggle_latejoin()
- set name = "Toggle AI Core Latejoin"
- set category = "Admin.Silicon"
+ return ..()
+ADMIN_VERB(empty_ai_core_toggle_latejoin, R_ADMIN|R_SERVER|R_EVENT, "Toggle AI Core Latejoin", "Toggles the option to latejoin as AI core.", ADMIN_CATEGORY_SILICON)
var/list/cores = list()
- for(var/obj/structure/AIcore/deactivated/D in GLOB.all_deactivated_AI_cores)
- cores["[D] ([D.loc.loc])"] = D
+ for(var/obj/structure/AIcore/deactivated/current_ai_struct in GLOB.all_deactivated_AI_cores)
+ cores["[current_ai_struct] ([current_ai_struct.loc.loc])"] = current_ai_struct
- var/id = tgui_input_list(usr, "Which core?", "Toggle AI Core Latejoin", cores)
- if(!id) return
+ var/id = tgui_input_list(user, "Which core?", "Toggle AI Core Latejoin", cores)
+ if(!id)
+ return
- var/obj/structure/AIcore/deactivated/D = cores[id]
- if(!D) return
+ var/obj/structure/AIcore/deactivated/ai_struct = cores[id]
+ if(!ai_struct)
+ return
- if(D in GLOB.empty_playable_ai_cores)
- GLOB.empty_playable_ai_cores -= D
- to_chat(src, "\The [id] is now [span_red("not available")] for latejoining AIs.")
+ if(ai_struct in GLOB.empty_playable_ai_cores)
+ GLOB.empty_playable_ai_cores -= ai_struct
+ to_chat(user, span_infoplain("\The [id] is now [span_red("not available")] for latejoining AIs."))
else
- GLOB.empty_playable_ai_cores += D
- to_chat(src, "\The [id] is now [span_green("available")] for latejoining AIs.")
+ GLOB.empty_playable_ai_cores += ai_struct
+ to_chat(user, span_infoplain("\The [id] is now [span_green("available")] for latejoining AIs."))
diff --git a/code/game/objects/effects/spawners/bombspawner.dm b/code/game/objects/effects/spawners/bombspawner.dm
index 9f40bbca89..9a5b7226fc 100644
--- a/code/game/objects/effects/spawners/bombspawner.dm
+++ b/code/game/objects/effects/spawners/bombspawner.dm
@@ -1,22 +1,19 @@
-/client/proc/spawn_tanktransferbomb()
- set category = "Debug.Game"
- set desc = "Spawn a tank transfer valve bomb"
- set name = "Instant TTV"
-
- if(!check_rights(R_SPAWN)) return
-
+ADMIN_VERB(spawn_tanktransferbomb, R_SPAWN, "Instant TTV", "Spawn a tank transfer valve bomb.", ADMIN_CATEGORY_DEBUG_GAME)
var/obj/effect/spawner/newbomb/proto = /obj/effect/spawner/newbomb/radio/custom
- var/p = tgui_input_number(usr, "Enter phoron amount (mol):","Phoron", initial(proto.phoron_amt))
- if(p == null) return
+ var/p = tgui_input_number(user, "Enter phoron amount (mol):","Phoron", initial(proto.phoron_amt))
+ if(isnull(p))
+ return
- var/o = tgui_input_number(usr, "Enter oxygen amount (mol):","Oxygen", initial(proto.oxygen_amt))
- if(o == null) return
+ var/o = tgui_input_number(user, "Enter oxygen amount (mol):","Oxygen", initial(proto.oxygen_amt))
+ if(isnull(o))
+ return
- var/c = tgui_input_number(usr, "Enter carbon dioxide amount (mol):","Carbon Dioxide", initial(proto.carbon_amt))
- if(c == null) return
+ var/c = tgui_input_number(user, "Enter carbon dioxide amount (mol):","Carbon Dioxide", initial(proto.carbon_amt))
+ if(isnull(c))
+ return
- new /obj/effect/spawner/newbomb/radio/custom(get_turf(mob), p, o, c)
+ new /obj/effect/spawner/newbomb/radio/custom(get_turf(user.mob), p, o, c)
/obj/effect/spawner/newbomb
name = "TTV bomb"
diff --git a/code/game/objects/explosion_recursive.dm b/code/game/objects/explosion_recursive.dm
index 7011515cb5..31165d009f 100644
--- a/code/game/objects/explosion_recursive.dm
+++ b/code/game/objects/explosion_recursive.dm
@@ -1,8 +1,3 @@
-/client/proc/kaboom()
- var/power = tgui_input_number(src, "power?", "power?")
- var/turf/T = get_turf(src.mob)
- explosion(T, power)
-
/turf
var/explosion_resistance
diff --git a/code/game/objects/mail.dm b/code/game/objects/mail.dm
index 53afd5a5fb..ea4efe1c46 100644
--- a/code/game/objects/mail.dm
+++ b/code/game/objects/mail.dm
@@ -276,13 +276,7 @@
disposal_holder.destinationTag = sortTag
// Mail spawn for events
-/datum/admins/proc/spawn_mail(var/object as text)
- set name = "Spawn Mail"
- set category = "Fun.Event Kit"
- set desc = "Spawn mail for a specific player, with a specific item."
-
- if(!check_rights(R_SPAWN)) return
-
+ADMIN_VERB(spawn_mail, R_SPAWN, "Spawn Mail", "Spawn mail for a specific player, with a specific item.", ADMIN_CATEGORY_FUN_EVENT_KIT, object as text)
var/list/types = typesof(/atom)
var/list/matches = new()
var/list/recipients = list()
@@ -298,23 +292,25 @@
if(matches.len==1)
chosen = matches[1]
else
- chosen = tgui_input_list(usr, "Select an atom type", "Spawn Atom in Mail", matches)
+ chosen = tgui_input_list(user, "Select an atom type", "Spawn Atom in Mail", matches)
if(!chosen)
return
for(var/mob/living/player in GLOB.player_list)
recipients += player
- var/mob/living/chosen_player = tgui_input_list(usr, "Choose recipient", "Recipients", recipients, recipients)
+ var/mob/living/chosen_player = tgui_input_list(user, "Choose recipient", "Recipients", recipients, recipients)
recipient_mind = chosen_player.mind
if(!recipient_mind)
return
- var/shuttle_spawn = tgui_alert(usr, "Spawn mail at location or in the shuttle?", "Spawn mail", list("Location", "Shuttle"))
+ var/shuttle_spawn = tgui_alert(user, "Spawn mail at location or in the shuttle?", "Spawn mail", list("Location", "Shuttle"))
if(!shuttle_spawn)
return
+
+ var/mob/user_mob = user.mob
if(shuttle_spawn == "Shuttle")
var/obj/item/mail/new_mail = new
new_mail.initialize_for_recipient(recipient_mind, TRUE)
@@ -322,10 +318,10 @@
SSmail.admin_mail += new_mail
log_and_message_admins("spawned [chosen] inside an envelope at the shuttle")
else
- var/obj/item/mail/ground_mail = new /obj/item/mail(usr.loc)
+ var/obj/item/mail/ground_mail = new /obj/item/mail(user_mob.loc)
ground_mail.initialize_for_recipient(recipient_mind, TRUE)
new chosen(ground_mail)
- log_and_message_admins("spawned [chosen] inside an envelope at ([usr.x],[usr.y],[usr.z])")
+ log_and_message_admins("spawned [chosen] inside an envelope at ([user_mob.x],[user_mob.y],[user_mob.z])")
feedback_add_details("admin_verb","SM")
diff --git a/code/game/world.dm b/code/game/world.dm
index ee9d2c4c91..b813452887 100644
--- a/code/game/world.dm
+++ b/code/game/world.dm
@@ -164,10 +164,6 @@ GLOBAL_VAR(restart_counter)
load_alienwhitelist()
load_jobwhitelist()
- //Emergency Fix
- load_mods()
- //end-emergency fix
-
src.update_status()
setup_season() //VOREStation Addition
@@ -536,31 +532,6 @@ GLOBAL_VAR_INIT(world_topic_spam_protect_time, world.timeofday)
fdel(F)
F << the_mode
-/hook/startup/proc/loadMods()
- world.load_mods()
- return 1
-
-/world/proc/load_mods()
- if(CONFIG_GET(flag/admin_legacy_system))
- var/text = file2text("config/moderators.txt")
- if (!text)
- log_world("Failed to load config/mods.txt")
- else
- var/list/lines = splittext(text, "\n")
- for(var/line in lines)
- if (!line)
- continue
-
- if (copytext(line, 1, 2) == ";")
- continue
-
- var/title = "Moderator"
- var/rights = GLOB.admin_ranks[title]
-
- var/ckey = copytext(line, 1, length(line)+1)
- var/datum/admins/D = new /datum/admins(title, rights, ckey)
- D.associate(GLOB.directory[ckey])
-
/world/proc/update_status()
var/s = ""
diff --git a/code/modules/admin/ToRban.dm b/code/modules/admin/ToRban.dm
index 11cb9c5440..3ebb0c83a2 100644
--- a/code/modules/admin/ToRban.dm
+++ b/code/modules/admin/ToRban.dm
@@ -43,10 +43,8 @@
log_world("ToR data update aborted: no data.")
return
-/client/proc/ToRban(task in list("update","toggle","show","remove","remove all","find"))
- set name = "ToRban"
- set category = "Server.Config"
- if(!check_rights_for(src, R_HOLDER)) return
+ADMIN_VERB(ToRban, R_ADMIN|R_SERVER, "ToRban", "Modifies the TorBan settings.", ADMIN_CATEGORY_SERVER_CONFIG)
+ var/task = tgui_input_list(user, "What do you want to do?", "Select Option", list("update","toggle","show","remove","remove all","find"))
switch(task)
if("update")
ToRban_update()
@@ -61,32 +59,32 @@
if("show")
var/savefile/F = new(TORFILE)
var/dat
- if( length(F.dir) )
- for( var/i=1, i<=length(F.dir), i++ )
+ if(length(F.dir))
+ for(var/i=1, i<=length(F.dir), i++)
dat += "
"
for(var/t in GLOB.jobban_keylist)
@@ -628,7 +593,7 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(show_player_panel, R_HOLDER, "Show Player Panel", m
#define HARD_RESTART "Hard Restart (No Delay/Feedback Reason)"
#define HARDEST_RESTART "Hardest Restart (No actions, just reboot)"
#define TGS_RESTART "Server Restart (Kill and restart DD)"
-ADMIN_VERB(restart, R_SERVER, "Reboot World", "Restarts the world immediately.", "Server.Game")
+ADMIN_VERB(restart, R_SERVER, "Reboot World", "Restarts the world immediately.", ADMIN_CATEGORY_SERVER_GAME)
var/list/options = list(REGULAR_RESTART, REGULAR_RESTART_DELAYED, HARD_RESTART)
// this option runs a codepath that can leak db connections because it skips subsystem (specifically SSdbcore) shutdown
@@ -681,25 +646,22 @@ ADMIN_VERB(restart, R_SERVER, "Reboot World", "Restarts the world immediately.",
#undef HARDEST_RESTART
#undef TGS_RESTART
-ADMIN_VERB(cancel_reboot, R_SERVER, "Cancel Reboot", "Cancels a pending world reboot.", "Server.Game")
+ADMIN_VERB(cancel_reboot, R_SERVER, "Cancel Reboot", "Cancels a pending world reboot.", ADMIN_CATEGORY_SERVER_GAME)
if(!SSticker.cancel_reboot(user))
return
log_admin("[key_name(user)] cancelled the pending world reboot.")
message_admins("[key_name_admin(user)] cancelled the pending world reboot.")
-/datum/admins/proc/announce()
- set category = "Admin.Chat"
- set name = "Announce"
- set desc="Announce your desires to the world"
- if(!check_rights(0)) return
+ADMIN_VERB(announce, R_SERVER|R_ADMIN|R_EVENT, "Announce", "Announce your desires to the world.", ADMIN_CATEGORY_CHAT)
+ var/message = tgui_input_text(user, "Global message to send:", "Admin Announce", multiline = TRUE, prevent_enter = TRUE)
+ if(!message)
+ return
- var/message = tgui_input_text(usr, "Global message to send:", "Admin Announce", multiline = TRUE, prevent_enter = TRUE)
- if(message)
- if(!check_rights(R_SERVER,0))
- message = sanitize(message, 500, extra = 0)
- message = replacetext(message, "\n", "
") // required since we're putting it in a tag
- send_ooc_announcement(message, "From [usr.client.holder.fakekey ? "Administrator" : usr.key]")
- log_admin("Announce: [key_name(usr)] : [message]")
+ if(!check_rights_for(user, R_SERVER))
+ message = sanitize(message, 500, extra = 0)
+ message = replacetext(message, "\n", "
") // required since we're putting it in a
tag
+ send_ooc_announcement(message, "From [user.holder.fakekey ? "Administrator" : usr.key]")
+ log_admin("Announce: [key_name(user)] : [message]")
feedback_add_details("admin_verb","A") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/intercom()
@@ -815,14 +777,7 @@ ADMIN_VERB(cancel_reboot, R_SERVER, "Cancel Reboot", "Cancels a pending world re
GLOB.global_announcer.autosay("[this_message]", "[this_sender]", "[channel == "Common" ? null : channel]", states = speech_verb) //Common is a weird case, as it's not a "channel", it's just talking into a radio without a channel set.
sleep(this_wait SECONDS)
-/datum/admins/proc/toggleooc()
- set category = "Server.Chat"
- set desc="Globally Toggles OOC"
- set name="Toggle Player OOC"
-
- if(!check_rights(R_ADMIN))
- return
-
+ADMIN_VERB(toggleooc, R_ADMIN, "Toggle Player OOC", "Globally Toggles OOC.", ADMIN_CATEGORY_SERVER_CHAT)
CONFIG_SET(flag/ooc_allowed, !CONFIG_GET(flag/ooc_allowed))
if (CONFIG_GET(flag/ooc_allowed))
to_chat(world, span_world("The OOC channel has been globally enabled!"))
@@ -831,14 +786,7 @@ ADMIN_VERB(cancel_reboot, R_SERVER, "Cancel Reboot", "Cancels a pending world re
log_and_message_admins("toggled OOC.")
feedback_add_details("admin_verb","TOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-/datum/admins/proc/togglelooc()
- set category = "Server.Chat"
- set desc="Globally Toggles LOOC"
- set name="Toggle Player LOOC"
-
- if(!check_rights(R_ADMIN))
- return
-
+ADMIN_VERB(togglelooc, R_ADMIN, "Toggle Player LOOC", "Globally Toggles LOOC.", ADMIN_CATEGORY_SERVER_CHAT)
CONFIG_SET(flag/looc_allowed, !CONFIG_GET(flag/looc_allowed))
if (CONFIG_GET(flag/looc_allowed))
to_chat(world, span_world("The LOOC channel has been globally enabled!"))
@@ -847,130 +795,88 @@ ADMIN_VERB(cancel_reboot, R_SERVER, "Cancel Reboot", "Cancels a pending world re
log_and_message_admins("toggled LOOC.")
feedback_add_details("admin_verb","TLOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
-/datum/admins/proc/toggledsay()
- set category = "Server.Chat"
- set desc="Globally Toggles DSAY"
- set name="Toggle DSAY"
-
- if(!check_rights(R_ADMIN))
- return
-
+ADMIN_VERB(toggledsay, R_ADMIN, "Toggle DSAY", "Globally Toggles DSAY.", ADMIN_CATEGORY_SERVER_CHAT)
CONFIG_SET(flag/dsay_allowed, !CONFIG_GET(flag/dsay_allowed))
if (CONFIG_GET(flag/dsay_allowed))
to_chat(world, span_world("Deadchat has been globally enabled!"))
else
to_chat(world, span_world("Deadchat has been globally disabled!"))
- log_admin("[key_name(usr)] toggled deadchat.")
- message_admins("[key_name_admin(usr)] toggled deadchat.")
+ log_admin("[key_name(user)] toggled deadchat.")
+ message_admins("[key_name_admin(user)] toggled deadchat.")
feedback_add_details("admin_verb","TDSAY") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc
-/datum/admins/proc/toggleoocdead()
- set category = "Server.Chat"
- set desc="Toggle Dead OOC."
- set name="Toggle Dead OOC"
-
- if(!check_rights(R_ADMIN))
- return
-
+ADMIN_VERB(toggleoocdead, R_ADMIN, "Toggle Dead OOC", "Toggle Dead OOC.", ADMIN_CATEGORY_SERVER_CHAT)
CONFIG_SET(flag/dooc_allowed, !CONFIG_GET(flag/dooc_allowed))
- log_admin("[key_name(usr)] toggled Dead OOC.")
- message_admins("[key_name_admin(usr)] toggled Dead OOC.")
+ log_admin("[key_name(user)] toggled Dead OOC.")
+ message_admins("[key_name_admin(user)] toggled Dead OOC.")
feedback_add_details("admin_verb","TDOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-/datum/admins/proc/togglehubvisibility()
- set category = "Server.Config"
- set desc="Globally Toggles Hub Visibility"
- set name="Toggle Hub Visibility"
-
- if(!check_rights(R_ADMIN))
- return
-
+ADMIN_VERB(togglehubvisibility, R_HOST, "Toggle Hub Visibility", "Globally Toggles Hub Visibility.", ADMIN_CATEGORY_SERVER_CONFIG)
world.visibility = !(world.visibility)
- log_admin("[key_name(usr)] toggled hub visibility.")
- message_admins("[key_name_admin(usr)] toggled hub visibility. The server is now [world.visibility ? "visible" : "invisible"] ([world.visibility]).")
+ log_admin("[key_name(user)] toggled hub visibility.")
+ message_admins("[key_name_admin(user)] toggled hub visibility. The server is now [world.visibility ? "visible" : "invisible"] ([world.visibility]).")
feedback_add_details("admin_verb","THUB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc
-/datum/admins/proc/toggletraitorscaling()
- set category = "Server.Game"
- set desc="Toggle traitor scaling"
- set name="Toggle Traitor Scaling"
+ADMIN_VERB(toggletraitorscaling, R_ADMIN, "Toggle traitor scaling", "Toggle traitor scaling.", ADMIN_CATEGORY_SERVER_GAME)
CONFIG_SET(flag/traitor_scaling, !CONFIG_GET(flag/traitor_scaling))
- log_admin("[key_name(usr)] toggled Traitor Scaling to [CONFIG_GET(flag/traitor_scaling)].")
- message_admins("[key_name_admin(usr)] toggled Traitor Scaling [CONFIG_GET(flag/traitor_scaling) ? "on" : "off"].")
+ log_admin("[key_name(user)] toggled Traitor Scaling to [CONFIG_GET(flag/traitor_scaling)].")
+ message_admins("[key_name_admin(user)] toggled Traitor Scaling [CONFIG_GET(flag/traitor_scaling) ? "on" : "off"].")
feedback_add_details("admin_verb","TTS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-/datum/admins/proc/startnow()
- set category = "Server.Game"
- set desc="Start the round ASAP"
- set name="Start Now"
-
- if(!check_rights(R_SERVER|R_EVENT))
- return
+ADMIN_VERB(startnow, R_SERVER|R_EVENT, "Start Now", "Start the round ASAP.", ADMIN_CATEGORY_SERVER_GAME)
if(SSticker.current_state > GAME_STATE_PREGAME)
- to_chat(usr, span_warning("Error: Start Now: Game has already started."))
+ to_chat(user, span_warning("Error: Start Now: Game has already started."))
return
if(!SSticker.start_immediately)
SSticker.start_immediately = TRUE
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.)"
- log_admin("[key_name(usr)] has started the game.[msg]")
- message_admins(span_notice("[key_name_admin(usr)] has started the game.[msg]"))
- feedback_add_details("admin_verb","SN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
- else
- SSticker.start_immediately = FALSE
- to_chat(world, span_filter_system(span_blue("Immediate game start canceled. Normal startup resumed.")))
- log_and_message_admins("cancelled immediate game start.")
-/datum/admins/proc/toggleenter()
- set category = "Server.Game"
- set desc="People can't enter"
- set name="Toggle Entering"
+ log_admin("[key_name(user)] has started the game.[msg]")
+ message_admins(span_notice("[key_name_admin(user)] has started the game.[msg]"))
+ feedback_add_details("admin_verb","SN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+ return
+ SSticker.start_immediately = FALSE
+ to_chat(world, span_filter_system(span_blue("Immediate game start canceled. Normal startup resumed.")))
+ log_and_message_admins("cancelled immediate game start.")
+
+ADMIN_VERB(toggleenter, R_SERVER|R_ADMIN, "Toggle Entering", "Toggle if people can join the round.", ADMIN_CATEGORY_SERVER_GAME)
CONFIG_SET(flag/enter_allowed, !CONFIG_GET(flag/enter_allowed))
if (!CONFIG_GET(flag/enter_allowed))
to_chat(world, span_world("New players may no longer enter the game."))
else
to_chat(world, span_world("New players may now enter the game."))
- log_admin("[key_name(usr)] toggled new player game entering.")
- message_admins(span_blue("[key_name_admin(usr)] toggled new player game entering."))
+ log_admin("[key_name(user)] toggled new player game entering.")
+ message_admins(span_blue("[key_name_admin(user)] toggled new player game entering."))
world.update_status()
feedback_add_details("admin_verb","TE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-/datum/admins/proc/toggleAI()
- set category = "Server.Game"
- set desc="People can't be AI"
- set name="Toggle AI"
+ADMIN_VERB(toggleAI, R_SERVER|R_EVENT, "Toggle AI", "Toggle if people can play as AI.", ADMIN_CATEGORY_SERVER_GAME)
CONFIG_SET(flag/allow_ai, !CONFIG_GET(flag/allow_ai))
if (!CONFIG_GET(flag/allow_ai))
to_chat(world, span_world("The AI job is no longer chooseable."))
else
to_chat(world, span_world("The AI job is chooseable now."))
- log_admin("[key_name(usr)] toggled AI allowed.")
+ log_admin("[key_name(user)] toggled AI allowed.")
world.update_status()
feedback_add_details("admin_verb","TAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-/datum/admins/proc/toggleaban()
- set category = "Server.Game"
- set desc="Respawn basically"
- set name="Toggle Respawn"
+ADMIN_VERB(toggleaban, R_SERVER|R_EVENT, "Toggle Respawn", "Respawn basically.", ADMIN_CATEGORY_SERVER_GAME)
CONFIG_SET(flag/abandon_allowed, !CONFIG_GET(flag/abandon_allowed))
if(CONFIG_GET(flag/abandon_allowed))
to_chat(world, span_world("You may now respawn."))
else
to_chat(world, span_world("You may no longer respawn :("))
- message_admins(span_blue("[key_name_admin(usr)] toggled respawn to [CONFIG_GET(flag/abandon_allowed) ? "On" : "Off"]."))
- log_admin("[key_name(usr)] toggled respawn to [CONFIG_GET(flag/abandon_allowed) ? "On" : "Off"].")
+ message_admins(span_blue("[key_name_admin(user)] toggled respawn to [CONFIG_GET(flag/abandon_allowed) ? "On" : "Off"]."))
+ log_admin("[key_name(user)] toggled respawn to [CONFIG_GET(flag/abandon_allowed) ? "On" : "Off"].")
world.update_status()
feedback_add_details("admin_verb","TR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-/datum/admins/proc/togglepersistence()
- set category = "Server.Config"
- set desc="Whether persistent data will be saved from now on."
- set name="Toggle Persistent Data"
+ADMIN_VERB(togglepersistence, R_SERVER, "Toggle Persistent Data", "Whether persistent data will be saved from now on.", ADMIN_CATEGORY_SERVER_CONFIG)
CONFIG_SET(flag/persistence_disabled, !CONFIG_GET(flag/persistence_disabled))
- message_admins(span_blue("[key_name_admin(usr)] toggled persistence to [CONFIG_GET(flag/persistence_disabled) ? "Off" : "On"]."))
- log_admin("[key_name(usr)] toggled persistence to [CONFIG_GET(flag/persistence_disabled) ? "Off" : "On"].")
+ message_admins(span_blue("[key_name_admin(user)] toggled persistence to [CONFIG_GET(flag/persistence_disabled) ? "Off" : "On"]."))
+ log_admin("[key_name(user)] toggled persistence to [CONFIG_GET(flag/persistence_disabled) ? "Off" : "On"].")
world.update_status()
feedback_add_details("admin_verb","TPD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -1000,48 +906,34 @@ ADMIN_VERB(toggle_space_ninja, R_FUN|R_SERVER, "Toggle Space Ninjas", "Toggle sp
message_admins("[key_name_admin(user)] toggled Space Ninjas [CONFIG_GET(flag/ninjas_allowed) ? "on" : "off"].")
feedback_add_details("admin_verb","TSN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-/datum/admins/proc/delay()
- set category = "Server.Game"
- set desc="Delay the game start/end"
- set name="Delay"
-
- if(!check_rights(R_SERVER|R_EVENT|R_ADMIN|R_MOD)) return
+ADMIN_VERB(delay, R_SERVER|R_EVENT|R_ADMIN|R_MOD, "Delay", "Delay the game start/end.", ADMIN_CATEGORY_SERVER_GAME)
if (SSticker.current_state >= GAME_STATE_PLAYING)
// Tell the ticker to delay/resume
SSticker.toggle_delay()
- log_admin("[key_name(usr)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"].")
- message_admins(span_blue("[key_name(usr)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"]."))
+ log_admin("[key_name(user)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"].")
+ message_admins(span_blue("[key_name(user)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"]."))
return
GLOB.round_progressing = !GLOB.round_progressing
if (!GLOB.round_progressing)
to_chat(world, span_world("The game start has been delayed."))
- log_admin("[key_name(usr)] delayed the game.")
+ log_admin("[key_name(user)] delayed the game.")
else
to_chat(world, span_world("The game will start soon."))
- log_admin("[key_name(usr)] removed the delay.")
+ log_admin("[key_name(user)] removed the delay.")
feedback_add_details("admin_verb","DELAY") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-/datum/admins/proc/adjump()
- set category = "Server.Game"
- set desc="Toggle admin jumping"
- set name="Toggle Jump"
+ADMIN_VERB(adjump, R_SERVER, "Toggle Jump", "Toggle admin jumping.", ADMIN_CATEGORY_SERVER_GAME)
CONFIG_SET(flag/allow_admin_jump, !CONFIG_GET(flag/allow_admin_jump))
message_admins(span_blue("Toggled admin jumping to [CONFIG_GET(flag/allow_admin_jump)]."))
feedback_add_details("admin_verb","TJ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-/datum/admins/proc/adspawn()
- set category = "Server.Game"
- set desc="Toggle admin spawning"
- set name="Toggle Spawn"
+ADMIN_VERB(adspawn, R_SERVER, "Toggle Spawn", "Toggle admin spawning.", ADMIN_CATEGORY_SERVER_GAME)
CONFIG_SET(flag/allow_admin_spawning, !CONFIG_GET(flag/allow_admin_spawning))
message_admins(span_blue("Toggled admin item spawning to [CONFIG_GET(flag/allow_admin_spawning)]."))
feedback_add_details("admin_verb","TAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-/datum/admins/proc/adrev()
- set category = "Server.Game"
- set desc="Toggle admin revives"
- set name="Toggle Revive"
+ADMIN_VERB(adrev, R_SERVER, "Toggle Revive", "Toggle admin revives.", ADMIN_CATEGORY_SERVER_GAME)
CONFIG_SET(flag/allow_admin_rev, !CONFIG_GET(flag/allow_admin_rev))
message_admins(span_blue("Toggled reviving to [CONFIG_GET(flag/allow_admin_rev)]."))
feedback_add_details("admin_verb","TAR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -1087,79 +979,55 @@ ADMIN_VERB(toggle_space_ninja, R_FUN|R_SERVER, "Toggle Space Ninjas", "Toggle sp
return 0
-/datum/admins/proc/spawn_fruit(seedtype in SSplants.seeds)
- set category = "Debug.Game"
- set desc = "Spawn the product of a seed."
- set name = "Spawn Fruit"
-
- if(!check_rights(R_SPAWN)) return
-
+ADMIN_VERB(spawn_fruit, R_SPAWN, "Spawn Fruit", "Spawn the product of a seed.", ADMIN_CATEGORY_DEBUG_GAME)
+ var/seedtype = tgui_input_list(user, "Select Seed.", "Seed Type", SSplants.seeds)
if(!seedtype || !SSplants.seeds[seedtype])
return
- var/amount = tgui_input_number(usr, "Amount of fruit to spawn", "Fruit Amount", 1)
+ var/amount = tgui_input_number(user, "Amount of fruit to spawn", "Fruit Amount", 1)
+ var/mob/user_mob = user.mob
if(!isnull(amount))
var/datum/seed/S = SSplants.seeds[seedtype]
- S.harvest(usr,0,0,amount)
- log_admin("[key_name(usr)] spawned [seedtype] fruit at ([usr.x],[usr.y],[usr.z])")
+ S.harvest(user_mob,0,0,amount)
+ log_admin("[key_name(user)] spawned [seedtype] fruit at ([user_mob.x],[user_mob.y],[user_mob.z])")
-/datum/admins/proc/spawn_custom_item()
- set category = "Debug.Game"
- set desc = "Spawn a custom item."
- set name = "Spawn Custom Item"
-
- if(!check_rights(R_SPAWN)) return
-
- var/owner = tgui_input_list(usr, "Select a ckey.", "Spawn Custom Item", GLOB.custom_items)
- if(!owner|| !GLOB.custom_items[owner])
+ADMIN_VERB(spawn_custom_item, R_SPAWN, "Spawn Custom Item", "Spawn a custom item.", ADMIN_CATEGORY_DEBUG_GAME)
+ var/owner = tgui_input_list(user, "Select a ckey.", "Spawn Custom Item", GLOB.custom_items)
+ if(!owner)
return
var/list/possible_items = GLOB.custom_items[owner]
- var/datum/custom_item/item_to_spawn = tgui_input_list(usr, "Select an item to spawn.", "Spawn Custom Item", possible_items)
+ if(!possible_items)
+ return
+ var/datum/custom_item/item_to_spawn = tgui_input_list(user, "Select an item to spawn.", "Spawn Custom Item", possible_items)
if(!item_to_spawn)
return
- item_to_spawn.spawn_item(get_turf(usr))
-
-/datum/admins/proc/check_custom_items()
- set category = "Debug.Investigate"
- set desc = "Check the custom item list."
- set name = "Check Custom Items"
-
- if(!check_rights(R_SPAWN)) return
+ item_to_spawn.spawn_item(get_turf(user.mob))
+ADMIN_VERB(check_custom_items, R_SPAWN, "Check Custom Items", "Check the custom item list.", ADMIN_CATEGORY_DEBUG_INVESTIGATE)
if(!GLOB.custom_items)
- to_chat(usr, "Custom item list is null.")
+ to_chat(user, "Custom item list is null.")
return
- if(!length(GLOB.custom_items))
- to_chat(usr, "Custom item list not populated.")
+ if(!GLOB.custom_items.len)
+ to_chat(user, "Custom item list not populated.")
return
for(var/assoc_key in GLOB.custom_items)
- to_chat(usr, "[assoc_key] has:")
+ to_chat(user, "[assoc_key] has:")
var/list/current_items = GLOB.custom_items[assoc_key]
for(var/datum/custom_item/item in current_items)
- to_chat(usr, "- name: [item.name] icon: [item.item_icon] path: [item.item_path] desc: [item.item_desc]")
-
-/datum/admins/proc/spawn_plant(seedtype in SSplants.seeds)
- set category = "Debug.Game"
- set desc = "Spawn a spreading plant effect."
- set name = "Spawn Plant"
-
- if(!check_rights(R_SPAWN)) return
+ to_chat(user, "- name: [item.name] icon: [item.item_icon] path: [item.item_path] desc: [item.item_desc]")
+ADMIN_VERB(spawn_plant, R_SPAWN, "Spawn Plant", "Spawn a spreading plant effect.", ADMIN_CATEGORY_DEBUG_GAME)
+ var/seedtype = tgui_input_list(user, "Select Seed.", "Seed Type", SSplants.seeds)
if(!seedtype || !SSplants.seeds[seedtype])
return
- new /obj/effect/plant(get_turf(usr), SSplants.seeds[seedtype])
- log_admin("[key_name(usr)] spawned [seedtype] vines at ([usr.x],[usr.y],[usr.z])")
-
-/datum/admins/proc/spawn_atom(var/object as text)
- set name = "Spawn"
- set category = "Debug.Game"
- set desc = "(atom path) Spawn an atom"
-
- if(!check_rights(R_SPAWN)) return
+ var/mob/user_mob = user.mob
+ new /obj/effect/plant(get_turf(user_mob), SSplants.seeds[seedtype])
+ log_admin("[key_name(user)] spawned [seedtype] vines at ([user_mob.x],[user_mob.y],[user_mob.z])")
+ADMIN_VERB(spawn_atom, R_SPAWN, "Spawn", "(atom path) Spawn an atom", ADMIN_CATEGORY_DEBUG_GAME, object as text)
var/list/types = typesof(/atom)
var/list/matches = new()
@@ -1174,42 +1042,34 @@ ADMIN_VERB(toggle_space_ninja, R_FUN|R_SERVER, "Toggle Space Ninjas", "Toggle sp
if(matches.len==1)
chosen = matches[1]
else
- chosen = tgui_input_list(usr, "Select an atom type", "Spawn Atom", matches)
+ chosen = tgui_input_list(user, "Select an atom type", "Spawn Atom", matches)
if(!chosen)
return
+ var/mob/user_mob = user.mob
if(ispath(chosen,/turf))
- var/turf/T = get_turf(usr.loc)
+ var/turf/T = get_turf(user_mob.loc)
T.ChangeTurf(chosen)
else
- new chosen(usr.loc)
+ new chosen(user_mob.loc)
- log_and_message_admins("spawned [chosen] at ([usr.x],[usr.y],[usr.z])")
+ log_and_message_admins("spawned [chosen] at ([user_mob.x],[user_mob.y],[user_mob.z])")
feedback_add_details("admin_verb","SA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
-/datum/admins/proc/show_traitor_panel(var/mob/M in GLOB.mob_list)
- set category = "Admin.Events"
- set desc = "Edit mobs's memory and role"
- set name = "Show Traitor Panel"
-
+ADMIN_VERB(show_traitor_panel, R_ADMIN|R_FUN|R_EVENT, "Show Traitor Panel", "Edit mobs's memory and role", ADMIN_CATEGORY_EVENTS, mob/M in GLOB.mob_list)
if(!istype(M))
- to_chat(usr, "This can only be used on instances of type /mob")
+ to_chat(user, "This can only be used on instances of type /mob")
return
if(!M.mind)
- to_chat(usr, "This mob has no mind!")
+ to_chat(user, "This mob has no mind!")
return
- M.mind.edit_memory()
+ M.mind.edit_memory(user.mob)
feedback_add_details("admin_verb","STP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-/datum/admins/proc/show_game_mode()
- set category = "Admin.Game"
- set desc = "Show the current round configuration."
- set name = "Show Game Mode"
-
+ADMIN_VERB(show_game_mode, R_ADMIN|R_EVENT, "Show Game Mode", "Show the current round configuration.", ADMIN_CATEGORY_GAME)
if(!SSticker|| !SSticker.mode)
- tgui_alert_async(usr, "Not before roundstart!", "Alert")
+ tgui_alert_async(user, "Not before roundstart!", "Alert")
return
var/out = span_large(span_bold("Current mode: [SSticker.mode.name] ([SSticker.mode.config_tag])")) + "
"
@@ -1273,36 +1133,29 @@ ADMIN_VERB(toggle_space_ninja, R_FUN|R_SERVER, "Toggle Space Ninjas", "Toggle sp
out += " None."
out += " \[+\]
"
- var/datum/browser/popup = new(owner, "edit_mode[src]", "Edit Game Mode")
+ var/datum/browser/popup = new(user, "edit_mode[user.holder]", "Edit Game Mode")
popup.set_content(out)
popup.open()
feedback_add_details("admin_verb","SGM")
-
-/datum/admins/proc/toggletintedweldhelmets()
- set category = "Server.Config"
- set desc="Reduces view range when wearing welding helmets"
- set name="Toggle tinted welding helmets."
+ADMIN_VERB(toggletintedweldhelmets, R_ADMIN, "Toggle tinted welding helmets", "Reduces view range when wearing welding helmets.", ADMIN_CATEGORY_SERVER_CONFIG)
CONFIG_SET(flag/welder_vision, !CONFIG_GET(flag/welder_vision))
if (CONFIG_GET(flag/welder_vision))
to_chat(world, span_world("Reduced welder vision has been enabled!"))
else
to_chat(world, span_world("Reduced welder vision has been disabled!"))
- log_admin("[key_name(usr)] toggled welder vision.")
- message_admins("[key_name_admin(usr)] toggled welder vision.", 1)
+ log_admin("[key_name(user)] toggled welder vision.")
+ message_admins("[key_name_admin(user)] toggled welder vision.", 1)
feedback_add_details("admin_verb","TTWH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-/datum/admins/proc/toggleguests()
- set category = "Server.Config"
- set desc="Guests can't enter"
- set name="Toggle guests"
+ADMIN_VERB(toggleguests, R_HOST, "Toggle guests", "Guests can't enter.", ADMIN_CATEGORY_SERVER_CONFIG)
CONFIG_SET(flag/guests_allowed, !CONFIG_GET(flag/guests_allowed))
if (!CONFIG_GET(flag/guests_allowed))
to_chat(world, span_world("Guests may no longer enter the game."))
else
to_chat(world, span_world("Guests may now enter the game."))
- log_admin("[key_name(usr)] toggled guests game entering [CONFIG_GET(flag/guests_allowed)?"":"dis"]allowed.")
- message_admins(span_blue("[key_name_admin(usr)] toggled guests game entering [CONFIG_GET(flag/guests_allowed)?"":"dis"]allowed."))
+ log_admin("[key_name(user)] toggled guests game entering [CONFIG_GET(flag/guests_allowed)?"":"dis"]allowed.")
+ message_admins(span_blue("[key_name_admin(user)] toggled guests game entering [CONFIG_GET(flag/guests_allowed)?"":"dis"]allowed."))
feedback_add_details("admin_verb","TGU") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/update_mob_sprite(mob/living/carbon/human/H as mob)
@@ -1404,119 +1257,65 @@ ADMIN_VERB(toggle_space_ninja, R_FUN|R_SERVER, "Toggle Space Ninjas", "Toggle sp
qdel(frommob)
return 1
-/datum/admins/proc/force_antag_latespawn()
- set category = "Admin.Events"
- set name = "Force Template Spawn"
- set desc = "Force an antagonist template to spawn."
-
- if (!istype(src,/datum/admins))
- src = usr.client.holder
- if (!istype(src,/datum/admins))
- to_chat(usr, "Error: you are not an admin!")
- return
-
+ADMIN_VERB(force_antag_latespawn, R_ADMIN|R_EVENT|R_FUN, "Force Template Spawn", "Force an antagonist template to spawn.", ADMIN_CATEGORY_EVENTS)
if(!SSticker|| !SSticker.mode)
- to_chat(usr, "Mode has not started.")
+ to_chat(user, span_warning("Mode has not started."))
return
- var/antag_type = tgui_input_list(usr, "Choose a template.","Force Latespawn", GLOB.all_antag_types)
+ var/antag_type = tgui_input_list(user, "Choose a template.","Force Latespawn", GLOB.all_antag_types)
if(!antag_type || !GLOB.all_antag_types[antag_type])
- to_chat(usr, "Aborting.")
+ to_chat(user, span_warning("Aborting."))
return
var/datum/antagonist/antag = GLOB.all_antag_types[antag_type]
- message_admins("[key_name(usr)] attempting to force latespawn with template [antag.id].")
+ message_admins("[key_name(user)] attempting to force latespawn with template [antag.id].")
antag.attempt_late_spawn()
-/datum/admins/proc/force_mode_latespawn()
- set category = "Admin.Events"
- set name = "Force Mode Spawn"
- set desc = "Force autotraitor to proc."
-
- if (!istype(src,/datum/admins))
- src = usr.client.holder
- if (!istype(src,/datum/admins) || !check_rights(R_ADMIN|R_EVENT|R_FUN))
- to_chat(usr, "Error: you are not an admin!")
- return
-
+ADMIN_VERB(force_mode_latespawn, R_ADMIN|R_EVENT|R_FUN, "Force Mode Spawn", "Force autotraitor to proc.", ADMIN_CATEGORY_EVENTS)
if(!SSticker|| !SSticker.mode)
- to_chat(usr, "Mode has not started.")
+ to_chat(user, span_warning("Mode has not started."))
return
log_and_message_admins("attempting to force mode autospawn.")
SSticker.mode.try_latespawn()
-/datum/admins/proc/paralyze_mob(mob/living/H as mob)
- set category = "Admin.Events"
- set name = "Toggle Paralyze"
- set desc = "Paralyzes a player. Or unparalyses them."
-
+ADMIN_VERB_AND_CONTEXT_MENU(paralyze_mob, R_ADMIN|R_MOD|R_EVENT, "Toggle Paralyze", "Paralyzes a player. Or unparalyses them.", ADMIN_CATEGORY_EVENTS, mob/living/living_target in GLOB.mob_list)
var/msg
+ if (living_target.paralysis == 0)
+ living_target.SetParalysis(8000)
+ msg = "has paralyzed [key_name(living_target)]."
+ log_and_message_admins(msg)
+ return
+ if(tgui_alert(user, "[key_name(living_target)] is paralyzed, would you like to unparalyze them?","Paralyze Mob",list("Yes","No")) == "Yes")
+ living_target.SetParalysis(0)
+ msg = "has unparalyzed [key_name(living_target)]."
+ log_and_message_admins(msg)
- if(check_rights(R_ADMIN|R_MOD|R_EVENT))
- if (H.paralysis == 0)
- H.SetParalysis(8000)
- msg = "has paralyzed [key_name(H)]."
- log_and_message_admins(msg)
- else
- if(tgui_alert(src, "[key_name(H)] is paralyzed, would you like to unparalyze them?","Paralyze Mob",list("Yes","No")) == "Yes")
- H.SetParalysis(0)
- msg = "has unparalyzed [key_name(H)]."
- log_and_message_admins(msg)
+ADMIN_VERB(set_tcrystals, R_ADMIN|R_EVENT, "Set Telecrystals", "Allows admins to change telecrystals of a user.", ADMIN_CATEGORY_DEBUG_GAME, mob/living/carbon/human/human_mob in GLOB.player_list)
+ var/crystals = tgui_input_number(user, "Amount of telecrystals for [human_mob.ckey], currently [human_mob.mind.tcrystals].")
+ if (!isnull(crystals))
+ human_mob.mind.tcrystals = crystals
+ var/msg = "[key_name(user)] has modified [human_mob.ckey]'s telecrystals to [crystals]."
+ message_admins(msg)
-/datum/admins/proc/set_tcrystals(mob/living/carbon/human/H as mob)
- set category = "Debug.Game"
- set name = "Set Telecrystals"
- set desc = "Allows admins to change telecrystals of a user."
- set popup_menu = FALSE
- var/crystals
-
- if(check_rights(R_ADMIN|R_EVENT))
- crystals = tgui_input_number(usr, "Amount of telecrystals for [H.ckey], currently [H.mind.tcrystals].", crystals)
- if (!isnull(crystals))
- H.mind.tcrystals = crystals
- var/msg = "[key_name(usr)] has modified [H.ckey]'s telecrystals to [crystals]."
- message_admins(msg)
- else
- to_chat(usr, "You do not have access to this command.")
-
-/datum/admins/proc/add_tcrystals(mob/living/carbon/human/H as mob)
- set category = "Debug.Game"
- set name = "Add Telecrystals"
- set desc = "Allows admins to change telecrystals of a user by addition."
- set popup_menu = FALSE
- var/crystals
-
- if(check_rights(R_ADMIN|R_EVENT))
- crystals = tgui_input_number(usr, "Amount of telecrystals to give to [H.ckey], currently [H.mind.tcrystals].", crystals)
- if (!isnull(crystals))
- H.mind.tcrystals += crystals
- var/msg = "[key_name(usr)] has added [crystals] to [H.ckey]'s telecrystals."
- message_admins(msg)
- else
- to_chat(usr, "You do not have access to this command.")
+ADMIN_VERB(add_tcrystals, R_ADMIN|R_EVENT, "Add Telecrystals", "Allows admins to change telecrystals of a user by addition.", ADMIN_CATEGORY_DEBUG_GAME, mob/living/carbon/human/human_mob in GLOB.player_list)
+ var/crystals = tgui_input_number(user, "Amount of telecrystals to give to [human_mob.ckey], currently [human_mob.mind.tcrystals].")
+ if (!isnull(crystals))
+ human_mob.mind.tcrystals += crystals
+ var/msg = "[key_name(user)] has added [crystals] to [human_mob.ckey]'s telecrystals."
+ message_admins(msg)
-/datum/admins/proc/sendFax()
- set category = "Fun.Event Kit"
- set name = "Send Fax"
- set desc = "Sends a fax to this machine"
- var/department = tgui_input_list(usr, "Choose a fax", "Fax", GLOB.alldepartments)
+ADMIN_VERB(sendFax, R_ADMIN|R_MOD|R_EVENT, "Send Fax", "Sends a fax to this machine.", ADMIN_CATEGORY_FUN_EVENT_KIT)
+ var/department = tgui_input_list(user, "Choose a fax", "Fax", GLOB.alldepartments)
for(var/obj/machinery/photocopier/faxmachine/sendto in GLOB.allfaxes)
if(sendto.department == department)
+ var/replyorigin = tgui_input_text(user, "Please specify who the fax is coming from", "Origin")
- if (!istype(src,/datum/admins))
- src = usr.client.holder
- if (!istype(src,/datum/admins))
- to_chat(usr, "Error: you are not an admin!")
- return
+ var/obj/item/paper/admin/P = new /obj/item/paper/admin(null) //hopefully the null loc won't cause trouble for us
+ user.holder.faxreply = P
- var/replyorigin = tgui_input_text(src.owner, "Please specify who the fax is coming from", "Origin")
-
- var/obj/item/paper/admin/P = new /obj/item/paper/admin( null ) //hopefully the null loc won't cause trouble for us
- faxreply = P
-
- P.admindatum = src
+ P.admindatum = user.holder
P.origin = replyorigin
P.destination = sendto
@@ -1590,17 +1389,17 @@ ADMIN_VERB(toggle_space_ninja, R_FUN|R_SERVER, "Toggle Space Ninjas", "Toggle sp
faxreply = null
return
-/datum/admins/proc/set_uplink(mob/living/carbon/human/H as mob)
+/datum/admins/proc/set_uplink(mob/living/carbon/human/human_mob)
set category = "Debug.Events"
set name = "Set Uplink"
set desc = "Allows admins to set up an uplink on a character. This will be required for a character to use telecrystals."
set popup_menu = FALSE
if(check_rights(R_ADMIN|R_DEBUG))
- GLOB.traitors.spawn_uplink(H)
- H.mind.tcrystals = DEFAULT_TELECRYSTAL_AMOUNT
- H.mind.accept_tcrystals = 1
- var/msg = "[key_name(usr)] has given [H.ckey] an uplink."
+ GLOB.traitors.spawn_uplink(human_mob)
+ human_mob.mind.tcrystals = DEFAULT_TELECRYSTAL_AMOUNT
+ human_mob.mind.accept_tcrystals = 1
+ var/msg = "[key_name(usr)] has given [human_mob.ckey] an uplink."
message_admins(msg)
else
to_chat(usr, "You do not have access to this command.")
diff --git a/code/modules/admin/admin_verb_lists_vr.dm b/code/modules/admin/admin_verb_lists_vr.dm
index 362d2f4024..a2ab8ad615 100644
--- a/code/modules/admin/admin_verb_lists_vr.dm
+++ b/code/modules/admin/admin_verb_lists_vr.dm
@@ -1,288 +1,86 @@
//admin verb groups - They can overlap if you so wish. Only one of each verb will exist in the verbs list regardless
GLOBAL_LIST_INIT(admin_verbs_admin, list(
- /client/proc/toggle_vantag_hud,
- /datum/admins/proc/set_tcrystals,
- /datum/admins/proc/add_tcrystals,
- /datum/admins/proc/show_traitor_panel, //interface which shows a mob's mind.,
- /datum/admins/proc/show_game_mode, //Configuration window for the current game mode.,
- /datum/admins/proc/force_mode_latespawn, //Force the mode to try a latespawn proc,
- /datum/admins/proc/force_antag_latespawn, //Force a specific template to try a latespawn proc,
- /datum/admins/proc/toggleenter, //toggles whether people can join the current game,
- /datum/admins/proc/toggleguests, //toggles whether guests can join the current game,
- /datum/admins/proc/announce, //priority announce something to all clients.,
/datum/admins/proc/intercom, //send a fake intercom message, like an arrivals announcement,
/datum/admins/proc/intercom_convo, //send a fake intercom conversation, like an ATC exchange,
- /client/proc/player_panel_new, //shows an interface for all players, with links to various panels,
- /client/proc/player_panel,
/client/proc/hide_verbs, //hides all our adminverbs,
/client/proc/hide_most_verbs, //hides all our hideable adminverbs,
- /client/proc/cmd_check_new_players, //allows us to see every new player,
- /client/proc/cmd_admin_pm_context, //right-click adminPM interface,
- /client/proc/cmd_admin_pm_panel, //admin-pm list,
- /client/proc/cmd_admin_subtle_message, //send an message to somebody as a 'voice in their head',
- /datum/admins/proc/access_news_network, //allows access of newscasters,
/client/proc/jumptocoord, //we ghost and jump to a coordinate,
/client/proc/Getmob, //teleports a mob to our location,
/client/proc/Getkey, //teleports a mob with a certain ckey to our location,
/client/proc/Jump,
/client/proc/jumptokey, //allows us to jump to the location of a mob with a certain ckey,
/client/proc/jumptomob, //allows us to jump to a specific mob,
- /client/proc/cmd_admin_direct_narrate, //send text directly to a player with no padding. Useful for narratives and fluff-text,
- /client/proc/cmd_admin_world_narrate, //sends text to all players with no padding,
/client/proc/check_ai_laws, //shows AI and borg laws,
/client/proc/rename_silicon, //properly renames silicons,
- /client/proc/manage_silicon_laws, // Allows viewing and editing silicon laws. ,
/client/proc/modify_robot,
- /client/proc/check_antagonists,
- /client/proc/dsay, //talk in deadchat using our ckey/fakekey,
- /datum/admins/proc/toggleooc, //toggles ooc on/off for everyone,
- /datum/admins/proc/togglelooc, //toggles looc on/off for everyone,
- /datum/admins/proc/toggleoocdead, //toggles ooc on/off for everyone who is dead,
- /datum/admins/proc/togglehubvisibility, //toggles visibility on the BYOND Hub.,
- /datum/admins/proc/toggledsay, //toggles dsay on/off for everyone,
- /datum/admins/proc/PlayerNotes,
- /datum/admins/proc/show_player_info,
/client/proc/free_slot, //frees slot for chosen job,
/client/proc/cmd_admin_change_custom_event,
/client/proc/toggleghostwriters,
/client/proc/toggledrones,
- /client/proc/check_customitem_activity,
/client/proc/man_up,
/client/proc/global_man_up,
/client/proc/response_team, // Response Teams admin verb,
/client/proc/trader_ship, // Trader ship admin verb,
- /client/proc/event_manager_panel,
- /client/proc/empty_ai_core_toggle_latejoin,
- /client/proc/empty_ai_core_toggle_latejoin,
/client/proc/aooc,
- /client/proc/change_human_appearance_admin, // Allows an admin to change the basic appearance of human-based mobs ,
- /client/proc/change_human_appearance_self, // Allows the human-based mob itself change its basic appearance ,
/client/proc/change_security_level,
- /client/proc/view_chemical_reaction_logs,
- /client/proc/makepAI,
- /datum/admins/proc/paralyze_mob,
/datum/admins/proc/set_uplink,
- /datum/admins/proc/sendFax,
- /datum/admins/proc/view_feedback,
/client/proc/delbook,
- /client/proc/toggle_spawning_with_recolour,
/client/proc/start_vote,
- /client/proc/hide_motion_tracker_feedback
- ))
-
-GLOBAL_LIST_INIT(admin_verbs_spawn, list(
- /datum/admins/proc/spawn_fruit,
- /datum/admins/proc/spawn_custom_item,
- /datum/admins/proc/check_custom_items,
- /datum/admins/proc/spawn_plant,
- /datum/admins/proc/spawn_atom, //allows us to spawn instances,
- /datum/admins/proc/spawn_mail,
- /client/proc/spawn_character_mob,
- /client/proc/spawn_chemdisp_cartridge,
- /client/proc/map_template_load,
- /client/proc/map_template_upload,
- /client/proc/map_template_load_on_new_z,
- /client/proc/eventkit_open_mob_spawner,
- /client/proc/generic_structure,
- /client/proc/generic_item,
- /client/proc/create_gm_message,
- /client/proc/remove_gm_message,
- /client/proc/AdminCreateVirus,
- /client/proc/ReleaseVirus,
- /client/proc/spawn_reagent
- ))
-
-GLOBAL_LIST_INIT(admin_verbs_server, list(
- /datum/admins/proc/capture_map,
- /client/proc/Set_Holiday,
- /client/proc/ToRban,
- /datum/admins/proc/startnow,
- /datum/admins/proc/delay,
- /datum/admins/proc/toggleaban,
- /datum/admins/proc/togglepersistence,
- /client/proc/toggle_log_hrefs,
- /datum/admins/proc/toggleAI,
- /client/proc/cmd_debug_del_all,
- /datum/admins/proc/adrev,
- /datum/admins/proc/adspawn,
- /datum/admins/proc/adjump,
- /client/proc/check_customitem_activity,
- /client/proc/modify_server_news,
- /client/proc/recipe_dump,
- /client/proc/panicbunker,
- /client/proc/paranoia_logging,
- /client/proc/ip_reputation
))
GLOBAL_LIST_INIT(admin_verbs_debug, list(
- /client/proc/Debug2,
/client/proc/kill_air,
- /client/proc/ZASSettings,
- /client/proc/cmd_debug_make_powernets,
- /client/proc/kill_airgroup,
- /client/proc/cmd_debug_mob_lists,
- /client/proc/cmd_debug_using_map,
- /client/proc/cmd_debug_del_all,
- /client/proc/cmd_debug_tog_aliens,
- /client/proc/cmd_display_del_log,
- /client/proc/cmd_display_init_log,
- // /client/proc/cmd_display_overlay_log,
/client/proc/air_report,
/client/proc/reload_admins,
- /client/proc/reload_eventMs,
/client/proc/print_random_map,
/client/proc/create_random_map,
/client/proc/apply_random_map,
/client/proc/overlay_random_map,
/client/proc/delete_random_map,
/client/proc/show_plant_genes,
- /client/proc/enable_debug_verbs,
/client/proc/Jump,
/client/proc/jumptomob,
/client/proc/jumptocoord,
- /client/proc/dsay,
- /client/proc/player_panel_new, //shows an interface for all players, with links to various panels,
- /client/proc/player_panel,
/client/proc/hide_verbs, //hides all our adminverbs,
/client/proc/hide_most_verbs, //hides all our hideable adminverbs,
- /client/proc/cmd_check_new_players, //allows us to see every new player,
- // /client/proc/show_gm_status, //We don't use SSgame_master yet.
/datum/admins/proc/set_uplink,
- /datum/admins/proc/change_weather,
- /datum/admins/proc/change_time,
- /client/proc/cmd_regenerate_asset_cache,
- /client/proc/cmd_clear_smart_asset_cache,
- /client/proc/cmd_reload_robot_sprite_test,
- /client/proc/simple_DPS,
- /datum/admins/proc/view_feedback,
/client/proc/stop_sounds,
- /client/proc/spawn_reagent
))
//verbs which can be hidden - needs work
GLOBAL_LIST_INIT(admin_verbs_hideable, list(
-// /client/proc/deadchat,
- /datum/admins/proc/show_traitor_panel,
- /datum/admins/proc/toggleenter,
- /datum/admins/proc/toggleguests,
- /datum/admins/proc/announce,
- /client/proc/cmd_admin_subtle_message,
- /datum/admins/proc/access_news_network,
- /client/proc/cmd_admin_direct_narrate,
- /client/proc/cmd_admin_world_narrate,
- /client/proc/Set_Holiday,
- /client/proc/ToRban,
- /datum/admins/proc/startnow,
- /datum/admins/proc/delay,
- /datum/admins/proc/toggleaban,
- /client/proc/toggle_log_hrefs,
- /datum/admins/proc/toggleAI,
- /datum/admins/proc/adrev,
- /datum/admins/proc/adspawn,
- /datum/admins/proc/adjump,
- /client/proc/Debug2,
/client/proc/reload_admins,
/client/proc/kill_air,
- /client/proc/cmd_debug_make_powernets,
- /client/proc/kill_airgroup,
- /client/proc/startSinglo,
- /client/proc/simple_DPS,
- /client/proc/cmd_debug_mob_lists,
- /client/proc/cmd_debug_using_map,
- /client/proc/cmd_debug_del_all,
- /client/proc/cmd_debug_tog_aliens,
- /client/proc/cmd_display_del_log,
/client/proc/air_report,
- /client/proc/enable_debug_verbs,
/datum/admins/proc/set_uplink,
- /datum/admins/proc/set_tcrystals,
/client/proc/stop_sounds
))
GLOBAL_LIST_INIT(admin_verbs_mod, list(
- /client/proc/cmd_admin_pm_context, //right-click adminPM interface,
- /client/proc/cmd_admin_pm_panel, //admin-pm list,
- /datum/admins/proc/PlayerNotes,
- /client/proc/player_panel_new, //shows an interface for all players, with links to various panels,
- /client/proc/player_panel,
/client/proc/hide_verbs, //hides all our adminverbs,
/client/proc/hide_most_verbs, //hides all our hideable adminverbs,
- /client/proc/cmd_check_new_players, //allows us to see every new player,
- /datum/admins/proc/show_player_info,
- /datum/admins/proc/show_traitor_panel,
- /client/proc/player_panel_new,
- /client/proc/dsay,
- /client/proc/check_antagonists,
/client/proc/aooc,
- /client/proc/cmd_admin_subtle_message, //send an message to somebody as a 'voice in their head',
- /datum/admins/proc/paralyze_mob,
- /client/proc/cmd_admin_direct_narrate,
- /datum/admins/proc/sendFax,
- /datum/admins/proc/view_persistent_data,
/client/proc/start_vote
))
GLOBAL_LIST_INIT(admin_verbs_event_manager, list(
- /client/proc/toggle_vantag_hud,
- /client/proc/cmd_admin_pm_context,
- /client/proc/cmd_admin_pm_panel,
- /client/proc/player_panel_new, //shows an interface for all players, with links to various panels,
- /client/proc/player_panel,
/client/proc/hide_verbs, //hides all our adminverbs,
/client/proc/hide_most_verbs, //hides all our hideable adminverbs,
- /client/proc/cmd_check_new_players, //allows us to see every new player,
- /datum/admins/proc/show_player_info,
- /client/proc/dsay,
- /client/proc/cmd_admin_subtle_message,
- /client/proc/check_antagonists,
/client/proc/aooc,
- /datum/admins/proc/paralyze_mob,
- /client/proc/cmd_admin_direct_narrate,
- /datum/admins/proc/sendFax,
- /datum/admins/proc/change_weather,
- /datum/admins/proc/change_time,
- /client/proc/cmd_regenerate_asset_cache,
- /client/proc/cmd_clear_smart_asset_cache,
- /client/proc/cmd_reload_robot_sprite_test,
/client/proc/Jump,
/client/proc/jumptomob,
/client/proc/jumptocoord,
- /datum/admins/proc/delay,
- /client/proc/Set_Holiday,
- /datum/admins/proc/PlayerNotes,
- /datum/admins/proc/change_weather,
- /datum/admins/proc/change_time,
- /client/proc/cmd_regenerate_asset_cache,
- /client/proc/cmd_clear_smart_asset_cache,
- /client/proc/cmd_reload_robot_sprite_test,
- /datum/admins/proc/set_tcrystals,
- /datum/admins/proc/add_tcrystals,
- /datum/admins/proc/show_traitor_panel, //interface which shows a mob's mind.,
- /datum/admins/proc/show_game_mode, //Configuration window for the current game mode.,
- /datum/admins/proc/force_mode_latespawn, //Force the mode to try a latespawn proc,
- /datum/admins/proc/force_antag_latespawn, //Force a specific template to try a latespawn proc,
- /datum/admins/proc/announce, //priority announce something to all clients.,
/datum/admins/proc/intercom, //send a fake intercom message, like an arrivals announcement,
/datum/admins/proc/intercom_convo, //send a fake intercom conversation, like an ATC exchange,
- /client/proc/cmd_admin_pm_context, //right-click adminPM interface,
- /client/proc/cmd_admin_pm_panel, //admin-pm list,
- /client/proc/cmd_admin_subtle_message, //send an message to somebody as a 'voice in their head',
- /datum/admins/proc/access_news_network, //allows access of newscasters,
/client/proc/jumptocoord, //we ghost and jump to a coordinate,
/client/proc/Getmob, //teleports a mob to our location,
/client/proc/Getkey, //teleports a mob with a certain ckey to our location,
/client/proc/Jump,
/client/proc/jumptokey, //allows us to jump to the location of a mob with a certain ckey,
/client/proc/jumptomob, //allows us to jump to a specific mob,
- /client/proc/cmd_admin_direct_narrate, //send text directly to a player with no padding. Useful for narratives and fluff-text,
- /client/proc/cmd_admin_world_narrate, //sends text to all players with no padding,
/client/proc/check_ai_laws, //shows AI and borg laws,
/client/proc/rename_silicon, //properly renames silicons,
- /client/proc/manage_silicon_laws, // Allows viewing and editing silicon laws. ,
/client/proc/modify_robot,
- /client/proc/check_antagonists,
- /client/proc/dsay, //talk in deadchat using our ckey/fakekey,
- /datum/admins/proc/show_player_info,
/client/proc/free_slot, //frees slot for chosen job,
/client/proc/cmd_admin_change_custom_event,
/client/proc/toggleghostwriters,
@@ -290,28 +88,9 @@ GLOBAL_LIST_INIT(admin_verbs_event_manager, list(
/client/proc/global_man_up,
/client/proc/response_team, // Response Teams admin verb,
/client/proc/trader_ship, // Trader ship admin verb,
- /client/proc/event_manager_panel,
/client/proc/aooc,
- /client/proc/change_human_appearance_admin, // Allows an admin to change the basic appearance of human-based mobs ,
- /client/proc/change_human_appearance_self, // Allows the human-based mob itself change its basic appearance ,
/client/proc/change_security_level,
- /client/proc/makepAI,
- /datum/admins/proc/paralyze_mob,
- /datum/admins/proc/sendFax,
- /datum/admins/proc/view_feedback,
- /datum/admins/proc/capture_map,
- /client/proc/Set_Holiday,
- /datum/admins/proc/startnow,
- /datum/admins/proc/delay,
- /client/proc/cmd_debug_del_all,
- /client/proc/modify_server_news,
- /client/proc/toggle_spawning_with_recolour,
/client/proc/start_vote,
- /client/proc/AdminCreateVirus,
- /client/proc/ReleaseVirus,
/client/proc/add_hidden_area,
/client/proc/remove_hidden_area,
- /client/proc/hide_motion_tracker_feedback,
- /client/proc/modify_event_collector,
- /client/proc/induce_malfunction
))
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index cb9f1c3b0f..364eb0a49e 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -4,9 +4,7 @@
if(rights & R_HOLDER)
if(rights & R_BUILDMODE) add_verb(src, /client/proc/togglebuildmodeself)
if(rights & R_ADMIN) add_verb(src, GLOB.admin_verbs_admin)
- if(rights & R_SERVER) add_verb(src, GLOB.admin_verbs_server)
if(rights & R_DEBUG) add_verb(src, GLOB.admin_verbs_debug)
- if(rights & R_SPAWN) add_verb(src, GLOB.admin_verbs_spawn)
if(rights & R_MOD) add_verb(src, GLOB.admin_verbs_mod)
if(rights & R_EVENT) add_verb(src, GLOB.admin_verbs_event_manager)
@@ -18,10 +16,7 @@
remove_verb(src, list(
/client/proc/togglebuildmodeself,
GLOB.admin_verbs_admin,
- GLOB.admin_verbs_server,
GLOB.admin_verbs_debug,
- GLOB.admin_verbs_spawn,
- GLOB.debug_verbs
))
// NEW ADMIN VERBS SYSTEM
@@ -137,32 +132,20 @@ ADMIN_VERB(show_manifest, R_ADMIN, "Show Manifest", "View the shift's Manifest."
user.holder.show_manifest()
//BLACKBOX_LOG_ADMIN_VERB("Show Manifest")
-/client/proc/player_panel()
- set name = "Player Panel"
- set category = "Admin.Game"
- if(check_rights(R_HOLDER))
- holder.player_panel_old()
+ADMIN_VERB(player_panel, R_HOLDER, "Player Panel", "Open the player panel.", ADMIN_CATEGORY_GAME)
+ user.holder.player_panel_old(user)
feedback_add_details("admin_verb","PP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
- return
-/client/proc/player_panel_new()
- set name = "Player Panel New"
- set category = "Admin.Game"
- if(check_rights(R_HOLDER))
- holder.player_panel_new()
+ADMIN_VERB(player_panel_new, R_HOLDER, "Player Panel New", "Open the player panel.", ADMIN_CATEGORY_GAME)
+ user.holder.player_panel_new(user)
feedback_add_details("admin_verb","PPN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
- return
-/client/proc/check_antagonists()
- set name = "Check Antagonists"
- set category = "Admin.Investigate"
- if(check_rights(R_HOLDER))
- holder.check_antagonists()
- log_admin("[key_name(usr)] checked antagonists.") //for tsar~
+ADMIN_VERB(check_antagonists, R_HOLDER, "Check Antagonists", "Open the antagonist panel.", ADMIN_CATEGORY_INVESTIGATE)
+ user.holder.check_antagonists(user)
+ log_admin("[key_name(user)] checked antagonists.") //for tsar~
feedback_add_details("admin_verb","CHA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
- return
-ADMIN_VERB(jobbans, R_BAN, "Display Job bans", "View job bans here.", "Admin.Investigate")
+ADMIN_VERB(jobbans, R_BAN, "Display Job bans", "View job bans here.", ADMIN_CATEGORY_INVESTIGATE)
if(CONFIG_GET(flag/ban_legacy_system))
user.holder.Jobbans()
else
@@ -203,7 +186,7 @@ ADMIN_VERB(game_panel, R_ADMIN|R_SERVER|R_FUN, "Game Panel", "Look at the state
i = 0
GLOB.stealthminID["[ckey]"] = "@[num2text(num)]"
-ADMIN_VERB(stealth, R_STEALTH, "Stealth Mode", "Toggle stealth.", "Admin.Game")
+ADMIN_VERB(stealth, R_STEALTH, "Stealth Mode", "Toggle stealth.", ADMIN_CATEGORY_GAME)
if(user.holder.fakekey)
user.holder.fakekey = null
if(isnewplayer(user.mob))
@@ -363,13 +346,11 @@ ADMIN_VERB(deadmin, R_NONE, "DeAdmin", "Shed your admin powers.", ADMIN_CATEGORY
var/mob/observer/dead/our_mob = user.mob
our_mob.visualnet?.removeVisibility(our_mob, user)
-/client/proc/toggle_log_hrefs()
- set name = "Toggle href logging"
- set category = "Server.Config"
- if(!holder) return
- if(config)
- CONFIG_SET(flag/log_hrefs, !CONFIG_GET(flag/log_hrefs))
- message_admins(span_bold("[key_name_admin(usr)] [CONFIG_GET(flag/log_hrefs) ? "started" : "stopped"] logging hrefs"))
+ADMIN_VERB(toggle_log_hrefs, R_SERVER, "Toggle href logging", "Allows to toggle the logging of used hrefs.", ADMIN_CATEGORY_SERVER_CONFIG)
+ if(!config)
+ return
+ CONFIG_SET(flag/log_hrefs, !CONFIG_GET(flag/log_hrefs))
+ message_admins(span_bold("[key_name_admin(user)] [CONFIG_GET(flag/log_hrefs) ? "started" : "stopped"] logging hrefs"))
/client/proc/check_ai_laws()
set name = "Check AI Laws"
@@ -392,18 +373,14 @@ ADMIN_VERB(deadmin, R_NONE, "DeAdmin", "Shed your admin powers.", ADMIN_CATEGORY
S.SetName(new_name)
feedback_add_details("admin_verb","RAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-/client/proc/manage_silicon_laws()
- set name = "Manage Silicon Laws"
- set category = "Admin.Silicon"
+ADMIN_VERB(manage_silicon_laws, R_ADMIN|R_EVENT, "Manage Silicon Laws", "Allows to modify silicon laws.", ADMIN_CATEGORY_SILICON)
+ var/mob/living/silicon/selected_silicon = tgui_input_list(user, "Select silicon.", "Manage Silicon Laws", GLOB.silicon_mob_list)
+ if(!selected_silicon)
+ return
- if(!check_rights(R_ADMIN|R_EVENT)) return
-
- var/mob/living/silicon/S = tgui_input_list(usr, "Select silicon.", "Manage Silicon Laws", GLOB.silicon_mob_list)
- if(!S) return
-
- var/datum/tgui_module/law_manager/admin/L = new(S)
- L.tgui_interact(usr)
- log_and_message_admins("has opened [S]'s law manager.")
+ var/datum/tgui_module/law_manager/admin/law_interface = new(selected_silicon)
+ law_interface.tgui_interact(user.mob)
+ log_and_message_admins("has opened [selected_silicon]'s law manager.")
feedback_add_details("admin_verb","MSL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/change_security_level()
@@ -441,13 +418,6 @@ ADMIN_VERB(deadmin, R_NONE, "DeAdmin", "Shed your admin powers.", ADMIN_CATEGORY
// feedback_add_details("admin_verb","MP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
-/client/proc/playernotes()
- set name = "Show Player Info"
- set category = "Admin.Moderation"
- if(check_rights(R_HOLDER))
- holder.PlayerNotes()
- return
-
/client/proc/free_slot()
set name = "Free Job Slot"
set category = "Admin.Game"
@@ -539,23 +509,20 @@ ADMIN_VERB(remove_spell, R_FUN, "Remove Spell", ADMIN_VERB_NO_DESCRIPTION, ADMIN
feedback_add_details("admin_verb","RS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
//BLACKBOX_LOG_ADMIN_VERB("Remove Spell")
-ADMIN_VERB(debug_statpanel, R_DEBUG, "Debug Stat Panel", "Toggles local debug of the stat panel", "Debug.Misc")
+ADMIN_VERB(debug_statpanel, R_DEBUG, "Debug Stat Panel", "Toggles local debug of the stat panel.", ADMIN_CATEGORY_DEBUG_MISC)
user.stat_panel.send_message("create_debug")
-/client/proc/spawn_reagent()
- set name = "Spawn Reagent"
- set category = "Debug.Game"
-
- if(!check_rights(R_ADMIN|R_EVENT)) return
- var/datum/reagent/R = tgui_input_list(usr, "Select a reagent to spawn", "Reagent Spawner", subtypesof(/datum/reagent))
- if(!R)
+ADMIN_VERB(spawn_reagent, R_DEBUG|R_EVENT, "Spawn Reagent", "Spawn any reagent.", ADMIN_CATEGORY_DEBUG_GAME)
+ var/datum/reagent/new_reagent = tgui_input_list(user, "Select a reagent to spawn", "Reagent Spawner", subtypesof(/datum/reagent))
+ if(!new_reagent)
return
- var/obj/item/reagent_containers/glass/bottle/B = new(usr.loc)
+ var/mob/user_mob = user.mob
+ var/obj/item/reagent_containers/glass/bottle/new_bottle = new(user_mob.loc)
- B.icon_state = "bottle-1"
- B.reagents.add_reagent(R.id, 60)
- B.name = "[B.name] of [R.name]"
+ new_bottle.icon_state = "bottle-1"
+ new_bottle.reagents.add_reagent(new_reagent.id, 60)
+ new_bottle.name = "[new_bottle.name] of [new_reagent.name]"
/client/proc/add_hidden_area()
set name = "Add Ghostsight Block Area"
@@ -589,15 +556,9 @@ ADMIN_VERB(debug_statpanel, R_DEBUG, "Debug Stat Panel", "Toggles local debug of
A.flags &= ~(AREA_BLOCK_GHOST_SIGHT)
GLOB.ghostnet.removeArea(A)
-/client/proc/hide_motion_tracker_feedback()
- set name = "Toggle Motion Echos"
- set desc = "Hides or reveals motion tracker echos globally."
- set category = "Admin.Events"
-
- if(!check_rights(R_ADMIN|R_EVENT))
- return
+ADMIN_VERB(hide_motion_tracker_feedback, R_ADMIN|R_EVENT, "Toggle Motion Echos", "Hides or reveals motion tracker echos globally.", ADMIN_CATEGORY_EVENTS)
SSmotiontracker.hide_all = !SSmotiontracker.hide_all
- log_admin("[key_name(usr)] changed the motion echo visibility to [SSmotiontracker.hide_all ? "hidden" : "visible"].")
+ log_admin("[key_name(user)] changed the motion echo visibility to [SSmotiontracker.hide_all ? "hidden" : "visible"].")
ADMIN_VERB(adminorbit, R_FUN, "Orbit Things", "Makes something orbit around something else.", ADMIN_CATEGORY_FUN_EVENT_KIT)
var/center
@@ -649,7 +610,7 @@ ADMIN_VERB(adminorbit, R_FUN, "Orbit Things", "Makes something orbit around some
if(tgui_alert(user, "\The [orbiter] will orbit around [center]. Is this okay?", "Confirm Orbit", list("Yes", "No")) == "Yes")
orbiter.orbit(center, distance, clock, speed, segments)
-ADMIN_VERB(removetickets, R_ADMIN, "Security Tickets", "Allows one to remove tickets from the global list.", "Admin.Investigate")
+ADMIN_VERB(removetickets, R_ADMIN, "Security Tickets", "Allows one to remove tickets from the global list.", ADMIN_CATEGORY_INVESTIGATE)
if(GLOB.security_printer_tickets.len >= 1)
var/input = tgui_input_list(user, "Which message?", "Security Tickets", GLOB.security_printer_tickets)
if(!input)
@@ -710,22 +671,15 @@ ADMIN_VERB(removetickets, R_ADMIN, "Security Tickets", "Allows one to remove tic
popup.set_content(dat)
popup.open()
-/client/proc/toggle_spawning_with_recolour()
- set name = "Toggle Simple/Robot recolour verb"
- set desc = "Makes it so new robots/simple_mobs spawn with a verb to recolour themselves for this round. You must set them separately."
- set category = "Server.Game"
-
- if(!check_rights(R_ADMIN|R_EVENT|R_FUN))
- return
-
- var/which = tgui_alert(usr, "Which do you want to toggle?", "Choose Recolour Toggle", list("Robot", "Simple Mob"))
+ADMIN_VERB(toggle_spawning_with_recolour, R_ADMIN|R_EVENT|R_FUN, "Toggle Simple/Robot recolour verb", "Makes it so new robots/simple_mobs spawn with a verb to recolour themselves for this round. You must set them separately.", ADMIN_CATEGORY_SERVER_GAME)
+ var/which = tgui_alert(user, "Which do you want to toggle?", "Choose Recolour Toggle", list("Robot", "Simple Mob"))
switch(which)
if("Robot")
CONFIG_SET(flag/allow_robot_recolor, !CONFIG_GET(flag/allow_robot_recolor))
- to_chat(usr, "You have [CONFIG_GET(flag/allow_robot_recolor) ? "enabled" : "disabled"] newly spawned cyborgs to spawn with the recolour verb")
+ to_chat(user, "You have [CONFIG_GET(flag/allow_robot_recolor) ? "enabled" : "disabled"] newly spawned cyborgs to spawn with the recolour verb")
if("Simple Mob")
CONFIG_SET(flag/allow_simple_mob_recolor, !CONFIG_GET(flag/allow_simple_mob_recolor))
- to_chat(usr, "You have [CONFIG_GET(flag/allow_simple_mob_recolor) ? "enabled" : "disabled"] newly spawned simple mobs to spawn with the recolour verb")
+ to_chat(user, "You have [CONFIG_GET(flag/allow_simple_mob_recolor) ? "enabled" : "disabled"] newly spawned simple mobs to spawn with the recolour verb")
-ADMIN_VERB(modify_shift_end, (R_ADMIN|R_EVENT|R_SERVER), "Modify Shift End", "Modifies the hard shift end time.", "Server.Game")
+ADMIN_VERB(modify_shift_end, (R_ADMIN|R_EVENT|R_SERVER), "Modify Shift End", "Modifies the hard shift end time.", ADMIN_CATEGORY_SERVER_GAME)
GLOB.transfer_controller.modify_hard_end(user)
diff --git a/code/modules/admin/holder2.dm b/code/modules/admin/holder2.dm
index b6a552e0a5..c41a236a17 100644
--- a/code/modules/admin/holder2.dm
+++ b/code/modules/admin/holder2.dm
@@ -65,6 +65,8 @@ GLOBAL_PROTECT(href_token)
if(IsAdminAdvancedProcCall())
alert_to_permissions_elevation_attempt(usr)
return QDEL_HINT_LETMELIVE
+ if(faxreply)
+ qdel(faxreply)
. = ..()
/datum/admins/proc/activate()
diff --git a/code/modules/admin/map_capture.dm b/code/modules/admin/map_capture.dm
index 95c3731563..6faf85349b 100644
--- a/code/modules/admin/map_capture.dm
+++ b/code/modules/admin/map_capture.dm
@@ -1,24 +1,37 @@
-/datum/admins/proc/capture_map(tx as null|num, ty as null|num, tz as null|num, range as null|num)
- set category = "Server.Game"
- set name = "Capture Map Part"
- set desc = "Usage: Capture-Map-Part target_x_cord target_y_cord target_z_cord range (captures part of a map originating from bottom left corner)"
- if(!check_rights(R_ADMIN|R_DEBUG|R_SERVER))
+ADMIN_VERB(capture_map, R_ADMIN, "Capture Map Part", "Usage: Capture-Map-Part target_x_cord target_y_cord target_z_cord range (captures part of a map originating from bottom left corner).", ADMIN_CATEGORY_SERVER_GAME)
+
+ var/pos_type = tgui_alert(user, "Do you want to use your current loc or a manual number input?", "Where?", list("Manual", "Location", "Cancel"))
+ if(!pos_type || pos_type == "Cancel")
return
+ var/tx
+ var/ty
+ var/tz
+ if(pos_type == "Location")
+ tx = user.mob.x
+ ty = user.mob.y
+ tz = user.mob.z
+ else
+ tx = tgui_input_number(user, "Select X location", "X Loc", 1, world.maxx, 1)
+ ty = tgui_input_number(user, "Select Y location", "Y Loc", 1, world.maxy, 1)
+ tz = tgui_input_number(user, "Select Z location", "Z Loc", 1, world.maxz, 1)
+
+ var/range = tgui_input_number(user, "Select Range", "Range", 1, 32, 1)
+
if(isnull(tx) || isnull(ty) || isnull(tz) || isnull(range))
- to_chat(usr, span_filter_notice("Capture Map Part, captures part of a map using camara like rendering."))
- to_chat(usr, span_filter_notice("Usage: Capture-Map-Part target_x_cord target_y_cord target_z_cord range."))
- to_chat(usr, span_filter_notice("Target coordinates specify bottom left corner of the capture, range defines render distance to opposite corner."))
+ to_chat(user, span_filter_notice("Capture Map Part, captures part of a map using camara like rendering."))
+ to_chat(user, span_filter_notice("Usage: Capture-Map-Part target_x_cord target_y_cord target_z_cord range."))
+ to_chat(user, span_filter_notice("Target coordinates specify bottom left corner of the capture, range defines render distance to opposite corner."))
return
if(range > 32 || range <= 0)
- to_chat(usr, span_filter_notice("Capturing range is incorrect, it must be within 1-32."))
+ to_chat(user, span_filter_notice("Capturing range is incorrect, it must be within 1-32."))
return
if(locate(tx,ty,tz))
var/list/turfstocapture = list()
- var/hasasked = 0
+ var/hasasked = FALSE
for(var/xoff = 0 to range)
for(var/yoff = 0 to range)
var/turf/T = locate(tx + xoff,ty + yoff,tz)
@@ -26,8 +39,8 @@
turfstocapture.Add(T)
else
if(!hasasked)
- var/answer = tgui_alert(usr, "Capture includes non existant turf, Continue capture?","Continue capture?", list("No", "Yes"))
- hasasked = 1
+ var/answer = tgui_alert(user, "Capture includes non existant turf, Continue capture?","Continue capture?", list("No", "Yes"))
+ hasasked = TRUE
if(answer != "Yes")
return
@@ -53,7 +66,7 @@
cap.Blend(img, blendMode2iconMode(A.blend_mode), A.pixel_x + xoff, A.pixel_y + yoff)
var/file_name = "map_capture_x[tx]_y[ty]_z[tz]_r[range].png"
- to_chat(usr, span_filter_notice("Saved capture in cache as [file_name]."))
- usr << browse_rsc(cap, file_name)
+ to_chat(user, span_filter_notice("Saved capture in cache as [file_name]."))
+ DIRECT_OUTPUT(user, browse_rsc(cap, file_name))
else
- to_chat(usr, span_filter_notice("Target coordinates are incorrect."))
+ to_chat(user, span_filter_notice("Target coordinates are incorrect."))
diff --git a/code/modules/admin/news.dm b/code/modules/admin/news.dm
index 68bdd286fa..a18f284191 100644
--- a/code/modules/admin/news.dm
+++ b/code/modules/admin/news.dm
@@ -11,21 +11,15 @@
return TRUE
return FALSE
-/client/proc/modify_server_news()
- set name = "Modify Public News"
- set category = "Server.Game"
-
- if(!check_rights(0))
- return
-
+ADMIN_VERB(modify_server_news, R_SERVER|R_EVENT, "Modify Public News", "Modify the public news message.", ADMIN_CATEGORY_SERVER_GAME)
var/savefile/F = new(NEWSFILE)
if(F)
var/title = F["title"]
var/body = html2paper_markup(F["body"])
- var/new_title = tgui_input_text(src,"Write a good title for the news update. Note: HTML is NOT supported.","Write News", title, MAX_MESSAGE_LEN)
+ var/new_title = tgui_input_text(user, "Write a good title for the news update. Note: HTML is NOT supported.", "Write News", title, MAX_MESSAGE_LEN)
if(!new_title)
return
- var/new_body = tgui_input_text(src,"Write the body of the news update here. Note: HTML is NOT supported, however paper markup is supported. \n\
+ var/new_body = tgui_input_text(user, "Write the body of the news update here. Note: HTML is NOT supported, however paper markup is supported. \n\
Hitting enter will automatically add a line break. \n\
Valid markup includes: \[b\], \[i\], \[u\], \[large\], \[h1\], \[h2\], \[h3\]\ \[*\], \[hr\], \[small\], \[list\], \[table\], \[grid\], \
\[row\], \[cell\], \[logo\], \[talogo\], \[sglogo\].","Write News", body, MAX_MESSAGE_LEN, TRUE, prevent_enter = TRUE)
@@ -36,9 +30,9 @@
return
F["title"] << new_title
F["body"] << new_body
- F["author"] << key
+ F["author"] << user.key
F["timestamp"] << time2text(world.realtime, "DDD, MMM DD YYYY")
- message_admins("[key] modified the news to read:
[new_title]
[new_body]")
+ message_admins("[user.key] modified the news to read:
[new_title]
[new_body]")
/proc/get_server_news()
var/savefile/F = new(NEWSFILE)
diff --git a/code/modules/admin/persistence.dm b/code/modules/admin/persistence.dm
index 79a93b8c0f..5802d6133e 100644
--- a/code/modules/admin/persistence.dm
+++ b/code/modules/admin/persistence.dm
@@ -1,6 +1,2 @@
-/datum/admins/proc/view_persistent_data()
- set category = "Admin.Game"
- set name = "View Persistent Data"
- set desc = "Shows a list of persistent data for this round. Allows modification by admins."
-
- SSpersistence.show_info(usr)
+ADMIN_VERB(view_persistent_data, R_MOD|R_ADMIN, "View Persistent Data", "Shows a list of persistent data for this round. Allows modification by admins.", ADMIN_CATEGORY_GAME)
+ SSpersistence.show_info(user)
diff --git a/code/modules/admin/player_effects.dm b/code/modules/admin/player_effects.dm
index 029cdb7b08..0ed4ae9357 100644
--- a/code/modules/admin/player_effects.dm
+++ b/code/modules/admin/player_effects.dm
@@ -1,5 +1,5 @@
-ADMIN_VERB_AND_CONTEXT_MENU(player_effects, R_FUN, "Player Effects", "Modify a player character with various 'special treatments' from a list.", ADMIN_CATEGORY_FUN_EVENT_KIT, mob/target in GLOB.mob_list)
+ADMIN_VERB_AND_CONTEXT_MENU(player_effects, R_FUN, "Player Effects", "Modify a player character with various 'special treatments' from a list.", ADMIN_CATEGORY_FUN_EVENT_KIT, mob/target in get_mob_with_client_list())
var/datum/eventkit/player_effects/spawner = new()
spawner.target = target
spawner.tgui_interact(user.mob)
@@ -776,19 +776,18 @@ ADMIN_VERB_AND_CONTEXT_MENU(player_effects, R_FUN, "Player Effects", "Modify a p
target.dust()
if("paralyse")
- var/mob/living/Tar = target
- if(!istype(Tar))
+ if(!isliving(target))
return
- ui.user.client.holder.paralyze_mob(Tar)
+ SSadmin_verbs.dynamic_invoke_verb(ui.user.client, /datum/admin_verb/paralyze_mob, target)
if("subtle_message")
- ui.user.client.cmd_admin_subtle_message(target)
+ SSadmin_verbs.dynamic_invoke_verb(ui.user.client, /datum/admin_verb/cmd_admin_subtle_message, target)
if("direct_narrate")
- ui.user.client.cmd_admin_direct_narrate(target)
+ SSadmin_verbs.dynamic_invoke_verb(ui.user.client, /datum/admin_verb/cmd_admin_direct_narrate, target)
if("player_panel")
- SSadmin_verbs.dynamic_invoke_verb(ui.user, /datum/admin_verb/show_player_panel, target)
+ SSadmin_verbs.dynamic_invoke_verb(ui.user.client, /datum/admin_verb/show_player_panel, target)
if("view_variables")
ui.user.client.debug_variables(target)
diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm
index 9207dfc9a9..02f0c76d18 100644
--- a/code/modules/admin/player_panel.dm
+++ b/code/modules/admin/player_panel.dm
@@ -1,6 +1,6 @@
-/datum/admins/proc/player_panel_new()//The new one
- if (!check_rights_for(usr.client, R_HOLDER))
+/datum/admins/proc/player_panel_new(client/user)//The new one
+ if (!check_rights_for(user, R_HOLDER))
return
var/ui_scale = owner.prefs.read_preference(/datum/preference/toggle/ui_scale)
var/dat = "
Admin Player Panel"
@@ -320,11 +320,11 @@
var/window_size = "size=600x480"
if(owner.window_scaling && ui_scale)
window_size = "size=[600 * owner.window_scaling]x[400 * owner.window_scaling]"
- usr << browse(dat, "window=players;[window_size]")
+ user << browse(dat, "window=players;[window_size]")
//The old one
-/datum/admins/proc/player_panel_old()
- if (!check_rights_for(usr.client, R_HOLDER))
+/datum/admins/proc/player_panel_old(client/user)
+ if (!check_rights_for(user, R_HOLDER))
return
var/dat = "Player Menu"
@@ -367,10 +367,10 @@
dat += {"[M.key ? (M.client ? M.key : "[M.key] (DC)") : "No key"] |
X |
- PM |
+ PM |
"}
- if(usr.client)
+ if(user)
switch(is_special_character(M))
if(0)
dat += {"Traitor? | "}
@@ -385,11 +385,11 @@
dat += "
"
- usr << browse(dat, "window=players;size=640x480")
+ user << browse(dat, "window=players;size=640x480")
-/datum/admins/proc/check_antagonists()
+/datum/admins/proc/check_antagonists(client/user)
if (SSticker && SSticker.current_state >= GAME_STATE_PLAYING)
var/dat = "