Storyteller admin/mod/fun verb smorgasbord (#20831)

As title: grants STs a small selection of admin/mod/fun verbs without
needing them to have an admin_rank configured on the back end.

I've been extra permissive here on the assumption that Those That Be
will veto anything they don't like. The granted verbs:
	/client/proc/toggle_view_range,
	/client/proc/jumptozlevel,
	/client/proc/jumptoshuttle,
	/client/proc/jumptoship,
	/client/proc/jumptosector,
	/client/proc/Getmob,
	/client/proc/Jump,
	/client/proc/jumptomob,
	/client/proc/jumptoturf,
	/client/proc/check_ai_laws,
	/client/proc/manage_silicon_laws,
	/client/proc/odyssey_panel,
	/client/proc/damage_menu,
	/client/proc/change_human_appearance_admin,
	/client/proc/change_security_level,
	/client/proc/cmd_dev_bst,
	/datum/admins/proc/create_admin_fax,
	/client/proc/check_fax_history,
	/client/proc/clear_toxins,
	/datum/admins/proc/call_supply_drop,
	/datum/admins/proc/call_drop_pod,
	/client/proc/event_manager_panel,
	/client/proc/toggle_random_events
	
This PR is full of _gross code_ but it _does_ work.
This commit is contained in:
Batrachophreno
2025-08-06 12:43:42 +00:00
committed by GitHub
parent a231c3a7c2
commit 790aeafbdf
13 changed files with 504 additions and 420 deletions
+121 -136
View File
@@ -9,66 +9,60 @@
set desc = "Area to jump to"
set category = "Admin"
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_DEV))
return
if(check_rights(R_ADMIN|R_MOD|R_DEBUG|R_DEV) || isstoryteller(src.mob))
if(istype(usr, /mob/abstract/new_player))
return
if(istype(usr, /mob/abstract/new_player))
return
if(GLOB.config.allow_admin_jump)
usr.on_mob_jump()
usr.forceMove(pick(get_area_turfs(A)))
if(GLOB.config.allow_admin_jump)
usr.on_mob_jump()
usr.forceMove(pick(get_area_turfs(A)))
log_admin("[key_name(usr)] jumped to [A]")
message_admins("[key_name_admin(usr)] jumped to [A]", 1)
feedback_add_details("admin_verb","JA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else
alert("Admin jumping disabled")
log_admin("[key_name(usr)] jumped to [A]")
message_admins("[key_name_admin(usr)] jumped to [A]", 1)
feedback_add_details("admin_verb","JA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else
alert("Admin jumping disabled")
/client/proc/jumptoturf(var/turf/T in world)
set name = "Jump to Turf"
set category = "Admin"
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_DEV))
return
if(check_rights(R_ADMIN|R_MOD|R_DEBUG|R_DEV) || isstoryteller(src.mob))
if(isnewplayer(usr))
return
if(isnewplayer(usr))
if(GLOB.config.allow_admin_jump)
log_admin("[key_name(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]")
message_admins("[key_name_admin(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]", 1)
usr.on_mob_jump()
usr.forceMove(T)
feedback_add_details("admin_verb","JT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else
alert("Admin jumping disabled")
return
if(GLOB.config.allow_admin_jump)
log_admin("[key_name(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]")
message_admins("[key_name_admin(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]", 1)
usr.on_mob_jump()
usr.forceMove(T)
feedback_add_details("admin_verb","JT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else
alert("Admin jumping disabled")
return
/client/proc/jumptomob(var/mob/M in GLOB.mob_list)
set category = "Admin"
set name = "Jump to Mob Admin"
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_DEV))
return
if(check_rights(R_ADMIN|R_MOD|R_DEBUG|R_DEV) || isstoryteller(src.mob))
if(isnewplayer(usr))
return
if(isnewplayer(usr))
return
if(GLOB.config.allow_admin_jump)
log_admin("[key_name(usr)] jumped to [key_name(M)]")
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
if(src.mob)
var/mob/A = src.mob
var/turf/T = get_turf(M)
if(isturf(T))
feedback_add_details("admin_verb","JM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
A.on_mob_jump()
A.forceMove(T)
else
to_chat(A, "This mob is not located in the game world.")
else
alert("Admin jumping disabled")
if(GLOB.config.allow_admin_jump)
log_admin("[key_name(usr)] jumped to [key_name(M)]")
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
if(src.mob)
var/mob/A = src.mob
var/turf/T = get_turf(M)
if(isturf(T))
feedback_add_details("admin_verb","JM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
A.on_mob_jump()
A.forceMove(T)
else
to_chat(A, "This mob is not located in the game world.")
else
alert("Admin jumping disabled")
/client/proc/jumptocoord(tx as num, ty as num, tz as num)
set category = "Admin"
@@ -94,102 +88,94 @@
set category = "Admin"
set name = "Jump to Z-Level"
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_DEV))
return
if(GLOB.config.allow_admin_jump)
var/list/zlevels = list()
for(var/z=0, z<world.maxz, z++)
zlevels += z
var/selection = input("Select z-level to jump to.", "Admin Jumping", null, null) as null|anything in zlevels
if(!selection)
to_chat(src, "No z-level selected.")
return
if(src && src.mob)
var/mob/A = src.mob
A.on_mob_jump()
A.x = world.maxx/2
A.y = world.maxy/2
A.z = selection
message_admins("[key_name_admin(usr)] jumped to z-level [selection]", 1)
feedback_add_details("admin_verb","JZ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else
alert("Admin jumping disabled")
if(check_rights(R_ADMIN|R_MOD|R_DEBUG|R_DEV) || isstoryteller(src.mob))
if(GLOB.config.allow_admin_jump)
var/list/zlevels = list()
for(var/z=0, z<world.maxz, z++)
zlevels += z
var/selection = input("Select z-level to jump to.", "Admin Jumping", null, null) as null|anything in zlevels
if(!selection)
to_chat(src, "No z-level selected.")
return
if(src && src.mob)
var/mob/A = src.mob
A.on_mob_jump()
A.x = world.maxx/2
A.y = world.maxy/2
A.z = selection
message_admins("[key_name_admin(usr)] jumped to z-level [selection]", 1)
feedback_add_details("admin_verb","JZ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else
alert("Admin jumping disabled")
/client/proc/jumptoshuttle()
set category = "Admin"
set name = "Jump to Shuttle"
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_DEV))
return
if(GLOB.config.allow_admin_jump)
var/list/shuttles = list()
for(var/shuttle_tag in SSshuttle.shuttles)
shuttles += shuttle_tag
var/selection = input("Select shuttle to jump to.", "Admin Jumping", null, null) as null|anything in shuttles
if(!selection)
to_chat(src, "No shuttle selected.")
return
var/datum/shuttle/shuttle = SSshuttle.shuttles[selection]
if(src && src.mob && shuttle && shuttle.current_location && shuttle.current_location.loc)
usr.on_mob_jump()
usr.forceMove(shuttle.current_location.loc)
message_admins("[key_name_admin(usr)] jumped to shuttle [selection]", 1)
feedback_add_details("admin_verb","JSHU") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else
alert("Admin jumping disabled")
if(check_rights(R_ADMIN|R_MOD|R_DEBUG|R_DEV) || isstoryteller(src.mob))
if(GLOB.config.allow_admin_jump)
var/list/shuttles = list()
for(var/shuttle_tag in SSshuttle.shuttles)
shuttles += shuttle_tag
var/selection = input("Select shuttle to jump to.", "Admin Jumping", null, null) as null|anything in shuttles
if(!selection)
to_chat(src, "No shuttle selected.")
return
var/datum/shuttle/shuttle = SSshuttle.shuttles[selection]
if(src && src.mob && shuttle && shuttle.current_location && shuttle.current_location.loc)
usr.on_mob_jump()
usr.forceMove(shuttle.current_location.loc)
message_admins("[key_name_admin(usr)] jumped to shuttle [selection]", 1)
feedback_add_details("admin_verb","JSHU") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else
alert("Admin jumping disabled")
/client/proc/jumptoship()
set category = "Admin"
set name = "Jump to Ship"
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_DEV))
return
if(GLOB.config.allow_admin_jump)
var/list/ships = list()
for(var/ship in SSshuttle.ships)
ships += ship
var/selection = input("Select ship to jump to.", "Admin Jumping", null, null) as null|anything in ships
if(!selection)
to_chat(src, "No ship selected.")
return
var/obj/effect/overmap/visitable/ship/ship = selection
if(src && src.mob && ship && ship.entry_points && ship.entry_points[1])
usr.on_mob_jump()
usr.forceMove(ship.entry_points[1].loc)
message_admins("[key_name_admin(usr)] jumped to ship [selection]", 1)
feedback_add_details("admin_verb","JSHI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else
alert("Admin jumping disabled")
if(check_rights(R_ADMIN|R_MOD|R_DEBUG|R_DEV) || isstoryteller(src.mob))
if(GLOB.config.allow_admin_jump)
var/list/ships = list()
for(var/ship in SSshuttle.ships)
ships += ship
var/selection = input("Select ship to jump to.", "Admin Jumping", null, null) as null|anything in ships
if(!selection)
to_chat(src, "No ship selected.")
return
var/obj/effect/overmap/visitable/ship/ship = selection
if(src && src.mob && ship && ship.entry_points && ship.entry_points[1])
usr.on_mob_jump()
usr.forceMove(ship.entry_points[1].loc)
message_admins("[key_name_admin(usr)] jumped to ship [selection]", 1)
feedback_add_details("admin_verb","JSHI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else
alert("Admin jumping disabled")
/client/proc/jumptosector()
set category = "Admin"
set name = "Jump to Sector"
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_DEV))
return
if(GLOB.config.allow_admin_jump)
var/list/sectors = list()
for(var/sector in SSshuttle.initialized_sectors)
sectors += sector
var/selection = input("Select sector to jump to.", "Admin Jumping", null, null) as null|anything in sectors
if(!selection)
to_chat(src, "No sector selected.")
return
var/obj/effect/overmap/visitable/sector/sector = selection
if(src && src.mob && sector && sector.map_z && sector.map_z[1])
var/mob/A = src.mob
A.on_mob_jump()
A.x = world.maxx/2
A.y = world.maxy/2
A.z = sector.map_z[1]
message_admins("[key_name_admin(usr)] jumped to sector [selection]", 1)
feedback_add_details("admin_verb","JSEC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else
alert("Admin jumping disabled")
if(check_rights(R_ADMIN|R_MOD|R_DEBUG|R_DEV) || isstoryteller(src.mob))
if(GLOB.config.allow_admin_jump)
var/list/sectors = list()
for(var/sector in SSshuttle.initialized_sectors)
sectors += sector
var/selection = input("Select sector to jump to.", "Admin Jumping", null, null) as null|anything in sectors
if(!selection)
to_chat(src, "No sector selected.")
return
var/obj/effect/overmap/visitable/sector/sector = selection
if(src && src.mob && sector && sector.map_z && sector.map_z[1])
var/mob/A = src.mob
A.on_mob_jump()
A.x = world.maxx/2
A.y = world.maxy/2
A.z = sector.map_z[1]
message_admins("[key_name_admin(usr)] jumped to sector [selection]", 1)
feedback_add_details("admin_verb","JSEC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else
alert("Admin jumping disabled")
/client/proc/jumptokey()
set category = "Admin"
@@ -219,16 +205,15 @@
set category = "Admin"
set name = "Get Mob"
set desc = "Mob to teleport"
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG))
return
if(GLOB.config.allow_admin_jump)
log_admin("[key_name(usr)] teleported [key_name(M)]")
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)]", 1)
M.on_mob_jump()
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
alert("Admin jumping disabled")
if(check_rights(R_ADMIN|R_MOD|R_DEBUG) || isstoryteller(src.mob))
if(GLOB.config.allow_admin_jump)
log_admin("[key_name(usr)] teleported [key_name(M)]")
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)]", 1)
M.on_mob_jump()
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
alert("Admin jumping disabled")
/client/proc/Getkey()
set category = "Admin"
+2 -2
View File
@@ -24,10 +24,10 @@
to_chat(src, "You've used this verb too recently, please wait a moment before trying again.")
return
if(!check_rights(R_DEV|R_ADMIN))
if(!check_rights(R_DEV|R_ADMIN) || !isstoryteller(src.mob))
return
if(!holder)
if(!holder || !isstoryteller(src.mob))
return //how did they get here?
if(!ROUND_IS_STARTED)
+2 -1
View File
@@ -1,8 +1,9 @@
/client/proc/clear_toxins()
set category = "Special Verbs"
set name = "Clear Toxin/Fire in Zone"
set desc = "Remove fires from your current zone and reset the atmosphere to human-perfect gas mix, pressure, and temp."
if (!check_rights(R_ADMIN))
if (!check_rights(R_ADMIN) && !isstoryteller(usr))
return
if(!usr.loc) return
+10 -11
View File
@@ -1069,17 +1069,16 @@ Traitors and the like can also be revived with the previous role mostly intact.
set name = "Toggle random events on/off"
set desc = "Toggles random events such as meteors, black holes, blob (but not space dust) on/off"
if(!check_rights(R_SERVER)) return
if(!GLOB.config.allow_random_events)
GLOB.config.allow_random_events = 1
to_chat(usr, "Random events enabled")
message_admins("Admin [key_name_admin(usr)] has enabled random events.", 1)
else
GLOB.config.allow_random_events = 0
to_chat(usr, "Random events disabled")
message_admins("Admin [key_name_admin(usr)] has disabled random events.", 1)
feedback_add_details("admin_verb","TRE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
if(check_rights(R_SERVER) || isstoryteller(usr))
if(!GLOB.config.allow_random_events)
GLOB.config.allow_random_events = 1
to_chat(usr, "Random events enabled")
message_admins("Admin [key_name_admin(usr)] has enabled random events.", 1)
else
GLOB.config.allow_random_events = 0
to_chat(usr, "Random events disabled")
message_admins("Admin [key_name_admin(usr)] has disabled random events.", 1)
feedback_add_details("admin_verb","TRE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/fab_tip()
set category = "Admin"