[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
+14 -19
View File
@@ -148,26 +148,20 @@
drop.buckled = null
drop.forceMove(T)
/datum/admins/proc/call_drop_pod()
set category = "Fun.Drop Pod"
set desc = "Call an immediate drop pod on your location."
set name = "Call Drop Pod"
if(!check_rights(R_FUN)) return
ADMIN_VERB(call_drop_pod, R_FUN, "Call Drop Pod", "Call an immediate drop pod on your location.", ADMIN_CATEGORY_FUN_DROP_POD)
var/client/selected_player
var/mob/living/spawned_mob
var/list/spawned_mobs = list()
var/spawn_path = tgui_input_list(usr, "Select a mob type.", "Drop Pod Selection", subtypesof(/mob/living))
var/spawn_path = tgui_input_list(user, "Select a mob type.", "Drop Pod Selection", subtypesof(/mob/living))
if(!spawn_path)
return
var/input = tgui_alert(usr, "Do you wish the mob to have a player?","Assign Player?",list("No","Yes"))
var/input = tgui_alert(user, "Do you wish the mob to have a player?","Assign Player?",list("No","Yes"))
if(!input)
return
if(input == "No")
var/spawn_count = tgui_input_number(usr, "How many mobs do you wish the pod to contain?", "Drop Pod Selection", null, min_value=1)
var/spawn_count = tgui_input_number(user, "How many mobs do you wish the pod to contain?", "Drop Pod Selection", null, min_value=1)
if(spawn_count <= 0)
return
for(var/i=0;i<spawn_count;i++)
@@ -181,11 +175,11 @@
candidates |= player
if(!candidates.len)
to_chat(usr, "There are no candidates for a drop pod launch.")
to_chat(user, "There are no candidates for a drop pod launch.")
return
// Get a player and a mob type.
selected_player = tgui_input_list(usr, "Select a player.", "Drop Pod Selection", candidates)
selected_player = tgui_input_list(user, "Select a player.", "Drop Pod Selection", candidates)
if(!selected_player)
return
@@ -195,12 +189,12 @@
// Equip them, if they are human and it is desirable.
if(ishuman(spawned_mob))
var/antag_type = tgui_input_list(usr, "Select an equipment template to use or cancel for nude.", GLOB.all_antag_types)
var/antag_type = tgui_input_list(user, "Select an equipment template to use or cancel for nude.", GLOB.all_antag_types)
if(antag_type)
var/datum/antagonist/A = GLOB.all_antag_types[antag_type]
A.equip(spawned_mob)
if(tgui_alert(usr, "Are you SURE you wish to deploy this drop pod? It will cause a sizable explosion and gib anyone underneath it.","Danger!",list("No","Yes")) != "Yes")
if(tgui_alert(user, "Are you SURE you wish to deploy this drop pod? It will cause a sizable explosion and gib anyone underneath it.","Danger!",list("No","Yes")) != "Yes")
if(spawned_mob)
qdel(spawned_mob)
if(spawned_mobs.len)
@@ -213,22 +207,23 @@
// Chuck them into the pod.
var/automatic_pod
var/mob/user_mob = user.mob
if(spawned_mob && selected_player)
if(selected_player.mob.mind)
selected_player.mob.mind.transfer_to(spawned_mob)
else
spawned_mob.ckey = selected_player.mob.ckey
spawned_mobs = list(spawned_mob)
message_admins("[key_name(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])")
message_admins("[key_name(user)] dropped a pod containing \the [spawned_mob] ([spawned_mob.key]) at ([user_mob.x],[user_mob.y],[user_mob.z])")
log_admin("[key_name(user)] dropped a pod containing \the [spawned_mob] ([spawned_mob.key]) at ([user_mob.x],[user_mob.y],[user_mob.z])")
else if(spawned_mobs.len)
automatic_pod = 1
message_admins("[key_name(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])")
message_admins("[key_name(user)] dropped a pod containing [spawned_mobs.len] [spawned_mobs[1]] at ([user_mob.x],[user_mob.y],[user_mob.z])")
log_admin("[key_name(user)] dropped a pod containing [spawned_mobs.len] [spawned_mobs[1]] at ([user_mob.x],[user_mob.y],[user_mob.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, user_mob.x-1, user_mob.y-1, user_mob.z, supplied_drops = spawned_mobs, automated = automatic_pod)
#undef SD_FLOOR_TILE
#undef SD_WALL_TILE
+18 -24
View File
@@ -31,67 +31,61 @@
else
log_world("## ERROR Unhandled drop type: [drop_type]")
/datum/admins/proc/call_supply_drop()
set category = "Fun.Drop Pod"
set desc = "Call an immediate supply drop on your location."
set name = "Call Supply Drop"
if(!check_rights(R_FUN)) return
ADMIN_VERB(call_supply_drop, R_FUN, "Call Supply Drop", "Call an immediate supply drop on your location.", ADMIN_CATEGORY_FUN_DROP_POD)
var/chosen_loot_type
var/list/chosen_loot_types
var/choice = tgui_alert(usr, "Do you wish to supply a custom loot list?","Supply Drop",list("No","Yes"))
var/choice = tgui_alert(user, "Do you wish to supply a custom loot list?","Supply Drop",list("No","Yes"))
if(!choice)
return
if(choice == "Yes")
chosen_loot_types = list()
choice = tgui_alert(usr, "Do you wish to add mobs?","Supply Drop",list("No","Yes"))
choice = tgui_alert(user, "Do you wish to add mobs?","Supply Drop",list("No","Yes"))
if(choice == "Yes")
while(1)
var/adding_loot_type = tgui_input_list(usr, "Select a new loot path. Cancel to finish.", "Loot Selection", typesof(/mob/living))
var/adding_loot_type = tgui_input_list(user, "Select a new loot path. Cancel to finish.", "Loot Selection", typesof(/mob/living))
if(!adding_loot_type)
break
chosen_loot_types |= adding_loot_type
choice = tgui_alert(usr, "Do you wish to add structures or machines?","Supply Drop",list("No","Yes"))
choice = tgui_alert(user, "Do you wish to add structures or machines?","Supply Drop",list("No","Yes"))
if(choice == "Yes")
while(1)
var/adding_loot_type = tgui_input_list(usr, "Select a new loot path. Cancel to finish.", "Loot Selection", subtypesof(/obj))
var/adding_loot_type = tgui_input_list(user, "Select a new loot path. Cancel to finish.", "Loot Selection", subtypesof(/obj))
if(!adding_loot_type)
break
chosen_loot_types |= adding_loot_type
choice = tgui_alert(usr, "Do you wish to add any non-weapon items?","Supply Drop",list("No","Yes"))
choice = tgui_alert(user, "Do you wish to add any non-weapon items?","Supply Drop",list("No","Yes"))
if(choice == "Yes")
while(1)
var/adding_loot_type = tgui_input_list(usr, "Select a new loot path. Cancel to finish.", "Loot Selection", subtypesof(/obj/item))
var/adding_loot_type = tgui_input_list(user, "Select a new loot path. Cancel to finish.", "Loot Selection", subtypesof(/obj/item))
if(!adding_loot_type)
break
chosen_loot_types |= adding_loot_type
choice = tgui_alert(usr, "Do you wish to add weapons?","Supply Drop",list("No","Yes"))
choice = tgui_alert(user, "Do you wish to add weapons?","Supply Drop",list("No","Yes"))
if(choice == "Yes")
while(1)
var/adding_loot_type = tgui_input_list(usr, "Select a new loot path. Cancel to finish.", "Loot Selection", typesof(/obj/item))
var/adding_loot_type = tgui_input_list(user, "Select a new loot path. Cancel to finish.", "Loot Selection", typesof(/obj/item))
if(!adding_loot_type)
break
chosen_loot_types |= adding_loot_type
choice = tgui_alert(usr, "Do you wish to add ABSOLUTELY ANYTHING ELSE? (you really shouldn't need to)","Supply Drop",list("No","Yes"))
choice = tgui_alert(user, "Do you wish to add ABSOLUTELY ANYTHING ELSE? (you really shouldn't need to)","Supply Drop",list("No","Yes"))
if(choice == "Yes")
while(1)
var/adding_loot_type = tgui_input_list(usr, "Select a new loot path. Cancel to finish.", "Loot Selection", typesof(/atom/movable))
var/adding_loot_type = tgui_input_list(user, "Select a new loot path. Cancel to finish.", "Loot Selection", typesof(/atom/movable))
if(!adding_loot_type)
break
chosen_loot_types |= adding_loot_type
else
choice = tgui_alert(usr, "Do you wish to specify a loot type?","Supply Drop",list("No","Yes"))
choice = tgui_alert(user, "Do you wish to specify a loot type?","Supply Drop",list("No","Yes"))
if(!choice)
return
if(choice == "Yes")
chosen_loot_type = tgui_input_list(usr, "Select a loot type.", "Loot Selection", supply_drop_random_loot_types())
chosen_loot_type = tgui_input_list(user, "Select a loot type.", "Loot Selection", supply_drop_random_loot_types())
choice = tgui_alert(usr, "Are you SURE you wish to deploy this supply drop? It will cause a sizable explosion and gib anyone underneath it.","Supply Drop",list("No","Yes"))
choice = tgui_alert(user, "Are you SURE you wish to deploy this supply drop? It will cause a sizable explosion and gib anyone underneath it.","Supply Drop",list("No","Yes"))
if(choice != "Yes")
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)
var/mob/user_mob = user.mob
log_admin("[key_name(user)] dropped supplies at ([user_mob.x],[user_mob.y],[user_mob.z])")
new /datum/random_map/droppod/supply(null, user_mob.x-2, user_mob.y-2, user_mob.z, supplied_drops = chosen_loot_types, supplied_drop = chosen_loot_type)