Mob Abilities (#63520)

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
Whoneedspacee
2021-12-31 18:56:26 -05:00
committed by GitHub
parent b396e73eb7
commit 155bd7d9ab
28 changed files with 1633 additions and 1226 deletions
+1
View File
@@ -107,6 +107,7 @@ GLOBAL_LIST_INIT(admin_verbs_fun, list(
/client/proc/show_tip,
/client/proc/smite,
/client/proc/admin_away,
/client/proc/add_mob_ability,
/datum/admins/proc/station_traits_panel,
))
GLOBAL_PROTECT(admin_verbs_fun)
+26
View File
@@ -505,3 +505,29 @@
message_admins("[key_name_admin(usr)] started weather of type [weather_type] on the z-level [z_level].")
log_admin("[key_name(usr)] started weather of type [weather_type] on the z-level [z_level].")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Run Weather")
/client/proc/add_mob_ability()
set category = "Admin.Events"
set name = "Add Mob Ability"
set desc = "Adds an ability to a marked mob."
if(!holder)
return
if(!holder.marked_datum || !istype(holder.marked_datum, /mob/living))
return
var/mob/living/marked_mob = holder.marked_datum
var/ability_type = input("Choose an ability", "Ability") as null|anything in sort_list(subtypesof(/datum/action/cooldown/mob_cooldown), /proc/cmp_typepaths_asc)
if(!ability_type)
return
var/datum/action/cooldown/mob_cooldown/add_ability = new ability_type()
add_ability.Grant(marked_mob)
message_admins("[key_name_admin(usr)] added mob ability [ability_type] to mob [marked_mob].")
log_admin("[key_name(usr)] added mob ability [ability_type] to mob [marked_mob].")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Add Mob Ability") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!