Admin Verb Datums MkIII | Now with functional command bar (#82511)

This commit is contained in:
Zephyr
2024-04-12 12:27:09 -07:00
committed by GitHub
parent e0d335b442
commit 7f8752be14
104 changed files with 1898 additions and 3287 deletions
+51 -104
View File
@@ -1,74 +1,54 @@
// Admin Tab - Fun Verbs
/client/proc/cmd_admin_explosion(atom/O as obj|mob|turf in world)
set category = "Admin.Fun"
set name = "Explosion"
if(!check_rights(R_ADMIN))
return
var/devastation = input("Range of total devastation. -1 to none", "Input") as num|null
ADMIN_VERB(admin_explosion, R_ADMIN|R_FUN, "Explosion", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, atom/orignator as obj|mob|turf)
var/devastation = input(user, "Range of total devastation. -1 to none", "Input") as num|null
if(devastation == null)
return
var/heavy = input("Range of heavy impact. -1 to none", "Input") as num|null
var/heavy = input(user, "Range of heavy impact. -1 to none", "Input") as num|null
if(heavy == null)
return
var/light = input("Range of light impact. -1 to none", "Input") as num|null
var/light = input(user, "Range of light impact. -1 to none", "Input") as num|null
if(light == null)
return
var/flash = input("Range of flash. -1 to none", "Input") as num|null
var/flash = input(user, "Range of flash. -1 to none", "Input") as num|null
if(flash == null)
return
var/flames = input("Range of flames. -1 to none", "Input") as num|null
var/flames = input(user, "Range of flames. -1 to none", "Input") as num|null
if(flames == null)
return
if ((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1) || (flames != -1))
if ((devastation > 20) || (heavy > 20) || (light > 20) || (flames > 20))
if (tgui_alert(usr, "Are you sure you want to do this? It will laaag.", "Confirmation", list("Yes", "No")) == "No")
if (tgui_alert(user, "Are you sure you want to do this? It will laaag.", "Confirmation", list("Yes", "No")) == "No")
return
explosion(O, devastation, heavy, light, flames, flash, explosion_cause = mob)
log_admin("[key_name(usr)] created an explosion ([devastation],[heavy],[light],[flames]) at [AREACOORD(O)]")
message_admins("[key_name_admin(usr)] created an explosion ([devastation],[heavy],[light],[flames]) at [AREACOORD(O)]")
explosion(orignator, devastation, heavy, light, flames, flash, explosion_cause = user.mob)
log_admin("[key_name(user)] created an explosion ([devastation],[heavy],[light],[flames]) at [AREACOORD(orignator)]")
message_admins("[key_name_admin(user)] created an explosion ([devastation],[heavy],[light],[flames]) at [AREACOORD(orignator)]")
BLACKBOX_LOG_ADMIN_VERB("Explosion")
/client/proc/cmd_admin_emp(atom/O as obj|mob|turf in world)
set category = "Admin.Fun"
set name = "EM Pulse"
if(!check_rights(R_ADMIN))
return
var/heavy = input("Range of heavy pulse.", "Input") as num|null
ADMIN_VERB(admin_emp, R_ADMIN|R_FUN, "EM Pulse", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, atom/orignator as obj|mob|turf)
var/heavy = input(user, "Range of heavy pulse.", "Input") as num|null
if(heavy == null)
return
var/light = input("Range of light pulse.", "Input") as num|null
var/light = input(user, "Range of light pulse.", "Input") as num|null
if(light == null)
return
if (heavy || light)
empulse(O, heavy, light)
log_admin("[key_name(usr)] created an EM Pulse ([heavy],[light]) at [AREACOORD(O)]")
message_admins("[key_name_admin(usr)] created an EM Pulse ([heavy],[light]) at [AREACOORD(O)]")
empulse(orignator, heavy, light)
log_admin("[key_name(user)] created an EM Pulse ([heavy],[light]) at [AREACOORD(orignator)]")
message_admins("[key_name_admin(user)] created an EM Pulse ([heavy],[light]) at [AREACOORD(orignator)]")
BLACKBOX_LOG_ADMIN_VERB("EM Pulse")
/client/proc/cmd_admin_gib(mob/victim in GLOB.mob_list)
set category = "Admin.Fun"
set name = "Gib"
if(!check_rights(R_ADMIN))
return
var/confirm = tgui_alert(usr, "Drop a brain?", "Confirm", list("Yes", "No","Cancel")) || "Cancel"
ADMIN_VERB(gib_them, R_ADMIN, "Gib", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, mob/victim)
var/confirm = tgui_alert(user, "Drop a brain?", "Confirm", list("Yes", "No","Cancel")) || "Cancel"
if(confirm == "Cancel")
return
//Due to the delay here its easy for something to have happened to the mob
if(isnull(victim))
return
log_admin("[key_name(usr)] has gibbed [key_name(victim)]")
message_admins("[key_name_admin(usr)] has gibbed [key_name_admin(victim)]")
log_admin("[key_name(user)] has gibbed [key_name(victim)]")
message_admins("[key_name_admin(user)] has gibbed [key_name_admin(victim)]")
if(isobserver(victim))
new /obj/effect/gibspawner/generic(get_turf(victim))
@@ -84,62 +64,47 @@
BLACKBOX_LOG_ADMIN_VERB("Gib")
/client/proc/cmd_admin_gib_self()
set name = "Gibself"
set category = "Admin.Fun"
var/confirm = tgui_alert(usr, "You sure?", "Confirm", list("Yes", "No"))
ADMIN_VERB(gib_self, R_ADMIN, "Gibself", "Give yourself the same treatment you give others.", ADMIN_CATEGORY_FUN)
var/confirm = tgui_alert(user, "You sure?", "Confirm", list("Yes", "No"))
if(confirm != "Yes")
return
log_admin("[key_name(usr)] used gibself.")
message_admins(span_adminnotice("[key_name_admin(usr)] used gibself."))
log_admin("[key_name(user)] used gibself.")
message_admins(span_adminnotice("[key_name_admin(user)] used gibself."))
BLACKBOX_LOG_ADMIN_VERB("Gib Self")
var/mob/living/ourself = mob
var/mob/living/ourself = user.mob
if (istype(ourself))
ourself.gib()
/client/proc/everyone_random()
set category = "Admin.Fun"
set name = "Make Everyone Random"
set desc = "Make everyone have a random appearance. You can only use this before rounds!"
ADMIN_VERB(everyone_random, R_SERVER, "Make Everyone Random", "Make everyone have a random appearance.", ADMIN_CATEGORY_FUN)
if(SSticker.HasRoundStarted())
to_chat(usr, "Nope you can't do this, the game's already started. This only works before rounds!", confidential = TRUE)
to_chat(user, "Nope you can't do this, the game's already started. This only works before rounds!", confidential = TRUE)
return
var/frn = CONFIG_GET(flag/force_random_names)
if(frn)
CONFIG_SET(flag/force_random_names, FALSE)
message_admins("Admin [key_name_admin(usr)] has disabled \"Everyone is Special\" mode.")
to_chat(usr, "Disabled.", confidential = TRUE)
message_admins("Admin [key_name_admin(user)] has disabled \"Everyone is Special\" mode.")
to_chat(user, "Disabled.", confidential = TRUE)
return
var/notifyplayers = tgui_alert(usr, "Do you want to notify the players?", "Options", list("Yes", "No", "Cancel")) || "Cancel"
var/notifyplayers = tgui_alert(user, "Do you want to notify the players?", "Options", list("Yes", "No", "Cancel")) || "Cancel"
if(notifyplayers == "Cancel")
return
log_admin("Admin [key_name(src)] has forced the players to have random appearances.")
message_admins("Admin [key_name_admin(usr)] has forced the players to have random appearances.")
log_admin("Admin [key_name(user)] has forced the players to have random appearances.")
message_admins("Admin [key_name_admin(user)] has forced the players to have random appearances.")
if(notifyplayers == "Yes")
to_chat(world, span_adminnotice("Admin [usr.key] has forced the players to have completely random identities!"), confidential = TRUE)
to_chat(world, span_adminnotice("Admin [user.key] has forced the players to have completely random identities!"), confidential = TRUE)
to_chat(usr, "<i>Remember: you can always disable the randomness by using the verb again, assuming the round hasn't started yet</i>.", confidential = TRUE)
to_chat(user, "<i>Remember: you can always disable the randomness by using the verb again, assuming the round hasn't started yet</i>.", confidential = TRUE)
CONFIG_SET(flag/force_random_names, TRUE)
BLACKBOX_LOG_ADMIN_VERB("Make Everyone Random")
/client/proc/mass_zombie_infection()
set category = "Admin.Fun"
set name = "Mass Zombie Infection"
set desc = "Infects all humans with a latent organ that will zombify \
them on death."
if(!check_rights(R_ADMIN))
return
var/confirm = tgui_alert(usr, "Please confirm you want to add latent zombie organs in all humans?", "Confirm Zombies", list("Yes", "No"))
ADMIN_VERB(mass_zombie_infection, R_ADMIN, "Mass Zombie Infection", "Infects all humans with a latent organ that will zombify them on death.", ADMIN_CATEGORY_FUN)
var/confirm = tgui_alert(user, "Please confirm you want to add latent zombie organs in all humans?", "Confirm Zombies", list("Yes", "No"))
if(confirm != "Yes")
return
@@ -147,45 +112,32 @@
var/mob/living/carbon/human/H = i
new /obj/item/organ/internal/zombie_infection/nodamage(H)
message_admins("[key_name_admin(usr)] added a latent zombie infection to all humans.")
log_admin("[key_name(usr)] added a latent zombie infection to all humans.")
message_admins("[key_name_admin(user)] added a latent zombie infection to all humans.")
log_admin("[key_name(user)] added a latent zombie infection to all humans.")
BLACKBOX_LOG_ADMIN_VERB("Mass Zombie Infection")
/client/proc/mass_zombie_cure()
set category = "Admin.Fun"
set name = "Mass Zombie Cure"
set desc = "Removes the zombie infection from all humans, returning them to normal."
if(!check_rights(R_ADMIN))
return
var/confirm = tgui_alert(usr, "Please confirm you want to cure all zombies?", "Confirm Zombie Cure", list("Yes", "No"))
ADMIN_VERB(mass_zombie_cure, R_ADMIN, "Mass Zombie Cure", "Removes the zombie infection from all humans, returning them to normal.", ADMIN_CATEGORY_FUN)
var/confirm = tgui_alert(user, "Please confirm you want to cure all zombies?", "Confirm Zombie Cure", list("Yes", "No"))
if(confirm != "Yes")
return
for(var/obj/item/organ/internal/zombie_infection/nodamage/I in GLOB.zombie_infection_list)
qdel(I)
message_admins("[key_name_admin(usr)] cured all zombies.")
log_admin("[key_name(usr)] cured all zombies.")
message_admins("[key_name_admin(user)] cured all zombies.")
log_admin("[key_name(user)] cured all zombies.")
BLACKBOX_LOG_ADMIN_VERB("Mass Zombie Cure")
/client/proc/polymorph_all()
set category = "Admin.Fun"
set name = "Polymorph All"
set desc = "Applies the effects of the bolt of change to every single mob."
if(!check_rights(R_ADMIN))
return
var/confirm = tgui_alert(usr, "Please confirm you want polymorph all mobs?", "Confirm Polymorph", list("Yes", "No"))
ADMIN_VERB(polymorph_all, R_ADMIN, "Polymorph All", "Applies the effects of the bolt of change to every single mob.", ADMIN_CATEGORY_FUN)
var/confirm = tgui_alert(user, "Please confirm you want polymorph all mobs?", "Confirm Polymorph", list("Yes", "No"))
if(confirm != "Yes")
return
var/list/mobs = shuffle(GLOB.alive_mob_list.Copy()) // might change while iterating
var/who_did_it = key_name_admin(usr)
var/who_did_it = key_name_admin(user)
message_admins("[key_name_admin(usr)] started polymorphed all living mobs.")
log_admin("[key_name(usr)] polymorphed all living mobs.")
message_admins("[key_name_admin(user)] started polymorphed all living mobs.")
log_admin("[key_name(user)] polymorphed all living mobs.")
BLACKBOX_LOG_ADMIN_VERB("Polymorph All")
for(var/mob/living/M in mobs)
@@ -201,23 +153,18 @@
message_admins("Mass polymorph started by [who_did_it] is complete.")
/client/proc/smite(mob/living/target as mob)
set category = "Admin.Fun"
set name = "Smite"
if(!check_rights(R_ADMIN) || !check_rights(R_FUN))
return
var/punishment = input("Choose a punishment", "DIVINE SMITING") as null|anything in GLOB.smites
ADMIN_VERB_AND_CONTEXT_MENU(admin_smite, R_ADMIN|R_FUN, "Smite", "Smite a player with divine power.", ADMIN_CATEGORY_FUN, mob/living/target in world)
var/punishment = input(user, "Choose a punishment", "DIVINE SMITING") as null|anything in GLOB.smites
if(QDELETED(target) || !punishment)
return
var/smite_path = GLOB.smites[punishment]
var/datum/smite/smite = new smite_path
var/configuration_success = smite.configure(usr)
var/configuration_success = smite.configure(user)
if (configuration_success == FALSE)
return
smite.effect(src, target)
smite.effect(user, target)
/// "Turns" people into objects. Really, we just add them to the contents of the item.
/proc/objectify(atom/movable/target, path)