diff --git a/code/__defines/admin_verb.dm b/code/__defines/admin_verb.dm
index ac34a29252..abfe93cffc 100644
--- a/code/__defines/admin_verb.dm
+++ b/code/__defines/admin_verb.dm
@@ -94,7 +94,7 @@ _ADMIN_VERB(verb_path_name, verb_permissions, verb_name, verb_desc, verb_categor
#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_EVENTS "Debug.Events"
#define ADMIN_CATEGORY_DEBUG_GAME "Debug.Game"
#define ADMIN_CATEGORY_DEBUG_SERVER "Debug.Server"
#define ADMIN_CATEGORY_DEBUG_SPRITES "Debug.Sprites"
diff --git a/code/controllers/subsystems/plants.dm b/code/controllers/subsystems/plants.dm
index 28fc3335d9..8f15a73b8d 100644
--- a/code/controllers/subsystems/plants.dm
+++ b/code/controllers/subsystems/plants.dm
@@ -150,18 +150,12 @@ SUBSYSTEM_DEF(plants)
// Debug for testing seed genes.
-/client/proc/show_plant_genes()
- set category = "Debug.Investigate"
- set name = "Show Plant Genes"
- set desc = "Prints the round's plant gene masks."
-
- if(!check_rights_for(src, R_HOLDER)) return
-
- if(!SSplants || !SSplants.gene_tag_masks)
- to_chat(usr, "Gene masks not set.")
+ADMIN_VERB(show_plant_genes, R_DEBUG, "Show Plant Genes", "Prints the round's plant gene masks.", ADMIN_CATEGORY_DEBUG_INVESTIGATE)
+ if(!SSplants.initialized)
+ to_chat(user, "Gene masks not set.")
return
for(var/mask in SSplants.gene_tag_masks)
- to_chat(usr, "[mask]: [SSplants.gene_tag_masks[mask]]")
+ to_chat(user, "[mask]: [SSplants.gene_tag_masks[mask]]")
#undef PLANT_TICK_TIME
diff --git a/code/datums/ghost_spawn_options.dm b/code/datums/ghost_spawn_options.dm
index 31832e8f20..8657d61f6d 100644
--- a/code/datums/ghost_spawn_options.dm
+++ b/code/datums/ghost_spawn_options.dm
@@ -21,7 +21,7 @@
to_chat(user, span_warning("You cannot become a mouse because you are banned from playing ghost roles."))
return
- if(!user.MayRespawn(1))
+ if(!user.MayRespawn(TRUE))
return
var/turf/T = get_turf(user)
@@ -77,7 +77,7 @@
to_chat(user, span_danger("You have not been playing on the server long enough to join as drone."))
return
- if(!user.MayRespawn(1))
+ if(!user.MayRespawn(TRUE))
return
var/deathtime = world.time - user.timeofdeath
diff --git a/code/game/objects/structures/trash_pile_vr.dm b/code/game/objects/structures/trash_pile_vr.dm
index dee67e8831..d0530196d3 100644
--- a/code/game/objects/structures/trash_pile_vr.dm
+++ b/code/game/objects/structures/trash_pile_vr.dm
@@ -73,7 +73,7 @@
to_chat(user, span_warning("You cannot become a mouse because you are banned from playing ghost roles."))
return
- if(!user.MayRespawn(1))
+ if(!user.MayRespawn(TRUE))
return
var/turf/T = get_turf(src)
diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index 07e5436aa2..50a97f96f9 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -661,49 +661,40 @@ ADMIN_VERB(announce, R_SERVER|R_ADMIN|R_EVENT, "Announce", "Announce your desire
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()
- set category = "Fun.Event Kit"
- set name = "Intercom Msg"
- set desc = "Send an intercom message, like an arrivals announcement."
- if(!check_rights(0)) return
+ADMIN_VERB(intercom, R_ADMIN|R_EVENT, "Intercom Msg", "Send an intercom message, like an arrivals announcement.", ADMIN_CATEGORY_FUN_EVENT_KIT)
+ var/channel = tgui_input_list(user, "Channel for message:","Channel", GLOB.radiochannels)
- var/channel = tgui_input_list(usr, "Channel for message:","Channel", GLOB.radiochannels)
+ if(!channel) //They didn't pick a channel
+ return
- if(channel) //They picked a channel
- var/sender = tgui_input_text(usr, "Name of sender (max 75):", "Announcement", "Announcement Computer")
+ var/sender = tgui_input_text(user, "Name of sender (max 75):", "Announcement", "Announcement Computer")
- if(sender) //They put a sender
- sender = sanitize(sender, 75, extra = 0)
- var/message = tgui_input_text(usr, "Message content (max 500):", "Contents", "This is a test of the announcement system.", multiline = TRUE, prevent_enter = TRUE)
- var/msgverb = tgui_input_text(usr, "Name of verb (Such as 'states', 'says', 'asks', etc):", "Verb", "says")
- if(message) //They put a message
- message = sanitize(message, 500, extra = 0)
- if(msgverb)
- msgverb = sanitize(msgverb, 50, extra = 0)
- else
- msgverb = "states"
- GLOB.global_announcer.autosay("[message]", "[sender]", "[channel == "Common" ? null : channel]", states = msgverb) //Common is a weird case, as it's not a "channel", it's just talking into a radio without a channel set.
- log_admin("Intercom: [key_name(usr)] : [sender]:[message]")
+ if(sender) //They put a sender
+ sender = sanitize(sender, 75, extra = 0)
+ var/message = tgui_input_text(user, "Message content (max 500):", "Contents", "This is a test of the announcement system.", multiline = TRUE, prevent_enter = TRUE)
+ var/msgverb = tgui_input_text(user, "Name of verb (Such as 'states', 'says', 'asks', etc):", "Verb", "says")
+ if(message) //They put a message
+ message = sanitize(message, 500, extra = 0)
+ if(msgverb)
+ msgverb = sanitize(msgverb, 50, extra = 0)
+ else
+ msgverb = "states"
+ GLOB.global_announcer.autosay("[message]", "[sender]", "[channel == "Common" ? null : channel]", states = msgverb) //Common is a weird case, as it's not a "channel", it's just talking into a radio without a channel set.
+ log_admin("Intercom: [key_name(user)] : [sender]:[message]")
feedback_add_details("admin_verb","IN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-/datum/admins/proc/intercom_convo()
- set category = "Fun.Event Kit"
- set name = "Intercom Convo"
- set desc = "Send an intercom conversation, like several uses of the Intercom Msg verb."
- set waitfor = FALSE //Why bother? We have some sleeps. You can leave tho!
- if(!check_rights(0)) return
-
- var/channel = tgui_input_list(usr, "Channel for message:","Channel", GLOB.radiochannels)
+ADMIN_VERB(intercom_convo, R_ADMIN|R_EVENT, "Intercom Convo", "Send an intercom conversation, like several uses of the Intercom Msg verb.", ADMIN_CATEGORY_FUN_EVENT_KIT)
+ var/channel = tgui_input_list(user, "Channel for message:","Channel", GLOB.radiochannels)
if(!channel) //They picked a channel
return
- var/speech_verb = tgui_alert(usr, "What speech verb to use for the conversation?", "Type", list("states", "says"))
+ var/speech_verb = tgui_alert(user, "What speech verb to use for the conversation?", "Type", list("states", "says"))
if(!speech_verb)
return
- to_chat(usr, span_notice(span_bold("Intercom Convo Directions") + "
Start the conversation with the sender, a pipe (|), and then the message on one line. Then hit enter to \
+ to_chat(user, span_notice(span_bold("Intercom Convo Directions") + "
Start the conversation with the sender, a pipe (|), and then the message on one line. Then hit enter to \
add another line, and type a (whole) number of seconds to pause between that message, and the next message, then repeat the message syntax up to 20 times. For example:
\
--- --- ---
\
Some Guy|Hello guys, what's up?
\
@@ -715,24 +706,25 @@ ADMIN_VERB(announce, R_SERVER|R_ADMIN|R_EVENT, "Announce", "Announce your desire
The above will result in those messages playing, with a 5 second gap between each. Maximum of 20 messages allowed."))
var/list/decomposed
- var/message = tgui_input_text(usr,"See your chat box for instructions. Keep a copy elsewhere in case it is rejected when you click OK.", "Input Conversation", "", multiline = TRUE, prevent_enter = TRUE)
+ var/message = tgui_input_text(user, "See your chat box for instructions. Keep a copy elsewhere in case it is rejected when you click OK.", "Input Conversation", "", multiline = TRUE, prevent_enter = TRUE)
if(!message)
return
//Split on pipe or \n
decomposed = splittext(message,regex("\\||$","m"))
- decomposed += "0" //Tack on a final 0 sleep to make 3-per-message evenly
//Time to find how they screwed up.
//Wasn't the right length
- if((decomposed.len) % 3) //+1 to accomidate the lack of a wait time for the last message
- to_chat(usr, span_warning("You passed [decomposed.len] segments (senders+messages+pauses). You must pass a multiple of 3, minus 1 (no pause after the last message). That means a sender and message on every other line (starting on the first), separated by a pipe character (|), and a number every other line that is a pause in seconds."))
+ if((decomposed.len) % 3)
+ to_chat(user, span_warning("You passed [decomposed.len] segments (senders+messages+pauses). You must pass a multiple of 3, minus 1 (no pause after the last message). That means a sender and message on every other line (starting on the first), separated by a pipe character (|), and a number every other line that is a pause in seconds."))
return
+ decomposed.Remove("") //ancient black magic.
+ decomposed += 0 //Add a final wait time for the final message.
//Too long a conversation
if((decomposed.len / 3) > 20)
- to_chat(usr, span_warning("This conversation is too long! 20 messages maximum, please."))
+ to_chat(user, span_warning("This conversation is too long! 20 messages maximum, please."))
return
//Missed some sleeps, or sanitized to nothing.
@@ -740,29 +732,29 @@ ADMIN_VERB(announce, R_SERVER|R_ADMIN|R_EVENT, "Announce", "Announce your desire
//Sanitize sender
var/clean_sender = sanitize(decomposed[i])
- if(!clean_sender)
- to_chat(usr, span_warning("One part of your conversation was not able to be sanitized. It was the sender of the [(i+2)/3]\th message."))
+ if(!istext(clean_sender))
+ to_chat(user, span_warning("One part of your conversation was not able to be sanitized. It was the sender of the [(i+2)/3]\th message."))
return
decomposed[i] = clean_sender
//Sanitize message
var/clean_message = sanitize(decomposed[++i])
- if(!clean_message)
- to_chat(usr, span_warning("One part of your conversation was not able to be sanitized. It was the body of the [(i+2)/3]\th message."))
+ if(!istext(clean_message))
+ to_chat(user, span_warning("One part of your conversation was not able to be sanitized. It was the body of the [(i+2)/3]\th message."))
return
decomposed[i] = clean_message
//Sanitize wait time
var/clean_time = text2num(decomposed[++i])
if(!isnum(clean_time))
- to_chat(usr, span_warning("One part of your conversation was not able to be sanitized. It was the wait time after the [(i+2)/3]\th message."))
+ to_chat(user, span_warning("One part of your conversation was not able to be sanitized. It was the wait time after the [(i+2)/3]\th message."))
return
if(clean_time > 60)
- to_chat(usr, span_warning("Max 60 second wait time between messages for sanity's sake please."))
+ to_chat(user, span_warning("Max 60 second wait time between messages for sanity's sake please."))
return
decomposed[i] = clean_time
- log_admin("Intercom convo started by: [key_name(usr)] : [sanitize(message)]")
+ log_admin("Intercom convo started by: [key_name(user)] : [sanitize(message)]")
feedback_add_details("admin_verb","IN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
//Sanitized AND we still have a chance to send it? Wow!
@@ -1395,17 +1387,12 @@ ADMIN_VERB(sendFax, R_ADMIN|R_MOD|R_EVENT, "Send Fax", "Sends a fax to this mach
faxreply = null
return
-/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
+ADMIN_VERB(set_uplink, R_ADMIN|R_DEBUG, "Set Uplink", "Allows admins to set up an uplink on a character. This will be required for a character to use telecrystals.", ADMIN_CATEGORY_DEBUG_EVENTS)
+ var/mob/living/carbon/human/traitor_human = tgui_input_list(user, "Select whom to give an uplink.", "Set uplink", GLOB.human_mob_list)
+ if(!traitor_human)
+ return
- if(check_rights(R_ADMIN|R_DEBUG))
- 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.")
+ GLOB.traitors.spawn_uplink(traitor_human)
+ traitor_human.mind.tcrystals = DEFAULT_TELECRYSTAL_AMOUNT
+ traitor_human.mind.accept_tcrystals = 1
+ message_admins("[key_name(usr)] has given [traitor_human.ckey] an uplink.")
diff --git a/code/modules/admin/admin_ranks.dm b/code/modules/admin/admin_ranks.dm
index 0ef0ca49ed..d6793d2d50 100644
--- a/code/modules/admin/admin_ranks.dm
+++ b/code/modules/admin/admin_ranks.dm
@@ -252,9 +252,9 @@ GLOBAL_PROTECT(protected_ranks)
dbfail = TRUE
//clear the datums references
GLOB.admin_datums.Cut()
- for(var/client/C in GLOB.admins)
- C.remove_admin_verbs()
- C.holder = null
+ for(var/client/current_client in GLOB.admins)
+ current_client.remove_admin_verbs()
+ current_client.holder = null
GLOB.admins.Cut()
GLOB.protected_admins.Cut()
GLOB.deadmins.Cut()
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 3c3da422ff..57f63c9af8 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -1,46 +1,16 @@
/client/proc/add_admin_verbs()
- // OLD ADMIN VERB SYSTEM
- var/rights = holder.rank_flags()
- 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_DEBUG) add_verb(src, GLOB.admin_verbs_debug)
- if(rights & R_MOD) add_verb(src, GLOB.admin_verbs_mod)
- if(rights & R_EVENT) add_verb(src, GLOB.admin_verbs_event_manager)
-
// NEW ADMIN VERBS SYSTEM
SSadmin_verbs.assosciate_admin(src)
/client/proc/remove_admin_verbs()
- // OLD ADMIN VERB SYSTEM
- remove_verb(src, list(
- /client/proc/togglebuildmodeself,
- GLOB.admin_verbs_admin,
- GLOB.admin_verbs_debug,
- ))
-
// NEW ADMIN VERBS SYSTEM
SSadmin_verbs.deassosciate_admin(src)
-/client/proc/hide_most_verbs()//Allows you to keep some functionality while hiding some verbs
- set name = "Adminverbs - Hide Most"
- set category = "Admin.Misc"
+ADMIN_VERB(hide_verbs, R_HOLDER, "Adminverbs - Hide All", "Hide all admin verbs.", ADMIN_CATEGORY_MISC)
+ SSadmin_verbs.deassosciate_admin(user)
+ add_verb(user, /client/proc/show_verbs)
- remove_verb(src, list(/client/proc/hide_most_verbs, GLOB.admin_verbs_hideable))
- add_verb(src, /client/proc/show_verbs)
-
- to_chat(src, span_filter_system(span_interface("Most of your adminverbs have been hidden.")))
- feedback_add_details("admin_verb","HMV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
- return
-
-/client/proc/hide_verbs()
- set name = "Adminverbs - Hide All"
- set category = "Admin.Misc"
-
- remove_admin_verbs()
- add_verb(src, /client/proc/show_verbs)
-
- to_chat(src, span_filter_system(span_interface("Almost all of your adminverbs have been hidden.")))
+ to_chat(user, span_filter_system(span_interface("Almost all of your adminverbs have been hidden.")))
feedback_add_details("admin_verb","TAVVH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
@@ -48,6 +18,9 @@
set name = "Adminverbs - Show"
set category = "Admin.Misc"
+ if(!check_rights_for(src, R_HOLDER))
+ return
+
remove_verb(src, /client/proc/show_verbs)
add_admin_verbs()
@@ -307,14 +280,10 @@ ADMIN_VERB_AND_CONTEXT_MENU(make_sound, R_FUN, "Make Sound", "Display a message
message_admins(span_blue("[key_name_admin(user)] made [target_object] at [target_object.x], [target_object.y], [target_object.z]. make a sound."))
feedback_add_details("admin_verb","MS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-/client/proc/togglebuildmodeself()
- set name = "Toggle Build Mode Self"
- set category = "Debug.Events"
- if(src.mob)
- togglebuildmode(src.mob)
+ADMIN_VERB_AND_CONTEXT_MENU(togglebuildmodeself, R_BUILDMODE, "Toggle Build Mode Self", "Toggles buildmode on oneself.", ADMIN_CATEGORY_DEBUG_EVENTS)
+ togglebuildmode(user.mob)
feedback_add_details("admin_verb","TBMS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
ADMIN_VERB(object_talk, R_FUN, "oSay", "Display a message to everyone who can hear the target.", ADMIN_CATEGORY_FUN_NARRATE, msg as text)
var/mob/user_mob = user.mob
if(!user_mob.control_object)
@@ -326,15 +295,11 @@ ADMIN_VERB(object_talk, R_FUN, "oSay", "Display a message to everyone who can he
V.show_message(span_filter_say(span_bold("[user_mob.control_object.name]") + " says: \"[msg]\""), 2)
feedback_add_details("admin_verb","OT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-/client/proc/kill_air() // -- TLE
- set category = "Debug.Dangerous"
- set name = "Kill Air"
- set desc = "Toggle Air Processing"
+ADMIN_VERB(kill_air, R_SERVER, "Kill Air", "Toggle Air Processing.", ADMIN_CATEGORY_DEBUG_DANGEROUS)
SSair.can_fire = !SSair.can_fire
- to_chat(usr, span_filter_system(span_bold("[SSair.can_fire ? "En" : "Dis"]abled air processing.")))
+ to_chat(user, span_filter_system(span_bold("[SSair.can_fire ? "En" : "Dis"]abled air processing.")))
feedback_add_details("admin_verb","KA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
- log_admin("[key_name(usr)] used 'kill air'.")
- message_admins(span_blue("[key_name_admin(usr)] used 'kill air'."), 1)
+ log_and_message_admins("used 'kill air'.", user)
ADMIN_VERB(deadmin, R_NONE, "DeAdmin", "Shed your admin powers.", ADMIN_CATEGORY_MISC)
user.holder.deactivate()
@@ -354,25 +319,18 @@ ADMIN_VERB(toggle_log_hrefs, R_SERVER, "Toggle href logging", "Allows to toggle
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"
- set category = "Admin.Silicon"
- if(check_rights(R_HOLDER))
- src.holder.output_ai_laws()
+ADMIN_VERB(check_ai_laws, R_ADMIN|R_FUN|R_EVENT, "Check AI Laws", "Display the current AI laws.", ADMIN_CATEGORY_SILICON)
+ user.holder.output_ai_laws()
-/client/proc/rename_silicon()
- set name = "Rename Silicon"
- set category = "Admin.Silicon"
+ADMIN_VERB(rename_silicon, R_ADMIN|R_FUN|R_EVENT, "Rename Silicon", "Rename a silicon mob.", ADMIN_CATEGORY_SILICON)
+ var/mob/living/silicon/silicon_target = tgui_input_list(user, "Select silicon.", "Rename Silicon.", GLOB.silicon_mob_list)
+ if(!silicon_target)
+ return
- if(!check_rights(R_ADMIN|R_FUN|R_EVENT)) return
-
- var/mob/living/silicon/S = tgui_input_list(usr, "Select silicon.", "Rename Silicon.", GLOB.silicon_mob_list)
- if(!S) return
-
- var/new_name = sanitizeSafe(tgui_input_text(src, "Enter new name. Leave blank or as is to cancel.", "[S.real_name] - Enter new silicon name", S.real_name, encode = FALSE))
- if(new_name && new_name != S.real_name)
- log_and_message_admins("has renamed the silicon '[S.real_name]' to '[new_name]'")
- S.SetName(new_name)
+ var/new_name = sanitizeSafe(tgui_input_text(user, "Enter new name. Leave blank or as is to cancel.", "[silicon_target.real_name] - Enter new silicon name", silicon_target.real_name, encode = FALSE))
+ if(new_name && new_name != silicon_target.real_name)
+ log_and_message_admins("has renamed the silicon '[silicon_target.real_name]' to '[new_name]'")
+ silicon_target.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!
ADMIN_VERB(manage_silicon_laws, R_ADMIN|R_EVENT, "Manage Silicon Laws", "Allows to modify silicon laws.", ADMIN_CATEGORY_SILICON)
@@ -385,101 +343,69 @@ ADMIN_VERB(manage_silicon_laws, R_ADMIN|R_EVENT, "Manage Silicon Laws", "Allows
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()
- set name = "Set security level"
- set desc = "Sets the station security level"
- set category = "Admin.Events"
-
- if(!check_rights(R_ADMIN|R_EVENT)) return
- var/sec_level = tgui_input_list(usr, "It's currently code [get_security_level()].", "Select Security Level", (list("green","yellow","violet","orange","blue","red","delta")-get_security_level()))
+ADMIN_VERB(change_security_level, R_ADMIN|R_EVENT, "Set security level", "Sets the station security level.", ADMIN_CATEGORY_EVENTS)
+ var/sec_level = tgui_input_list(user, "It's currently code [get_security_level()].", "Select Security Level", (list("green","yellow","violet","orange","blue","red","delta")-get_security_level()))
if(!sec_level)
return
- if(tgui_alert(usr, "Switch from code [get_security_level()] to code [sec_level]?","Change security level?",list("Yes","No")) == "Yes")
+ if(tgui_alert(user, "Switch from code [get_security_level()] to code [sec_level]?","Change security level?",list("Yes","No")) == "Yes")
set_security_level(sec_level)
- log_admin("[key_name(usr)] changed the security level to code [sec_level].")
-
-/client/proc/shuttle_panel()
- set name = "Shuttle Control Panel"
- set category = "Admin.Events"
-
- if(!check_rights(R_ADMIN | R_EVENT))
- return
+ log_admin("[key_name(user)] changed the security level to code [sec_level].")
+ADMIN_VERB(shuttle_panel, R_ADMIN|R_EVENT, "Shuttle Control Panel", "Access the shuttle control panel.", ADMIN_CATEGORY_EVENTS)
var/datum/tgui_module/admin_shuttle_controller/A = new(src)
- A.tgui_interact(usr)
- log_and_message_admins("has opened the shuttle panel.")
+ A.tgui_interact(user.mob)
+ log_and_message_admins("has opened the shuttle panel.", user)
feedback_add_details("admin_verb","SHCP")
-//---- bs12 verbs ----
+ADMIN_VERB(free_slot, R_ADMIN|R_FUN|R_EVENT, "Free Job Slot", "Frees another job slot.", ADMIN_CATEGORY_EVENTS)
+ var/list/jobs = list()
+ for (var/datum/job/current_job in GLOB.job_master.occupations)
+ if (current_job.current_positions >= current_job.total_positions && current_job.total_positions != -1)
+ jobs += current_job.title
+ if (!length(jobs))
+ to_chat(user, "There are no fully staffed jobs.")
+ return
+ var/job = tgui_input_list(user, "Please select job slot to free", "Free job slot", jobs)
+ if (!job)
+ return
+ GLOB.job_master.FreeRole(job)
+ message_admins("A job slot for [job] has been opened by [key_name_admin(user)]")
-/client/proc/mod_panel()
- set name = "Moderator Panel"
- set category = "Admin.Moderation"
-/* if(check_rights(R_HOLDER))
- holder.mod_panel()*/
-// feedback_add_details("admin_verb","MP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
- return
+ADMIN_VERB(toggleghostwriters, R_ADMIN|R_FUN|R_EVENT, "Toggle ghost writers", "Toggles ghost writing.", ADMIN_CATEGORY_SERVER_GAME)
+ if(!config)
+ return
+ CONFIG_SET(flag/cult_ghostwriter, !CONFIG_GET(flag/cult_ghostwriter))
+ message_admins("Admin [key_name_admin(user)] has [CONFIG_GET(flag/cult_ghostwriter) ? "en" : "dis"]abled ghost writers.")
-/client/proc/free_slot()
- set name = "Free Job Slot"
- set category = "Admin.Game"
- if(check_rights(R_HOLDER))
- var/list/jobs = list()
- for (var/datum/job/J in GLOB.job_master.occupations)
- if (J.current_positions >= J.total_positions && J.total_positions != -1)
- jobs += J.title
- if (!jobs.len)
- to_chat(usr, "There are no fully staffed jobs.")
- return
- var/job = tgui_input_list(usr, "Please select job slot to free", "Free job slot", jobs)
- if (job)
- GLOB.job_master.FreeRole(job)
- message_admins("A job slot for [job] has been opened by [key_name_admin(usr)]")
- return
+ADMIN_VERB(toggledrones, R_ADMIN|R_FUN|R_EVENT, "Toggle maintenance drones", "Toggles maintenance drone.", ADMIN_CATEGORY_SERVER_GAME)
+ if(!config)
+ return
+ CONFIG_SET(flag/allow_drone_spawn, !CONFIG_GET(flag/allow_drone_spawn))
+ message_admins("Admin [key_name_admin(user)] has [CONFIG_GET(flag/allow_drone_spawn) ? "en" : "dis"]abled maintenance drones.")
-/client/proc/toggleghostwriters()
- set name = "Toggle ghost writers"
- set category = "Server.Game"
- if(!holder) return
- if(config)
- CONFIG_SET(flag/cult_ghostwriter, !CONFIG_GET(flag/cult_ghostwriter))
- message_admins("Admin [key_name_admin(usr)] has [CONFIG_GET(flag/cult_ghostwriter) ? "en" : "dis"]abled ghost writers.", 1)
+ADMIN_VERB(man_up, R_ADMIN|R_FUN, "Man Up", "Tells mob to man up and deal with it.", ADMIN_CATEGORY_FUN_DO_NOT)
+ var/mob/living/living_target = tgui_input_list(user, "Who to tell to man up and deal with it.", "Man up", GLOB.mob_list)
+ if(!living_target)
+ return
-/client/proc/toggledrones()
- set name = "Toggle maintenance drones"
- set category = "Server.Game"
- if(!holder) return
- if(config)
- CONFIG_SET(flag/allow_drone_spawn, !CONFIG_GET(flag/allow_drone_spawn))
- message_admins("Admin [key_name_admin(usr)] has [CONFIG_GET(flag/allow_drone_spawn) ? "en" : "dis"]abled maintenance drones.", 1)
+ if(tgui_alert(user, "Are you sure you want to tell them to man up?", "Confirmation", list("Deal with it","No")) != "Deal with it")
+ return
-/client/proc/man_up(mob/T as mob in GLOB.mob_list)
- set category = "Fun.Do Not"
- set name = "Man Up"
- set desc = "Tells mob to man up and deal with it."
- set popup_menu = FALSE //VOREStation Edit - Declutter.
+ to_chat(living_target, span_filter_system(span_boldnotice(span_large("Man up and deal with it."))))
+ to_chat(living_target, span_filter_system(span_notice("Move along.")))
- if(tgui_alert(usr, "Are you sure you want to tell them to man up?","Confirmation",list("Deal with it","No")) != "Deal with it") return
+ log_admin("[key_name(user)] told [key_name(living_target)] to man up and deal with it.")
+ message_admins(span_blue("[key_name_admin(user)] told [key_name(living_target)] to man up and deal with it."), 1)
- to_chat(T, span_filter_system(span_boldnotice(span_large("Man up and deal with it."))))
- to_chat(T, span_filter_system(span_notice("Move along.")))
+ADMIN_VERB(global_man_up, R_ADMIN|R_FUN, "Man Up Global", "Tells everyone to man up and deal with it.", ADMIN_CATEGORY_FUN_DO_NOT)
+ if(tgui_alert(user, "Are you sure you want to tell the whole server up?","Confirmation",list("Deal with it","No")) != "Deal with it")
+ return
- log_admin("[key_name(usr)] told [key_name(T)] to man up and deal with it.")
- message_admins(span_blue("[key_name_admin(usr)] told [key_name(T)] to man up and deal with it."), 1)
+ for (var/mob/target_mob in GLOB.mob_list)
+ to_chat(target_mob, "
" + span_filter_system(span_notice(span_bold(span_huge("Man up.
Deal with it.")) + "
Move along.")) + "
")
+ DIRECT_OUTPUT(target_mob, 'sound/voice/manup1.ogg')
-/client/proc/global_man_up()
- set category = "Fun.Do Not"
- set name = "Man Up Global"
- set desc = "Tells everyone to man up and deal with it."
-
- if(tgui_alert(usr, "Are you sure you want to tell the whole server up?","Confirmation",list("Deal with it","No")) != "Deal with it") return
-
- for (var/mob/T as mob in GLOB.mob_list)
- to_chat(T, "
" + span_filter_system(span_notice(span_bold(span_huge("Man up.
Deal with it.")) + "
Move along.")) + "
")
- T << 'sound/voice/manup1.ogg'
-
- log_admin("[key_name(usr)] told everyone to man up and deal with it.")
- message_admins(span_blue("[key_name_admin(usr)] told everyone to man up and deal with it."), 1)
+ log_and_message_admins("told everyone to man up and deal with it.", user)
ADMIN_VERB(give_spell, R_FUN, "Give Spell", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, mob/spell_recipient)
var/datum/spell/S = tgui_input_list(user, "Choose the spell to give to that guy", "ABRAKADABRA", typesof(/datum/spell))
@@ -526,37 +452,33 @@ ADMIN_VERB(spawn_reagent, R_DEBUG|R_EVENT, "Spawn Reagent", "Spawn any reagent."
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"
- set category = "Admin.Game"
-
+ADMIN_VERB(add_hidden_area, R_ADMIN|R_FUN, "Add Ghostsight Block Area", "Blocks ghost sight in the taget area.", ADMIN_CATEGORY_GAME)
var/list/blocked_areas = list()
- for(var/area/A in world)
- if(!A.flag_check(AREA_BLOCK_GHOST_SIGHT))
- blocked_areas[A.name] = A
+ for(var/type, value in GLOB.areas_by_type)
+ var/area/current_area = value
+ if(!current_area.flag_check(AREA_BLOCK_GHOST_SIGHT))
+ blocked_areas[current_area.name] = current_area
blocked_areas = sortTim(blocked_areas, GLOBAL_PROC_REF(cmp_text_asc))
- var/selected_area = tgui_input_list(usr, "Pick an area to hide from ghost", "Select Area to hide", blocked_areas)
- var/area/A = blocked_areas[selected_area]
- if(!A)
+ var/selected_area = tgui_input_list(user, "Pick an area to hide from ghost", "Select Area to hide", blocked_areas)
+ var/area/target_area = blocked_areas[selected_area]
+ if(!target_area)
return
- A.flags |= AREA_BLOCK_GHOST_SIGHT
- GLOB.ghostnet.addArea(A)
-
-/client/proc/remove_hidden_area()
- set name = "Remove Ghostsight Block Area"
- set category = "Admin.Game"
+ target_area.flags |= AREA_BLOCK_GHOST_SIGHT
+ GLOB.ghostnet.addArea(target_area)
+ADMIN_VERB(remove_hidden_area, R_ADMIN|R_FUN, "Remove Ghostsight Block Area", "Unblocks ghost sight in the taget area.", ADMIN_CATEGORY_GAME)
var/list/blocked_areas = list()
- for(var/area/A in world)
- if(A.flag_check(AREA_BLOCK_GHOST_SIGHT))
- blocked_areas[A.name] = A
+ for(var/type, value in GLOB.areas_by_type)
+ var/area/current_area = value
+ if(current_area.flag_check(AREA_BLOCK_GHOST_SIGHT))
+ blocked_areas[current_area.name] = current_area
blocked_areas = sortTim(blocked_areas, GLOBAL_PROC_REF(cmp_text_asc))
- var/selected_area = tgui_input_list(usr, "Pick a from ghost hidden area to let them see it again", "Select Hidden Area", blocked_areas)
- var/area/A = blocked_areas[selected_area]
- if(!A)
+ var/selected_area = tgui_input_list(user, "Pick a from ghost hidden area to let them see it again", "Select Hidden Area", blocked_areas)
+ var/area/target_area = blocked_areas[selected_area]
+ if(!target_area)
return
- A.flags &= ~(AREA_BLOCK_GHOST_SIGHT)
- GLOB.ghostnet.removeArea(A)
+ target_area.flags &= ~(AREA_BLOCK_GHOST_SIGHT)
+ GLOB.ghostnet.removeArea(target_area)
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
@@ -624,22 +546,14 @@ ADMIN_VERB(removetickets, R_ADMIN, "Security Tickets", "Allows one to remove tic
else
tgui_alert_async(user, "The ticket list is empty.","Empty")
-/client/proc/delbook()
- set name = "Delete Book"
- set desc = "Permamently deletes a book from the database."
- set category = "Admin.Game"
- if(!src.holder)
- to_chat(src, "Only administrators may use this command.")
- return
-
+ADMIN_VERB(delbook, R_ADMIN, "Delete Book", "Permamently deletes a book from the database.", ADMIN_CATEGORY_GAME)
var/obj/machinery/librarycomp/our_comp
for(var/obj/machinery/librarycomp/l in world)
- if(istype(l, /obj/machinery/librarycomp))
- our_comp = l
- break
+ our_comp = l
+ break
if(!our_comp)
- to_chat(usr, span_warning("Unable to locate a library computer to use for book deleting."))
+ to_chat(user, span_warning("Unable to locate a library computer to use for book deleting."))
return
var/dat = "Book Inventory Management\n"
@@ -654,22 +568,19 @@ ADMIN_VERB(removetickets, R_ADMIN, "Security Tickets", "Allows one to remove tic
var/datum/db_query/query = SSdbcore.NewQuery("SELECT id, author, title, category FROM library ORDER BY [our_comp.sortby]")
query.Execute()
- var/show_admin_options = check_rights(R_ADMIN, show_msg = FALSE)
-
while(query.NextRow())
var/id = query.item[1]
var/author = query.item[2]
var/title = query.item[3]
var/category = query.item[4]
dat += "| [author] | [title] | [category] | "
- if(show_admin_options) // This isn't the only check, since you can just href-spoof press this button. Just to tidy things up.
- dat += "\[Del\]"
+ dat += "\[Del\]"
dat += " |
"
dat += ""
qdel(query)
- var/datum/browser/popup = new(src, "library", "Delete Book")
+ var/datum/browser/popup = new(user, "library", "Delete Book")
popup.set_content(dat)
popup.open()
diff --git a/code/modules/admin/modify_robot.dm b/code/modules/admin/modify_robot.dm
index 6b80cf9d1b..1703dc71da 100644
--- a/code/modules/admin/modify_robot.dm
+++ b/code/modules/admin/modify_robot.dm
@@ -1,14 +1,10 @@
-/client/proc/modify_robot(var/mob/living/silicon/robot/target in GLOB.silicon_mob_list)
- set name = "Modify Robot"
- set desc = "Allows to add or remove modules to/from robots."
- set category = "Admin.Silicon"
- if(!check_rights(R_ADMIN|R_FUN|R_VAREDIT|R_EVENT))
+ADMIN_VERB_AND_CONTEXT_MENU(modify_robot, R_ADMIN|R_FUN|R_VAREDIT|R_EVENT, "Modify Robot", "Allows to add or remove modules to/from robots.", ADMIN_CATEGORY_SILICON, mob/living/silicon/robot/target in GLOB.silicon_mob_list)
+ if(!target)
return
-
var/datum/eventkit/modify_robot/modify_robot = new()
- modify_robot.target = isrobot(target) ? target : null
+ modify_robot.target = target
modify_robot.selected_ai = target.is_slaved()
- modify_robot.tgui_interact(src.mob)
+ modify_robot.tgui_interact(user.mob)
/datum/eventkit/modify_robot
var/mob/living/silicon/robot/target
diff --git a/code/modules/admin/player_effects.dm b/code/modules/admin/player_effects.dm
index 0ed4ae9357..2faaffdbb9 100644
--- a/code/modules/admin/player_effects.dm
+++ b/code/modules/admin/player_effects.dm
@@ -752,7 +752,7 @@ ADMIN_VERB_AND_CONTEXT_MENU(player_effects, R_FUN, "Player Effects", "Modify a p
if(where == "Cancel")
return
if(where == "To Me")
- ui.user.client.Getmob(target)
+ SSadmin_verbs.dynamic_invoke_verb(ui.user.client, /datum/admin_verb/Getmob, target)
if(where == "To Mob")
var/mob/selection = tgui_input_list(ui.user, "Select a mob to jump [target] to:", "Jump to mob", GLOB.mob_list)
target.on_mob_jump()
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index ef7dede665..7f2db6d373 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -1235,10 +1235,9 @@
var/y = text2num(href_list["Y"])
var/z = text2num(href_list["Z"])
- var/client/C = usr.client
if(!isobserver(usr))
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/admin_ghost)
- C.jumptocoord(x,y,z)
+ SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/jumptocoord, x, y, z)
else if(href_list["viewruntime"])
var/datum/error_viewer/error_viewer = locate(href_list["viewruntime"])
diff --git a/code/modules/admin/verbs/adminjump.dm b/code/modules/admin/verbs/adminjump.dm
index 255ebbf4c4..beab9c9923 100644
--- a/code/modules/admin/verbs/adminjump.dm
+++ b/code/modules/admin/verbs/adminjump.dm
@@ -4,15 +4,9 @@
/mob/observer/dead/on_mob_jump()
following = null
-/client/proc/Jump(areaname as null|anything in return_sorted_areas())
- set name = "Jump to Area"
- set desc = "Area to jump to"
- set category = "Admin.Game"
- if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
- return
-
+ADMIN_VERB(Jump, R_ADMIN|R_MOD|R_DEBUG|R_EVENT, "Jump to Area", "Area to jump to.", ADMIN_CATEGORY_GAME, areaname as null|anything in return_sorted_areas())
if(!CONFIG_GET(flag/allow_admin_jump))
- tgui_alert_async(usr, "Admin jumping disabled")
+ tgui_alert_async(user, "Admin jumping disabled")
return
var/area/target_area
@@ -20,26 +14,24 @@
if(areaname)
target_area = return_sorted_areas()[areaname]
else
- target_area = return_sorted_areas()[tgui_input_list(src, "Pick an area:", "Jump to Area", return_sorted_areas())]
+ target_area = return_sorted_areas()[tgui_input_list(user, "Pick an area:", "Jump to Area", return_sorted_areas())]
if(!target_area)
return
- mob.on_mob_jump()
- mob.reset_perspective(mob)
+ user.mob.on_mob_jump()
+ user.mob.reset_perspective(user.mob)
var/turf/target = pick(get_area_turfs(target_area))
if(!target)
- to_chat(src, span_warning("Selected area [target_area] has no turfs!"))
+ to_chat(user, span_warning("Selected area [target_area] has no turfs!"))
return
- mob.forceMove(target)
- log_admin("[key_name(src)] jumped to [target_area]")
- message_admins("[key_name_admin(src)] jumped to [target_area]")
+ user.mob.forceMove(target)
+ log_and_message_admins("jumped to [target_area]", user)
feedback_add_details("admin_verb","JA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
ADMIN_VERB_AND_CONTEXT_MENU(jumptoturf, R_ADMIN|R_MOD|R_DEBUG|R_EVENT, "Jump to Turf", "Jump to a specific turf in the game.", ADMIN_CATEGORY_GAME, turf/T in world)
if(CONFIG_GET(flag/allow_admin_jump))
- log_admin("[key_name(user)] jumped to [T.x],[T.y],[T.z] in [T.loc]")
- message_admins("[key_name_admin(user)] jumped to [T.x],[T.y],[T.z] in [T.loc]")
+ log_and_message_admins("jumped to [T.x],[T.y],[T.z] in [T.loc]", user)
user.mob.on_mob_jump()
user.mob.reset_perspective(user)
user.mob.forceMove(T)
@@ -48,15 +40,8 @@ ADMIN_VERB_AND_CONTEXT_MENU(jumptoturf, R_ADMIN|R_MOD|R_DEBUG|R_EVENT, "Jump to
tgui_alert_async(user, "Admin jumping disabled")
/// Verb wrapper around do_jumptomob()
-/client/proc/jumptomob(mob as null|anything in GLOB.mob_list)
- set category = "Admin.Game"
- set name = "Jump to Mob"
- set popup_menu = FALSE
-
- if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
- return
-
- do_jumptomob(mob)
+ADMIN_VERB_AND_CONTEXT_MENU(jumptomob, R_ADMIN|R_MOD|R_DEBUG|R_EVENT, "Jump to Mob", "Jump to the selected mob.", ADMIN_CATEGORY_GAME, mob/M in GLOB.mob_list)
+ user.do_jumptomob(M)
/// Performs the jumps, also called from admin Topic() for JMP links
/client/proc/do_jumptomob(var/mob/M)
@@ -81,110 +66,92 @@ ADMIN_VERB_AND_CONTEXT_MENU(jumptoturf, R_ADMIN|R_MOD|R_DEBUG|R_EVENT, "Jump to
else
to_chat(A, span_filter_adminlog("This mob is not located in the game world."))
-/client/proc/jumptocoord(tx as num, ty as num, tz as num)
- set category = "Admin.Game"
- set name = "Jump to Coordinate"
-
- if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
+ADMIN_VERB(jumptocoord, R_ADMIN|R_MOD|R_DEBUG|R_EVENT,"Jump to Coordinate", "Jump to the target coordinates.", ADMIN_CATEGORY_GAME)
+ if(!CONFIG_GET(flag/allow_admin_jump))
+ tgui_alert_async(user, "Admin jumping disabled")
return
- if (CONFIG_GET(flag/allow_admin_jump))
- if(src.mob)
- var/mob/A = src.mob
- A.on_mob_jump()
- var/turf/T = locate(tx, ty, tz)
- if(!T)
- to_chat(usr, span_warning("Those coordinates are outside the boundaries of the map."))
- return
- A.reset_perspective(A)
- A.forceMove(T)
- feedback_add_details("admin_verb","JC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
- message_admins("[key_name_admin(usr)] jumped to coordinates [tx], [ty], [tz]")
+ var/tx
+ var/ty
+ var/tz
- else
- tgui_alert_async(usr, "Admin jumping disabled")
+ tx = tgui_input_number(user, "Select the target x coordinate", "X Loc", 1, world.maxx, 1)
+ ty = tgui_input_number(user, "Select the target y coordinate", "Y Loc", 1, world.maxy, 1)
+ tz = tgui_input_number(user, "Select the target z coordinate", "Z Loc", 1, world.maxz, 1)
-/client/proc/jumptokey()
- set category = "Admin.Game"
- set name = "Jump to Key"
+ var/mob/user_mob = user.mob
+ user_mob.on_mob_jump()
+ var/turf/target_turf = locate(tx, ty, tz)
+ if(!target_turf)
+ to_chat(user, span_warning("Those coordinates are outside the boundaries of the map."))
+ return
+ user_mob.reset_perspective(user_mob)
+ user_mob.forceMove(target_turf)
+ feedback_add_details("admin_verb","JC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+ message_admins("[key_name_admin(user)] jumped to coordinates [tx], [ty], [tz]")
- if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
+ADMIN_VERB(jumptokey, R_ADMIN|R_MOD|R_DEBUG|R_EVENT, "Jump to Key", "Jump to a player.", ADMIN_CATEGORY_GAME)
+ if(!CONFIG_GET(flag/allow_admin_jump))
+ tgui_alert_async(user, "Admin jumping disabled")
return
- if(CONFIG_GET(flag/allow_admin_jump))
- var/list/keys = list()
- for(var/mob/M in GLOB.player_list)
- keys += M.client
- var/selection = tgui_input_list(usr, "Select a key:", "Jump to Key", sortKey(keys))
- if(!selection)
- return
- var/mob/M = selection:mob
- var/turf/target_turf = get_turf(M)
- if(!target_turf)
- return
- log_admin("[key_name(usr)] jumped to [key_name(M)]")
- message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
- usr.on_mob_jump()
- usr.reset_perspective(usr)
- usr.forceMove(target_turf)
- feedback_add_details("admin_verb","JK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
- else
- tgui_alert_async(usr, "Admin jumping disabled")
-
-/client/proc/Getmob(mob/living/M as null|anything in GLOB.mob_list)
- set category = "Admin.Game"
- set name = "Get Mob"
- set desc = "Mob to teleport"
- set popup_menu = TRUE
-
- if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
+ var/list/keys = list()
+ for(var/mob/player_mob in GLOB.player_list)
+ keys += player_mob.client
+ var/client/selection = tgui_input_list(user, "Select a key:", "Jump to Key", sortKey(keys))
+ if(!selection)
return
- if(CONFIG_GET(flag/allow_admin_jump))
- if(!M)
- M = tgui_input_list(usr, "Pick a mob:", "Get Mob", GLOB.mob_list)
- if(!M)
- return
- log_admin("[key_name(usr)] jumped [key_name(M)] to them")
- var/msg = "[key_name_admin(usr)] jumped [key_name_admin(M)] to them"
- message_admins(msg)
- admin_ticket_log(M, msg)
- M.on_mob_jump()
- M.reset_perspective(M)
- M.forceMove(get_turf(usr))
- feedback_add_details("admin_verb","GM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
- else
- tgui_alert_async(usr, "Admin jumping disabled")
+ var/mob/selected_mob = selection.mob
+ var/turf/target_turf = get_turf(selected_mob)
+ if(!target_turf)
+ return
+ log_and_message_admins("jumped to [key_name(selected_mob)]", user)
+ user.mob.on_mob_jump()
+ user.mob.reset_perspective(user.mob)
+ user.mob.forceMove(target_turf)
+ feedback_add_details("admin_verb","JK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-/client/proc/Getkey()
- set category = "Admin.Game"
- set name = "Get Key"
- set desc = "Key to teleport"
-
- if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
+ADMIN_VERB_AND_CONTEXT_MENU(Getmob, R_ADMIN|R_MOD|R_DEBUG|R_EVENT, "Get Mob", "Mob to teleport.", ADMIN_CATEGORY_GAME, mob/living/living_mob in GLOB.mob_list)
+ if(!CONFIG_GET(flag/allow_admin_jump))
+ tgui_alert_async(user, "Admin jumping disabled")
return
- if(CONFIG_GET(flag/allow_admin_jump))
- var/list/keys = list()
- for(var/mob/M in GLOB.player_list)
- keys += M.client
- var/selection = tgui_input_list(usr, "Pick a key:", "Get Key", sortKey(keys))
- if(!selection)
- return
- var/mob/M = selection:mob
+ if(!living_mob)
+ living_mob = tgui_input_list(user, "Pick a mob:", "Get Mob", GLOB.mob_list)
+ if(!living_mob)
+ return
+ var/msg = "jumped [key_name(living_mob)] to them."
+ log_and_message_admins(msg, user)
+ admin_ticket_log(living_mob, "[key_name_admin(user)] " + msg)
+ living_mob.on_mob_jump()
+ living_mob.reset_perspective(living_mob)
+ living_mob.forceMove(get_turf(user.mob))
+ feedback_add_details("admin_verb","GM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
- if(!M)
- return
- log_admin("[key_name(usr)] teleported [key_name(M)]")
- var/msg = "[key_name_admin(usr)] teleported [ADMIN_LOOKUPFLW(M)]"
- message_admins(msg)
- admin_ticket_log(M, msg)
- if(M)
- M.on_mob_jump()
- M.reset_perspective(M) // Force reset to self before teleport
- M.forceMove(get_turf(usr))
- feedback_add_details("admin_verb","GK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
- else
- tgui_alert_async(usr, "Admin jumping disabled")
+ADMIN_VERB(Getkey, R_ADMIN|R_MOD|R_DEBUG|R_EVENT, "Get Key", "Key to teleport.", ADMIN_CATEGORY_GAME)
+ if(!CONFIG_GET(flag/allow_admin_jump))
+ tgui_alert_async(user, "Admin jumping disabled")
+ return
+
+ var/list/keys = list()
+ for(var/mob/curernt_mob in GLOB.player_list)
+ keys += curernt_mob.client
+ var/client/selection = tgui_input_list(user, "Pick a key:", "Get Key", sortKey(keys))
+ if(!selection)
+ return
+
+ var/mob/selected_mob = selection.mob
+ if(!selected_mob)
+ return
+
+ log_admin("[key_name(user)] teleported [key_name(selected_mob)]")
+ var/msg = "[key_name_admin(user)] teleported [ADMIN_LOOKUPFLW(selected_mob)]"
+ message_admins(msg)
+ admin_ticket_log(selected_mob, msg)
+ selected_mob.on_mob_jump()
+ selected_mob.reset_perspective(selected_mob) // Force reset to self before teleport
+ selected_mob.forceMove(get_turf(user))
+ feedback_add_details("admin_verb","GK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/sendmob()
set category = "Admin.Game"
diff --git a/code/modules/admin/verbs/antag-ooc.dm b/code/modules/admin/verbs/antag-ooc.dm
index a4faad663c..800f3d2695 100644
--- a/code/modules/admin/verbs/antag-ooc.dm
+++ b/code/modules/admin/verbs/antag-ooc.dm
@@ -3,40 +3,48 @@
set name = "AOOC"
set desc = "Antagonist OOC"
- var/is_admin = check_rights(R_ADMIN|R_MOD|R_EVENT, show_msg = 0)
- var/is_antag = src.mob.mind && src.mob.mind.special_role
+ var/is_antag = mob.mind?.special_role
- if(!is_antag && !is_admin) // Non-antagonists and non-admins have no business using this.
+ if(!is_antag) // Non-antagonists and non-admins have no business using this.
to_chat(src, span_warning("Sorry, but only certain antagonists or administrators can use this verb."))
return
- else if(is_antag && !is_admin) // Is an antag, and not an admin, meaning we need to check if their antag type allows AOOC.
- var/datum/antagonist/A = SSantag_job.get_antag_data(src.mob.mind.special_role)
- if(!A || !A.can_speak_aooc || !A.can_hear_aooc)
- to_chat(src, span_warning("Sorry, but your antagonist type is not allowed to speak in AOOC."))
- return
+ var/datum/antagonist/antag_datum = SSantag_job.get_antag_data(src.mob.mind.special_role)
+ if(!(antag_datum?.can_speak_aooc) || !antag_datum.can_hear_aooc)
+ to_chat(src, span_warning("Sorry, but your antagonist type is not allowed to speak in AOOC."))
+ return
msg = sanitize(msg)
if(!msg)
return
+ perform_aooc(msg)
+
+ADMIN_VERB(admin_aooc, R_ADMIN|R_MOD|R_EVENT, "Admin AOOC", "Send a message to antagonist OOC.", ADMIN_CATEGORY_CHAT, msg as text)
+ msg = sanitize(msg)
+ if(!msg)
+ return
+
+ user.perform_aooc(msg)
+
+/client/proc/perform_aooc(msg)
// Name shown to admins.
var/display_name = src.key
- if(holder)
- if(holder.fakekey)
- display_name = holder.fakekey
+ if(holder?.fakekey)
+ display_name = holder.fakekey
// Name shown to other players. Admins whom are not also antags have their rank displayed.
- var/player_display = (is_admin && !is_antag) ? "[display_name]([holder.rank_names()])" : display_name
+ var/player_display = (check_rights_for(src, R_ADMIN|R_MOD|R_EVENT) && !(mob.mind?.special_role)) ? "[display_name]([holder.rank_names()])" : display_name
- for(var/mob/M in GLOB.mob_list)
- if(check_rights_for(M.client, R_ADMIN|R_MOD|R_EVENT)) // Staff can see AOOC unconditionally, and with more details.
- to_chat(M, span_ooc(span_aooc("[create_text_tag("aooc", "Antag-OOC:", M.client)] [get_options_bar(src, 0, 1, 1)]([admin_jump_link(src.mob, check_rights_for(M.client, R_HOLDER))]): " + span_message("[msg]"))))
- else if(M.client) // Players can only see AOOC if observing, or if they are an antag type allowed to use AOOC.
- var/datum/antagonist/A = null
- if(M.mind) // Observers don't have minds, but they should still see AOOC.
- A = SSantag_job.get_antag_data(M.mind.special_role)
- if((M.mind && M.mind.special_role && A && A.can_hear_aooc) || isobserver(M)) // Antags must have their type be allowed to AOOC to see AOOC. This prevents, say, ERT from seeing AOOC.
- to_chat(M, span_ooc(span_aooc("[create_text_tag("aooc", "Antag-OOC:", M.client)] [player_display]: " + span_message("[msg]"))))
+ for(var/mob/target_mob in GLOB.mob_list)
+ if(check_rights_for(target_mob.client, R_ADMIN|R_MOD|R_EVENT)) // Staff can see AOOC unconditionally, and with more details.
+ to_chat(target_mob, span_ooc(span_aooc("[create_text_tag("aooc", "Antag-OOC:", target_mob.client)] [get_options_bar(src, 0, 1, 1)]([admin_jump_link(src.mob, check_rights_for(target_mob.client, R_HOLDER))]): " + span_message("[msg]"))))
+ continue
+ if(target_mob.client) // Players can only see AOOC if observing, or if they are an antag type allowed to use AOOC.
+ var/datum/antagonist/antag_datum = null
+ if(target_mob.mind) // Observers don't have minds, but they should still see AOOC.
+ antag_datum = SSantag_job.get_antag_data(target_mob.mind.special_role)
+ if((target_mob.mind?.special_role && antag_datum?.can_hear_aooc) || isobserver(target_mob)) // Antags must have their type be allowed to AOOC to see AOOC. This prevents, say, ERT from seeing AOOC.
+ to_chat(target_mob, span_ooc(span_aooc("[create_text_tag("aooc", "Antag-OOC:", target_mob.client)] [player_display]: " + span_message("[msg]"))))
- src.mob.log_talk("(AOOC) [msg]", LOG_OOC, color="#ff0000")
+ mob.log_talk("(AOOC) [msg]", LOG_OOC, color="#ff0000")
diff --git a/code/modules/admin/verbs/custom_event.dm b/code/modules/admin/verbs/custom_event.dm
index 27c7a5323b..e938123dcd 100644
--- a/code/modules/admin/verbs/custom_event.dm
+++ b/code/modules/admin/verbs/custom_event.dm
@@ -1,21 +1,14 @@
// verb for admins to set custom event
-/client/proc/cmd_admin_change_custom_event()
- set category = "Fun.Event Kit"
- set name = "Change Custom Event"
-
- if(!check_rights_for(src, R_HOLDER))
- to_chat(src, "Only administrators may use this command.")
+ADMIN_VERB(cmd_admin_change_custom_event, R_ADMIN|R_FUN|R_SERVER|R_EVENT, "Change Custom Event", "Change custom event message.", ADMIN_CATEGORY_FUN_EVENT_KIT)
+ var/input = tgui_input_text(user, "Enter the description of the custom event. Be descriptive. To cancel the event, make this blank or hit cancel.", "Custom Event", GLOB.custom_event_msg, MAX_PAPER_MESSAGE_LEN, TRUE, prevent_enter = TRUE)
+ if(isnull(input))
return
-
- var/input = tgui_input_text(usr, "Enter the description of the custom event. Be descriptive. To cancel the event, make this blank or hit cancel.", "Custom Event", GLOB.custom_event_msg, MAX_PAPER_MESSAGE_LEN, TRUE, prevent_enter = TRUE)
- if(!input || input == "")
+ if(input == "")
GLOB.custom_event_msg = null
- log_admin("[usr.key] has cleared the custom event text.")
- message_admins("[key_name_admin(usr)] has cleared the custom event text.")
+ log_and_message_admins("has cleared the custom event text.", user)
return
- log_admin("[usr.key] has changed the custom event text.")
- message_admins("[key_name_admin(usr)] has changed the custom event text.")
+ log_and_message_admins("has changed the custom event text.", user)
GLOB.custom_event_msg = input
diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm
index 00117e8078..a734c20b82 100644
--- a/code/modules/admin/verbs/diagnostics.dm
+++ b/code/modules/admin/verbs/diagnostics.dm
@@ -1,9 +1,6 @@
-/client/proc/air_report()
- set category = "Debug.Investigate"
- set name = "Show Air Report"
-
- if(!GLOB.master_controller || !SSair)
- tgui_alert_async(usr,"Master_controller or SSair not found.","Air Report")
+ADMIN_VERB(air_report, R_DEBUG, "Show Air Report", "Displays the current atmos stats.", ADMIN_CATEGORY_DEBUG_INVESTIGATE)
+ if(!SSair.initialized)
+ tgui_alert_async(user, "SSair not ready.", "Air Report")
return
var/active_groups = SSair.active_zones
@@ -15,18 +12,18 @@
var/active_on_main_station = 0
var/inactive_on_main_station = 0
- for(var/datum/zone/zone in SSair.zones)
+ for(var/datum/zone/zone as anything in SSair.zones)
var/turf/simulated/turf = locate() in zone.contents
if(turf?.z in using_map.station_levels)
if(zone.needs_update)
active_on_main_station++
- else
- inactive_on_main_station++
+ continue
+ inactive_on_main_station++
var/output = {"AIR SYSTEMS REPORT
General Processing Data
Cycle: [SSair.current_cycle]
- Groups: [SSair.zones.len]
+ Groups: [length(SSair.zones)]
---- Active: [active_groups]
---- Inactive: [inactive_groups]
---- Active on station: [active_on_main_station]
@@ -36,48 +33,14 @@
Hotspot Processing: [hotspots]
Geometry Processing Data
- Tile Update: [SSair.tiles_to_update.len]
+ Tile Update: [length(SSair.tiles_to_update)]
"}
- var/datum/browser/popup = new(src, "airreport", "Airreport")
+ var/datum/browser/popup = new(user, "airreport", "Airreport")
popup.set_content(output)
popup.open()
-/client/proc/fix_next_move()
- set category = "Debug.Game"
- set name = "Unfreeze Everyone"
- var/largest_move_time = 0
- var/largest_click_time = 0
- var/mob/largest_move_mob = null
- var/mob/largest_click_mob = null
- for(var/mob/M in GLOB.mob_list)
- if(!M.client)
- continue
- if(M.next_move >= largest_move_time)
- largest_move_mob = M
- if(M.next_move > world.time)
- largest_move_time = M.next_move - world.time
- else
- largest_move_time = 1
- if(M.next_click >= largest_click_time)
- largest_click_mob = M
- if(M.next_click > world.time)
- largest_click_time = M.next_click - world.time
- else
- largest_click_time = 0
- log_admin("DEBUG: [key_name(M)] next_move = [M.next_move] next_click = [M.next_click] world.time = [world.time]")
- M.next_move = 1
- M.next_click = 0
- message_admins("[key_name_admin(largest_move_mob)] had the largest move delay with [largest_move_time] frames / [largest_move_time/10] seconds!", 1)
- message_admins("[key_name_admin(largest_click_mob)] had the largest click delay with [largest_click_time] frames / [largest_click_time/10] seconds!", 1)
- message_admins("world.time = [world.time]", 1)
- feedback_add_details("admin_verb","UFE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
- return
-
-/client/proc/radio_report()
- set category = "Debug.Game"
- set name = "Radio report"
-
+ADMIN_VERB(radio_report, R_DEBUG, "Radio report", "Displays a radio report.", ADMIN_CATEGORY_DEBUG_INVESTIGATE)
var/output = "Radio Report
"
for (var/fq in SSradio.frequencies)
output += "Freq: [fq]
"
@@ -85,8 +48,8 @@
if (!fqs)
output += " ERROR
"
continue
- for (var/radio_filter in fqs.devices)
- var/list/f = fqs.devices[radio_filter]
+ for (var/radio_filter, device_list in fqs.devices)
+ var/list/f = device_list
if (!f)
output += " [radio_filter]: ERROR
"
continue
@@ -94,21 +57,16 @@
for (var/device in f)
if (isobj(device))
output += " [device] ([device:x],[device:y],[device:z] in area [get_area(device:loc)])
"
- else
- output += " [device]
"
+ continue
+ output += " [device]
"
- var/datum/browser/popup = new(src, "radioreport", "Radioreport")
+ var/datum/browser/popup = new(user, "radioreport", "Radioreport")
popup.set_content(output)
popup.open()
feedback_add_details("admin_verb","RR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-/client/proc/reload_admins()
- set name = "Reload Admins"
- set category = "Debug.Server"
-
- if(!check_rights(R_SERVER)) return
-
- message_admins("[usr] manually reloaded admins")
+ADMIN_VERB(reload_admins, R_SERVER, "Reload Admins", "Reloads admins from the file or database.", ADMIN_CATEGORY_DEBUG_SERVER)
+ message_admins("[user] manually reloaded admins")
load_admins()
feedback_add_details("admin_verb","RLDA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm
index 4c4864c41c..f3bb3b3fa8 100644
--- a/code/modules/admin/verbs/playsound.dm
+++ b/code/modules/admin/verbs/playsound.dm
@@ -212,18 +212,12 @@ ADMIN_VERB(play_web_sound, R_SOUNDS, "Play Internet Sound", "Plays a sound from
else
web_sound(user.mob, null)
-/client/proc/stop_sounds()
- set category = "Debug.Dangerous"
- set name = "Stop All Playing Sounds"
- if(!check_rights_for(src, R_HOLDER))
- return
-
- log_admin("[key_name(src)] stopped all currently playing sounds.")
- message_admins("[key_name_admin(src)] stopped all currently playing sounds.")
- for(var/mob/M in GLOB.player_list)
- SEND_SOUND(M, sound(null))
- var/client/C = M.client
- C?.tgui_panel?.stop_music()
+ADMIN_VERB(stop_sounds, R_SOUNDS, "Stop All Playing Sounds", "Stops all playing sounds.", ADMIN_CATEGORY_FUN_SOUNDS)
+ log_and_message_admins("stopped all currently playing sounds.", user)
+ for(var/mob/current_mob in GLOB.player_list)
+ SEND_SOUND(current_mob, sound(null))
+ var/client/current_client = current_mob.client
+ current_client?.tgui_panel?.stop_music()
S_TIMER_COOLDOWN_RESET(SStimer, COOLDOWN_INTERNET_SOUND)
feedback_add_details("admin_verb", "Stop All Playing Sounds")
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index 74c7c10153..2a555de1b8 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -123,7 +123,7 @@ ADMIN_VERB(cmd_admin_local_narrate, R_FUN|R_EVENT, "Local Narrate", "Locally nar
feedback_add_details("admin_verb","LNR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-ADMIN_VERB(cmd_admin_direct_narrate, R_FUN|R_EVENT, "Direct Narrate", "Directly narrate the target.", ADMIN_CATEGORY_FUN_NARRATE, mob/target_mob)
+ADMIN_VERB_AND_CONTEXT_MENU(cmd_admin_direct_narrate, R_FUN|R_EVENT, "Direct Narrate", "Directly narrate the target.", ADMIN_CATEGORY_FUN_NARRATE, mob/target_mob in GLOB.mob_list)
if(!target_mob)
target_mob = tgui_input_list(user, "Direct narrate to who?", "Active Players", get_mob_with_client_list())
diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm
index 39ed4f31ab..368a5d8c71 100644
--- a/code/modules/admin/verbs/striketeam.dm
+++ b/code/modules/admin/verbs/striketeam.dm
@@ -60,40 +60,30 @@ GLOBAL_VAR_INIT(send_emergency_team, 0) // Used for automagic response teams; 'a
GLOBAL_VAR_INIT(ert_base_chance, 10) // Default base chance. Will be incremented by increment ERT chance.
GLOBAL_VAR(can_call_ert)
-GLOBAL_VAR_INIT(silent_ert, 0)
+GLOBAL_VAR_INIT(silent_ert, FALSE)
-/client/proc/response_team()
- set name = "Dispatch Emergency Response Team"
- set category = "Fun.Event Kit"
- set desc = "Send an emergency response team to the station"
-
- if(!check_rights_for(src, R_HOLDER))
- to_chat(usr, span_danger("Only administrators may use this command."))
- return
- if(!SSticker)
- to_chat(usr, span_danger("The game hasn't started yet!"))
- return
- if(SSticker.current_state == 1)
- to_chat(usr, span_danger("The round hasn't started yet!"))
+ADMIN_VERB(response_team, R_ADMIN|R_MOD|R_EVENT, "Dispatch Emergency Response Team", "Send an emergency response team to the station.", ADMIN_CATEGORY_FUN_EVENT_KIT)
+ if(SSticker.current_state <= GAME_STATE_PREGAME)
+ to_chat(user, span_danger("The round hasn't started yet!"))
return
if(GLOB.send_emergency_team)
- to_chat(usr, span_danger("[using_map.boss_name] has already dispatched an emergency response team!"))
+ to_chat(user, span_danger("[using_map.boss_name] has already dispatched an emergency response team!"))
return
- if(tgui_alert(usr, "Do you want to dispatch an Emergency Response Team?","ERT",list("Yes","No")) != "Yes")
+ if(tgui_alert(user, "Do you want to dispatch an Emergency Response Team?", "ERT", list("Yes","No")) != "Yes")
return
- if(tgui_alert(usr, "Do you want this Response Team to be announced?","ERT",list("Yes","No")) != "Yes")
- GLOB.silent_ert = 1
+ if(tgui_alert(user, "Do you want this Response Team to be announced?", "ERT", list("Yes","No")) != "Yes")
+ GLOB.silent_ert = TRUE
if(get_security_level() != "red") // Allow admins to reconsider if the alert level isn't Red
- if(tgui_alert(usr, "The station is not in red alert. Do you still want to dispatch a response team?","ERT",list("Yes","No")) != "Yes")
+ if(tgui_alert(user, "The station is not in red alert. Do you still want to dispatch a response team?", "ERT", list("Yes","No")) != "Yes")
return
if(GLOB.send_emergency_team)
- to_chat(usr, span_danger("Looks like somebody beat you to it!"))
+ to_chat(user, span_danger("Looks like somebody beat you to it!"))
return
- message_admins("[key_name_admin(usr)] is dispatching an Emergency Response Team.", 1)
- admin_chat_message(message = "[key_name(usr)] is dispatching an Emergency Response Team", color = "#CC2222") //VOREStation Add
- log_admin("[key_name(usr)] used Dispatch Response Team.")
- trigger_armed_response_team(1)
+ message_admins("[key_name_admin(user)] is dispatching an Emergency Response Team.")
+ admin_chat_message(message = "[key_name(user)] is dispatching an Emergency Response Team", color = "#CC2222")
+ log_admin("[key_name(user)] used Dispatch Response Team.")
+ trigger_armed_response_team(TRUE)
/client/verb/JoinResponseTeam()
diff --git a/code/modules/admin/verbs/trader.dm b/code/modules/admin/verbs/trader.dm
index fad765ca43..c19de754cd 100644
--- a/code/modules/admin/verbs/trader.dm
+++ b/code/modules/admin/verbs/trader.dm
@@ -1,57 +1,47 @@
//Based on the ERT setup
-GLOBAL_VAR_INIT(send_beruang, 0)
-GLOBAL_VAR_INIT(can_call_traders, 1)
+GLOBAL_VAR_INIT(send_beruang, FALSE)
+GLOBAL_VAR_INIT(can_call_traders, TRUE)
-/client/proc/trader_ship()
- set name = "Dispatch Beruang Trader Ship"
- set category = "Fun.Event Kit"
- set desc = "Invite players to join the Beruang."
-
- if(!holder)
- to_chat(usr, span_danger("Only administrators may use this command."))
- return
- if(!SSticker)
- to_chat(usr, span_danger("The game hasn't started yet!"))
- return
- if(SSticker.current_state == 1)
- to_chat(usr, span_danger("The round hasn't started yet!"))
+ADMIN_VERB(trader_ship, R_ADMIN|R_EVENT, "Dispatch Beruang Trader Ship", "Invite players to join the Beruang.", ADMIN_CATEGORY_FUN_EVENT_KIT)
+ if(SSticker.current_state <= GAME_STATE_PREGAME)
+ to_chat(user, span_danger("The round hasn't started yet!"))
return
if(GLOB.send_beruang)
- to_chat(usr, span_danger("The Beruang has already been sent this round!"))
+ to_chat(user, span_danger("The Beruang has already been sent this round!"))
return
- if(tgui_alert(usr, "Do you want to dispatch the Beruang trade ship?","Trade Ship",list("Yes","No")) != "Yes")
+ if(tgui_alert(user, "Do you want to dispatch the Beruang trade ship?", "Trade Ship", list("Yes","No")) != "Yes")
return
if(get_security_level() == "red") // Allow admins to reconsider if the alert level is Red
- if(tgui_alert(usr, "The station is in red alert. Do you still want to send traders?","Trade Ship",list("Yes","No")) != "Yes")
+ if(tgui_alert(user, "The station is in red alert. Do you still want to send traders?", "Trade Ship", list("Yes","No")) != "Yes")
return
if(GLOB.send_beruang)
- to_chat(usr, span_danger("Looks like somebody beat you to it!"))
+ to_chat(user, span_danger("Looks like somebody beat you to it!"))
return
- message_admins("[key_name_admin(usr)] is dispatching the Beruang.", 1)
- log_admin("[key_name(usr)] used Dispatch Beruang Trader Ship.")
+ message_admins("[key_name_admin(user)] is dispatching the Beruang.")
+ log_admin("[key_name(user)] used Dispatch Beruang Trader Ship.")
trigger_trader_visit()
/client/verb/JoinTraders()
-
set name = "Join Trader Visit"
set category = "IC.Event"
- if(!MayRespawn(1))
- to_chat(usr, span_warning("You cannot join the traders."))
+ if(!MayRespawn(TRUE))
+ to_chat(src, span_warning("You cannot join the traders."))
return
- if(isobserver(usr) || isnewplayer(usr))
- if(!GLOB.send_beruang)
- to_chat(usr, "The Beruang is not currently heading to the station.")
- return
- if(GLOB.traders.current_antagonists.len >= GLOB.traders.hard_cap)
- to_chat(usr, "The number of trader slots is already full!")
- return
- GLOB.traders.create_default(usr)
- else
- to_chat(usr, "You need to be an observer or new player to use this.")
+ if(!isobserver(mob) && !isnewplayer(mob))
+ to_chat(src, "You need to be an observer or new player to use this.")
+ return
+
+ if(!GLOB.send_beruang)
+ to_chat(src, "The Beruang is not currently heading to the station.")
+ return
+ if(GLOB.traders.current_antagonists.len >= GLOB.traders.hard_cap)
+ to_chat(src, "The number of trader slots is already full!")
+ return
+ GLOB.traders.create_default(mob)
/proc/trigger_trader_visit()
if(!GLOB.can_call_traders)
@@ -61,12 +51,12 @@ GLOBAL_VAR_INIT(can_call_traders, 1)
GLOB.command_announcement.Announce("Incoming cargo hauler: Beruang (Reg: VRS 22EB1F11C2).", "[station_name()] Traffic Control")
- GLOB.can_call_traders = 0 // Only one call per round.
- GLOB.send_beruang = 1
+ GLOB.can_call_traders = FALSE // Only one call per round.
+ GLOB.send_beruang = TRUE
consider_trader_load() //VOREStation Add
- sleep(600 * 5)
- GLOB.send_beruang = 0 // Can no longer join the traders.
+ sleep(300 SECONDS)
+ GLOB.send_beruang = FALSE // Can no longer join the traders.
GLOBAL_VAR(trader_loaded)
diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm
index 0f2dda9aef..13f2e5edf6 100644
--- a/code/modules/client/client procs.dm
+++ b/code/modules/client/client procs.dm
@@ -612,14 +612,14 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
addtimer(CALLBACK(SSassets.transport, TYPE_PROC_REF(/datum/asset_transport, send_assets_slow), src, SSassets.transport.preload), 5 SECONDS)
/mob/proc/MayRespawn()
- return 0
+ return FALSE
/client/proc/MayRespawn()
if(mob)
return mob.MayRespawn()
// Something went wrong, client is usually kicked or transfered to a new mob at this point
- return 0
+ return FALSE
/client/verb/character_setup()
set name = "Character Setup"
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index 6262f1b0e1..76339aea80 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -879,18 +879,18 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
plane_holder.set_vis(VIS_LIGHTING, lighting_alpha)
plane_holder.set_vis(VIS_GHOSTS, ghostvision)
-/mob/observer/dead/MayRespawn(var/feedback = 0)
+/mob/observer/dead/MayRespawn(var/feedback = FALSE)
if(!client)
- return 0
+ return FALSE
if(mind && mind.current && mind.current.stat != DEAD && can_reenter_corpse)
if(feedback)
to_chat(src, span_warning("Your non-dead body prevents you from respawning."))
- return 0
+ return FALSE
if(CONFIG_GET(flag/antag_hud_restricted) && has_enabled_antagHUD == 1)
if(feedback)
to_chat(src, span_warning("antagHUD restrictions prevent you from respawning."))
- return 0
- return 1
+ return FALSE
+ return TRUE
/atom/proc/extra_ghost_link()
return
diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm
index 9dab90569e..22d35dc8d5 100644
--- a/code/modules/mob/new_player/new_player.dm
+++ b/code/modules/mob/new_player/new_player.dm
@@ -513,4 +513,4 @@
return
/mob/new_player/MayRespawn()
- return 1
+ return TRUE
diff --git a/code/modules/random_map/random_map.dm b/code/modules/random_map/random_map.dm
index 57c924bf95..2860a0e700 100644
--- a/code/modules/random_map/random_map.dm
+++ b/code/modules/random_map/random_map.dm
@@ -31,7 +31,7 @@
// Test to see if rand_seed() can be used reliably.
var/priority_process
-/datum/random_map/New(var/seed, var/tx, var/ty, var/tz, var/tlx, var/tly, var/do_not_apply, var/do_not_announce)
+/datum/random_map/New(var/seed, var/tx, var/ty, var/tz, var/tlx, var/tly, var/do_not_apply, var/do_not_announce, var/admin_map)
if(!isnum(tz))
var/old_tz = tz
tz = GLOB.map_templates_loaded[tz]
@@ -45,7 +45,7 @@
else
GLOB.map_count[descriptor]++
name = "[descriptor] #[GLOB.map_count[descriptor]]"
- if(preserve_map) GLOB.random_maps[name] = src
+ if(preserve_map || admin_map) GLOB.random_maps[name] = src
// Get origins for applying the map later.
set_origins(tx, ty, tz)
diff --git a/code/modules/random_map/random_map_verbs.dm b/code/modules/random_map/random_map_verbs.dm
index 96fea0cf1c..e36c4bbcbf 100644
--- a/code/modules/random_map/random_map_verbs.dm
+++ b/code/modules/random_map/random_map_verbs.dm
@@ -1,108 +1,73 @@
-/client/proc/print_random_map()
- set category = "Debug.Events"
- set name = "Display Random Map"
- set desc = "Show the contents of a random map."
-
- if(!check_rights_for(src, R_HOLDER)) return
-
- var/choice = tgui_input_list(usr, "Choose a map to display.", "Map Choice", GLOB.random_maps)
+ADMIN_VERB(print_random_map, R_DEBUG, "Display Random Map", "Show the contents of a random map.", ADMIN_CATEGORY_DEBUG_EVENTS)
+ var/choice = tgui_input_list(user, "Choose a map to display.", "Map Choice", GLOB.random_maps)
if(!choice)
return
- var/datum/random_map/M = GLOB.random_maps[choice]
- if(istype(M))
- M.display_map(usr)
+ var/datum/random_map/selected_map = GLOB.random_maps[choice]
+ if(istype(selected_map))
+ selected_map.display_map(user)
-/client/proc/delete_random_map()
- set category = "Debug.Events"
- set name = "Delete Random Map"
- set desc = "Delete a random map."
-
- if(!check_rights_for(src, R_HOLDER)) return
-
- var/choice = tgui_input_list(usr, "Choose a map to delete.", "Map Choice", GLOB.random_maps)
+ADMIN_VERB(delete_random_map, R_DEBUG, "Delete Random Map", "Delete a random map.", ADMIN_CATEGORY_DEBUG_EVENTS)
+ var/choice = tgui_input_list(user, "Choose a map to delete.", "Map Choice", GLOB.random_maps)
if(!choice)
return
- var/datum/random_map/M = GLOB.random_maps[choice]
+ var/datum/random_map/selected_map = GLOB.random_maps[choice]
GLOB.random_maps[choice] = null
- if(istype(M))
- message_admins("[key_name_admin(usr)] has deleted [M.name].")
- log_admin("[key_name(usr)] has deleted [M.name].")
- qdel(M)
+ if(istype(selected_map))
+ log_and_message_admins("has deleted [selected_map.name].", user)
+ qdel(selected_map)
-/client/proc/create_random_map()
- set category = "Debug.Events"
- set name = "Create Random Map"
- set desc = "Create a random map."
-
- if(!check_rights_for(src, R_HOLDER)) return
-
- var/map_datum = tgui_input_list(usr, "Choose a map to create.", "Map Choice", subtypesof(/datum/random_map))
+ADMIN_VERB(create_random_map, R_DEBUG, "Create Random Map", "Create a random map.", ADMIN_CATEGORY_DEBUG_EVENTS)
+ var/map_datum = tgui_input_list(user, "Choose a map to create.", "Map Choice", subtypesof(/datum/random_map))
if(!map_datum)
return
- var/datum/random_map/M
- if(tgui_alert(usr, "Do you wish to customise the map?","Customize",list("Yes","No")) == "Yes")
- var/seed = tgui_input_text(usr, "Seed? (blank for none)")
- var/lx = tgui_input_number(usr, "X-size? (blank for default)")
- var/ly = tgui_input_number(usr, "Y-size? (blank for default)")
- M = new map_datum(seed,null,null,null,lx,ly,1)
+ var/datum/random_map/selected_map
+ if(tgui_alert(user, "Do you wish to customise the map?","Customize",list("Yes","No")) == "Yes")
+ var/seed = tgui_input_text(user, "Seed? (blank for none)")
+ var/lx = tgui_input_number(user, "X-size? (blank for default)")
+ var/ly = tgui_input_number(user, "Y-size? (blank for default)")
+ selected_map = new map_datum(seed,null,null,0,lx,ly,1,null,TRUE)
else
- M = new map_datum(null,null,null,null,null,null,1)
+ selected_map = new map_datum(null,null,null,0,null,null,1,null,TRUE)
- if(M)
- message_admins("[key_name_admin(usr)] has created [M.name].")
- log_admin("[key_name(usr)] has created [M.name].")
+ if(selected_map)
+ log_and_message_admins("has created [selected_map.name]", user)
-/client/proc/apply_random_map()
- set category = "Debug.Events"
- set name = "Apply Random Map"
- set desc = "Apply a map to the game world."
-
- if(!check_rights_for(src, R_HOLDER)) return
-
- var/choice = tgui_input_list(usr, "Choose a map to apply.", "Map Choice", GLOB.random_maps)
+ADMIN_VERB(apply_random_map, R_DEBUG, "Apply Random Map", "Apply a map to the game world.", ADMIN_CATEGORY_DEBUG_EVENTS)
+ var/choice = tgui_input_list(user, "Choose a map to apply.", "Map Choice", GLOB.random_maps)
if(!choice)
return
- var/datum/random_map/M = GLOB.random_maps[choice]
- if(istype(M))
- var/tx = tgui_input_number(usr, "X? (default to current turf)")
- var/ty = tgui_input_number(usr, "Y? (default to current turf)")
- var/tz = tgui_input_number(usr, "Z? (default to current turf)")
- if(isnull(tx) || isnull(ty) || isnull(tz))
- var/turf/T = get_turf(usr)
- tx = !isnull(tx) ? tx : T.x
- ty = !isnull(ty) ? ty : T.y
- tz = !isnull(tz) ? tz : T.z
- message_admins("[key_name_admin(usr)] has applied [M.name] at x[tx],y[ty],z[tz].")
- log_admin("[key_name(usr)] has applied [M.name] at x[tx],y[ty],z[tz].")
- M.set_origins(tx,ty,tz)
- M.apply_to_map()
+ var/datum/random_map/selected_map = GLOB.random_maps[choice]
+ if(istype(selected_map))
+ var/tx = tgui_input_number(user, "X? (default to current turf)")
+ var/ty = tgui_input_number(user, "Y? (default to current turf)")
+ var/tz = tgui_input_number(user, "Z? (default to current turf)")
+ if(!tx || !ty || !tz) //If someone puts 0 for ANY of these, ignore it and get their current turf.
+ var/turf/target_turf = get_turf(user.mob)
+ tx = tx ? tx : target_turf.x
+ ty = ty ? ty : target_turf.y
+ tz = tz ? tz : target_turf.z
+ log_and_message_admins("has applied [selected_map.name] at x[tx],y[ty],z[tz].", user)
+ selected_map.set_origins(tx,ty,tz)
+ selected_map.apply_to_map()
-/client/proc/overlay_random_map()
- set category = "Debug.Events"
- set name = "Overlay Random Map"
- set desc = "Apply a map to another map."
-
- if(!check_rights_for(src, R_HOLDER)) return
-
- var/choice = tgui_input_list(usr, "Choose a map as base.", "Map Choice", GLOB.random_maps)
+ADMIN_VERB(overlay_random_map, R_DEBUG, "Overlay Random Map", "Apply a map to another map.", ADMIN_CATEGORY_DEBUG_EVENTS)
+ var/choice = tgui_input_list(user, "Choose a map as base.", "Map Choice", GLOB.random_maps)
if(!choice)
return
var/datum/random_map/base_map = GLOB.random_maps[choice]
- choice = null
- choice = tgui_input_list(usr, "Choose a map to overlay.", "Map Choice", GLOB.random_maps)
+ choice = tgui_input_list(user, "Choose a map to overlay.", "Map Choice", GLOB.random_maps)
if(!choice)
return
var/datum/random_map/overlay_map = GLOB.random_maps[choice]
if(istype(base_map) && istype(overlay_map))
- var/tx = tgui_input_number(usr, "X? (default to 1)")
- var/ty = tgui_input_number(usr, "Y? (default to 1)")
+ var/tx = tgui_input_number(user, "X? (default to 1)")
+ var/ty = tgui_input_number(user, "Y? (default to 1)")
if(!tx) tx = 1
if(!ty) ty = 1
- message_admins("[key_name_admin(usr)] has applied [overlay_map.name] to [base_map.name] at x[tx],y[ty].")
- log_admin("[key_name(usr)] has applied [overlay_map.name] to [base_map.name] at x[tx],y[ty].")
+ log_and_message_admins("has applied [overlay_map.name] to [base_map.name] at x[tx],y[ty],z[overlay_map.origin_z].", user)
overlay_map.overlay_with(base_map,tx,ty)
- base_map.display_map(usr)
+ base_map.display_map(user)
diff --git a/code/modules/vote/vote_verb.dm b/code/modules/vote/vote_verb.dm
index ef937c52cf..34265015be 100644
--- a/code/modules/vote/vote_verb.dm
+++ b/code/modules/vote/vote_verb.dm
@@ -7,16 +7,9 @@
else
to_chat(src, span_warning("There is no active vote"))
-/client/proc/start_vote()
- set category = "Admin.Game" // CHOMPEdit
- set name = "Start Vote"
- set desc = "Start a vote on the server"
-
- if(!is_admin(usr))
- return
-
+ADMIN_VERB(start_vote, R_HOLDER, "Start Vote", "Start a vote on the server.", ADMIN_CATEGORY_GAME)
if(SSvote.active_vote)
- to_chat(src, span_warning("A vote is already in progress"))
+ to_chat(user, span_warning("A vote is already in progress"))
return
var/vote_types = subtypesof(/datum/vote)
@@ -26,31 +19,31 @@
for(var/vtype in vote_types)
votemap["[vtype]"] = vtype
- var/choice = tgui_input_list(src, "Select a vote type", "Vote", vote_types)
+ var/choice = tgui_input_list(user, "Select a vote type", "Vote", vote_types)
- if(choice == null)
+ if(isnull(choice))
return
if(choice != "\[CUSTOM]")
var/datum/votetype = votemap["[choice]"]
- SSvote.start_vote(new votetype(usr.ckey))
+ SSvote.start_vote(new votetype(user.ckey))
return
- var/question = tgui_input_text(src, "What is the vote for?", "Create Vote", "", MAX_MESSAGE_LEN)
+ var/question = tgui_input_text(user, "What is the vote for?", "Create Vote", "", MAX_MESSAGE_LEN)
if(isnull(question))
return
var/list/choices = list()
for(var/i in 1 to 10)
- var/option = tgui_input_text(src, "Please enter an option or hit cancel to finish", "Create Vote", "", MAX_MESSAGE_LEN)
- if(isnull(option) || !usr.client)
+ var/option = tgui_input_text(user, "Please enter an option or hit cancel to finish", "Create Vote", "", MAX_MESSAGE_LEN)
+ if(isnull(option) || !user)
break
choices |= option
- var/c2 = tgui_alert(src, "Show counts while vote is happening?", "Counts", list("Yes", "No"))
- var/c3 = tgui_input_list(src, "Select a result calculation type", "Vote", list(VOTE_RESULT_TYPE_MAJORITY))
+ var/c2 = tgui_alert(user, "Show counts while vote is happening?", "Counts", list("Yes", "No"))
+ var/c3 = tgui_input_list(user, "Select a result calculation type", "Vote", list(VOTE_RESULT_TYPE_MAJORITY))
- var/datum/vote/V = new /datum/vote(usr.ckey, question, choices, TRUE)
+ var/datum/vote/V = new /datum/vote(user.ckey, question, choices, TRUE)
V.show_counts = (c2 == "Yes")
V.vote_result_type = c3
SSvote.start_vote(V)
diff --git a/vorestation.dme b/vorestation.dme
index 1ea642fbe6..484e3339e9 100644
--- a/vorestation.dme
+++ b/vorestation.dme
@@ -2285,7 +2285,6 @@
#include "code\modules\admin\admin_memo.dm"
#include "code\modules\admin\admin_ranks.dm"
#include "code\modules\admin\admin_tools.dm"
-#include "code\modules\admin\admin_verb_lists_vr.dm"
#include "code\modules\admin\admin_verbs.dm"
#include "code\modules\admin\banjob.dm"
#include "code\modules\admin\ckey_vr.dm"