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 08:43:42 -04:00
committed by GitHub
parent a231c3a7c2
commit 790aeafbdf
13 changed files with 504 additions and 420 deletions
+63 -64
View File
@@ -153,76 +153,75 @@
set desc = "Call an immediate drop pod on your location."
set name = "Call Drop Pod"
if(!check_rights(R_FUN)) return
if(check_rights(R_FUN) || isstoryteller(usr))
var/client/selected_player
var/mob/living/spawned_mob
var/list/spawned_mobs = list()
var/client/selected_player
var/mob/living/spawned_mob
var/list/spawned_mobs = list()
var/spawn_path = input("Select a mob type.", "Drop Pod Selection", null) as null|anything in typesof(/mob/living)-/mob/living
if(!spawn_path)
return
if(alert("Do you wish the mob to have a player?",,"No","Yes") == "No")
var/spawn_count = input("How many mobs do you wish the pod to contain?", "Drop Pod Selection", null) as num
if(spawn_count <= 0)
return
for(var/i=0;i<spawn_count;i++)
var/mob/living/M = new spawn_path()
M.tag = "awaiting drop"
spawned_mobs |= M
else
var/list/candidates = list()
for(var/client/player in GLOB.clients)
if(player.mob && istype(player.mob, /mob/abstract/ghost/observer))
candidates |= player
if(!candidates.len)
to_chat(usr, "There are no candidates for a drop pod launch.")
var/spawn_path = input("Select a mob type.", "Drop Pod Selection", null) as null|anything in typesof(/mob/living)-/mob/living
if(!spawn_path)
return
// Get a player and a mob type.
selected_player = input("Select a player.", "Drop Pod Selection", null) as null|anything in candidates
if(!selected_player)
if(alert("Do you wish the mob to have a player?",,"No","Yes") == "No")
var/spawn_count = input("How many mobs do you wish the pod to contain?", "Drop Pod Selection", null) as num
if(spawn_count <= 0)
return
for(var/i=0;i<spawn_count;i++)
var/mob/living/M = new spawn_path()
M.tag = "awaiting drop"
spawned_mobs |= M
else
var/list/candidates = list()
for(var/client/player in GLOB.clients)
if(player.mob && istype(player.mob, /mob/abstract/ghost/observer))
candidates |= player
if(!candidates.len)
to_chat(usr, "There are no candidates for a drop pod launch.")
return
// Get a player and a mob type.
selected_player = input("Select a player.", "Drop Pod Selection", null) as null|anything in candidates
if(!selected_player)
return
// Spawn the mob in nullspace for now.
spawned_mob = new spawn_path()
spawned_mob.tag = "awaiting drop"
// Equip them, if they are human and it is desirable.
if(istype(spawned_mob, /mob/living/carbon/human))
var/antag_type = input("Select an equipment template to use or cancel for nude.", null) as null|anything in GLOB.all_antag_types
if(antag_type)
var/datum/antagonist/A = GLOB.all_antag_types[antag_type]
A.equip(spawned_mob)
if(alert("Are you SURE you wish to deploy this drop pod? It will cause a sizable explosion and gib anyone underneath it.",,"No","Yes") == "No")
if(spawned_mob)
qdel(spawned_mob)
if(spawned_mobs.len)
for(var/mob/living/M in spawned_mobs)
spawned_mobs -= M
M.tag = null
qdel(M)
spawned_mobs.Cut()
return
// Spawn the mob in nullspace for now.
spawned_mob = new spawn_path()
spawned_mob.tag = "awaiting drop"
// Chuck them into the pod.
var/automatic_pod
if(spawned_mob && selected_player)
spawned_mob.ckey = selected_player.mob.ckey
spawned_mobs = list(spawned_mob)
message_admins("[key_name_admin(usr)] dropped a pod containing \the [spawned_mob] ([spawned_mob.key]) at ([usr.x],[usr.y],[usr.z])")
log_admin("[key_name(usr)] dropped a pod containing \the [spawned_mob] ([spawned_mob.key]) at ([usr.x],[usr.y],[usr.z])")
else if(spawned_mobs.len)
automatic_pod = 1
message_admins("[key_name_admin(usr)] dropped a pod containing [spawned_mobs.len] [spawned_mobs[1]] at ([usr.x],[usr.y],[usr.z])")
log_admin("[key_name(usr)] dropped a pod containing [spawned_mobs.len] [spawned_mobs[1]] at ([usr.x],[usr.y],[usr.z])")
else
return
// Equip them, if they are human and it is desirable.
if(istype(spawned_mob, /mob/living/carbon/human))
var/antag_type = input("Select an equipment template to use or cancel for nude.", null) as null|anything in GLOB.all_antag_types
if(antag_type)
var/datum/antagonist/A = GLOB.all_antag_types[antag_type]
A.equip(spawned_mob)
if(alert("Are you SURE you wish to deploy this drop pod? It will cause a sizable explosion and gib anyone underneath it.",,"No","Yes") == "No")
if(spawned_mob)
qdel(spawned_mob)
if(spawned_mobs.len)
for(var/mob/living/M in spawned_mobs)
spawned_mobs -= M
M.tag = null
qdel(M)
spawned_mobs.Cut()
return
// Chuck them into the pod.
var/automatic_pod
if(spawned_mob && selected_player)
spawned_mob.ckey = selected_player.mob.ckey
spawned_mobs = list(spawned_mob)
message_admins("[key_name_admin(usr)] dropped a pod containing \the [spawned_mob] ([spawned_mob.key]) at ([usr.x],[usr.y],[usr.z])")
log_admin("[key_name(usr)] dropped a pod containing \the [spawned_mob] ([spawned_mob.key]) at ([usr.x],[usr.y],[usr.z])")
else if(spawned_mobs.len)
automatic_pod = 1
message_admins("[key_name_admin(usr)] dropped a pod containing [spawned_mobs.len] [spawned_mobs[1]] at ([usr.x],[usr.y],[usr.z])")
log_admin("[key_name(usr)] dropped a pod containing [spawned_mobs.len] [spawned_mobs[1]] at ([usr.x],[usr.y],[usr.z])")
else
return
new /datum/random_map/droppod(null, usr.x-1, usr.y-1, usr.z, supplied_drops = spawned_mobs, automated = automatic_pod)
new /datum/random_map/droppod(null, usr.x-1, usr.y-1, usr.z, supplied_drops = spawned_mobs, automated = automatic_pod)
#undef SD_FLOOR_TILE
+50 -51
View File
@@ -37,57 +37,56 @@
set desc = "Call an immediate supply drop on your location."
set name = "Call Supply Drop"
if(!check_rights(R_FUN)) return
if(check_rights(R_FUN) || isstoryteller(usr))
var/chosen_loot_type
var/list/chosen_loot_types
var/choice = alert("Do you wish to supply a custom loot list?",,"No","Yes")
if(choice == "Yes")
chosen_loot_types = list()
var/chosen_loot_type
var/list/chosen_loot_types
var/choice = alert("Do you wish to supply a custom loot list?",,"No","Yes")
if(choice == "Yes")
chosen_loot_types = list()
choice = alert("Do you wish to add mobs?",,"No","Yes")
if(choice == "Yes")
while(1)
var/adding_loot_type = input("Select a new loot path. Cancel to finish.", "Loot Selection", null) as null|anything in typesof(/mob/living)
if(!adding_loot_type)
break
chosen_loot_types |= adding_loot_type
choice = alert("Do you wish to add structures or machines?",,"No","Yes")
if(choice == "Yes")
while(1)
var/adding_loot_type = input("Select a new loot path. Cancel to finish.", "Loot Selection", null) as null|anything in typesof(/obj) - typesof(/obj/item)
if(!adding_loot_type)
break
chosen_loot_types |= adding_loot_type
choice = alert("Do you wish to add any non-weapon items?",,"No","Yes")
if(choice == "Yes")
while(1)
var/adding_loot_type = input("Select a new loot path. Cancel to finish.", "Loot Selection", null) as null|anything in typesof(/obj/item) - typesof(/obj/item)
if(!adding_loot_type)
break
chosen_loot_types |= adding_loot_type
choice = alert("Do you wish to add mobs?",,"No","Yes")
if(choice == "Yes")
while(1)
var/adding_loot_type = input("Select a new loot path. Cancel to finish.", "Loot Selection", null) as null|anything in typesof(/mob/living)
if(!adding_loot_type)
break
chosen_loot_types |= adding_loot_type
choice = alert("Do you wish to add structures or machines?",,"No","Yes")
if(choice == "Yes")
while(1)
var/adding_loot_type = input("Select a new loot path. Cancel to finish.", "Loot Selection", null) as null|anything in typesof(/obj) - typesof(/obj/item)
if(!adding_loot_type)
break
chosen_loot_types |= adding_loot_type
choice = alert("Do you wish to add any non-weapon items?",,"No","Yes")
if(choice == "Yes")
while(1)
var/adding_loot_type = input("Select a new loot path. Cancel to finish.", "Loot Selection", null) as null|anything in typesof(/obj/item) - typesof(/obj/item)
if(!adding_loot_type)
break
chosen_loot_types |= adding_loot_type
choice = alert("Do you wish to add weapons?",,"No","Yes")
if(choice == "Yes")
while(1)
var/adding_loot_type = input("Select a new loot path. Cancel to finish.", "Loot Selection", null) as null|anything in typesof(/obj/item)
if(!adding_loot_type)
break
chosen_loot_types |= adding_loot_type
choice = alert("Do you wish to add ABSOLUTELY ANYTHING ELSE? (you really shouldn't need to)",,"No","Yes")
if(choice == "Yes")
while(1)
var/adding_loot_type = input("Select a new loot path. Cancel to finish.", "Loot Selection", null) as null|anything in typesof(/atom/movable)
if(!adding_loot_type)
break
chosen_loot_types |= adding_loot_type
else
choice = alert("Do you wish to specify a loot type?",,"No","Yes")
if(choice == "Yes")
chosen_loot_type = input("Select a loot type.", "Loot Selection", null) as null|anything in supply_drop_random_loot_types()
choice = alert("Do you wish to add weapons?",,"No","Yes")
if(choice == "Yes")
while(1)
var/adding_loot_type = input("Select a new loot path. Cancel to finish.", "Loot Selection", null) as null|anything in typesof(/obj/item)
if(!adding_loot_type)
break
chosen_loot_types |= adding_loot_type
choice = alert("Do you wish to add ABSOLUTELY ANYTHING ELSE? (you really shouldn't need to)",,"No","Yes")
if(choice == "Yes")
while(1)
var/adding_loot_type = input("Select a new loot path. Cancel to finish.", "Loot Selection", null) as null|anything in typesof(/atom/movable)
if(!adding_loot_type)
break
chosen_loot_types |= adding_loot_type
else
choice = alert("Do you wish to specify a loot type?",,"No","Yes")
if(choice == "Yes")
chosen_loot_type = input("Select a loot type.", "Loot Selection", null) as null|anything in supply_drop_random_loot_types()
choice = alert("Are you SURE you wish to deploy this supply drop? It will cause a sizable explosion and gib anyone underneath it.",,"No","Yes")
if(choice == "No")
return
log_admin("[key_name(usr)] dropped supplies at ([usr.x],[usr.y],[usr.z])")
new /datum/random_map/droppod/supply(null, usr.x-2, usr.y-2, usr.z, supplied_drops = chosen_loot_types, supplied_drop = chosen_loot_type)
choice = alert("Are you SURE you wish to deploy this supply drop? It will cause a sizable explosion and gib anyone underneath it.",,"No","Yes")
if(choice == "No")
return
log_admin("[key_name(usr)] dropped supplies at ([usr.x],[usr.y],[usr.z])")
new /datum/random_map/droppod/supply(null, usr.x-2, usr.y-2, usr.z, supplied_drops = chosen_loot_types, supplied_drop = chosen_loot_type)