[MIRROR] moves the last admin verbs (#12656)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2026-04-13 02:02:58 -04:00
committed by GitHub
co-authored by Kashargul Cameron Lennox
parent 0ff0ec0cca
commit 256cd81e28
25 changed files with 406 additions and 662 deletions
+95 -184
View File
@@ -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, "<br><center>" + span_filter_system(span_notice(span_bold(span_huge("Man up.<br> Deal with it.")) + "<br>Move along.")) + "</center><br>")
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, "<br><center>" + span_filter_system(span_notice(span_bold(span_huge("Man up.<br> Deal with it.")) + "<br>Move along.")) + "</center><br>")
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 = "<HEAD><TITLE>Book Inventory Management</TITLE></HEAD><BODY>\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 += "<tr><td>[author]</td><td>[title]</td><td>[category]</td><td>"
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 += "<A href='byond://?our_comp=\ref[our_comp];[HrefToken()];delid=[id]'>\[Del\]</A>"
dat += "<A href='byond://?our_comp=\ref[our_comp];[HrefToken()];delid=[id]'>\[Del\]</A>"
dat += "</td></tr>"
dat += "</table>"
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()