From 84ab3d7a3a7acc06dc4a5120777e7b1d2ee5f0a6 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Fri, 3 Nov 2023 07:42:48 +0100 Subject: [PATCH] [MIRROR] Standardizes Adding Datum Actions into a proc/define (Bonus AI Support) (Bonus Useless Code Cleanup) [MDB IGNORE] (#24761) * Standardizes Adding Datum Actions into a proc/define (Bonus AI Support) (Bonus Useless Code Cleanup) * Update ooze.dm * Modular audit - no more creating actions in nullspace * Update drone.dm --------- Co-authored-by: san7890 Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com> --- code/__DEFINES/actions.dm | 7 ++ code/datums/brain_damage/imaginary_friend.dm | 12 +- code/modules/mob/living/basic/clown/clown.dm | 20 +--- .../mob/living/basic/constructs/_construct.dm | 4 +- .../mob/living/basic/constructs/artificer.dm | 4 +- .../mob/living/basic/constructs/juggernaut.dm | 2 +- .../modules/mob/living/basic/festivus_pole.dm | 5 +- .../{heretic_summon.dm => _heretic_summon.dm} | 0 .../mob/living/basic/heretic/ash_spirit.dm | 4 +- .../mob/living/basic/heretic/flesh_stalker.dm | 9 +- .../basic/heretic/maid_in_the_mirror.dm | 3 +- .../mob/living/basic/heretic/raw_prophet.dm | 32 +++--- .../mob/living/basic/heretic/rust_walker.dm | 11 +- .../basic/icemoon/ice_demon/ice_demon.dm | 16 ++- .../basic/icemoon/ice_whelp/ice_whelp.dm | 15 ++- .../jungle/mega_arachnid/mega_arachnid.dm | 14 +-- .../living/basic/jungle/seedling/seedling.dm | 12 +- .../living/basic/jungle/venus_human_trap.dm | 7 +- .../basic/lavaland/bileworm/_bileworm.dm | 22 ++-- .../basic/lavaland/brimdemon/brimdemon.dm | 4 - .../basic/lavaland/goldgrub/goldgrub.dm | 12 +- .../living/basic/lavaland/goliath/goliath.dm | 10 +- .../living/basic/lavaland/legion/legion.dm | 2 +- .../mob/living/basic/lavaland/mook/mook.dm | 26 ++++- .../mob/living/basic/minebots/minebot.dm | 15 ++- .../mob/living/basic/space_fauna/carp/carp.dm | 5 - .../space_fauna/changeling/flesh_spider.dm | 17 ++- .../basic/space_fauna/demon/demon_subtypes.dm | 3 +- .../basic/space_fauna/eyeball/_eyeball.dm | 8 +- .../basic/space_fauna/hivebot/_hivebot.dm | 3 +- .../space_fauna/meteor_heart/meteor_heart.dm | 31 +++--- .../basic/space_fauna/netherworld/creature.dm | 3 +- .../space_fauna/paper_wizard/paper_wizard.dm | 17 +-- .../basic/space_fauna/regal_rat/regal_rat.dm | 11 +- .../basic/space_fauna/revenant/_revenant.dm | 4 +- .../space_fauna/space_dragon/space_dragon.dm | 5 - .../spider/giant_spider/giant_spiders.dm | 105 +++++++----------- .../young_spider/young_spider_subtypes.dm | 5 +- .../living/basic/space_fauna/statue/statue.dm | 12 +- .../living/carbon/alien/adult/caste/drone.dm | 3 +- .../carbon/alien/adult/caste/praetorian.dm | 9 +- .../carbon/alien/adult/caste/sentinel.dm | 3 +- .../mob/living/carbon/alien/adult/queen.dm | 10 +- .../mob/living/carbon/alien/larva/larva.dm | 10 +- .../hostile/megafauna/_megafauna.dm | 4 +- .../hostile/megafauna/blood_drunk_miner.dm | 18 +-- .../hostile/megafauna/bubblegum.dm | 16 +-- .../hostile/megafauna/colossus.dm | 18 +-- .../hostile/megafauna/demonic_frost_miner.dm | 24 ++-- .../simple_animal/hostile/megafauna/drake.dm | 16 +-- .../hostile/mining_mobs/elites/elite.dm | 4 +- .../mob/living/simple_animal/hostile/ooze.dm | 32 +++--- .../living/simple_animal/hostile/vatbeast.dm | 3 +- .../living/simple_animal/hostile/wizard.dm | 6 - .../mob/living/simple_animal/slime/powers.dm | 3 +- code/modules/mob/mob_helpers.dm | 18 +++ .../code/modules/client/preferences/ghost.dm | 2 +- .../ashwalkers/code/species/Ashwalkers.dm | 2 +- .../modules/black_mesa/code/mobs/headcrab.dm | 6 +- .../modules/black_mesa/code/mobs/houndeye.dm | 4 +- .../clock_cult/code/items/clockwork_slab.dm | 2 +- .../code/mobs/clockwork_marauder.dm | 2 +- .../clock_cult/code/scriptures/_scripture.dm | 2 +- .../cortical_borer/code/cortical_borer.dm | 2 +- .../code/evolution/evolution_diveworm.dm | 2 +- .../code/evolution/evolution_hivelord.dm | 6 +- .../code/evolution/evolution_symbiote.dm | 4 +- .../horrorform/code/true_changeling.dm | 6 +- modular_skyrat/modules/hydra/code/neutral.dm | 4 +- .../nifsofts/base_types/action_granter.dm | 2 +- .../code/nifsofts/hivemind.dm | 2 +- .../code/nifsofts/soulcatcher.dm | 2 +- .../code/soulcatcher/soulcatcher_component.dm | 2 +- .../code/soulcatcher/soulcatcher_mob.dm | 4 +- .../spells/bloodcrawl_potion.dm | 2 +- .../modules/synths/code/species/synthetic.dm | 2 +- .../code/base_skyrat_xeno.dm | 17 +-- .../code/xeno_types/defender.dm | 19 +--- .../code/xeno_types/drone.dm | 11 +- .../code/xeno_types/praetorian.dm | 18 +-- .../code/xeno_types/queen.dm | 19 +--- .../code/xeno_types/ravager.dm | 27 +---- .../code/xeno_types/rouny.dm | 6 +- .../code/xeno_types/warrior.dm | 26 +---- tgstation.dme | 2 +- 85 files changed, 385 insertions(+), 514 deletions(-) rename code/modules/mob/living/basic/heretic/{heretic_summon.dm => _heretic_summon.dm} (100%) diff --git a/code/__DEFINES/actions.dm b/code/__DEFINES/actions.dm index 5bc2b161781..99f9c1aca55 100644 --- a/code/__DEFINES/actions.dm +++ b/code/__DEFINES/actions.dm @@ -41,3 +41,10 @@ DEFINE_BITFIELD(check_flags, list( #define UPDATE_BUTTON_BACKGROUND (1<<2) #define UPDATE_BUTTON_OVERLAY (1<<3) #define UPDATE_BUTTON_STATUS (1<<4) + +/// Takes in a typepath of a `/datum/action` and adds it to `src`. +/// Only useful if you want to add the action and never desire to reference it again ever. +#define GRANT_ACTION(typepath) do {\ + var/datum/action/_ability = new typepath(src);\ + _ability.Grant(src);\ +} while (FALSE) diff --git a/code/datums/brain_damage/imaginary_friend.dm b/code/datums/brain_damage/imaginary_friend.dm index 48fabd701f4..61175593ce4 100644 --- a/code/datums/brain_damage/imaginary_friend.dm +++ b/code/datums/brain_damage/imaginary_friend.dm @@ -83,8 +83,7 @@ var/mob/living/owner var/bubble_icon = "default" - var/datum/action/innate/imaginary_join/join - var/datum/action/innate/imaginary_hide/hide + /mob/camera/imaginary_friend/Login() . = ..() @@ -105,10 +104,11 @@ */ /mob/camera/imaginary_friend/Initialize(mapload) . = ..() - join = new - join.Grant(src) - hide = new - hide.Grant(src) + var/static/list/grantable_actions = list( + /datum/action/innate/imaginary_join, + /datum/action/innate/imaginary_hide, + ) + grant_actions_by_list(grantable_actions) /// Links this imaginary friend to the provided mob /mob/camera/imaginary_friend/proc/attach_to_owner(mob/living/imaginary_friend_owner) diff --git a/code/modules/mob/living/basic/clown/clown.dm b/code/modules/mob/living/basic/clown/clown.dm index 5682edf9339..e55b91bade2 100644 --- a/code/modules/mob/living/basic/clown/clown.dm +++ b/code/modules/mob/living/basic/clown/clown.dm @@ -391,8 +391,7 @@ /mob/living/basic/clown/mutant/glutton/Initialize(mapload) . = ..() - var/datum/action/cooldown/regurgitate/spit = new(src) - spit.Grant(src) + GRANT_ACTION(/datum/action/cooldown/regurgitate) AddElement(/datum/element/swabable, CELL_LINE_TABLE_GLUTTON, CELL_VIRUS_TABLE_GENERIC_MOB, 1, 5) AddComponent(/datum/component/tameable, food_types = list(/obj/item/food/cheesiehonkers, /obj/item/food/cornchips), tame_chance = 30, bonus_tame_chance = 0, after_tame = CALLBACK(src, PROC_REF(tamed))) @@ -541,22 +540,15 @@ BB_EMOTE_SEE = list("bites into the banana", "plucks a banana off its head", "photosynthesizes"), BB_EMOTE_SOUND = list('sound/items/bikehorn.ogg'), ) - ///Our peel dropping ability - var/datum/action/cooldown/rustle/banana_rustle - ///Our banana bunch spawning ability - var/datum/action/cooldown/exquisite_bunch/banana_bunch /mob/living/basic/clown/banana/Initialize(mapload) . = ..() - banana_rustle = new() - banana_rustle.Grant(src) - banana_bunch = new() - banana_bunch.Grant(src) -/mob/living/basic/clown/banana/Destroy() - . = ..() - QDEL_NULL(banana_rustle) - QDEL_NULL(banana_bunch) + var/static/list/innate_actions = list( + /datum/action/cooldown/exquisite_bunch, + /datum/action/cooldown/rustle, + ) + grant_actions_by_list(innate_actions) ///drops peels around the mob when activated /datum/action/cooldown/rustle diff --git a/code/modules/mob/living/basic/constructs/_construct.dm b/code/modules/mob/living/basic/constructs/_construct.dm index 71b2eb79fb6..a39949b5208 100644 --- a/code/modules/mob/living/basic/constructs/_construct.dm +++ b/code/modules/mob/living/basic/constructs/_construct.dm @@ -80,9 +80,7 @@ structure_types_typecache = structure_types,\ ) add_traits(list(TRAIT_HEALS_FROM_CULT_PYLONS, TRAIT_SPACEWALK), INNATE_TRAIT) - for(var/spell in construct_spells) - var/datum/action/new_spell = new spell(src) - new_spell.Grant(src) + grant_actions_by_list(construct_spells) var/spell_count = 1 for(var/datum/action/spell as anything in actions) diff --git a/code/modules/mob/living/basic/constructs/artificer.dm b/code/modules/mob/living/basic/constructs/artificer.dm index bf4a086bcdb..8856c0e66a2 100644 --- a/code/modules/mob/living/basic/constructs/artificer.dm +++ b/code/modules/mob/living/basic/constructs/artificer.dm @@ -15,11 +15,11 @@ attack_verb_simple = "ram" attack_sound = 'sound/weapons/punch2.ogg' construct_spells = list( + /datum/action/cooldown/spell/aoe/magic_missile/lesser, + /datum/action/cooldown/spell/conjure/construct/lesser, /datum/action/cooldown/spell/conjure/cult_floor, /datum/action/cooldown/spell/conjure/cult_wall, /datum/action/cooldown/spell/conjure/soulstone, - /datum/action/cooldown/spell/conjure/construct/lesser, - /datum/action/cooldown/spell/aoe/magic_missile/lesser, /datum/action/innate/cult/create_rune/revive, ) playstyle_string = "You are an Artificer. You are incredibly weak and fragile, \ diff --git a/code/modules/mob/living/basic/constructs/juggernaut.dm b/code/modules/mob/living/basic/constructs/juggernaut.dm index 2b8bb7e293d..6beee5554a3 100644 --- a/code/modules/mob/living/basic/constructs/juggernaut.dm +++ b/code/modules/mob/living/basic/constructs/juggernaut.dm @@ -19,8 +19,8 @@ mob_size = MOB_SIZE_LARGE force_threshold = 10 construct_spells = list( - /datum/action/cooldown/spell/forcewall/cult, /datum/action/cooldown/spell/basic_projectile/juggernaut, + /datum/action/cooldown/spell/forcewall/cult, /datum/action/innate/cult/create_rune/wall, ) playstyle_string = span_bold("You are a Juggernaut. Though slow, your shell can withstand heavy punishment, create shield walls, rip apart enemies and walls alike, and even deflect energy weapons.") diff --git a/code/modules/mob/living/basic/festivus_pole.dm b/code/modules/mob/living/basic/festivus_pole.dm index 058b74bfad8..f6dd1a41a2b 100644 --- a/code/modules/mob/living/basic/festivus_pole.dm +++ b/code/modules/mob/living/basic/festivus_pole.dm @@ -40,15 +40,14 @@ ///how much charge we give off to cells around us when rubbed var/recharge_value = 75 + /mob/living/basic/festivus/Initialize(mapload) . = ..() AddComponent(/datum/component/seethrough_mob) var/static/list/death_loot = list(/obj/item/stack/rods) AddElement(/datum/element/death_drops, death_loot) AddComponent(/datum/component/aggro_emote, emote_list = string_list(list("growls")), emote_chance = 20) - var/datum/action/cooldown/mob_cooldown/charge_apc/charge_ability = new(src) - charge_ability.Grant(src) - ai_controller.set_blackboard_key(BB_FESTIVE_APC, charge_ability) + grant_actions_by_list(list(/datum/action/cooldown/mob_cooldown/charge_apc = BB_FESTIVE_APC)) /datum/ai_controller/basic_controller/festivus_pole blackboard = list( diff --git a/code/modules/mob/living/basic/heretic/heretic_summon.dm b/code/modules/mob/living/basic/heretic/_heretic_summon.dm similarity index 100% rename from code/modules/mob/living/basic/heretic/heretic_summon.dm rename to code/modules/mob/living/basic/heretic/_heretic_summon.dm diff --git a/code/modules/mob/living/basic/heretic/ash_spirit.dm b/code/modules/mob/living/basic/heretic/ash_spirit.dm index d12ad5eb8d1..fed64db8adc 100644 --- a/code/modules/mob/living/basic/heretic/ash_spirit.dm +++ b/code/modules/mob/living/basic/heretic/ash_spirit.dm @@ -20,6 +20,4 @@ /datum/action/cooldown/spell/jaunt/ethereal_jaunt/ash, /datum/action/cooldown/spell/pointed/cleave, ) - for (var/action in actions_to_add) - var/datum/action/cooldown/new_action = new action(src) - new_action.Grant(src) + grant_actions_by_list(actions_to_add) diff --git a/code/modules/mob/living/basic/heretic/flesh_stalker.dm b/code/modules/mob/living/basic/heretic/flesh_stalker.dm index 00fecd2f608..f6a051334d2 100644 --- a/code/modules/mob/living/basic/heretic/flesh_stalker.dm +++ b/code/modules/mob/living/basic/heretic/flesh_stalker.dm @@ -11,7 +11,7 @@ melee_damage_upper = 20 sight = SEE_MOBS ai_controller = /datum/ai_controller/basic_controller/stalker - /// Associative list of action types we would like to have, and what blackboard key (if any) to put it in + /// Actions to grant on spawn var/static/list/actions_to_add = list( /datum/action/cooldown/spell/emp/eldritch = BB_GENERIC_ACTION, /datum/action/cooldown/spell/jaunt/ethereal_jaunt/ash = null, @@ -21,12 +21,7 @@ /mob/living/basic/heretic_summon/stalker/Initialize(mapload) . = ..() AddComponent(/datum/component/ai_target_timer) - for (var/action_type in actions_to_add) - var/datum/action/new_action = new action_type(src) - new_action.Grant(src) - var/blackboard_key = actions_to_add[action_type] - if (!isnull(blackboard_key)) - ai_controller?.set_blackboard_key(blackboard_key, new_action) + grant_actions_by_list(actions_to_add) /// Changes shape and lies in wait when it has no target, uses EMP and attacks once it does /datum/ai_controller/basic_controller/stalker diff --git a/code/modules/mob/living/basic/heretic/maid_in_the_mirror.dm b/code/modules/mob/living/basic/heretic/maid_in_the_mirror.dm index 26eaa9d7ebe..b83c4f253f3 100644 --- a/code/modules/mob/living/basic/heretic/maid_in_the_mirror.dm +++ b/code/modules/mob/living/basic/heretic/maid_in_the_mirror.dm @@ -32,8 +32,7 @@ /obj/item/shard, ) AddElement(/datum/element/death_drops, loot) - var/datum/action/cooldown/spell/jaunt/mirror_walk/jaunt = new (src) - jaunt.Grant(src) + GRANT_ACTION(/datum/action/cooldown/spell/jaunt/mirror_walk) /mob/living/basic/heretic_summon/maid_in_the_mirror/death(gibbed) var/turf/death_turf = get_turf(src) diff --git a/code/modules/mob/living/basic/heretic/raw_prophet.dm b/code/modules/mob/living/basic/heretic/raw_prophet.dm index 1b701596095..f3bb1efa7e9 100644 --- a/code/modules/mob/living/basic/heretic/raw_prophet.dm +++ b/code/modules/mob/living/basic/heretic/raw_prophet.dm @@ -15,8 +15,12 @@ maxHealth = 65 health = 65 sight = SEE_MOBS|SEE_OBJS|SEE_TURFS - /// Some ability we use to make people go blind - var/blind_action_type = /datum/action/cooldown/spell/pointed/blind/eldritch + /// List of innate abilities we have to add. + var/static/list/innate_abilities = list( + /datum/action/cooldown/spell/jaunt/ethereal_jaunt/ash/long = null, + /datum/action/cooldown/spell/list_target/telepathy/eldritch = null, + /datum/action/innate/expand_sight = null, + ) /mob/living/basic/heretic_summon/raw_prophet/Initialize(mapload) . = ..() @@ -39,19 +43,13 @@ unlink_message = on_unlink_message, \ ) - // We don't use these for AI so we can just repeat the same adding process - var/static/list/add_abilities = list( - /datum/action/cooldown/spell/jaunt/ethereal_jaunt/ash/long, - /datum/action/cooldown/spell/list_target/telepathy/eldritch, - /datum/action/innate/expand_sight, - ) - for (var/ability_type in add_abilities) - var/datum/action/new_action = new ability_type(src) - new_action.Grant(src) + grant_actions_by_list(get_innate_abilities()) - var/datum/action/cooldown/blind = new blind_action_type(src) - blind.Grant(src) - ai_controller?.set_blackboard_key(BB_TARGETTED_ACTION, blind) +/// Returns a list of abilities that we should add. +/mob/living/basic/heretic_summon/raw_prophet/proc/get_innate_abilities() + var/list/returnable_list = innate_abilities.Copy() + returnable_list += list(/datum/action/cooldown/spell/pointed/blind/eldritch = BB_TARGETTED_ACTION) + return returnable_list /* * Callback for the mind_linker component. @@ -78,7 +76,11 @@ /// NPC variant with a less bullshit ability /mob/living/basic/heretic_summon/raw_prophet/ruins ai_controller = /datum/ai_controller/basic_controller/raw_prophet - blind_action_type = /datum/action/cooldown/mob_cooldown/watcher_gaze + +/mob/living/basic/heretic_summon/raw_prophet/ruins/get_innate_abilities() + var/list/returnable_list = innate_abilities.Copy() + returnable_list += list(/datum/action/cooldown/mob_cooldown/watcher_gaze = BB_TARGETTED_ACTION) + return returnable_list /// Walk and attack people, blind them when we can /datum/ai_controller/basic_controller/raw_prophet diff --git a/code/modules/mob/living/basic/heretic/rust_walker.dm b/code/modules/mob/living/basic/heretic/rust_walker.dm index 0031ce2388d..9dff3c01e31 100644 --- a/code/modules/mob/living/basic/heretic/rust_walker.dm +++ b/code/modules/mob/living/basic/heretic/rust_walker.dm @@ -17,13 +17,12 @@ /mob/living/basic/heretic_summon/rust_walker/Initialize(mapload) . = ..() AddElement(/datum/element/footstep, FOOTSTEP_MOB_RUST) - var/datum/action/cooldown/spell/aoe/rust_conversion/small/conversion = new(src) - conversion.Grant(src) - ai_controller?.set_blackboard_key(BB_GENERIC_ACTION, conversion) - var/datum/action/cooldown/spell/basic_projectile/rust_wave/short/wave = new(src) - wave.Grant(src) - ai_controller?.set_blackboard_key(BB_TARGETTED_ACTION, wave) + var/static/list/grantable_spells = list( + /datum/action/cooldown/spell/aoe/rust_conversion/small = BB_GENERIC_ACTION, + /datum/action/cooldown/spell/basic_projectile/rust_wave/short = BB_TARGETTED_ACTION, + ) + grant_actions_by_list(grantable_spells) /mob/living/basic/heretic_summon/rust_walker/setDir(newdir) . = ..() diff --git a/code/modules/mob/living/basic/icemoon/ice_demon/ice_demon.dm b/code/modules/mob/living/basic/icemoon/ice_demon/ice_demon.dm index 960f875365b..63c2992b513 100644 --- a/code/modules/mob/living/basic/icemoon/ice_demon/ice_demon.dm +++ b/code/modules/mob/living/basic/icemoon/ice_demon/ice_demon.dm @@ -28,15 +28,13 @@ /mob/living/basic/mining/ice_demon/Initialize(mapload) . = ..() - var/datum/action/cooldown/mob_cooldown/slippery_ice_floors/ice_floor = new(src) - ice_floor.Grant(src) - ai_controller.set_blackboard_key(BB_DEMON_SLIP_ABILITY, ice_floor) - var/datum/action/cooldown/mob_cooldown/ice_demon_teleport/demon_teleport = new(src) - demon_teleport.Grant(src) - ai_controller.set_blackboard_key(BB_DEMON_TELEPORT_ABILITY, demon_teleport) - var/datum/action/cooldown/spell/conjure/create_afterimages/afterimage = new(src) - afterimage.Grant(src) - ai_controller.set_blackboard_key(BB_DEMON_CLONE_ABILITY, afterimage) + var/static/list/innate_actions = list( + /datum/action/cooldown/mob_cooldown/slippery_ice_floors = BB_DEMON_SLIP_ABILITY, + /datum/action/cooldown/mob_cooldown/ice_demon_teleport = BB_DEMON_TELEPORT_ABILITY, + /datum/action/cooldown/spell/conjure/create_afterimages = BB_DEMON_CLONE_ABILITY, + ) + grant_actions_by_list(innate_actions) + AddComponent(\ /datum/component/ranged_attacks,\ projectile_type = /obj/projectile/temp/ice_demon,\ diff --git a/code/modules/mob/living/basic/icemoon/ice_whelp/ice_whelp.dm b/code/modules/mob/living/basic/icemoon/ice_whelp/ice_whelp.dm index 8fb02ec83df..768375cfce8 100644 --- a/code/modules/mob/living/basic/icemoon/ice_whelp/ice_whelp.dm +++ b/code/modules/mob/living/basic/icemoon/ice_whelp/ice_whelp.dm @@ -40,17 +40,20 @@ /mob/living/basic/mining/ice_whelp/Initialize(mapload) . = ..() ADD_TRAIT(src, TRAIT_NO_GLIDE, INNATE_TRAIT) + AddElement(/datum/element/footstep, FOOTSTEP_MOB_HEAVY) AddComponent(/datum/component/basic_mob_ability_telegraph) AddComponent(/datum/component/basic_mob_attack_telegraph, telegraph_duration = 0.6 SECONDS) - var/datum/action/cooldown/mob_cooldown/fire_breath/ice/flamethrower = new(src) - flamethrower.Grant(src) - ai_controller.set_blackboard_key(BB_WHELP_STRAIGHTLINE_FIRE, flamethrower) - var/datum/action/cooldown/mob_cooldown/fire_breath/ice/cross/wide_flames = new(src) - wide_flames.Grant(src) - ai_controller.set_blackboard_key(BB_WHELP_WIDESPREAD_FIRE, wide_flames) + RegisterSignal(src, COMSIG_HOSTILE_PRE_ATTACKINGTARGET, PROC_REF(pre_attack)) + var/static/list/innate_actions = list( + /datum/action/cooldown/mob_cooldown/fire_breath/ice = BB_WHELP_STRAIGHTLINE_FIRE, + /datum/action/cooldown/mob_cooldown/fire_breath/ice/cross = BB_WHELP_WIDESPREAD_FIRE, + ) + + grant_actions_by_list(innate_actions) + /mob/living/basic/mining/ice_whelp/proc/pre_attack(mob/living/sculptor, atom/target) SIGNAL_HANDLER diff --git a/code/modules/mob/living/basic/jungle/mega_arachnid/mega_arachnid.dm b/code/modules/mob/living/basic/jungle/mega_arachnid/mega_arachnid.dm index bb109fdde61..3a6ed50db10 100644 --- a/code/modules/mob/living/basic/jungle/mega_arachnid/mega_arachnid.dm +++ b/code/modules/mob/living/basic/jungle/mega_arachnid/mega_arachnid.dm @@ -36,16 +36,16 @@ /mob/living/basic/mega_arachnid/Initialize(mapload) . = ..() - AddComponent(/datum/component/seethrough_mob) - var/datum/action/cooldown/spell/pointed/projectile/flesh_restraints/restrain = new(src) - var/datum/action/cooldown/mob_cooldown/secrete_acid/acid_spray = new(src) - acid_spray.Grant(src) - restrain.Grant(src) + var/static/list/innate_actions = list( + /datum/action/cooldown/mob_cooldown/secrete_acid = BB_ARACHNID_SLIP, + /datum/action/cooldown/spell/pointed/projectile/flesh_restraints = BB_ARACHNID_RESTRAIN, + ) + grant_actions_by_list(innate_actions) + AddElement(/datum/element/swabable, CELL_LINE_TABLE_MEGA_ARACHNID, CELL_VIRUS_TABLE_GENERIC_MOB, 1, 5) + AddComponent(/datum/component/seethrough_mob) AddComponent(/datum/component/appearance_on_aggro, alpha_on_aggro = 255, alpha_on_deaggro = alpha) AddComponent(/datum/component/tree_climber, climbing_distance = 15) - ai_controller.set_blackboard_key(BB_ARACHNID_RESTRAIN, restrain) - ai_controller.set_blackboard_key(BB_ARACHNID_SLIP, acid_spray) /mob/living/basic/mega_arachnid/Login() . = ..() diff --git a/code/modules/mob/living/basic/jungle/seedling/seedling.dm b/code/modules/mob/living/basic/jungle/seedling/seedling.dm index 296cead44c4..46c67ffa0e4 100644 --- a/code/modules/mob/living/basic/jungle/seedling/seedling.dm +++ b/code/modules/mob/living/basic/jungle/seedling/seedling.dm @@ -56,12 +56,12 @@ /mob/living/basic/seedling/Initialize(mapload) . = ..() - var/datum/action/cooldown/mob_cooldown/projectile_attack/rapid_fire/seedling/seed_attack = new(src) - seed_attack.Grant(src) - ai_controller.set_blackboard_key(BB_RAPIDSEEDS_ABILITY, seed_attack) - var/datum/action/cooldown/mob_cooldown/solarbeam/beam_attack = new(src) - beam_attack.Grant(src) - ai_controller.set_blackboard_key(BB_SOLARBEAM_ABILITY, beam_attack) + var/static/list/innate_actions = list( + /datum/action/cooldown/mob_cooldown/projectile_attack/rapid_fire/seedling = BB_RAPIDSEEDS_ABILITY, + /datum/action/cooldown/mob_cooldown/solarbeam = BB_SOLARBEAM_ABILITY, + ) + + grant_actions_by_list(innate_actions) var/petal_color = pick(possible_colors) diff --git a/code/modules/mob/living/basic/jungle/venus_human_trap.dm b/code/modules/mob/living/basic/jungle/venus_human_trap.dm index 2f2858eb6ce..bfe7c1e8497 100644 --- a/code/modules/mob/living/basic/jungle/venus_human_trap.dm +++ b/code/modules/mob/living/basic/jungle/venus_human_trap.dm @@ -174,9 +174,10 @@ /mob/living/basic/venus_human_trap/Initialize(mapload) . = ..() AddElement(/datum/element/lifesteal, 5) - var/datum/action/cooldown/vine_tangle/tangle = new(src) - tangle.Grant(src) - ai_controller.set_blackboard_key(BB_TARGETTED_ACTION, tangle) + var/static/list/innate_actions = list( + /datum/action/cooldown/vine_tangle = BB_TARGETTED_ACTION, + ) + grant_actions_by_list(innate_actions) /mob/living/basic/venus_human_trap/RangedAttack(atom/victim) if(!combat_mode) diff --git a/code/modules/mob/living/basic/lavaland/bileworm/_bileworm.dm b/code/modules/mob/living/basic/lavaland/bileworm/_bileworm.dm index 3d6bc299ccd..d2e04b60d26 100644 --- a/code/modules/mob/living/basic/lavaland/bileworm/_bileworm.dm +++ b/code/modules/mob/living/basic/lavaland/bileworm/_bileworm.dm @@ -37,8 +37,6 @@ /mob/living/basic/mining/bileworm/Initialize(mapload) . = ..() - //traits and elements - ADD_TRAIT(src, TRAIT_IMMOBILIZED, INNATE_TRAIT) if(ispath(evolve_path)) @@ -47,16 +45,14 @@ //setup mob abilities - var/datum/action/cooldown/mob_cooldown/projectile_attack/dir_shots/bileworm/spew_bile = new attack_action_path(src) - spew_bile.Grant(src) //well, one of them has to start on infinite cooldown + var/datum/action/cooldown/mob_cooldown/projectile_attack/dir_shots/bileworm/spew_bile = new(src) + spew_bile.Grant(src) spew_bile.StartCooldownSelf(INFINITY) - var/datum/action/cooldown/mob_cooldown/resurface/resurface = new(src) - resurface.Grant(src) - var/datum/action/cooldown/mob_cooldown/devour/devour = new(src) - devour.Grant(src) - var/datum/action/adjust_vision/bileworm/adjust_vision = new(src) - adjust_vision.Grant(src) - ai_controller.set_blackboard_key(BB_BILEWORM_SPEW_BILE, spew_bile) - ai_controller.set_blackboard_key(BB_BILEWORM_RESURFACE, resurface) - ai_controller.set_blackboard_key(BB_BILEWORM_DEVOUR, devour) + ai_controller?.set_blackboard_key(BB_BILEWORM_SPEW_BILE, spew_bile) + + var/static/list/other_innate_actions = list( + /datum/action/adjust_vision/bileworm = null, + /datum/action/cooldown/mob_cooldown/devour = BB_BILEWORM_DEVOUR, + /datum/action/cooldown/mob_cooldown/resurface = BB_BILEWORM_RESURFACE, + ) diff --git a/code/modules/mob/living/basic/lavaland/brimdemon/brimdemon.dm b/code/modules/mob/living/basic/lavaland/brimdemon/brimdemon.dm index 2c22977d9c6..dbd017837a9 100644 --- a/code/modules/mob/living/basic/lavaland/brimdemon/brimdemon.dm +++ b/code/modules/mob/living/basic/lavaland/brimdemon/brimdemon.dm @@ -43,10 +43,6 @@ beam.Grant(src) ai_controller.set_blackboard_key(BB_TARGETTED_ACTION, beam) -/mob/living/basic/mining/brimdemon/Destroy() - QDEL_NULL(beam) - return ..() - /mob/living/basic/mining/brimdemon/RangedAttack(atom/target, modifiers) beam.Trigger(target = target) diff --git a/code/modules/mob/living/basic/lavaland/goldgrub/goldgrub.dm b/code/modules/mob/living/basic/lavaland/goldgrub/goldgrub.dm index 843f288e1a9..7e014f20378 100644 --- a/code/modules/mob/living/basic/lavaland/goldgrub/goldgrub.dm +++ b/code/modules/mob/living/basic/lavaland/goldgrub/goldgrub.dm @@ -47,13 +47,11 @@ else can_lay_eggs = FALSE - var/datum/action/cooldown/mob_cooldown/spit_ore/spit = new(src) - var/datum/action/cooldown/mob_cooldown/burrow/burrow = new(src) - spit.Grant(src) - burrow.Grant(src) - ai_controller.set_blackboard_key(BB_SPIT_ABILITY, spit) - ai_controller.set_blackboard_key(BB_BURROW_ABILITY, burrow) - AddElement(/datum/element/wall_tearer, allow_reinforced = FALSE) + var/static/list/innate_actions = list( + /datum/action/cooldown/mob_cooldown/spit_ore = BB_SPIT_ABILITY, + /datum/action/cooldown/mob_cooldown/burrow = BB_BURROW_ABILITY, + ) + grant_actions_by_list(innate_actions) AddComponent(/datum/component/ai_listen_to_weather) AddComponent(\ /datum/component/appearance_on_aggro,\ diff --git a/code/modules/mob/living/basic/lavaland/goliath/goliath.dm b/code/modules/mob/living/basic/lavaland/goliath/goliath.dm index 6f57e1dec67..20beac22176 100644 --- a/code/modules/mob/living/basic/lavaland/goliath/goliath.dm +++ b/code/modules/mob/living/basic/lavaland/goliath/goliath.dm @@ -44,6 +44,8 @@ COOLDOWN_DECLARE(ability_animation_cooldown) /// Our base tentacles ability var/datum/action/cooldown/mob_cooldown/goliath_tentacles/tentacles + /// Our melee tentacles ability + var/datum/action/cooldown/mob_cooldown/tentacle_burst/melee_tentacles /// Our long-ranged tentacles ability var/datum/action/cooldown/mob_cooldown/tentacle_grasp/tentacle_line /// Things we want to eat off the floor (or a plate, we're not picky) @@ -76,7 +78,7 @@ tentacles = new (src) tentacles.Grant(src) - var/datum/action/cooldown/mob_cooldown/tentacle_burst/melee_tentacles = new (src) + melee_tentacles = new(src) melee_tentacles.Grant(src) AddComponent(/datum/component/revenge_ability, melee_tentacles, targetting = ai_controller.blackboard[BB_TARGETTING_DATUM], max_range = 1, target_self = TRUE) tentacle_line = new (src) @@ -88,12 +90,6 @@ ai_controller.set_blackboard_key(BB_BASIC_FOODS, goliath_foods) ai_controller.set_blackboard_key(BB_GOLIATH_TENTACLES, tentacles) - -/mob/living/basic/mining/goliath/Destroy() - QDEL_NULL(tentacles) - QDEL_NULL(tentacle_line) - return ..() - /mob/living/basic/mining/goliath/examine(mob/user) . = ..() if (saddled) diff --git a/code/modules/mob/living/basic/lavaland/legion/legion.dm b/code/modules/mob/living/basic/lavaland/legion/legion.dm index 7c6bd0fd170..5ed501b452d 100644 --- a/code/modules/mob/living/basic/lavaland/legion/legion.dm +++ b/code/modules/mob/living/basic/lavaland/legion/legion.dm @@ -41,7 +41,7 @@ var/datum/action/cooldown/mob_cooldown/skull_launcher/skull_launcher = new(src) skull_launcher.Grant(src) skull_launcher.spawn_type = brood_type - ai_controller.blackboard[BB_TARGETTED_ACTION] = skull_launcher + ai_controller.set_blackboard_key(BB_TARGETTED_ACTION, skull_launcher) /// Create what we want to drop on death, in proc form so we can always return a static list /mob/living/basic/mining/legion/proc/get_loot_list() diff --git a/code/modules/mob/living/basic/lavaland/mook/mook.dm b/code/modules/mob/living/basic/lavaland/mook/mook.dm index cfc7abe8f24..463c9d5de79 100644 --- a/code/modules/mob/living/basic/lavaland/mook/mook.dm +++ b/code/modules/mob/living/basic/lavaland/mook/mook.dm @@ -52,9 +52,7 @@ move_resist = MOVE_RESIST_DEFAULT,\ ) AddComponent(/datum/component/ai_retaliate_advanced, CALLBACK(src, PROC_REF(attack_intruder))) - var/datum/action/cooldown/mob_cooldown/mook_ability/mook_jump/jump = new(src) - jump.Grant(src) - ai_controller.set_blackboard_key(BB_MOOK_JUMP_ABILITY, jump) + grant_actions_by_list(get_innate_abilities()) ore_overlay = mutable_appearance(icon, "mook_ore_overlay") @@ -68,6 +66,13 @@ AddComponent(/datum/component/obeys_commands, pet_commands) +/// Returns a list of actions and blackboard keys to pass into `grant_actions_by_list`. +/mob/living/basic/mining/mook/proc/get_innate_abilities() + var/static/list/innate_abilities = list( + /datum/action/cooldown/mob_cooldown/mook_ability/mook_jump = BB_MOOK_JUMP_ABILITY, + ) + return innate_abilities + /mob/living/basic/mining/mook/proc/grant_healer_abilities() AddComponent(\ /datum/component/healing_touch,\ @@ -198,9 +203,18 @@ neutral_stance = mutable_appearance(icon, "mook_axe_overlay") attack_stance = mutable_appearance(icon, "axe_strike_overlay") update_appearance() - var/datum/action/cooldown/mob_cooldown/mook_ability/mook_leap/leap = new(src) - leap.Grant(src) - ai_controller.set_blackboard_key(BB_MOOK_LEAP_ABILITY, leap) + +/mob/living/basic/mining/mook/worker/get_innate_abilities() + var/static/list/worker_innate_abilites = null + + if(isnull(worker_innate_abilites)) + worker_innate_abilites = list() + worker_innate_abilites += ..() + worker_innate_abilites += list( + /datum/action/cooldown/mob_cooldown/mook_ability/mook_leap = BB_MOOK_LEAP_ABILITY, + ) + + return worker_innate_abilites /mob/living/basic/mining/mook/worker/attack_sequence(atom/target) . = ..() diff --git a/code/modules/mob/living/basic/minebots/minebot.dm b/code/modules/mob/living/basic/minebots/minebot.dm index 061c9a624f7..ad03da1e697 100644 --- a/code/modules/mob/living/basic/minebots/minebot.dm +++ b/code/modules/mob/living/basic/minebots/minebot.dm @@ -58,14 +58,13 @@ after_tame = CALLBACK(src, PROC_REF(activate_bot)),\ ) - var/datum/action/cooldown/mob_cooldown/minedrone/toggle_light/toggle_light_action = new(src) - var/datum/action/cooldown/mob_cooldown/minedrone/toggle_meson_vision/toggle_meson_vision_action = new(src) - var/datum/action/cooldown/mob_cooldown/minedrone/dump_ore/dump_ore_action = new(src) - toggle_light_action.Grant(src) - toggle_meson_vision_action.Grant(src) - dump_ore_action.Grant(src) - ai_controller.set_blackboard_key(BB_MINEBOT_LIGHT_ABILITY, toggle_light_action) - ai_controller.set_blackboard_key(BB_MINEBOT_DUMP_ABILITY, dump_ore_action) + var/static/list/innate_actions = list( + /datum/action/cooldown/mob_cooldown/minedrone/toggle_light = BB_MINEBOT_LIGHT_ABILITY, + /datum/action/cooldown/mob_cooldown/minedrone/toggle_meson_vision = null, + /datum/action/cooldown/mob_cooldown/minedrone/dump_ore = BB_MINEBOT_DUMP_ABILITY, + ) + + grant_actions_by_list(innate_actions) stored_gun = new(src) var/obj/item/implant/radio/mining/comms = new(src) diff --git a/code/modules/mob/living/basic/space_fauna/carp/carp.dm b/code/modules/mob/living/basic/space_fauna/carp/carp.dm index cccb29c4386..75be113f651 100644 --- a/code/modules/mob/living/basic/space_fauna/carp/carp.dm +++ b/code/modules/mob/living/basic/space_fauna/carp/carp.dm @@ -105,11 +105,6 @@ ai_controller.set_blackboard_key(BB_CARP_RIFT, teleport) ai_controller.set_blackboard_key(BB_OBSTACLE_TARGETTING_WHITELIST, allowed_obstacle_targets) - -/mob/living/basic/carp/Destroy() - QDEL_NULL(teleport) - return ..() - /// Tell the elements and the blackboard what food we want to eat /mob/living/basic/carp/proc/setup_eating() AddElement(/datum/element/basic_eating, food_types = desired_food) diff --git a/code/modules/mob/living/basic/space_fauna/changeling/flesh_spider.dm b/code/modules/mob/living/basic/space_fauna/changeling/flesh_spider.dm index a64250d891c..606df8f136f 100644 --- a/code/modules/mob/living/basic/space_fauna/changeling/flesh_spider.dm +++ b/code/modules/mob/living/basic/space_fauna/changeling/flesh_spider.dm @@ -63,13 +63,12 @@ outline_colour = COLOR_PINK,\ ) - var/datum/action/cooldown/mob_cooldown/lay_web/webbing = new(src) - webbing.webbing_time *= 0.7 - webbing.Grant(src) - ai_controller?.set_blackboard_key(BB_SPIDER_WEB_ACTION, webbing) + var/static/list/innate_actions = list( + /datum/action/cooldown/mob_cooldown/lay_web = BB_SPIDER_WEB_ACTION, + /datum/action/cooldown/mob_cooldown/lay_web/sticky_web = null, + /datum/action/cooldown/mob_cooldown/lay_web/web_spikes = null, + ) + grant_actions_by_list(innate_actions) - var/datum/action/cooldown/mob_cooldown/lay_web/web_spikes/spikes_web = new(src) - spikes_web.Grant(src) - - var/datum/action/cooldown/mob_cooldown/lay_web/sticky_web/web_sticky = new(src) - web_sticky.Grant(src) +/datum/action/cooldown/mob_cooldown/lay_web/flesh + webbing_time = 3 SECONDS diff --git a/code/modules/mob/living/basic/space_fauna/demon/demon_subtypes.dm b/code/modules/mob/living/basic/space_fauna/demon/demon_subtypes.dm index ed3c131949d..d8c419ea2e3 100644 --- a/code/modules/mob/living/basic/space_fauna/demon/demon_subtypes.dm +++ b/code/modules/mob/living/basic/space_fauna/demon/demon_subtypes.dm @@ -37,8 +37,7 @@ /mob/living/basic/demon/slaughter/Initialize(mapload) . = ..() - var/datum/action/cooldown/spell/jaunt/bloodcrawl/slaughter_demon/crawl = new crawl_type(src) - crawl.Grant(src) + GRANT_ACTION(/datum/action/cooldown/spell/jaunt/bloodcrawl/slaughter_demon) RegisterSignal(src, COMSIG_LIVING_UNARMED_ATTACK, PROC_REF(on_attack)) RegisterSignals(src, list(COMSIG_MOB_ENTER_JAUNT, COMSIG_MOB_AFTER_EXIT_JAUNT), PROC_REF(on_crawl)) diff --git a/code/modules/mob/living/basic/space_fauna/eyeball/_eyeball.dm b/code/modules/mob/living/basic/space_fauna/eyeball/_eyeball.dm index 47e43704079..b72815d8325 100644 --- a/code/modules/mob/living/basic/space_fauna/eyeball/_eyeball.dm +++ b/code/modules/mob/living/basic/space_fauna/eyeball/_eyeball.dm @@ -52,9 +52,11 @@ /mob/living/basic/eyeball/Initialize(mapload) . = ..() - var/datum/action/cooldown/spell/pointed/death_glare/glare = new(src) - glare.Grant(src) - ai_controller.set_blackboard_key(BB_GLARE_ABILITY, glare) + var/static/list/innate_actions = list( + /datum/action/cooldown/spell/pointed/death_glare = BB_GLARE_ABILITY + ) + grant_actions_by_list(innate_actions) + AddElement(/datum/element/simple_flying) AddComponent(/datum/component/tameable, food_types = list(/obj/item/food/grown/carrot), tame_chance = 100, after_tame = CALLBACK(src, PROC_REF(on_tame))) ADD_TRAIT(src, TRAIT_SPACEWALK, INNATE_TRAIT) diff --git a/code/modules/mob/living/basic/space_fauna/hivebot/_hivebot.dm b/code/modules/mob/living/basic/space_fauna/hivebot/_hivebot.dm index db0d310a71c..d914e0589c4 100644 --- a/code/modules/mob/living/basic/space_fauna/hivebot/_hivebot.dm +++ b/code/modules/mob/living/basic/space_fauna/hivebot/_hivebot.dm @@ -95,8 +95,7 @@ /mob/living/basic/hivebot/mechanic/Initialize(mapload) . = ..() - var/datum/action/cooldown/spell/conjure/foam_wall/foam = new(src) - foam.Grant(src) + GRANT_ACTION(/datum/action/cooldown/spell/conjure/foam_wall) RegisterSignal(src, COMSIG_HOSTILE_PRE_ATTACKINGTARGET, PROC_REF(pre_attack)) /mob/living/basic/hivebot/mechanic/proc/pre_attack(mob/living/fixer, atom/target) diff --git a/code/modules/mob/living/basic/space_fauna/meteor_heart/meteor_heart.dm b/code/modules/mob/living/basic/space_fauna/meteor_heart/meteor_heart.dm index 6a41993526e..72f2001011c 100644 --- a/code/modules/mob/living/basic/space_fauna/meteor_heart/meteor_heart.dm +++ b/code/modules/mob/living/basic/space_fauna/meteor_heart/meteor_heart.dm @@ -2,6 +2,8 @@ #define HEARTBEAT_FAST (0.6 SECONDS) #define HEARTBEAT_FRANTIC (0.4 SECONDS) +#define SPIKES_ABILITY_TYPEPATH /datum/action/cooldown/mob_cooldown/chasing_spikes + /mob/living/basic/meteor_heart name = "meteor heart" desc = "A pulsing lump of flesh and bone growing directly out of the ground." @@ -25,10 +27,7 @@ maximum_survivable_temperature = 1500 combat_mode = TRUE move_resist = INFINITY // This mob IS the floor - /// Action which sends a line of spikes chasing a player - var/datum/action/cooldown/mob_cooldown/chasing_spikes/spikes - /// Action which summons areas the player can't stand in - var/datum/action/cooldown/mob_cooldown/spine_traps/traps + /// Looping heartbeat sound var/datum/looping_sound/heartbeat/soundloop @@ -39,14 +38,11 @@ AddElement(/datum/element/death_drops, death_loot) AddElement(/datum/element/relay_attackers) - spikes = new(src) - spikes.Grant(src) - ai_controller.set_blackboard_key(BB_METEOR_HEART_GROUND_SPIKES, spikes) - - traps = new(src) - traps.Grant(src) - ai_controller.set_blackboard_key(BB_METEOR_HEART_SPINE_TRAPS, traps) - + var/static/list/innate_actions = list( + SPIKES_ABILITY_TYPEPATH = BB_METEOR_HEART_GROUND_SPIKES, + /datum/action/cooldown/mob_cooldown/spine_traps = BB_METEOR_HEART_SPINE_TRAPS, + ) + grant_actions_by_list(innate_actions) ai_controller.set_ai_status(AI_STATUS_OFF) RegisterSignal(src, COMSIG_MOB_ABILITY_FINISHED, PROC_REF(used_ability)) @@ -60,12 +56,13 @@ soundloop.pressure_affected = FALSE soundloop.start() - - AddComponent(/datum/component/bloody_spreader,\ + AddComponent(\ + /datum/component/bloody_spreader,\ blood_left = INFINITY,\ blood_dna = list("meaty DNA" = "MT-"),\ diseases = null,\ ) + /// Called when we get mad at something, either for attacking us or attacking the nearby area /mob/living/basic/meteor_heart/proc/aggro() if (ai_controller.ai_status == AI_STATUS_ON) @@ -85,13 +82,11 @@ /// Animate when using certain abilities /mob/living/basic/meteor_heart/proc/used_ability(mob/living/owner, datum/action/cooldown/mob_cooldown/ability) SIGNAL_HANDLER - if (ability != spikes) + if(!istype(ability, SPIKES_ABILITY_TYPEPATH)) return Shake(1, 0, 1.5 SECONDS) /mob/living/basic/meteor_heart/Destroy() - QDEL_NULL(spikes) - QDEL_NULL(traps) QDEL_NULL(soundloop) return ..() @@ -136,3 +131,5 @@ #undef HEARTBEAT_NORMAL #undef HEARTBEAT_FAST #undef HEARTBEAT_FRANTIC + +#undef SPIKES_ABILITY_TYPEPATH diff --git a/code/modules/mob/living/basic/space_fauna/netherworld/creature.dm b/code/modules/mob/living/basic/space_fauna/netherworld/creature.dm index cdde6ad05e4..c55376c4fcc 100644 --- a/code/modules/mob/living/basic/space_fauna/netherworld/creature.dm +++ b/code/modules/mob/living/basic/space_fauna/netherworld/creature.dm @@ -39,8 +39,7 @@ min_health_slowdown = -1.5,\ ) - var/datum/action/cooldown/spell/jaunt/creature_teleport/teleport = new(src) - teleport.Grant(src) + GRANT_ACTION(/datum/action/cooldown/spell/jaunt/creature_teleport) /mob/living/basic/creature/proc/can_be_seen(turf/location) // Check for darkness diff --git a/code/modules/mob/living/basic/space_fauna/paper_wizard/paper_wizard.dm b/code/modules/mob/living/basic/space_fauna/paper_wizard/paper_wizard.dm index 519e8ba1a73..c4ea41cad37 100644 --- a/code/modules/mob/living/basic/space_fauna/paper_wizard/paper_wizard.dm +++ b/code/modules/mob/living/basic/space_fauna/paper_wizard/paper_wizard.dm @@ -36,21 +36,16 @@ AddElement(/datum/element/effect_trail, /obj/effect/temp_visual/paper_scatter) /mob/living/basic/paper_wizard/proc/grant_abilities() - summon = new(src) - summon.Grant(src) - ai_controller.set_blackboard_key(BB_WIZARD_SUMMON_MINIONS, summon) - mimic = new(src) - mimic.Grant(src) - ai_controller.set_blackboard_key(BB_WIZARD_MIMICS, mimic) + var/static/list/innate_actions = list( + /datum/action/cooldown/spell/conjure/wizard_summon_minions = BB_WIZARD_SUMMON_MINIONS, + /datum/action/cooldown/spell/pointed/wizard_mimic = BB_WIZARD_MIMICS, + ) + + grant_actions_by_list(innate_actions) /mob/living/basic/paper_wizard/proc/grant_loot() AddElement(/datum/element/death_drops, dropped_loot) -/mob/living/basic/paper_wizard/Destroy() - QDEL_NULL(summon) - QDEL_NULL(mimic) - return ..() - /datum/ai_controller/basic_controller/paper_wizard blackboard = list( BB_TARGETTING_DATUM = new /datum/targetting_datum/basic, diff --git a/code/modules/mob/living/basic/space_fauna/regal_rat/regal_rat.dm b/code/modules/mob/living/basic/space_fauna/regal_rat/regal_rat.dm index 24e53b3bf44..de0c0324f80 100644 --- a/code/modules/mob/living/basic/space_fauna/regal_rat/regal_rat.dm +++ b/code/modules/mob/living/basic/space_fauna/regal_rat/regal_rat.dm @@ -64,13 +64,12 @@ after_assumed_control = CALLBACK(src, PROC_REF(became_player_controlled)),\ ) - var/datum/action/cooldown/mob_cooldown/domain/domain = new(src) - domain.Grant(src) - ai_controller.set_blackboard_key(BB_DOMAIN_ABILITY, domain) + var/static/list/innate_actions = list( + /datum/action/cooldown/mob_cooldown/domain = BB_DOMAIN_ABILITY, + /datum/action/cooldown/mob_cooldown/riot = BB_RAISE_HORDE_ABILITY, + ) - var/datum/action/cooldown/mob_cooldown/riot/riot = new(src) - riot.Grant(src) - ai_controller.set_blackboard_key(BB_RAISE_HORDE_ABILITY, riot) + grant_actions_by_list(innate_actions) /mob/living/basic/regal_rat/examine(mob/user) . = ..() diff --git a/code/modules/mob/living/basic/space_fauna/revenant/_revenant.dm b/code/modules/mob/living/basic/space_fauna/revenant/_revenant.dm index 856b5820b98..6da3352c9d6 100644 --- a/code/modules/mob/living/basic/space_fauna/revenant/_revenant.dm +++ b/code/modules/mob/living/basic/space_fauna/revenant/_revenant.dm @@ -97,9 +97,7 @@ AddElement(/datum/element/simple_flying) add_traits(list(TRAIT_SPACEWALK, TRAIT_SIXTHSENSE, TRAIT_FREE_HYPERSPACE_MOVEMENT), INNATE_TRAIT) - for(var/ability in abilities) - var/datum/action/spell = new ability(src) - spell.Grant(src) + grant_actions_by_list(abilities) RegisterSignal(src, COMSIG_LIVING_BANED, PROC_REF(on_baned)) RegisterSignal(src, COMSIG_MOVABLE_PRE_MOVE, PROC_REF(on_move)) diff --git a/code/modules/mob/living/basic/space_fauna/space_dragon/space_dragon.dm b/code/modules/mob/living/basic/space_fauna/space_dragon/space_dragon.dm index 412b0376457..547e35cf413 100644 --- a/code/modules/mob/living/basic/space_fauna/space_dragon/space_dragon.dm +++ b/code/modules/mob/living/basic/space_fauna/space_dragon/space_dragon.dm @@ -76,11 +76,6 @@ buffet = new(src) buffet.Grant(src) -/mob/living/basic/space_dragon/Destroy() - QDEL_NULL(fire_breath) - QDEL_NULL(buffet) - return ..() - /mob/living/basic/space_dragon/Login() . = ..() if(!isnull(chosen_colour)) diff --git a/code/modules/mob/living/basic/space_fauna/spider/giant_spider/giant_spiders.dm b/code/modules/mob/living/basic/space_fauna/spider/giant_spider/giant_spiders.dm index a1aaf954c36..c79731bcdd1 100644 --- a/code/modules/mob/living/basic/space_fauna/spider/giant_spider/giant_spiders.dm +++ b/code/modules/mob/living/basic/space_fauna/spider/giant_spider/giant_spiders.dm @@ -19,7 +19,12 @@ melee_damage_upper = 25 gold_core_spawnable = HOSTILE_SPAWN ai_controller = /datum/ai_controller/basic_controller/giant_spider + /// Actions to grant on Initialize + var/list/innate_actions = null +/mob/living/basic/spider/giant/Initialize(mapload) + . = ..() + grant_actions_by_list(innate_actions) /** * ### Ambush Spider @@ -42,7 +47,8 @@ melee_damage_upper = 30 speed = 5 player_speed_modifier = -3.1 - menu_description = "Slow spider, with a strong disarming pull and above avarage health and damage." + menu_description = "Slow spider, with a strong disarming pull and above average health and damage." + innate_actions = list(/datum/action/cooldown/mob_cooldown/sneak/spider) /mob/living/basic/spider/giant/ambush/Initialize(mapload) . = ..() @@ -50,9 +56,6 @@ AddElement(/datum/element/web_walker, /datum/movespeed_modifier/slow_web) - var/datum/action/cooldown/mob_cooldown/sneak/spider/sneak_web = new(src) - sneak_web.Grant(src) - /** * ### Guard Spider * A subtype of the giant spider which is similar on every single way, @@ -74,13 +77,11 @@ speed = 5 player_speed_modifier = -4 menu_description = "Tanky and strong able to shed a carcass for protection." + innate_actions = list(/datum/action/cooldown/mob_cooldown/web_effigy) /mob/living/basic/spider/giant/guard/Initialize(mapload) . = ..() - AddElement(/datum/element/web_walker, /datum/movespeed_modifier/average_web) - var/datum/action/cooldown/mob_cooldown/web_effigy/shed = new(src) - shed.Grant(src) /** * ### Hunter Spider @@ -105,7 +106,6 @@ /mob/living/basic/spider/giant/hunter/Initialize(mapload) . = ..() - AddElement(/datum/element/web_walker, /datum/movespeed_modifier/fast_web) /** @@ -131,14 +131,12 @@ player_speed_modifier = -3.1 sight = SEE_SELF|SEE_MOBS menu_description = "Fast spider able to see enemies through walls, send messages to the nest and the ability to travel in vents." + innate_actions = list(/datum/action/cooldown/mob_cooldown/command_spiders/communication_spiders) /mob/living/basic/spider/giant/scout/Initialize(mapload) . = ..() ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT) - var/datum/action/cooldown/mob_cooldown/command_spiders/communication_spiders/spiders_communication = new(src) - spiders_communication.Grant(src) - /** * ### Nurse Spider * @@ -210,21 +208,16 @@ speed = 4 player_speed_modifier = -3.1 web_type = /datum/action/cooldown/mob_cooldown/lay_web/sealer - menu_description = "Avarage speed spider with self healing abilities and multiple web types to reinforce the nest with little to no damage and low health." + menu_description = "Average speed spider with self healing abilities and multiple web types to reinforce the nest with little to no damage and low health." + innate_actions = list( + /datum/action/cooldown/mob_cooldown/lay_web/solid_web, + /datum/action/cooldown/mob_cooldown/lay_web/sticky_web, + /datum/action/cooldown/mob_cooldown/lay_web/web_passage, + /datum/action/cooldown/mob_cooldown/lay_web/web_spikes, + ) /mob/living/basic/spider/giant/tangle/Initialize(mapload) . = ..() - var/datum/action/cooldown/mob_cooldown/lay_web/solid_web/web_solid = new(src) - web_solid.Grant(src) - - var/datum/action/cooldown/mob_cooldown/lay_web/web_passage/passage_web = new(src) - passage_web.Grant(src) - - var/datum/action/cooldown/mob_cooldown/lay_web/web_spikes/spikes_web = new(src) - spikes_web.Grant(src) - - var/datum/action/cooldown/mob_cooldown/lay_web/sticky_web/web_sticky = new(src) - web_sticky.Grant(src) AddElement(/datum/element/web_walker, /datum/movespeed_modifier/average_web) @@ -364,7 +357,12 @@ web_speed = 0.7 web_type = /datum/action/cooldown/mob_cooldown/lay_web/sealer menu_description = "Tank spider variant with an enormous amount of health and damage, but is very slow when not on webbing. It also has a charge ability to close distance with a target after a small windup." - /// Charging ability + innate_actions = list( + /datum/action/cooldown/mob_cooldown/charge/basic_charge, + /datum/action/cooldown/mob_cooldown/lay_web/solid_web, + /datum/action/cooldown/mob_cooldown/lay_web/web_passage, + ) + /// Charging ability, kept seperate from innate_actions due to implementation details var/datum/action/cooldown/mob_cooldown/charge/basic_charge/charge /mob/living/basic/spider/giant/tarantula/Initialize(mapload) @@ -405,15 +403,14 @@ player_speed_modifier = -2.5 gold_core_spawnable = NO_SPAWN menu_description = "Assassin spider variant with an unmatched speed and very deadly poison, but has very low amount of health and damage." + innate_actions = list( + /datum/action/cooldown/mob_cooldown/defensive_mode, + ) /mob/living/basic/spider/giant/viper/Initialize(mapload) . = ..() - AddElement(/datum/element/bonus_damage) - var/datum/action/cooldown/mob_cooldown/defensive_mode/defensive_action = new(src) - defensive_action.Grant(src) - /** * ### Spider Broodmother * @@ -440,38 +437,21 @@ web_speed = 0.5 web_type = /datum/action/cooldown/mob_cooldown/lay_web/sealer menu_description = "Royal spider variant specializing in reproduction and leadership, deals low damage." + innate_actions = list( + /datum/action/cooldown/mob_cooldown/command_spiders, + /datum/action/cooldown/mob_cooldown/lay_eggs, + /datum/action/cooldown/mob_cooldown/lay_eggs/abnormal, + /datum/action/cooldown/mob_cooldown/lay_eggs/enriched, + /datum/action/cooldown/mob_cooldown/lay_web/solid_web, + /datum/action/cooldown/mob_cooldown/lay_web/sticky_web, + /datum/action/cooldown/mob_cooldown/lay_web/web_passage, + /datum/action/cooldown/mob_cooldown/lay_web/web_spikes, + /datum/action/cooldown/mob_cooldown/set_spider_directive, + /datum/action/cooldown/mob_cooldown/wrap, + ) /mob/living/basic/spider/giant/midwife/Initialize(mapload) . = ..() - var/datum/action/cooldown/mob_cooldown/lay_web/solid_web/web_solid = new(src) - web_solid.Grant(src) - - var/datum/action/cooldown/mob_cooldown/lay_web/web_passage/passage_web = new(src) - passage_web.Grant(src) - - var/datum/action/cooldown/mob_cooldown/lay_web/web_spikes/spikes_web = new(src) - spikes_web.Grant(src) - - var/datum/action/cooldown/mob_cooldown/lay_web/sticky_web/web_sticky = new(src) - web_sticky.Grant(src) - - var/datum/action/cooldown/mob_cooldown/wrap/wrapping = new(src) - wrapping.Grant(src) - - var/datum/action/cooldown/mob_cooldown/lay_eggs/make_eggs_tier1 = new(src) - make_eggs_tier1.Grant(src) - - var/datum/action/cooldown/mob_cooldown/lay_eggs/abnormal/make_eggs_tier2 = new(src) - make_eggs_tier2.Grant(src) - - var/datum/action/cooldown/mob_cooldown/lay_eggs/enriched/make_eggs_tier3 = new(src) - make_eggs_tier3.Grant(src) - - var/datum/action/cooldown/mob_cooldown/set_spider_directive/give_orders = new(src) - give_orders.Grant(src) - - var/datum/action/cooldown/mob_cooldown/command_spiders/not_hivemind_talk = new(src) - not_hivemind_talk.Grant(src) AddElement(/datum/element/web_walker, /datum/movespeed_modifier/average_web) @@ -586,18 +566,15 @@ unsuitable_heat_damage = 1 menu_description = "Stronger assassin spider variant with an unmatched speed, high amount of health and very deadly poison, but deals very low amount of damage. It also has ability to ventcrawl." apply_spider_antag = FALSE + innate_actions = list( + /datum/action/cooldown/mob_cooldown/lay_web/sticky_web, + /datum/action/cooldown/mob_cooldown/lay_web/web_spikes, + ) /mob/living/basic/spider/giant/viper/wizard/Initialize(mapload) . = ..() ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT) - var/datum/action/cooldown/mob_cooldown/lay_web/web_spikes/spikes_web = new(src) - spikes_web.Grant(src) - - var/datum/action/cooldown/mob_cooldown/lay_web/sticky_web/web_sticky = new(src) - web_sticky.Grant(src) - - /** * ### Sergeant Araneus * diff --git a/code/modules/mob/living/basic/space_fauna/spider/young_spider/young_spider_subtypes.dm b/code/modules/mob/living/basic/space_fauna/spider/young_spider/young_spider_subtypes.dm index de44bc74180..809755e3555 100644 --- a/code/modules/mob/living/basic/space_fauna/spider/young_spider/young_spider_subtypes.dm +++ b/code/modules/mob/living/basic/space_fauna/spider/young_spider/young_spider_subtypes.dm @@ -32,10 +32,9 @@ /mob/living/basic/spider/growing/young/ambush/Initialize(mapload) . = ..() - AddElement(/datum/element/web_walker, /datum/movespeed_modifier/slow_web) - var/datum/action/cooldown/mob_cooldown/sneak/spider/sneak_web = new(src) - sneak_web.Grant(src) + GRANT_ACTION(/datum/action/cooldown/mob_cooldown/sneak/spider) + AddElement(/datum/element/web_walker, /datum/movespeed_modifier/slow_web) /// Will differentiate into the "scout" giant spider. /mob/living/basic/spider/growing/young/scout diff --git a/code/modules/mob/living/basic/space_fauna/statue/statue.dm b/code/modules/mob/living/basic/space_fauna/statue/statue.dm index d2ea5e8a831..c525c03bda0 100644 --- a/code/modules/mob/living/basic/space_fauna/statue/statue.dm +++ b/code/modules/mob/living/basic/space_fauna/statue/statue.dm @@ -56,14 +56,14 @@ /mob/living/basic/statue/Initialize(mapload, mob/living/creator) . = ..() - AddComponent(/datum/component/unobserved_actor, unobserved_flags = NO_OBSERVED_MOVEMENT | NO_OBSERVED_ATTACKS) ADD_TRAIT(src, TRAIT_UNOBSERVANT, INNATE_TRAIT) + AddComponent(/datum/component/unobserved_actor, unobserved_flags = NO_OBSERVED_MOVEMENT | NO_OBSERVED_ATTACKS) - // Give spells - var/datum/action/cooldown/spell/aoe/flicker_lights/flicker = new(src) - flicker.Grant(src) - var/datum/action/cooldown/spell/aoe/blindness/blind = new(src) - blind.Grant(src) + var/static/list/innate_actions = list( + /datum/action/cooldown/spell/aoe/blindness, + /datum/action/cooldown/spell/aoe/flicker_lights, + ) + grant_actions_by_list(innate_actions) // Set creator if(creator) diff --git a/code/modules/mob/living/carbon/alien/adult/caste/drone.dm b/code/modules/mob/living/carbon/alien/adult/caste/drone.dm index 3a1843dd93c..ff208baabd2 100644 --- a/code/modules/mob/living/carbon/alien/adult/caste/drone.dm +++ b/code/modules/mob/living/carbon/alien/adult/caste/drone.dm @@ -6,8 +6,7 @@ icon_state = "aliend" /mob/living/carbon/alien/adult/drone/Initialize(mapload) - var/datum/action/cooldown/alien/evolve_to_praetorian/evolution = new(src) - evolution.Grant(src) + GRANT_ACTION(/datum/action/cooldown/alien/evolve_to_praetorian) return ..() /mob/living/carbon/alien/adult/drone/create_internal_organs() diff --git a/code/modules/mob/living/carbon/alien/adult/caste/praetorian.dm b/code/modules/mob/living/carbon/alien/adult/caste/praetorian.dm index a26eb31231c..8fa142a38f0 100644 --- a/code/modules/mob/living/carbon/alien/adult/caste/praetorian.dm +++ b/code/modules/mob/living/carbon/alien/adult/caste/praetorian.dm @@ -9,11 +9,12 @@ /mob/living/carbon/alien/adult/royal/praetorian/Initialize(mapload) real_name = name - var/datum/action/cooldown/spell/aoe/repulse/xeno/tail_whip = new(src) - tail_whip.Grant(src) + var/static/list/innate_actions = list( + /datum/action/cooldown/alien/evolve_to_queen, + /datum/action/cooldown/spell/aoe/repulse/xeno, + ) - var/datum/action/cooldown/alien/evolve_to_queen/evolution = new(src) - evolution.Grant(src) + grant_actions_by_list(innate_actions) return ..() diff --git a/code/modules/mob/living/carbon/alien/adult/caste/sentinel.dm b/code/modules/mob/living/carbon/alien/adult/caste/sentinel.dm index 7fffdf35522..bef621905f4 100644 --- a/code/modules/mob/living/carbon/alien/adult/caste/sentinel.dm +++ b/code/modules/mob/living/carbon/alien/adult/caste/sentinel.dm @@ -7,8 +7,7 @@ alien_speed = 0.2 /mob/living/carbon/alien/adult/sentinel/Initialize(mapload) - var/datum/action/cooldown/mob_cooldown/sneak/alien/sneaky_beaky = new(src) - sneaky_beaky.Grant(src) + GRANT_ACTION(/datum/action/cooldown/mob_cooldown/sneak/alien) return ..() /mob/living/carbon/alien/adult/sentinel/create_internal_organs() diff --git a/code/modules/mob/living/carbon/alien/adult/queen.dm b/code/modules/mob/living/carbon/alien/adult/queen.dm index dd8e61b6699..df03ce3fa9e 100644 --- a/code/modules/mob/living/carbon/alien/adult/queen.dm +++ b/code/modules/mob/living/carbon/alien/adult/queen.dm @@ -55,11 +55,11 @@ real_name = src.name - var/datum/action/cooldown/spell/aoe/repulse/xeno/tail_whip = new(src) - tail_whip.Grant(src) - - var/datum/action/cooldown/alien/promote/promotion = new(src) - promotion.Grant(src) + var/static/list/innate_actions = list( + /datum/action/cooldown/alien/promote, + /datum/action/cooldown/spell/aoe/repulse/xeno, + ) + grant_actions_by_list(innate_actions) return ..() diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index 0b1396520b3..f4159813ed9 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -31,10 +31,12 @@ //This is fine right now, if we're adding organ specific damage this needs to be updated /mob/living/carbon/alien/larva/Initialize(mapload) - var/datum/action/cooldown/alien/larva_evolve/evolution = new(src) - evolution.Grant(src) - var/datum/action/cooldown/alien/hide/hide = new(src) - hide.Grant(src) + var/static/list/innate_actions = list( + /datum/action/cooldown/alien/hide, + /datum/action/cooldown/alien/larva_evolve, + ) + grant_actions_by_list(innate_actions) + return ..() /mob/living/carbon/alien/larva/create_internal_organs() diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/_megafauna.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/_megafauna.dm index 5f9e2678fd8..4ed79e48834 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/_megafauna.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/_megafauna.dm @@ -59,9 +59,7 @@ AddComponent(/datum/component/gps, gps_name) ADD_TRAIT(src, TRAIT_SPACEWALK, INNATE_TRAIT) add_traits(list(TRAIT_NO_TELEPORT, TRAIT_MARTIAL_ARTS_IMMUNE), MEGAFAUNA_TRAIT) - for(var/action_type in attack_action_types) - var/datum/action/innate/megafauna_attack/attack_action = new action_type() - attack_action.Grant(src) + grant_actions_by_list(attack_action_types) /mob/living/simple_animal/hostile/megafauna/Moved(atom/old_loc, movement_dir, forced, list/old_locs, momentum_change = TRUE) //Safety check diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm index 113f7431ffc..2e562eb5659 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm @@ -67,21 +67,23 @@ Difficulty: Medium . = ..() miner_saw = new(src) ADD_TRAIT(src, TRAIT_NO_FLOATING_ANIM, INNATE_TRAIT) - dash = new /datum/action/cooldown/mob_cooldown/dash() - kinetic_accelerator = new /datum/action/cooldown/mob_cooldown/projectile_attack/kinetic_accelerator() - dash_attack = new /datum/action/cooldown/mob_cooldown/dash_attack() - transform_weapon = new /datum/action/cooldown/mob_cooldown/transform_weapon() + + dash = new /datum/action/cooldown/mob_cooldown/dash + kinetic_accelerator = new /datum/action/cooldown/mob_cooldown/projectile_attack/kinetic_accelerator + dash_attack = new /datum/action/cooldown/mob_cooldown/dash_attack + transform_weapon = new /datum/action/cooldown/mob_cooldown/transform_weapon dash.Grant(src) kinetic_accelerator.Grant(src) dash_attack.Grant(src) transform_weapon.Grant(src) + AddComponent(/datum/component/boss_music, 'sound/lavaland/bdm_boss.ogg', 167 SECONDS) /mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/Destroy() - QDEL_NULL(dash) - QDEL_NULL(kinetic_accelerator) - QDEL_NULL(dash_attack) - QDEL_NULL(transform_weapon) + dash = null + kinetic_accelerator = null + dash_attack = null + transform_weapon = null return ..() /mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/OpenFire() diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm index a1336bd6a09..eaeaddc3e03 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm @@ -86,10 +86,10 @@ Difficulty: Hard /mob/living/simple_animal/hostile/megafauna/bubblegum/Initialize(mapload) . = ..() ADD_TRAIT(src, TRAIT_NO_FLOATING_ANIM, INNATE_TRAIT) - triple_charge = new /datum/action/cooldown/mob_cooldown/charge/triple_charge() - hallucination_charge = new /datum/action/cooldown/mob_cooldown/charge/hallucination_charge() - hallucination_charge_surround = new /datum/action/cooldown/mob_cooldown/charge/hallucination_charge/hallucination_surround() - blood_warp = new /datum/action/cooldown/mob_cooldown/blood_warp() + triple_charge = new(src) + hallucination_charge = new(src) + hallucination_charge_surround = new(src) + blood_warp = new(src) triple_charge.Grant(src) hallucination_charge.Grant(src) hallucination_charge_surround.Grant(src) @@ -105,10 +105,10 @@ Difficulty: Hard sound_volume = 200) /mob/living/simple_animal/hostile/megafauna/bubblegum/Destroy() - QDEL_NULL(triple_charge) - QDEL_NULL(hallucination_charge) - QDEL_NULL(hallucination_charge_surround) - QDEL_NULL(blood_warp) + triple_charge = null + hallucination_charge = null + hallucination_charge_surround = null + blood_warp = null return ..() /mob/living/simple_animal/hostile/megafauna/bubblegum/update_cooldowns(list/cooldown_updates, ignore_staggered = FALSE) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm index 10873e398e5..4d08a29740b 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -71,11 +71,11 @@ /mob/living/simple_animal/hostile/megafauna/colossus/Initialize(mapload) . = ..() ADD_TRAIT(src, TRAIT_NO_FLOATING_ANIM, INNATE_TRAIT) //we don't want this guy to float, messes up his animations. - spiral_shots = new /datum/action/cooldown/mob_cooldown/projectile_attack/spiral_shots/colossus() - random_shots = new /datum/action/cooldown/mob_cooldown/projectile_attack/random_aoe/colossus() - shotgun_blast = new /datum/action/cooldown/mob_cooldown/projectile_attack/shotgun_blast/colossus() - dir_shots = new /datum/action/cooldown/mob_cooldown/projectile_attack/dir_shots/alternating/colossus() - colossus_final = new /datum/action/cooldown/mob_cooldown/projectile_attack/colossus_final() + spiral_shots = new(src) + random_shots = new(src) + shotgun_blast = new(src) + dir_shots = new(src) + colossus_final = new(src) spiral_shots.Grant(src) random_shots.Grant(src) shotgun_blast.Grant(src) @@ -87,10 +87,10 @@ /mob/living/simple_animal/hostile/megafauna/colossus/Destroy() RemoveElement(/datum/element/projectile_shield) - QDEL_NULL(spiral_shots) - QDEL_NULL(random_shots) - QDEL_NULL(shotgun_blast) - QDEL_NULL(dir_shots) + spiral_shots = null + random_shots = null + shotgun_blast = null + dir_shots = null return ..() /mob/living/simple_animal/hostile/megafauna/colossus/OpenFire() diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm index aac1964cbf2..dc49d71f796 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm @@ -62,12 +62,12 @@ Difficulty: Extremely Hard /mob/living/simple_animal/hostile/megafauna/demonic_frost_miner/Initialize(mapload) . = ..() - frost_orbs = new /datum/action/cooldown/mob_cooldown/projectile_attack/rapid_fire/shrapnel() - hard_frost_orbs = new /datum/action/cooldown/mob_cooldown/projectile_attack/rapid_fire/shrapnel/strong() - snowball_machine_gun = new /datum/action/cooldown/mob_cooldown/projectile_attack/rapid_fire() - hard_snowball_machine_gun = new /datum/action/cooldown/mob_cooldown/direct_and_aoe() - ice_shotgun = new /datum/action/cooldown/mob_cooldown/projectile_attack/shotgun_blast/pattern() - hard_ice_shotgun = new /datum/action/cooldown/mob_cooldown/projectile_attack/shotgun_blast/pattern/circular() + frost_orbs = new(src) + hard_frost_orbs = new(src) + snowball_machine_gun = new(src) + hard_snowball_machine_gun = new(src) + ice_shotgun = new(src) + hard_ice_shotgun = new(src) frost_orbs.Grant(src) hard_frost_orbs.Grant(src) snowball_machine_gun.Grant(src) @@ -83,12 +83,12 @@ Difficulty: Extremely Hard AddComponent(/datum/component/boss_music, 'sound/lavaland/bdm_boss.ogg', 167 SECONDS) /mob/living/simple_animal/hostile/megafauna/demonic_frost_miner/Destroy() - QDEL_NULL(frost_orbs) - QDEL_NULL(hard_frost_orbs) - QDEL_NULL(snowball_machine_gun) - QDEL_NULL(hard_snowball_machine_gun) - QDEL_NULL(ice_shotgun) - QDEL_NULL(hard_ice_shotgun) + frost_orbs = null + hard_frost_orbs = null + snowball_machine_gun = null + hard_snowball_machine_gun = null + ice_shotgun = null + hard_ice_shotgun = null return ..() /mob/living/simple_animal/hostile/megafauna/demonic_frost_miner/OpenFire() diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm index 5008d4b1748..6132d1740de 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm @@ -80,10 +80,10 @@ /mob/living/simple_animal/hostile/megafauna/dragon/Initialize(mapload) . = ..() - fire_cone = new /datum/action/cooldown/mob_cooldown/fire_breath/cone() - meteors = new /datum/action/cooldown/mob_cooldown/meteors() - mass_fire = new /datum/action/cooldown/mob_cooldown/fire_breath/mass_fire() - lava_swoop = new /datum/action/cooldown/mob_cooldown/lava_swoop() + fire_cone = new(src) + meteors = new(src) + mass_fire = new(src) + lava_swoop = new(src) fire_cone.Grant(src) meteors.Grant(src) mass_fire.Grant(src) @@ -95,10 +95,10 @@ AddElement(/datum/element/change_force_on_death, move_force = MOVE_FORCE_DEFAULT) /mob/living/simple_animal/hostile/megafauna/dragon/Destroy() - QDEL_NULL(fire_cone) - QDEL_NULL(meteors) - QDEL_NULL(mass_fire) - QDEL_NULL(lava_swoop) + fire_cone = null + meteors = null + mass_fire = null + lava_swoop = null return ..() /mob/living/simple_animal/hostile/megafauna/dragon/OpenFire() diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm index 881a6cf17d6..00e5d1f7a15 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm @@ -29,9 +29,7 @@ /mob/living/simple_animal/hostile/asteroid/elite/Initialize(mapload) . = ..() AddComponent(/datum/component/seethrough_mob) - for(var/action_type in attack_action_types) - var/datum/action/innate/elite_attack/attack_action = new action_type() - attack_action.Grant(src) + grant_actions_by_list(attack_action_types) //Prevents elites from attacking members of their faction (can't hurt themselves either) and lets them mine rock with an attack despite not being able to smash walls. /mob/living/simple_animal/hostile/asteroid/elite/AttackingTarget(atom/attacked_target) diff --git a/code/modules/mob/living/simple_animal/hostile/ooze.dm b/code/modules/mob/living/simple_animal/hostile/ooze.dm index d4f86d3905d..37b04e839b5 100644 --- a/code/modules/mob/living/simple_animal/hostile/ooze.dm +++ b/code/modules/mob/living/simple_animal/hostile/ooze.dm @@ -41,6 +41,8 @@ ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT) AddElement(/datum/element/content_barfer) + grant_actions_by_list(get_innate_actions()) + /mob/living/simple_animal/hostile/ooze/attacked_by(obj/item/I, mob/living/user) if(!eat_atom(I, TRUE)) return ..() @@ -71,6 +73,10 @@ if(ooze_nutrition <= 0) adjustBruteLoss(0.25 * seconds_per_tick) +/// Returns an applicable list of actions to grant to the mob. Will return a list or null. +/mob/living/simple_animal/hostile/ooze/proc/get_innate_actions() + return null + ///Does ooze_nutrition + supplied amount and clamps it within 0 and 500 /mob/living/simple_animal/hostile/ooze/proc/adjust_ooze_nutrition(amount) ooze_nutrition = clamp(ooze_nutrition + amount, 0, 500) @@ -106,23 +112,20 @@ armour_penetration = 15 obj_damage = 20 death_message = "collapses into a pile of goo!" - ///The ability to give yourself a metabolic speed boost which raises heat - var/datum/action/cooldown/metabolicboost/boost ///The ability to consume mobs var/datum/action/consume/consume ///Initializes the mobs abilities and gives them to the mob /mob/living/simple_animal/hostile/ooze/gelatinous/Initialize(mapload) . = ..() - boost = new - boost.Grant(src) consume = new consume.Grant(src) -/mob/living/simple_animal/hostile/ooze/gelatinous/Destroy() - . = ..() - QDEL_NULL(boost) - QDEL_NULL(consume) +/mob/living/simple_animal/hostile/ooze/gelatinous/get_innate_actions() + var/static/list/innate_actions = list( + /datum/action/cooldown/metabolicboost, + ) + return innate_actions ///If this mob gets resisted by something, its trying to escape consumption. /mob/living/simple_animal/hostile/ooze/gelatinous/container_resist_act(mob/living/user) @@ -284,15 +287,14 @@ obj_damage = 15 death_message = "deflates and spills its vital juices!" edible_food_types = MEAT | VEGETABLES - ghost_controllable = TRUE //SKYRAT EDIT ADDITION - These guys can be helpful... maybe players will be helpful. -/mob/living/simple_animal/hostile/ooze/grapes/Initialize(mapload) - . = ..() - var/datum/action/cooldown/globules/glob_shooter = new(src) - glob_shooter.Grant(src) - var/datum/action/cooldown/gel_cocoon/gel_cocoon = new(src) - gel_cocoon.Grant(src) +/mob/living/simple_animal/hostile/ooze/grapes/get_innate_actions() + var/static/list/innate_actions = list( + /datum/action/cooldown/globules, + /datum/action/cooldown/gel_cocoon, + ) + return innate_actions /mob/living/simple_animal/hostile/ooze/grapes/add_cell_sample() AddElement(/datum/element/swabable, CELL_LINE_TABLE_GRAPE, CELL_VIRUS_TABLE_GENERIC_MOB, 1, 5) diff --git a/code/modules/mob/living/simple_animal/hostile/vatbeast.dm b/code/modules/mob/living/simple_animal/hostile/vatbeast.dm index 7c6edeb88da..a0fe73b32bf 100644 --- a/code/modules/mob/living/simple_animal/hostile/vatbeast.dm +++ b/code/modules/mob/living/simple_animal/hostile/vatbeast.dm @@ -28,8 +28,7 @@ /mob/living/simple_animal/hostile/vatbeast/Initialize(mapload) . = ..() - var/datum/action/cooldown/tentacle_slap/slapper = new(src) - slapper.Grant(src) + GRANT_ACTION(/datum/action/cooldown/tentacle_slap) add_cell_sample() AddComponent(/datum/component/tameable, list(/obj/item/food/fries, /obj/item/food/cheesyfries, /obj/item/food/cornchips, /obj/item/food/carrotfries), tame_chance = 30, bonus_tame_chance = 0, after_tame = CALLBACK(src, PROC_REF(tamed))) diff --git a/code/modules/mob/living/simple_animal/hostile/wizard.dm b/code/modules/mob/living/simple_animal/hostile/wizard.dm index d2957effd3c..59b44077661 100644 --- a/code/modules/mob/living/simple_animal/hostile/wizard.dm +++ b/code/modules/mob/living/simple_animal/hostile/wizard.dm @@ -57,12 +57,6 @@ blink.outer_tele_radius = 3 blink.Grant(src) -/mob/living/simple_animal/hostile/wizard/Destroy() - QDEL_NULL(fireball) - QDEL_NULL(magic_missile) - QDEL_NULL(blink) - return ..() - /mob/living/simple_animal/hostile/wizard/handle_automated_action() . = ..() if(target && next_cast < world.time) diff --git a/code/modules/mob/living/simple_animal/slime/powers.dm b/code/modules/mob/living/simple_animal/slime/powers.dm index 9e858d4f02d..28bfffa6d40 100644 --- a/code/modules/mob/living/simple_animal/slime/powers.dm +++ b/code/modules/mob/living/simple_animal/slime/powers.dm @@ -164,8 +164,7 @@ amount_grown = 0 for(var/datum/action/innate/slime/evolve/E in actions) E.Remove(src) - var/datum/action/innate/slime/reproduce/reproduce_action = new - reproduce_action.Grant(src) + GRANT_ACTION(/datum/action/innate/slime/reproduce) regenerate_icons() update_name() else diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 5f52e79aaab..4e76848eb90 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -560,3 +560,21 @@ raw_lines += recent_speech[key] return raw_lines + +/// Takes in an associated list (key `/datum/action` typepaths, value is the AI blackboard key) and handles granting the action and adding it to the mob's AI controller blackboard. +/// This is only useful in instances where you don't want to store the reference to the action on a variable on the mob. +/// You can set the value to null if you don't want to add it to the blackboard (like in player controlled instances). Is also safe with null AI controllers. +/// Assumes that the action will be initialized and held in the mob itself, which is typically standard. +/mob/proc/grant_actions_by_list(list/input) + if(length(input) <= 0) + return + + for(var/action in input) + var/datum/action/ability = new action(src) + ability.Grant(src) + + var/blackboard_key = input[action] + if(isnull(blackboard_key)) + continue + + ai_controller?.set_blackboard_key(blackboard_key, ability) diff --git a/modular_skyrat/master_files/code/modules/client/preferences/ghost.dm b/modular_skyrat/master_files/code/modules/client/preferences/ghost.dm index 0530276c5bb..38eb418b503 100644 --- a/modular_skyrat/master_files/code/modules/client/preferences/ghost.dm +++ b/modular_skyrat/master_files/code/modules/client/preferences/ghost.dm @@ -17,7 +17,7 @@ join_action.Remove(ghost) return TRUE - var/datum/action/innate/join_soulcatcher/new_join_action = new + var/datum/action/innate/join_soulcatcher/new_join_action = new(ghost) new_join_action.Grant(ghost) return TRUE diff --git a/modular_skyrat/modules/ashwalkers/code/species/Ashwalkers.dm b/modular_skyrat/modules/ashwalkers/code/species/Ashwalkers.dm index 0e60d2ed7e9..7e41148ba11 100644 --- a/modular_skyrat/modules/ashwalkers/code/species/Ashwalkers.dm +++ b/modular_skyrat/modules/ashwalkers/code/species/Ashwalkers.dm @@ -95,7 +95,7 @@ to_chat(human_target, span_notice("Your body feels hotter...")) if(5) var/datum/action/cooldown/mob_cooldown/fire_breath/granted_action - granted_action = new() + granted_action = new(human_target) granted_action.Grant(human_target) to_chat(human_target, span_notice("Your throat feels larger...")) if(6 to INFINITY) diff --git a/modular_skyrat/modules/black_mesa/code/mobs/headcrab.dm b/modular_skyrat/modules/black_mesa/code/mobs/headcrab.dm index 75e473b9196..e7afbf7aae7 100644 --- a/modular_skyrat/modules/black_mesa/code/mobs/headcrab.dm +++ b/modular_skyrat/modules/black_mesa/code/mobs/headcrab.dm @@ -40,14 +40,10 @@ /mob/living/simple_animal/hostile/blackmesa/xen/headcrab/Initialize(mapload) . = ..() - charge = new /datum/action/cooldown/mob_cooldown/charge/basic_charge() + charge = new(src) charge.Grant(src) charge.cooldown_time = 0 -/mob/living/simple_animal/hostile/blackmesa/xen/headcrab/Destroy() - QDEL_NULL(charge) - return ..() - /mob/living/simple_animal/hostile/blackmesa/xen/headcrab/Shoot(atom/targeted_atom) throw_at(targeted_atom, throw_at_range, throw_at_speed) playsound( diff --git a/modular_skyrat/modules/black_mesa/code/mobs/houndeye.dm b/modular_skyrat/modules/black_mesa/code/mobs/houndeye.dm index f7e4c70a6ce..ee0ee204d3e 100644 --- a/modular_skyrat/modules/black_mesa/code/mobs/houndeye.dm +++ b/modular_skyrat/modules/black_mesa/code/mobs/houndeye.dm @@ -39,11 +39,11 @@ /mob/living/simple_animal/hostile/blackmesa/xen/houndeye/Initialize(mapload) . = ..() - charge = new /datum/action/cooldown/mob_cooldown/charge/basic_charge() + charge = new(src) charge.Grant(src) /mob/living/simple_animal/hostile/blackmesa/xen/houndeye/Destroy() - QDEL_NULL(charge) + charge = null return ..() /mob/living/simple_animal/hostile/blackmesa/xen/houndeye/OpenFire() diff --git a/modular_skyrat/modules/clock_cult/code/items/clockwork_slab.dm b/modular_skyrat/modules/clock_cult/code/items/clockwork_slab.dm index 0f4efdd5692..8f8f51379ea 100644 --- a/modular_skyrat/modules/clock_cult/code/items/clockwork_slab.dm +++ b/modular_skyrat/modules/clock_cult/code/items/clockwork_slab.dm @@ -119,7 +119,7 @@ GLOBAL_LIST_INIT(clockwork_slabs, list()) qdel(quick_bound_scriptures[position]) //Put the quickbound action onto the slab, the slab should grant when picked up - var/datum/action/innate/clockcult/quick_bind/quickbound = new + var/datum/action/innate/clockcult/quick_bind/quickbound = new(src) quickbound.scripture = spell quickbound.slab_weakref = WEAKREF(src) quick_bound_scriptures[position] = quickbound diff --git a/modular_skyrat/modules/clock_cult/code/mobs/clockwork_marauder.dm b/modular_skyrat/modules/clock_cult/code/mobs/clockwork_marauder.dm index 08ef285d89c..ab91108bae6 100644 --- a/modular_skyrat/modules/clock_cult/code/mobs/clockwork_marauder.dm +++ b/modular_skyrat/modules/clock_cult/code/mobs/clockwork_marauder.dm @@ -48,7 +48,7 @@ GLOBAL_LIST_EMPTY(clockwork_marauders) if(length(loot)) AddElement(/datum/element/death_drops, loot) - var/datum/action/innate/clockcult/comm/communicate = new + var/datum/action/innate/clockcult/comm/communicate = new(src) communicate.Grant(src) GLOB.clockwork_marauders += src diff --git a/modular_skyrat/modules/clock_cult/code/scriptures/_scripture.dm b/modular_skyrat/modules/clock_cult/code/scriptures/_scripture.dm index ad8f096188b..e37db5b30dd 100644 --- a/modular_skyrat/modules/clock_cult/code/scriptures/_scripture.dm +++ b/modular_skyrat/modules/clock_cult/code/scriptures/_scripture.dm @@ -261,7 +261,7 @@ GLOBAL_LIST_EMPTY(clock_scriptures_by_type) /datum/scripture/slab/New() . = ..() - pointed_spell = new + pointed_spell = new(src) pointed_spell.name = src.name pointed_spell.deactive_msg = "" pointed_spell.parent_scripture = src diff --git a/modular_skyrat/modules/cortical_borer/code/cortical_borer.dm b/modular_skyrat/modules/cortical_borer/code/cortical_borer.dm index 258cd9463d6..4c35890f8d2 100644 --- a/modular_skyrat/modules/cortical_borer/code/cortical_borer.dm +++ b/modular_skyrat/modules/cortical_borer/code/cortical_borer.dm @@ -221,7 +221,7 @@ GLOBAL_LIST_EMPTY(cortical_borers) reagent_holder = new /obj/item/reagent_containers/borer(src) for(var/action_type in known_abilities) - var/datum/action/attack_action = new action_type() + var/datum/action/attack_action = new action_type(src) attack_action.Grant(src) if(mind) diff --git a/modular_skyrat/modules/cortical_borer/code/evolution/evolution_diveworm.dm b/modular_skyrat/modules/cortical_borer/code/evolution/evolution_diveworm.dm index 5a07e43d313..b04370d6c29 100644 --- a/modular_skyrat/modules/cortical_borer/code/evolution/evolution_diveworm.dm +++ b/modular_skyrat/modules/cortical_borer/code/evolution/evolution_diveworm.dm @@ -107,5 +107,5 @@ /datum/borer_evolution/diveworm/empowered_offspring/on_evolve(mob/living/basic/cortical_borer/cortical_owner) . = ..() - var/datum/action/cooldown/borer/empowered_offspring/attack_action = new() + var/datum/action/cooldown/borer/empowered_offspring/attack_action = new(cortical_owner) attack_action.Grant(cortical_owner) diff --git a/modular_skyrat/modules/cortical_borer/code/evolution/evolution_hivelord.dm b/modular_skyrat/modules/cortical_borer/code/evolution/evolution_hivelord.dm index ca5e1188352..be06cc5d7f4 100644 --- a/modular_skyrat/modules/cortical_borer/code/evolution/evolution_hivelord.dm +++ b/modular_skyrat/modules/cortical_borer/code/evolution/evolution_hivelord.dm @@ -12,7 +12,7 @@ /datum/borer_evolution/hivelord/produce_offspring/on_evolve(mob/living/basic/cortical_borer/cortical_owner) . = ..() - var/datum/action/cooldown/borer/produce_offspring/attack_action = new() + var/datum/action/cooldown/borer/produce_offspring/attack_action = new(cortical_owner) attack_action.Grant(cortical_owner) // T2 @@ -25,7 +25,7 @@ /datum/borer_evolution/hivelord/blood_chemical/on_evolve(mob/living/basic/cortical_borer/cortical_owner) . = ..() - var/datum/action/cooldown/borer/learn_bloodchemical/attack_action = new() + var/datum/action/cooldown/borer/learn_bloodchemical/attack_action = new(cortical_owner) attack_action.Grant(cortical_owner) // T3 @@ -51,7 +51,7 @@ /datum/borer_evolution/hivelord/stealth_mode/on_evolve(mob/living/basic/cortical_borer/cortical_owner) . = ..() - var/datum/action/cooldown/borer/stealth_mode/attack_action = new() + var/datum/action/cooldown/borer/stealth_mode/attack_action = new(cortical_owner) attack_action.Grant(cortical_owner) // T5 diff --git a/modular_skyrat/modules/cortical_borer/code/evolution/evolution_symbiote.dm b/modular_skyrat/modules/cortical_borer/code/evolution/evolution_symbiote.dm index 2cdc66addbb..4eb50058837 100644 --- a/modular_skyrat/modules/cortical_borer/code/evolution/evolution_symbiote.dm +++ b/modular_skyrat/modules/cortical_borer/code/evolution/evolution_symbiote.dm @@ -12,7 +12,7 @@ /datum/borer_evolution/symbiote/willing_host/on_evolve(mob/living/basic/cortical_borer/cortical_owner) . = ..() - var/datum/action/cooldown/borer/willing_host/attack_action = new() + var/datum/action/cooldown/borer/willing_host/attack_action = new(cortical_owner) attack_action.Grant(cortical_owner) // T2 @@ -107,6 +107,6 @@ /datum/borer_evolution/symbiote/revive_host/on_evolve(mob/living/basic/cortical_borer/cortical_owner) . = ..() - var/datum/action/cooldown/borer/revive_host/attack_action = new() + var/datum/action/cooldown/borer/revive_host/attack_action = new(cortical_owner) attack_action.Grant(cortical_owner) diff --git a/modular_skyrat/modules/horrorform/code/true_changeling.dm b/modular_skyrat/modules/horrorform/code/true_changeling.dm index 4765f9f9df6..6d7831cd3b2 100644 --- a/modular_skyrat/modules/horrorform/code/true_changeling.dm +++ b/modular_skyrat/modules/horrorform/code/true_changeling.dm @@ -35,7 +35,6 @@ butcher_results = list(/obj/item/food/meat/slab/human = 15) //It's a pretty big dude. Actually killing one is a feat. gold_core_spawnable = FALSE //Should stay exclusive to changelings tbh, otherwise makes it much less significant to sight one var/datum/action/innate/turn_to_human - var/datum/action/innate/devour var/transformed_time = 0 var/playstyle_string = span_infoplain("We have entered our true form! We are unbelievably powerful, and regenerate life at a steady rate. However, most of \ our abilities are useless in this form, and we must utilise the abilities that we have gained as a result of our transformation. Currently, we are incapable of returning to a human. \ @@ -51,10 +50,9 @@ /mob/living/simple_animal/hostile/true_changeling/Initialize(mapload) . = ..() to_chat(src, playstyle_string) - turn_to_human = new /datum/action/innate/turn_to_human - devour = new /datum/action/innate/devour + turn_to_human = new(src) turn_to_human.Grant(src) - devour.Grant(src) + GRANT_ACTION(/datum/action/innate/devour) ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT) /mob/living/simple_animal/hostile/true_changeling/Life() diff --git a/modular_skyrat/modules/hydra/code/neutral.dm b/modular_skyrat/modules/hydra/code/neutral.dm index aea55dcc147..fe4165a33bf 100644 --- a/modular_skyrat/modules/hydra/code/neutral.dm +++ b/modular_skyrat/modules/hydra/code/neutral.dm @@ -10,8 +10,8 @@ /datum/quirk/hydra/add(client/client_source) var/mob/living/carbon/human/hydra = quirk_holder - var/datum/action/innate/hydra/spell = new - var/datum/action/innate/hydrareset/resetspell = new + var/datum/action/innate/hydra/spell = new(hydra) + var/datum/action/innate/hydrareset/resetspell = new(hydra) spell.Grant(hydra) spell.owner = hydra resetspell.Grant(hydra) diff --git a/modular_skyrat/modules/modular_implants/code/nifsofts/base_types/action_granter.dm b/modular_skyrat/modules/modular_implants/code/nifsofts/base_types/action_granter.dm index f43b6d1d058..64a941f0936 100644 --- a/modular_skyrat/modules/modular_implants/code/nifsofts/base_types/action_granter.dm +++ b/modular_skyrat/modules/modular_implants/code/nifsofts/base_types/action_granter.dm @@ -11,7 +11,7 @@ /datum/nifsoft/action_granter/activate() . = ..() if(active) - granted_action = new action_to_grant + granted_action = new action_to_grant(linked_mob) granted_action.Grant(linked_mob) return diff --git a/modular_skyrat/modules/modular_implants/code/nifsofts/hivemind.dm b/modular_skyrat/modules/modular_implants/code/nifsofts/hivemind.dm index 7f722dcb343..347004f7183 100644 --- a/modular_skyrat/modules/modular_implants/code/nifsofts/hivemind.dm +++ b/modular_skyrat/modules/modular_implants/code/nifsofts/hivemind.dm @@ -34,7 +34,7 @@ GLOBAL_LIST_EMPTY(hivemind_users) linker_action_path = /datum/action/innate/hivemind_config, \ ) - keyboard_action = new + keyboard_action = new(linked_mob) keyboard_action.Grant(linked_mob) active_network = user_network diff --git a/modular_skyrat/modules/modular_implants/code/nifsofts/soulcatcher.dm b/modular_skyrat/modules/modular_implants/code/nifsofts/soulcatcher.dm index 5b03931941a..716e7e9513c 100644 --- a/modular_skyrat/modules/modular_implants/code/nifsofts/soulcatcher.dm +++ b/modular_skyrat/modules/modular_implants/code/nifsofts/soulcatcher.dm @@ -21,7 +21,7 @@ /datum/nifsoft/soulcatcher/New() . = ..() - soulcatcher_action = new + soulcatcher_action = new(linked_mob) soulcatcher_action.Grant(linked_mob) soulcatcher_action.parent_nifsoft = WEAKREF(src) diff --git a/modular_skyrat/modules/modular_implants/code/soulcatcher/soulcatcher_component.dm b/modular_skyrat/modules/modular_implants/code/soulcatcher/soulcatcher_component.dm index 9046e31ecab..8c14385430a 100644 --- a/modular_skyrat/modules/modular_implants/code/soulcatcher/soulcatcher_component.dm +++ b/modular_skyrat/modules/modular_implants/code/soulcatcher/soulcatcher_component.dm @@ -466,5 +466,5 @@ GLOBAL_LIST_EMPTY(soulcatchers) if(locate(/datum/action/innate/join_soulcatcher) in actions) return - var/datum/action/innate/join_soulcatcher/new_join_action = new + var/datum/action/innate/join_soulcatcher/new_join_action = new(src) new_join_action.Grant(src) diff --git a/modular_skyrat/modules/modular_implants/code/soulcatcher/soulcatcher_mob.dm b/modular_skyrat/modules/modular_implants/code/soulcatcher/soulcatcher_mob.dm index 8ae004b9667..5127fdfe8d4 100644 --- a/modular_skyrat/modules/modular_implants/code/soulcatcher/soulcatcher_mob.dm +++ b/modular_skyrat/modules/modular_implants/code/soulcatcher/soulcatcher_mob.dm @@ -45,10 +45,10 @@ if(!outside_hearing) ADD_TRAIT(src, TRAIT_DEAF, INNATE_TRAIT) - var/datum/action/innate/leave_soulcatcher/leave_action = new + var/datum/action/innate/leave_soulcatcher/leave_action = new(src) leave_action.Grant(src) - var/datum/action/innate/soulcatcher_user/soulcatcher_action = new + var/datum/action/innate/soulcatcher_user/soulcatcher_action = new(src) soulcatcher_action.Grant(src) var/datum/component/soulcatcher_user/user_component = AddComponent(/datum/component/soulcatcher_user) soulcatcher_action.soulcatcher_user_component = WEAKREF(user_component) diff --git a/modular_skyrat/modules/morewizardstuffs/spells/bloodcrawl_potion.dm b/modular_skyrat/modules/morewizardstuffs/spells/bloodcrawl_potion.dm index d3164d93360..e48d95d9789 100644 --- a/modular_skyrat/modules/morewizardstuffs/spells/bloodcrawl_potion.dm +++ b/modular_skyrat/modules/morewizardstuffs/spells/bloodcrawl_potion.dm @@ -6,7 +6,7 @@ /obj/item/bloodcrawl_bottle/attack_self(mob/user) to_chat(user, span_notice("You drink the contents of [src].")) - var/datum/action/cooldown/spell/jaunt/bloodcrawl/new_spell = new () + var/datum/action/cooldown/spell/jaunt/bloodcrawl/new_spell = new(user) new_spell.Grant(user) user.log_message("learned the spell bloodcrawl ([new_spell])", LOG_ATTACK, color="orange") qdel(src) diff --git a/modular_skyrat/modules/synths/code/species/synthetic.dm b/modular_skyrat/modules/synths/code/species/synthetic.dm index 1c623114b58..cfa4b92f04b 100644 --- a/modular_skyrat/modules/synths/code/species/synthetic.dm +++ b/modular_skyrat/modules/synths/code/species/synthetic.dm @@ -96,7 +96,7 @@ if(eyes) eyes.eye_icon_state = "None" - screen = new + screen = new(transformer) screen.Grant(transformer) return diff --git a/modular_skyrat/modules/xenos_skyrat_redo/code/base_skyrat_xeno.dm b/modular_skyrat/modules/xenos_skyrat_redo/code/base_skyrat_xeno.dm index e098f01769b..4b1f325c393 100644 --- a/modular_skyrat/modules/xenos_skyrat_redo/code/base_skyrat_xeno.dm +++ b/modular_skyrat/modules/xenos_skyrat_redo/code/base_skyrat_xeno.dm @@ -5,8 +5,6 @@ icon = 'modular_skyrat/modules/xenos_skyrat_redo/icons/big_xenos.dmi' rotate_on_lying = FALSE base_pixel_x = -16 //All of the xeno sprites are 64x64, and we want them to be level with the tile they are on, much like oversized quirk users - /// Holds the ability for quick resting without using the ic panel, and without editing xeno huds - var/datum/action/cooldown/alien/skyrat/sleepytime/rest_button mob_size = MOB_SIZE_LARGE layer = LARGE_MOB_LAYER //above most mobs, but below speechbubbles plane = GAME_PLANE_UPPER_FOV_HIDDEN @@ -17,8 +15,6 @@ var/alt_inhands_file = 'modular_skyrat/modules/xenos_skyrat_redo/icons/big_xenos.dmi' /// Setting this will give a xeno generic_evolve set to evolve them into this type var/next_evolution - /// Holds the ability for evolving into whatever type next_evolution is set to - var/datum/action/cooldown/alien/skyrat/generic_evolve/evolve_ability /// Keeps track of if a xeno has evolved recently, if so then we prevent them from evolving until that time is up var/has_evolved_recently = FALSE /// How long xenos should be unable to evolve after recently evolving @@ -35,24 +31,15 @@ . = ..() AddComponent(/datum/component/seethrough_mob) - rest_button = new /datum/action/cooldown/alien/skyrat/sleepytime() - rest_button.Grant(src) - + GRANT_ACTION(/datum/action/cooldown/alien/skyrat/sleepytime) if(next_evolution) - evolve_ability = new /datum/action/cooldown/alien/skyrat/generic_evolve() - evolve_ability.Grant(src) + GRANT_ACTION(/datum/action/cooldown/alien/skyrat/generic_evolve) pixel_x = -16 ADD_TRAIT(src, TRAIT_XENO_HEAL_AURA, TRAIT_XENO_INNATE) real_name = "alien [caste]" -/mob/living/carbon/alien/adult/skyrat/Destroy() - QDEL_NULL(rest_button) - if(evolve_ability) - QDEL_NULL(evolve_ability) - return ..() - /// Called when a larva or xeno evolves, adds a configurable timer on evolving again to the xeno /mob/living/carbon/alien/adult/skyrat/proc/has_just_evolved() if(has_evolved_recently) diff --git a/modular_skyrat/modules/xenos_skyrat_redo/code/xeno_types/defender.dm b/modular_skyrat/modules/xenos_skyrat_redo/code/xeno_types/defender.dm index 8c5b1f3fc03..5b79b7a8934 100644 --- a/modular_skyrat/modules/xenos_skyrat_redo/code/xeno_types/defender.dm +++ b/modular_skyrat/modules/xenos_skyrat_redo/code/xeno_types/defender.dm @@ -9,29 +9,20 @@ icon_state = "aliendefender" melee_damage_lower = 25 melee_damage_upper = 30 - /// Holds the basic charge ability that the defender will be granted - var/datum/action/cooldown/mob_cooldown/charge/basic_charge/defender/charge - /// Holds the wrecking ball tail sweep that the defender will be granted - var/datum/action/cooldown/spell/aoe/repulse/xeno/skyrat_tailsweep/tail_sweep next_evolution = /mob/living/carbon/alien/adult/skyrat/warrior /mob/living/carbon/alien/adult/skyrat/defender/Initialize(mapload) . = ..() - tail_sweep = new /datum/action/cooldown/spell/aoe/repulse/xeno/skyrat_tailsweep() - tail_sweep.Grant(src) - - charge = new /datum/action/cooldown/mob_cooldown/charge/basic_charge/defender() - charge.Grant(src) + var/static/list/innate_actions = list( + /datum/action/cooldown/spell/aoe/repulse/xeno/skyrat_tailsweep, + /datum/action/cooldown/mob_cooldown/charge/basic_charge/defender, + ) + grant_actions_by_list(innate_actions) REMOVE_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT) add_movespeed_modifier(/datum/movespeed_modifier/alien_heavy) -/mob/living/carbon/alien/adult/skyrat/defender/Destroy() - QDEL_NULL(charge) - QDEL_NULL(tail_sweep) - return ..() - /mob/living/carbon/alien/adult/skyrat/defender/create_internal_organs() organs += new /obj/item/organ/internal/alien/plasmavessel/small ..() diff --git a/modular_skyrat/modules/xenos_skyrat_redo/code/xeno_types/drone.dm b/modular_skyrat/modules/xenos_skyrat_redo/code/xeno_types/drone.dm index ee3b7214da9..7958984aea9 100644 --- a/modular_skyrat/modules/xenos_skyrat_redo/code/xeno_types/drone.dm +++ b/modular_skyrat/modules/xenos_skyrat_redo/code/xeno_types/drone.dm @@ -7,20 +7,13 @@ maxHealth = 200 health = 200 icon_state = "aliendrone" - /// Holds the healing aura ability the drone will be granted - var/datum/action/cooldown/alien/skyrat/heal_aura/heal_aura_ability melee_damage_lower = 15 melee_damage_upper = 20 next_evolution = /mob/living/carbon/alien/adult/skyrat/praetorian /mob/living/carbon/alien/adult/skyrat/drone/Initialize(mapload) . = ..() - heal_aura_ability = new /datum/action/cooldown/alien/skyrat/heal_aura() - heal_aura_ability.Grant(src) - -/mob/living/carbon/alien/adult/skyrat/drone/Destroy() - QDEL_NULL(heal_aura_ability) - return ..() + GRANT_ACTION(/datum/action/cooldown/alien/skyrat/heal_aura) /mob/living/carbon/alien/adult/skyrat/drone/create_internal_organs() organs += new /obj/item/organ/internal/alien/plasmavessel @@ -59,6 +52,8 @@ return TRUE /datum/action/cooldown/alien/skyrat/heal_aura/proc/aura_deactivate() + if(!aura_active) + return aura_active = FALSE QDEL_NULL(aura_healing_component) owner.balloon_alert(owner, "healing aura ended") diff --git a/modular_skyrat/modules/xenos_skyrat_redo/code/xeno_types/praetorian.dm b/modular_skyrat/modules/xenos_skyrat_redo/code/xeno_types/praetorian.dm index 45d5bd471c9..a34376970e7 100644 --- a/modular_skyrat/modules/xenos_skyrat_redo/code/xeno_types/praetorian.dm +++ b/modular_skyrat/modules/xenos_skyrat_redo/code/xeno_types/praetorian.dm @@ -7,30 +7,22 @@ maxHealth = 400 health = 400 icon_state = "alienpraetorian" - /// Holds the improved healing aura ability to be granted to the praetorian later - var/datum/action/cooldown/alien/skyrat/heal_aura/juiced/heal_aura_ability - /// Holds the less lethal tail sweep ability to be granted to the praetorian later - var/datum/action/cooldown/spell/aoe/repulse/xeno/skyrat_tailsweep/hard_throwing/tail_sweep melee_damage_lower = 25 melee_damage_upper = 30 next_evolution = /mob/living/carbon/alien/adult/skyrat/queen /mob/living/carbon/alien/adult/skyrat/praetorian/Initialize(mapload) . = ..() - heal_aura_ability = new /datum/action/cooldown/alien/skyrat/heal_aura/juiced() - heal_aura_ability.Grant(src) - - tail_sweep = new /datum/action/cooldown/spell/aoe/repulse/xeno/skyrat_tailsweep/hard_throwing() - tail_sweep.Grant(src) + var/static/list/innate_actions = list( + /datum/action/cooldown/alien/skyrat/heal_aura/juiced, + /datum/action/cooldown/spell/aoe/repulse/xeno/skyrat_tailsweep/hard_throwing, + ) + grant_actions_by_list(innate_actions) REMOVE_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT) add_movespeed_modifier(/datum/movespeed_modifier/alien_big) -/mob/living/carbon/alien/adult/skyrat/praetorian/Destroy() - QDEL_NULL(heal_aura_ability) - return ..() - /mob/living/carbon/alien/adult/skyrat/praetorian/create_internal_organs() organs += new /obj/item/organ/internal/alien/plasmavessel/large organs += new /obj/item/organ/internal/alien/neurotoxin/spitter diff --git a/modular_skyrat/modules/xenos_skyrat_redo/code/xeno_types/queen.dm b/modular_skyrat/modules/xenos_skyrat_redo/code/xeno_types/queen.dm index 26497fc78c7..3c60e970958 100644 --- a/modular_skyrat/modules/xenos_skyrat_redo/code/xeno_types/queen.dm +++ b/modular_skyrat/modules/xenos_skyrat_redo/code/xeno_types/queen.dm @@ -7,30 +7,21 @@ maxHealth = 500 health = 500 icon_state = "alienqueen" - /// Holds the less lethal tail sweep ability to be granted to the queen later - var/datum/action/cooldown/spell/aoe/repulse/xeno/skyrat_tailsweep/hard_throwing/tail_sweep - /// Holds the queen screech ability to be granted to her later - var/datum/action/cooldown/alien/skyrat/queen_screech/screech melee_damage_lower = 30 melee_damage_upper = 35 /mob/living/carbon/alien/adult/skyrat/queen/Initialize(mapload) . = ..() - tail_sweep = new /datum/action/cooldown/spell/aoe/repulse/xeno/skyrat_tailsweep/hard_throwing() - tail_sweep.Grant(src) - - screech = new /datum/action/cooldown/alien/skyrat/queen_screech() - screech.Grant(src) + var/static/list/innate_actions = list( + /datum/action/cooldown/spell/aoe/repulse/xeno/skyrat_tailsweep/hard_throwing, + /datum/action/cooldown/alien/skyrat/queen_screech, + ) + grant_actions_by_list(innate_actions) REMOVE_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT) add_movespeed_modifier(/datum/movespeed_modifier/alien_big) -/mob/living/carbon/alien/adult/skyrat/queen/Destroy() - QDEL_NULL(tail_sweep) - QDEL_NULL(screech) - return ..() - /mob/living/carbon/alien/adult/skyrat/queen/create_internal_organs() organs += new /obj/item/organ/internal/alien/plasmavessel/large/queen organs += new /obj/item/organ/internal/alien/resinspinner diff --git a/modular_skyrat/modules/xenos_skyrat_redo/code/xeno_types/ravager.dm b/modular_skyrat/modules/xenos_skyrat_redo/code/xeno_types/ravager.dm index 4f872be7342..00e469883a4 100644 --- a/modular_skyrat/modules/xenos_skyrat_redo/code/xeno_types/ravager.dm +++ b/modular_skyrat/modules/xenos_skyrat_redo/code/xeno_types/ravager.dm @@ -9,35 +9,20 @@ maxHealth = 350 health = 350 icon_state = "alienravager" - /// Holds the triple charge ability to be granted to the ravager later - var/datum/action/cooldown/mob_cooldown/charge/triple_charge/ravager/triple_charge - /// Holds the slicing tail sweep ability to be granted to the ravager later - var/datum/action/cooldown/spell/aoe/repulse/xeno/skyrat_tailsweep/slicing/tailsweep_slice - /// Holds the endure ability to be granted to the ravager later - var/datum/action/cooldown/alien/skyrat/literally_too_angry_to_die/you_cant_hurt_me_jack melee_damage_lower = 30 melee_damage_upper = 35 /mob/living/carbon/alien/adult/skyrat/ravager/Initialize(mapload) . = ..() - tailsweep_slice = new /datum/action/cooldown/spell/aoe/repulse/xeno/skyrat_tailsweep/slicing() - tailsweep_slice.Grant(src) - - you_cant_hurt_me_jack = new /datum/action/cooldown/alien/skyrat/literally_too_angry_to_die() - you_cant_hurt_me_jack.Grant(src) - - triple_charge = new /datum/action/cooldown/mob_cooldown/charge/triple_charge/ravager() - triple_charge.Grant(src) + var/static/list/innate_actions = list( + /datum/action/cooldown/spell/aoe/repulse/xeno/skyrat_tailsweep/slicing, + /datum/action/cooldown/alien/skyrat/literally_too_angry_to_die, + /datum/action/cooldown/mob_cooldown/charge/triple_charge/ravager, + ) + grant_actions_by_list(innate_actions) REMOVE_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT) -/mob/living/carbon/alien/adult/skyrat/ravager/Destroy() - //QDEL_NULL(triple_charge) - QDEL_NULL(tailsweep_slice) - QDEL_NULL(you_cant_hurt_me_jack) - QDEL_NULL(triple_charge) - return ..() - /mob/living/carbon/alien/adult/skyrat/ravager/create_internal_organs() organs += new /obj/item/organ/internal/alien/plasmavessel ..() diff --git a/modular_skyrat/modules/xenos_skyrat_redo/code/xeno_types/rouny.dm b/modular_skyrat/modules/xenos_skyrat_redo/code/xeno_types/rouny.dm index 5a7cb614fb5..81ef781ff31 100644 --- a/modular_skyrat/modules/xenos_skyrat_redo/code/xeno_types/rouny.dm +++ b/modular_skyrat/modules/xenos_skyrat_redo/code/xeno_types/rouny.dm @@ -20,15 +20,11 @@ /mob/living/carbon/alien/adult/skyrat/runner/Initialize(mapload) . = ..() AddComponent(/datum/component/tackler, stamina_cost = 0, base_knockdown = 2, range = 10, speed = 2, skill_mod = 7, min_distance = 0) - evade_ability = new /datum/action/cooldown/alien/skyrat/evade() + evade_ability = new(src) evade_ability.Grant(src) add_movespeed_modifier(/datum/movespeed_modifier/alien_quick) -/mob/living/carbon/alien/adult/skyrat/runner/Destroy() - QDEL_NULL(evade_ability) - return ..() - /mob/living/carbon/alien/adult/skyrat/runner/create_internal_organs() organs += new /obj/item/organ/internal/alien/plasmavessel/small/tiny ..() diff --git a/modular_skyrat/modules/xenos_skyrat_redo/code/xeno_types/warrior.dm b/modular_skyrat/modules/xenos_skyrat_redo/code/xeno_types/warrior.dm index 885df34df68..1a483472792 100644 --- a/modular_skyrat/modules/xenos_skyrat_redo/code/xeno_types/warrior.dm +++ b/modular_skyrat/modules/xenos_skyrat_redo/code/xeno_types/warrior.dm @@ -9,34 +9,20 @@ icon_state = "alienwarrior" melee_damage_lower = 30 melee_damage_upper = 35 - /// Holds the charge ability that will be given to the warrior later - var/datum/action/cooldown/mob_cooldown/charge/basic_charge/defender/charge - /// Holds the tail sweep ability that will be given to the warrior later - var/datum/action/cooldown/spell/aoe/repulse/xeno/skyrat_tailsweep/tail_sweep - /// Holds the agility ability that will be given to the warrior later - var/datum/action/cooldown/alien/skyrat/warrior_agility/agility /mob/living/carbon/alien/adult/skyrat/warrior/Initialize(mapload) . = ..() - tail_sweep = new /datum/action/cooldown/spell/aoe/repulse/xeno/skyrat_tailsweep() - tail_sweep.Grant(src) - - charge = new /datum/action/cooldown/mob_cooldown/charge/basic_charge/defender() - charge.Grant(src) - - agility = new /datum/action/cooldown/alien/skyrat/warrior_agility() - agility.Grant(src) + var/static/list/innate_actions = list( + /datum/action/cooldown/spell/aoe/repulse/xeno/skyrat_tailsweep, + /datum/action/cooldown/mob_cooldown/charge/basic_charge/defender, + /datum/action/cooldown/alien/skyrat/warrior_agility, + ) + grant_actions_by_list(innate_actions) REMOVE_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT) add_movespeed_modifier(/datum/movespeed_modifier/alien_big) -/mob/living/carbon/alien/adult/skyrat/warrior/Destroy() - QDEL_NULL(charge) - QDEL_NULL(tail_sweep) - QDEL_NULL(agility) - return ..() - /mob/living/carbon/alien/adult/skyrat/warrior/create_internal_organs() organs += new /obj/item/organ/internal/alien/plasmavessel ..() diff --git a/tgstation.dme b/tgstation.dme index a45c9c24b42..aeeaf20f1aa 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -4517,11 +4517,11 @@ #include "code\modules\mob\living\basic\farm_animals\gorilla\gorilla_accessories.dm" #include "code\modules\mob\living\basic\farm_animals\gorilla\gorilla_ai.dm" #include "code\modules\mob\living\basic\farm_animals\gorilla\gorilla_emotes.dm" +#include "code\modules\mob\living\basic\heretic\_heretic_summon.dm" #include "code\modules\mob\living\basic\heretic\ash_spirit.dm" #include "code\modules\mob\living\basic\heretic\fire_shark.dm" #include "code\modules\mob\living\basic\heretic\flesh_stalker.dm" #include "code\modules\mob\living\basic\heretic\flesh_worm.dm" -#include "code\modules\mob\living\basic\heretic\heretic_summon.dm" #include "code\modules\mob\living\basic\heretic\maid_in_the_mirror.dm" #include "code\modules\mob\living\basic\heretic\raw_prophet.dm" #include "code\modules\mob\living\basic\heretic\rust_walker.dm"