[MIRROR] some more admin verbs (#12480)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2026-03-02 23:50:24 +01:00
committed by GitHub
co-authored by Kashargul
parent 2cb976153e
commit df328ef354
24 changed files with 383 additions and 570 deletions
+70 -92
View File
@@ -4,10 +4,8 @@
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_FUN) add_verb(src, GLOB.admin_verbs_fun)
if(rights & R_SERVER) add_verb(src, GLOB.admin_verbs_server)
if(rights & R_DEBUG) add_verb(src, GLOB.admin_verbs_debug)
if(rights & R_SOUNDS) add_verb(src, GLOB.admin_verbs_sounds)
if(rights & R_SPAWN) add_verb(src, GLOB.admin_verbs_spawn)
if(rights & R_MOD) add_verb(src, GLOB.admin_verbs_mod)
if(rights & R_EVENT) add_verb(src, GLOB.admin_verbs_event_manager)
@@ -20,10 +18,8 @@
remove_verb(src, list(
/client/proc/togglebuildmodeself,
GLOB.admin_verbs_admin,
GLOB.admin_verbs_fun,
GLOB.admin_verbs_server,
GLOB.admin_verbs_debug,
GLOB.admin_verbs_sounds,
GLOB.admin_verbs_spawn,
GLOB.debug_verbs
))
@@ -64,17 +60,14 @@
feedback_add_details("admin_verb","TAVVS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/admin_ghost()
set category = "Admin.Game"
set name = "Aghost"
if(!check_rights_for(src, R_HOLDER)) return
ADMIN_VERB(admin_ghost, R_HOLDER, "Aghost", "Ghost out of your body with the option to return at any time.", ADMIN_CATEGORY_GAME)
var/build_mode
if(src.buildmode)
build_mode = tgui_alert(src, "You appear to be currently in buildmode. Do you want to re-enter buildmode after aghosting?", "Buildmode", list("Yes", "No"))
if(user.buildmode)
build_mode = tgui_alert(user, "You appear to be currently in buildmode. Do you want to re-enter buildmode after aghosting?", "Buildmode", list("Yes", "No"))
if(build_mode != "Yes")
to_chat(src, "Will not re-enter buildmode after switch.")
to_chat(user, "Will not re-enter buildmode after switch.")
var/mob/mob = user.mob
if(isobserver(mob))
//re-enter
var/mob/observer/dead/ghost = mob
@@ -93,7 +86,7 @@
feedback_add_details("admin_verb","P") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else if(isnewplayer(mob))
to_chat(src, span_filter_system(span_warning("Error: Aghost: Can't admin-ghost whilst in the lobby. Join or Observe first.")))
to_chat(user, span_filter_system(span_warning("Error: Aghost: Can't admin-ghost whilst in the lobby. Join or Observe first.")))
else
//ghostize
var/mob/body = mob
@@ -101,38 +94,34 @@
if(build_mode)
togglebuildmode(body)
ghost = body.ghostize(1, TRUE)
log_and_message_admins("[key_name(src)] admin-ghosted.") // CHOMPEdit - Add logging.
log_and_message_admins("[key_name(user)] admin-ghosted.") // CHOMPEdit - Add logging.
if(build_mode == "Yes")
togglebuildmode(ghost)
else
ghost = body.ghostize(1, TRUE)
log_and_message_admins("[key_name(src)] admin-ghosted.") // CHOMPEdit - Add logging.
init_verbs()
log_and_message_admins("[key_name(user)] admin-ghosted.") // CHOMPEdit - Add logging.
user.init_verbs()
if(body)
body.teleop = ghost
if(!body.key)
body.key = "@[key]" //Haaaaaaaack. But the people have spoken. If it breaks; blame adminbus
body.key = "@[user.key]" //Haaaaaaaack. But the people have spoken. If it breaks; blame adminbus
feedback_add_details("admin_verb","O") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/invisimin()
set name = "Invisimin"
set category = "Admin.Game"
set desc = "Toggles ghost-like invisibility (Don't abuse this)"
ADMIN_VERB(invisimin, R_ADMIN|R_MOD|R_EVENT, "Invisimin", "Toggles ghost-like invisibility (Don't abuse this).", ADMIN_CATEGORY_GAME)
var/mob/mob = user.mob
if(mob.invisibility > INVISIBILITY_OBSERVER)
to_chat(user, span_warning("You can't use this, your current invisibility level ([mob.invisibility]) is above the observer level ([INVISIBILITY_OBSERVER])."))
return
if(check_rights(R_HOLDER) && mob)
if(mob.invisibility > INVISIBILITY_OBSERVER)
to_chat(mob, span_warning("You can't use this, your current invisibility level ([mob.invisibility]) is above the observer level ([INVISIBILITY_OBSERVER])."))
return
if(mob.invisibility == INVISIBILITY_OBSERVER)
mob.invisibility = initial(mob.invisibility)
to_chat(mob, span_filter_system(span_danger("Invisimin off. Invisibility reset.")))
mob.alpha = max(mob.alpha + 100, 255)
return
if(mob.invisibility == INVISIBILITY_OBSERVER)
mob.invisibility = initial(mob.invisibility)
to_chat(mob, span_filter_system(span_danger("Invisimin off. Invisibility reset.")))
mob.alpha = max(mob.alpha + 100, 255)
return
mob.invisibility = INVISIBILITY_OBSERVER
to_chat(mob, span_filter_system(span_boldnotice("Invisimin on. You are now as invisible as a ghost.")))
mob.alpha = max(mob.alpha - 100, 0)
mob.invisibility = INVISIBILITY_OBSERVER
to_chat(mob, span_filter_system(span_boldnotice("Invisimin on. You are now as invisible as a ghost.")))
mob.alpha = max(mob.alpha - 100, 0)
ADMIN_VERB(list_bombers, R_ADMIN, "List Bombers", "Look at all bombs and their likely culprit.", ADMIN_CATEGORY_GAME)
user.holder.list_bombers()
@@ -276,19 +265,15 @@ ADMIN_VERB(stealth, R_STEALTH, "Stealth Mode", "Toggle stealth.", "Admin.Game")
#undef MAX_WARNS
#undef AUTOBANTIME
/client/proc/drop_bomb() // Some admin dickery that can probably be done better -- TLE
set category = "Fun.Do Not"
set name = "Drop Bomb"
set desc = "Cause an explosion of varying strength at your location."
var/turf/epicenter = mob.loc
ADMIN_VERB(drop_bomb, R_FUN, "Drop Bomb", "Cause an explosion of varying strength at your location.", ADMIN_CATEGORY_FUN_DO_NOT) // Some admin dickery that can probably be done better -- TLE
var/turf/epicenter = user.mob.loc
var/list/choices = list("Small Bomb", "Medium Bomb", "Big Bomb", "Maxcap Bomb", "SM Blast", "Custom Bomb", "Cancel")
var/choice = tgui_input_list(usr, "What size explosion would you like to produce?", "Explosion Choice", choices)
var/choice = tgui_input_list(user, "What size explosion would you like to produce?", "Explosion Choice", choices)
switch(choice)
if(null)
return 0
return FALSE
if("Cancel")
return 0
return FALSE
if("Small Bomb")
explosion(epicenter, 1, 2, 3, 3)
if("Medium Bomb")
@@ -300,15 +285,14 @@ ADMIN_VERB(stealth, R_STEALTH, "Stealth Mode", "Toggle stealth.", "Admin.Game")
if("SM Blast")
explosion(epicenter, 8, 16, 24, 32)
if("Custom Bomb")
var/devastation_range = tgui_input_number(usr, "Devastation range (in tiles):")
var/heavy_impact_range = tgui_input_number(usr, "Heavy impact range (in tiles):")
var/light_impact_range = tgui_input_number(usr, "Light impact range (in tiles):")
var/flash_range = tgui_input_number(usr, "Flash range (in tiles):")
var/devastation_range = tgui_input_number(user, "Devastation range (in tiles):")
var/heavy_impact_range = tgui_input_number(user, "Heavy impact range (in tiles):")
var/light_impact_range = tgui_input_number(user, "Light impact range (in tiles):")
var/flash_range = tgui_input_number(user, "Flash range (in tiles):")
explosion(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range)
message_admins(span_blue("[ckey] creating an admin explosion at [epicenter.loc]."))
message_admins(span_blue("[user.ckey] creating an admin explosion at [epicenter.loc]."))
feedback_add_details("admin_verb","DB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
ADMIN_VERB(admin_give_modifier, R_EVENT, "Give Modifier", "Makes a mob weaker or stronger by adding a specific modifier to them.", ADMIN_CATEGORY_DEBUG_GAME, mob/living/living_target)
if(!living_target)
to_chat(user, span_warning("Looks like you didn't select a mob."))
@@ -328,19 +312,17 @@ ADMIN_VERB(admin_give_modifier, R_EVENT, "Give Modifier", "Makes a mob weaker or
living_target.add_modifier(new_modifier_type, duration)
log_and_message_admins("has given [key_name(living_target)] the modifer [new_modifier_type], with a duration of [duration ? "[duration / 600] minutes" : "forever"].", user)
/client/proc/make_sound(var/obj/O in world) // -- TLE
set category = "Fun.Sounds"
set name = "Make Sound"
set desc = "Display a message to everyone who can hear the target"
if(O)
var/message = tgui_input_text(usr, "What do you want the message to be?", "Make Sound", "", MAX_MESSAGE_LEN)
if(!message)
return
O.audible_message(message)
log_admin("[key_name(usr)] made [O] at [O.x], [O.y], [O.z]. make a sound")
message_admins(span_blue("[key_name_admin(usr)] made [O] at [O.x], [O.y], [O.z]. make a sound."), 1)
feedback_add_details("admin_verb","MS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
ADMIN_VERB(make_sound, R_FUN, "Make Sound", "Display a message to everyone who can hear the target.", ADMIN_CATEGORY_FUN_SOUNDS, obj/target_object in world)
if(!target_object)
return
var/message = tgui_input_text(user, "What do you want the message to be?", "Make Sound", "", MAX_MESSAGE_LEN)
if(!message)
return
target_object.audible_message(message)
log_admin("[key_name(user)] made [target_object] at [target_object.x], [target_object.y], [target_object.z]. make a sound")
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"
@@ -349,15 +331,18 @@ ADMIN_VERB(admin_give_modifier, R_EVENT, "Give Modifier", "Makes a mob weaker or
togglebuildmode(src.mob)
feedback_add_details("admin_verb","TBMS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/object_talk(var/msg as text) // -- TLE
set category = "Fun.Narrate"
set name = "oSay"
set desc = "Display a message to everyone who can hear the target"
if(mob.control_object)
ADMIN_VERB(object_talk, R_FUN, "oSay", "Display a message to everyone who can hear the target.", ADMIN_CATEGORY_FUN_NARRATE, msg)
var/mob/user_mob = user.mob
if(!user_mob.control_object)
return
if(!msg)
msg = tgui_input_text(user, "oSay", "Object text to say.", "")
if(!msg)
return
for (var/mob/V in hearers(mob.control_object))
V.show_message(span_filter_say(span_bold("[mob.control_object.name]") + " says: \"[msg]\""), 2)
for(var/mob/V in hearers(user_mob.control_object))
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
@@ -618,50 +603,43 @@ ADMIN_VERB(debug_statpanel, R_DEBUG, "Debug Stat Panel", "Toggles local debug of
SSmotiontracker.hide_all = !SSmotiontracker.hide_all
log_admin("[key_name(usr)] changed the motion echo visibility to [SSmotiontracker.hide_all ? "hidden" : "visible"].")
/client/proc/adminorbit()
set category = "Fun.Event Kit"
set name = "Orbit Things"
set desc = "Makes something orbit around something else."
set popup_menu = FALSE
if(!check_rights(R_FUN))
return
ADMIN_VERB(adminorbit, R_FUN, "Orbit Things", "Makes something orbit around something else.", ADMIN_CATEGORY_FUN_EVENT_KIT)
var/center
var/atom/movable/orbiter
var/input
if(check_rights(R_HOLDER) && holder.marked_datum)
input = tgui_alert(usr, "You have \n[holder.marked_datum] marked, should this be the center of the orbit, or the orbiter?", "Orbit", list("Center", "Orbiter", "Neither"))
var/datum/marked_datum = user.holder.marked_datum
if(marked_datum)
input = tgui_alert(user, "You have \n[marked_datum] marked, should this be the center of the orbit, or the orbiter?", "Orbit", list("Center", "Orbiter", "Neither"))
switch(input)
if("Center")
center = holder.marked_datum
center = marked_datum
if("Orbiter")
orbiter = holder.marked_datum
orbiter = marked_datum
var/list/possible_things = list()
for(var/T as mob in view(view)) //Let's do mobs before objects
for(var/T as mob in view(user.view)) //Let's do mobs before objects
if(ismob(T))
possible_things |= T
for(var/T as obj in view(view))
for(var/T as obj in view(user.view))
if(isobj(T))
possible_things |= T
if(!center)
center = tgui_input_list(src, "What should act as the center of the orbit?", "Center", possible_things)
center = tgui_input_list(user, "What should act as the center of the orbit?", "Center", possible_things)
possible_things -= center
if(!orbiter)
orbiter = tgui_input_list(src, "What should act as the orbiter of the orbit?", "Orbiter", possible_things)
orbiter = tgui_input_list(user, "What should act as the orbiter of the orbit?", "Orbiter", possible_things)
if(!center || !orbiter)
to_chat(usr, span_warning("A center of orbit and an orbiter must be configured. You can also do this by marking a target."))
to_chat(user, span_warning("A center of orbit and an orbiter must be configured. You can also do this by marking a target."))
return
if(center == orbiter)
to_chat(usr, span_warning("The center of the orbit cannot also be the orbiter."))
to_chat(user, span_warning("The center of the orbit cannot also be the orbiter."))
return
if(isturf(orbiter))
to_chat(usr, span_warning("The orbiter cannot be a turf. It can only be used as a center."))
to_chat(user, span_warning("The orbiter cannot be a turf. It can only be used as a center."))
return
var/distance = tgui_input_number(usr, "How large will their orbit radius be? (In pixels. 32 is 'near around a character)", "Orbit Radius", 32)
var/speed = tgui_input_number(usr, "How fast will they orbit (negative numbers spin clockwise)", "Orbit Speed", 20)
var/segments = tgui_input_number(usr, "How many segments will they have in their orbit? (3 is a triangle, 36 is a circle, etc)", "Orbit Segments", 36)
var/distance = tgui_input_number(user, "How large will their orbit radius be? (In pixels. 32 is 'near around a character)", "Orbit Radius", 32)
var/speed = tgui_input_number(user, "How fast will they orbit (negative numbers spin clockwise)", "Orbit Speed", 20)
var/segments = tgui_input_number(user, "How many segments will they have in their orbit? (3 is a triangle, 36 is a circle, etc)", "Orbit Segments", 36)
var/clock = FALSE
if(!distance)
distance = 32
@@ -672,7 +650,7 @@ ADMIN_VERB(debug_statpanel, R_DEBUG, "Debug Stat Panel", "Toggles local debug of
speed *= -1
if(!segments)
segments = 36
if(tgui_alert(usr, "\The [orbiter] will orbit around [center]. Is this okay?", "Confirm Orbit", list("Yes", "No")) == "Yes")
if(tgui_alert(user, "\The [orbiter] will orbit around [center]. Is this okay?", "Confirm Orbit", list("Yes", "No")) == "Yes")
orbiter.orbit(center, distance, clock, speed, segments)
ADMIN_VERB(removetickets, R_ADMIN, "Security Tickets", "Allows one to remove tickets from the global list.", "Admin.Investigate")