diff --git a/code/__DEFINES/ai/ai.dm b/code/__DEFINES/ai/ai.dm
index 53cbf117af4..5e0b979b2f8 100644
--- a/code/__DEFINES/ai/ai.dm
+++ b/code/__DEFINES/ai/ai.dm
@@ -1,4 +1,5 @@
#define GET_AI_BEHAVIOR(behavior_type) SSai_behaviors.ai_behaviors[behavior_type]
+#define GET_TARGETING_STRATEGY(targeting_type) SSai_behaviors.targeting_strategies[targeting_type]
#define HAS_AI_CONTROLLER_TYPE(thing, type) istype(thing?.ai_controller, type)
#define AI_STATUS_ON 1
diff --git a/code/__DEFINES/ai/ai_blackboard.dm b/code/__DEFINES/ai/ai_blackboard.dm
index 484b38b0fd1..dc1a573eaf6 100644
--- a/code/__DEFINES/ai/ai_blackboard.dm
+++ b/code/__DEFINES/ai/ai_blackboard.dm
@@ -40,26 +40,28 @@
///Basic Mob Keys
-///Targetting subtrees
+///Targeting subtrees
#define BB_BASIC_MOB_CURRENT_TARGET "BB_basic_current_target"
#define BB_BASIC_MOB_CURRENT_TARGET_HIDING_LOCATION "BB_basic_current_target_hiding_location"
-#define BB_TARGETTING_DATUM "targetting_datum"
+#define BB_TARGETING_STRATEGY "targeting_strategy"
///some behaviors that check current_target also set this on deep crit mobs
#define BB_BASIC_MOB_EXECUTION_TARGET "BB_basic_execution_target"
///Blackboard key for a whitelist typecache of "things we can target while trying to move"
-#define BB_OBSTACLE_TARGETTING_WHITELIST "BB_targetting_whitelist"
+#define BB_OBSTACLE_TARGETING_WHITELIST "BB_targeting_whitelist"
/// Key for the minimum status at which we want to target mobs (does not need to be specified if CONSCIOUS)
#define BB_TARGET_MINIMUM_STAT "BB_target_minimum_stat"
/// Flag for whether to target only wounded mobs
#define BB_TARGET_WOUNDED_ONLY "BB_target_wounded_only"
+/// What typepath the holding object targeting strategy should look for
+#define BB_TARGET_HELD_ITEM "BB_target_held_item"
-/// Blackboard key storing how long your targetting datum has held a particular target
+/// Blackboard key storing how long your targeting strategy has held a particular target
#define BB_BASIC_MOB_HAS_TARGET_TIME "BB_basic_mob_has_target_time"
-///Targetting keys for something to run away from, if you need to store this separately from current target
+///Targeting keys for something to run away from, if you need to store this separately from current target
#define BB_BASIC_MOB_FLEE_TARGET "BB_basic_flee_target"
#define BB_BASIC_MOB_FLEE_TARGET_HIDING_LOCATION "BB_basic_flee_target_hiding_location"
-#define BB_FLEE_TARGETTING_DATUM "flee_targetting_datum"
+#define BB_FLEE_TARGETING_STRATEGY "flee_targeting_strategy"
#define BB_BASIC_MOB_FLEE_DISTANCE "BB_basic_flee_distance"
#define DEFAULT_BASIC_FLEE_DISTANCE 9
@@ -115,9 +117,9 @@
///Range for a MOD AI controller.
#define MOD_AI_RANGE 200
-///should we skip the faction check for the targetting datum?
+///should we skip the faction check for the targeting strategy?
#define BB_ALWAYS_IGNORE_FACTION "BB_always_ignore_factions"
-///are we in some kind of temporary state of ignoring factions when targetting? can result in volatile results if multiple behaviours touch this
+///are we in some kind of temporary state of ignoring factions when targeting? can result in volatile results if multiple behaviours touch this
#define BB_TEMPORARILY_IGNORE_FACTION "BB_temporarily_ignore_factions"
///currently only used by clowns, a list of what can the mob speak randomly
diff --git a/code/__DEFINES/ai/carp.dm b/code/__DEFINES/ai/carp.dm
index 8286f326207..459b98ffb02 100644
--- a/code/__DEFINES/ai/carp.dm
+++ b/code/__DEFINES/ai/carp.dm
@@ -7,9 +7,9 @@
/// Current target turf in your migration
#define BB_CARP_MIGRATION_TARGET "BB_carp_migration_target"
-/// Targetting keys for magicarp spells
+/// Targeting keys for magicarp spells
#define BB_MAGICARP_SPELL_TARGET "BB_magicarp_spell_target"
-#define BB_MAGICARP_SPELL_SPECIAL_TARGETTING "BB_magicarp_spell_special_targetting"
+#define BB_MAGICARP_SPELL_SPECIAL_TARGETING "BB_magicarp_spell_special_targeting"
#define MAGICARP_SPELL_CORPSES "magicarp_spell_corpses"
#define MAGICARP_SPELL_WALLS "magicarp_spell_walls"
#define MAGICARP_SPELL_OBJECTS "magicarp_spell_objects"
diff --git a/code/__DEFINES/ai/pet_commands.dm b/code/__DEFINES/ai/pet_commands.dm
index 5894aedff14..1e692b9f805 100644
--- a/code/__DEFINES/ai/pet_commands.dm
+++ b/code/__DEFINES/ai/pet_commands.dm
@@ -4,6 +4,6 @@
/// Blackboard field for what we actually want the pet to target
#define BB_CURRENT_PET_TARGET "BB_current_pet_target"
/// Blackboard field for how we target things, as usually we want to be more permissive than normal
-#define BB_PET_TARGETTING_DATUM "BB_pet_targetting"
+#define BB_PET_TARGETING_STRATEGY "BB_pet_targeting"
/// Typecache of weakrefs to mobs this mob is friends with, will follow their instructions and won't attack them
#define BB_FRIENDS_LIST "BB_friends_list"
diff --git a/code/__DEFINES/ai/ventcrawling.dm b/code/__DEFINES/ai/ventcrawling.dm
index f981ef3bba5..a60b7fd5940 100644
--- a/code/__DEFINES/ai/ventcrawling.dm
+++ b/code/__DEFINES/ai/ventcrawling.dm
@@ -3,7 +3,7 @@
/// Key that holds a vent that we want to exit out of (when we're already in a pipenet)
#define BB_EXIT_VENT_TARGET "BB_exit_vent_target"
/// Do we plan on going inside a vent? Boolean.
-#define BB_CURRENTLY_TARGETTING_VENT "BB_currently_targetting_vent"
+#define BB_CURRENTLY_TARGETING_VENT "BB_currently_targeting_vent"
/// How long should we wait before we try and enter a vent again?
#define BB_VENTCRAWL_COOLDOWN "BB_ventcrawl_cooldown"
/// The least amount of time (in seconds) we take to go through the vents.
diff --git a/code/__DEFINES/vv.dm b/code/__DEFINES/vv.dm
index 1cc9025b821..f6cb654b1d5 100644
--- a/code/__DEFINES/vv.dm
+++ b/code/__DEFINES/vv.dm
@@ -57,7 +57,7 @@
// VV HREF KEYS
#define VV_HK_TARGET "target"
-#define VV_HK_VARNAME "targetvar" //name or index of var for 1 variable targetting hrefs.
+#define VV_HK_VARNAME "targetvar" //name or index of var for 1 variable targeting hrefs.
// vv_do_list() keys
#define VV_HK_LIST_ADD "listadd"
diff --git a/code/_onclick/hud/ooze.dm b/code/_onclick/hud/ooze.dm
index 1b466f7ff97..0962b58126a 100644
--- a/code/_onclick/hud/ooze.dm
+++ b/code/_onclick/hud/ooze.dm
@@ -1,4 +1,4 @@
-///Hud type with targetting dol and a nutrition bar
+///Hud type with targeting dol and a nutrition bar
/datum/hud/ooze/New(mob/living/owner)
. = ..()
diff --git a/code/controllers/subsystem/processing/ai_behaviors.dm b/code/controllers/subsystem/processing/ai_behaviors.dm
index 4ec698db32b..e92da2474bb 100644
--- a/code/controllers/subsystem/processing/ai_behaviors.dm
+++ b/code/controllers/subsystem/processing/ai_behaviors.dm
@@ -8,9 +8,12 @@ PROCESSING_SUBSYSTEM_DEF(ai_behaviors)
wait = 1
///List of all ai_behavior singletons, key is the typepath while assigned value is a newly created instance of the typepath. See SetupAIBehaviors()
var/list/ai_behaviors
+ ///List of all targeting_strategy singletons, key is the typepath while assigned value is a newly created instance of the typepath. See SetupAIBehaviors()
+ var/list/targeting_strategies
/datum/controller/subsystem/processing/ai_behaviors/Initialize()
SetupAIBehaviors()
+ SetupTargetingStrats()
return SS_INIT_SUCCESS
/datum/controller/subsystem/processing/ai_behaviors/proc/SetupAIBehaviors()
@@ -18,3 +21,9 @@ PROCESSING_SUBSYSTEM_DEF(ai_behaviors)
for(var/behavior_type in subtypesof(/datum/ai_behavior))
var/datum/ai_behavior/ai_behavior = new behavior_type
ai_behaviors[behavior_type] = ai_behavior
+
+/datum/controller/subsystem/processing/ai_behaviors/proc/SetupTargetingStrats()
+ targeting_strategies = list()
+ for(var/target_type in subtypesof(/datum/targeting_strategy))
+ var/datum/targeting_strategy/target_start = new target_type
+ targeting_strategies[target_type] = target_start
diff --git a/code/datums/ai/basic_mobs/basic_ai_behaviors/basic_attacking.dm b/code/datums/ai/basic_mobs/basic_ai_behaviors/basic_attacking.dm
index 91ba7ec4894..93f20babf36 100644
--- a/code/datums/ai/basic_mobs/basic_ai_behaviors/basic_attacking.dm
+++ b/code/datums/ai/basic_mobs/basic_ai_behaviors/basic_attacking.dm
@@ -2,9 +2,9 @@
action_cooldown = 0.2 SECONDS // We gotta check unfortunately often because we're in a race condition with nextmove
behavior_flags = AI_BEHAVIOR_REQUIRE_MOVEMENT | AI_BEHAVIOR_REQUIRE_REACH | AI_BEHAVIOR_CAN_PLAN_DURING_EXECUTION
-/datum/ai_behavior/basic_melee_attack/setup(datum/ai_controller/controller, target_key, targetting_datum_key, hiding_location_key)
+/datum/ai_behavior/basic_melee_attack/setup(datum/ai_controller/controller, target_key, targeting_strategy_key, hiding_location_key)
. = ..()
- if(!controller.blackboard_key_exists(targetting_datum_key))
+ if(!controller.blackboard[targeting_strategy_key])
CRASH("No target datum was supplied in the blackboard for [controller.pawn]")
//Hiding location is priority
@@ -14,7 +14,7 @@
set_movement_target(controller, target)
-/datum/ai_behavior/basic_melee_attack/perform(seconds_per_tick, datum/ai_controller/controller, target_key, targetting_datum_key, hiding_location_key)
+/datum/ai_behavior/basic_melee_attack/perform(seconds_per_tick, datum/ai_controller/controller, target_key, targeting_strategy_key, hiding_location_key)
if (isliving(controller.pawn))
var/mob/living/pawn = controller.pawn
if (world.time < pawn.next_move)
@@ -22,15 +22,15 @@
. = ..()
var/mob/living/basic/basic_mob = controller.pawn
- //targetting datum will kill the action if not real anymore
+ //targeting strategy will kill the action if not real anymore
var/atom/target = controller.blackboard[target_key]
- var/datum/targetting_datum/targetting_datum = controller.blackboard[targetting_datum_key]
+ var/datum/targeting_strategy/targeting_strategy = GET_TARGETING_STRATEGY(controller.blackboard[targeting_strategy_key])
- if(!targetting_datum.can_attack(basic_mob, target))
+ if(!targeting_strategy.can_attack(basic_mob, target))
finish_action(controller, FALSE, target_key)
return
- var/hiding_target = targetting_datum.find_hidden_mobs(basic_mob, target) //If this is valid, theyre hidden in something!
+ var/hiding_target = targeting_strategy.find_hidden_mobs(basic_mob, target) //If this is valid, theyre hidden in something!
controller.set_blackboard_key(hiding_location_key, hiding_target)
@@ -40,7 +40,7 @@
basic_mob.melee_attack(target)
-/datum/ai_behavior/basic_melee_attack/finish_action(datum/ai_controller/controller, succeeded, target_key, targetting_datum_key, hiding_location_key)
+/datum/ai_behavior/basic_melee_attack/finish_action(datum/ai_controller/controller, succeeded, target_key, targeting_strategy_key, hiding_location_key)
. = ..()
if(!succeeded)
controller.clear_blackboard_key(target_key)
@@ -54,30 +54,30 @@
///do we care about avoiding friendly fire?
var/avoid_friendly_fire = FALSE
-/datum/ai_behavior/basic_ranged_attack/setup(datum/ai_controller/controller, target_key, targetting_datum_key, hiding_location_key)
+/datum/ai_behavior/basic_ranged_attack/setup(datum/ai_controller/controller, target_key, targeting_strategy_key, hiding_location_key)
. = ..()
var/atom/target = controller.blackboard[hiding_location_key] || controller.blackboard[target_key]
if(QDELETED(target))
return FALSE
set_movement_target(controller, target)
-/datum/ai_behavior/basic_ranged_attack/perform(seconds_per_tick, datum/ai_controller/controller, target_key, targetting_datum_key, hiding_location_key)
+/datum/ai_behavior/basic_ranged_attack/perform(seconds_per_tick, datum/ai_controller/controller, target_key, targeting_strategy_key, hiding_location_key)
var/mob/living/basic/basic_mob = controller.pawn
- //targetting datum will kill the action if not real anymore
+ //targeting strategy will kill the action if not real anymore
var/atom/target = controller.blackboard[target_key]
- var/datum/targetting_datum/targetting_datum = controller.blackboard[targetting_datum_key]
+ var/datum/targeting_strategy/targeting_strategy = GET_TARGETING_STRATEGY(controller.blackboard[targeting_strategy_key])
- if(!targetting_datum.can_attack(basic_mob, target, chase_range))
+ if(!targeting_strategy.can_attack(basic_mob, target, chase_range))
finish_action(controller, FALSE, target_key)
return
- var/atom/hiding_target = targetting_datum.find_hidden_mobs(basic_mob, target) //If this is valid, theyre hidden in something!
+ var/atom/hiding_target = targeting_strategy.find_hidden_mobs(basic_mob, target) //If this is valid, theyre hidden in something!
var/atom/final_target = hiding_target ? hiding_target : target
if(!can_see(basic_mob, final_target, required_distance))
return
- if(avoid_friendly_fire && check_friendly_in_path(basic_mob, target, targetting_datum))
+ if(avoid_friendly_fire && check_friendly_in_path(basic_mob, target, targeting_strategy))
adjust_position(basic_mob, target)
return ..()
@@ -85,17 +85,17 @@
basic_mob.RangedAttack(final_target)
return ..() //only start the cooldown when the shot is shot
-/datum/ai_behavior/basic_ranged_attack/finish_action(datum/ai_controller/controller, succeeded, target_key, targetting_datum_key, hiding_location_key)
+/datum/ai_behavior/basic_ranged_attack/finish_action(datum/ai_controller/controller, succeeded, target_key, targeting_strategy_key, hiding_location_key)
. = ..()
if(!succeeded)
controller.clear_blackboard_key(target_key)
-/datum/ai_behavior/basic_ranged_attack/proc/check_friendly_in_path(mob/living/source, atom/target, datum/targetting_datum/targetting_datum)
+/datum/ai_behavior/basic_ranged_attack/proc/check_friendly_in_path(mob/living/source, atom/target, datum/targeting_strategy/targeting_strategy)
var/list/turfs_list = calculate_trajectory(source, target)
for(var/turf/possible_turf as anything in turfs_list)
for(var/mob/living/potential_friend in possible_turf)
- if(!targetting_datum.can_attack(source, potential_friend))
+ if(!targeting_strategy.can_attack(source, potential_friend))
return TRUE
return FALSE
diff --git a/code/datums/ai/basic_mobs/basic_ai_behaviors/nearest_targetting.dm b/code/datums/ai/basic_mobs/basic_ai_behaviors/nearest_targeting.dm
similarity index 100%
rename from code/datums/ai/basic_mobs/basic_ai_behaviors/nearest_targetting.dm
rename to code/datums/ai/basic_mobs/basic_ai_behaviors/nearest_targeting.dm
diff --git a/code/datums/ai/basic_mobs/basic_ai_behaviors/targetting.dm b/code/datums/ai/basic_mobs/basic_ai_behaviors/targeting.dm
similarity index 82%
rename from code/datums/ai/basic_mobs/basic_ai_behaviors/targetting.dm
rename to code/datums/ai/basic_mobs/basic_ai_behaviors/targeting.dm
index 376f62a5855..435b9cb1ef3 100644
--- a/code/datums/ai/basic_mobs/basic_ai_behaviors/targetting.dm
+++ b/code/datums/ai/basic_mobs/basic_ai_behaviors/targeting.dm
@@ -7,16 +7,16 @@
/// Static typecache list of potentially dangerous objs
var/static/list/hostile_machines = typecacheof(list(/obj/machinery/porta_turret, /obj/vehicle/sealed/mecha))
-/datum/ai_behavior/find_potential_targets/perform(seconds_per_tick, datum/ai_controller/controller, target_key, targetting_datum_key, hiding_location_key)
+/datum/ai_behavior/find_potential_targets/perform(seconds_per_tick, datum/ai_controller/controller, target_key, targeting_strategy_key, hiding_location_key)
. = ..()
var/mob/living/living_mob = controller.pawn
- var/datum/targetting_datum/targetting_datum = controller.blackboard[targetting_datum_key]
+ var/datum/targeting_strategy/targeting_strategy = GET_TARGETING_STRATEGY(controller.blackboard[targeting_strategy_key])
- if(!targetting_datum)
+ if(!targeting_strategy)
CRASH("No target datum was supplied in the blackboard for [controller.pawn]")
var/atom/current_target = controller.blackboard[target_key]
- if (targetting_datum.can_attack(living_mob, current_target, vision_range))
+ if (targeting_strategy.can_attack(living_mob, current_target, vision_range))
finish_action(controller, succeeded = FALSE)
return
@@ -37,7 +37,7 @@
var/list/filtered_targets = list()
for(var/atom/pot_target in potential_targets)
- if(targetting_datum.can_attack(living_mob, pot_target))//Can we attack it?
+ if(targeting_strategy.can_attack(living_mob, pot_target))//Can we attack it?
filtered_targets += pot_target
continue
@@ -48,7 +48,7 @@
var/atom/target = pick_final_target(controller, filtered_targets)
controller.set_blackboard_key(target_key, target)
- var/atom/potential_hiding_location = targetting_datum.find_hidden_mobs(living_mob, target)
+ var/atom/potential_hiding_location = targeting_strategy.find_hidden_mobs(living_mob, target)
if(potential_hiding_location) //If they're hiding inside of something, we need to know so we can go for that instead initially.
controller.set_blackboard_key(hiding_location_key, potential_hiding_location)
diff --git a/code/datums/ai/basic_mobs/basic_ai_behaviors/ventcrawling.dm b/code/datums/ai/basic_mobs/basic_ai_behaviors/ventcrawling.dm
index f5e4f74a1fe..e162cc61299 100644
--- a/code/datums/ai/basic_mobs/basic_ai_behaviors/ventcrawling.dm
+++ b/code/datums/ai/basic_mobs/basic_ai_behaviors/ventcrawling.dm
@@ -18,7 +18,7 @@
. = ..()
var/obj/machinery/atmospherics/components/unary/vent_pump/entry_vent = controller.blackboard[target_key] || controller.blackboard[BB_ENTRY_VENT_TARGET]
var/mob/living/cached_pawn = controller.pawn
- if(HAS_TRAIT(cached_pawn, TRAIT_MOVE_VENTCRAWLING) || !controller.blackboard[BB_CURRENTLY_TARGETTING_VENT] || !is_vent_valid(entry_vent))
+ if(HAS_TRAIT(cached_pawn, TRAIT_MOVE_VENTCRAWLING) || !controller.blackboard[BB_CURRENTLY_TARGETING_VENT] || !is_vent_valid(entry_vent))
return
if(!cached_pawn.can_enter_vent(entry_vent, provide_feedback = FALSE)) // we're an AI we scoff at feedback
@@ -30,7 +30,7 @@
finish_action(controller, FALSE, target_key)
return
- controller.set_blackboard_key(BB_CURRENTLY_TARGETTING_VENT, FALSE) // must be done here because we have a do_after sleep in handle_ventcrawl unfortunately and double dipping could lead to erroneous suicide pill calls.
+ controller.set_blackboard_key(BB_CURRENTLY_TARGETING_VENT, FALSE) // must be done here because we have a do_after sleep in handle_ventcrawl unfortunately and double dipping could lead to erroneous suicide pill calls.
cached_pawn.handle_ventcrawl(entry_vent)
if(!HAS_TRAIT(cached_pawn, TRAIT_MOVE_VENTCRAWLING)) //something failed and we ARE NOT IN THE VENT even though the earlier check said we were good to go! odd.
finish_action(controller, FALSE, target_key)
@@ -134,5 +134,5 @@
controller.clear_blackboard_key(target_key)
controller.clear_blackboard_key(BB_ENTRY_VENT_TARGET)
controller.clear_blackboard_key(BB_EXIT_VENT_TARGET)
- controller.set_blackboard_key(BB_CURRENTLY_TARGETTING_VENT, FALSE) // just in case
+ controller.set_blackboard_key(BB_CURRENTLY_TARGETING_VENT, FALSE) // just in case
diff --git a/code/datums/ai/basic_mobs/basic_ai_behaviors/wounded_targetting.dm b/code/datums/ai/basic_mobs/basic_ai_behaviors/wounded_targeting.dm
similarity index 100%
rename from code/datums/ai/basic_mobs/basic_ai_behaviors/wounded_targetting.dm
rename to code/datums/ai/basic_mobs/basic_ai_behaviors/wounded_targeting.dm
diff --git a/code/datums/ai/basic_mobs/basic_subtrees/attack_adjacent_target.dm b/code/datums/ai/basic_mobs/basic_subtrees/attack_adjacent_target.dm
index c3d334165d9..41169004354 100644
--- a/code/datums/ai/basic_mobs/basic_subtrees/attack_adjacent_target.dm
+++ b/code/datums/ai/basic_mobs/basic_subtrees/attack_adjacent_target.dm
@@ -12,19 +12,19 @@
var/mob/living/pawn = controller.pawn
if (LAZYLEN(pawn.do_afters))
return
- controller.queue_behavior(melee_attack_behavior, BB_BASIC_MOB_CURRENT_TARGET, BB_TARGETTING_DATUM, BB_BASIC_MOB_CURRENT_TARGET_HIDING_LOCATION)
+ controller.queue_behavior(melee_attack_behavior, BB_BASIC_MOB_CURRENT_TARGET, BB_TARGETING_STRATEGY, BB_BASIC_MOB_CURRENT_TARGET_HIDING_LOCATION)
/// Attack something which is already adjacent to us without moving
/datum/ai_behavior/basic_melee_attack/opportunistic
action_cooldown = 0.2 SECONDS // We gotta check unfortunately often because we're in a race condition with nextmove
behavior_flags = AI_BEHAVIOR_CAN_PLAN_DURING_EXECUTION
-/datum/ai_behavior/basic_melee_attack/opportunistic/setup(datum/ai_controller/controller, target_key, targetting_datum_key, hiding_location_key)
- if (!controller.blackboard_key_exists(targetting_datum_key))
+/datum/ai_behavior/basic_melee_attack/opportunistic/setup(datum/ai_controller/controller, target_key, targeting_strategy_key, hiding_location_key)
+ if (!controller.blackboard_key_exists(targeting_strategy_key))
CRASH("No target datum was supplied in the blackboard for [controller.pawn]")
return controller.blackboard_key_exists(target_key)
-/datum/ai_behavior/basic_melee_attack/opportunistic/perform(seconds_per_tick, datum/ai_controller/controller, target_key, targetting_datum_key, hiding_location_key)
+/datum/ai_behavior/basic_melee_attack/opportunistic/perform(seconds_per_tick, datum/ai_controller/controller, target_key, targeting_strategy_key, hiding_location_key)
var/atom/movable/atom_pawn = controller.pawn
if(!atom_pawn.CanReach(controller.blackboard[target_key]))
finish_action(controller, TRUE, target_key) // Don't clear target
diff --git a/code/datums/ai/basic_mobs/basic_subtrees/attack_obstacle_in_path.dm b/code/datums/ai/basic_mobs/basic_subtrees/attack_obstacle_in_path.dm
index 9f1053f29d3..7059bec93fe 100644
--- a/code/datums/ai/basic_mobs/basic_subtrees/attack_obstacle_in_path.dm
+++ b/code/datums/ai/basic_mobs/basic_subtrees/attack_obstacle_in_path.dm
@@ -74,7 +74,7 @@
return FALSE
if (basic_mob.see_invisible < object.invisibility)
return FALSE
- var/list/whitelist = basic_mob.ai_controller.blackboard[BB_OBSTACLE_TARGETTING_WHITELIST]
+ var/list/whitelist = basic_mob.ai_controller.blackboard[BB_OBSTACLE_TARGETING_WHITELIST]
if(whitelist && !is_type_in_typecache(object, whitelist))
return FALSE
diff --git a/code/datums/ai/basic_mobs/basic_subtrees/capricious_retaliate.dm b/code/datums/ai/basic_mobs/basic_subtrees/capricious_retaliate.dm
index 47f4155ac45..4d5319bca86 100644
--- a/code/datums/ai/basic_mobs/basic_subtrees/capricious_retaliate.dm
+++ b/code/datums/ai/basic_mobs/basic_subtrees/capricious_retaliate.dm
@@ -1,19 +1,19 @@
/// Add or remove people to our retaliation shitlist just on an arbitrary whim
/datum/ai_planning_subtree/capricious_retaliate
/// Blackboard key which tells us how to select valid targets
- var/targetting_datum_key = BB_TARGETTING_DATUM
+ var/targeting_strategy_key = BB_TARGETING_STRATEGY
/// Whether we should skip checking faction for our decision
var/ignore_faction = TRUE
/datum/ai_planning_subtree/capricious_retaliate/SelectBehaviors(datum/ai_controller/controller, seconds_per_tick)
. = ..()
- controller.queue_behavior(/datum/ai_behavior/capricious_retaliate, targetting_datum_key, ignore_faction)
+ controller.queue_behavior(/datum/ai_behavior/capricious_retaliate, targeting_strategy_key, ignore_faction)
/// Add or remove people to our retaliation shitlist just on an arbitrary whim
/datum/ai_behavior/capricious_retaliate
action_cooldown = 1 SECONDS
-/datum/ai_behavior/capricious_retaliate/perform(seconds_per_tick, datum/ai_controller/controller, targetting_datum_key, ignore_faction)
+/datum/ai_behavior/capricious_retaliate/perform(seconds_per_tick, datum/ai_controller/controller, targeting_strategy_key, ignore_faction)
. = ..()
var/atom/pawn = controller.pawn
if (controller.blackboard_key_exists(BB_BASIC_MOB_RETALIATE_LIST))
@@ -35,10 +35,10 @@
var/aggro_range = controller.blackboard[BB_AGGRO_RANGE] || 9
var/list/potential_targets = hearers(aggro_range, get_turf(pawn)) - pawn
if (!length(potential_targets))
- failed_targetting(controller, pawn, ignore_faction)
+ failed_targeting(controller, pawn, ignore_faction)
return
- var/datum/targetting_datum/target_helper = controller.blackboard[targetting_datum_key]
+ var/datum/targeting_strategy/target_helper = GET_TARGETING_STRATEGY(controller.blackboard[targeting_strategy_key])
var/mob/living/final_target = null
if (ignore_faction)
@@ -49,7 +49,7 @@
final_target = test_target
if (isnull(final_target))
- failed_targetting(controller, pawn, ignore_faction)
+ failed_targeting(controller, pawn, ignore_faction)
return
controller.insert_blackboard_key_lazylist(BB_BASIC_MOB_RETALIATE_LIST, final_target)
@@ -57,7 +57,7 @@
finish_action(controller, TRUE, ignore_faction)
/// Called if we try but fail to target something
-/datum/ai_behavior/capricious_retaliate/proc/failed_targetting(datum/ai_controller/controller, atom/pawn, ignore_faction)
+/datum/ai_behavior/capricious_retaliate/proc/failed_targeting(datum/ai_controller/controller, atom/pawn, ignore_faction)
finish_action(controller, FALSE, ignore_faction)
pawn.visible_message(span_notice("[pawn] grumbles.")) // We're pissed off but with no outlet to vent our frustration upon
diff --git a/code/datums/ai/basic_mobs/basic_subtrees/flee_target.dm b/code/datums/ai/basic_mobs/basic_subtrees/flee_target.dm
index 4f901745eee..4a2f5b476c7 100644
--- a/code/datums/ai/basic_mobs/basic_subtrees/flee_target.dm
+++ b/code/datums/ai/basic_mobs/basic_subtrees/flee_target.dm
@@ -20,7 +20,7 @@
return SUBTREE_RETURN_FINISH_PLANNING //we gotta get out of here.
/// Try to escape from your current target, without performing any other actions.
-/// Reads from some fleeing-specific targetting keys rather than the current mob target.
+/// Reads from some fleeing-specific targeting keys rather than the current mob target.
/datum/ai_planning_subtree/flee_target/from_flee_key
target_key = BB_BASIC_MOB_FLEE_TARGET
hiding_place_key = BB_BASIC_MOB_FLEE_TARGET_HIDING_LOCATION
diff --git a/code/datums/ai/basic_mobs/basic_subtrees/opportunistic_ventcrawler.dm b/code/datums/ai/basic_mobs/basic_subtrees/opportunistic_ventcrawler.dm
index 63a745305b2..240272d1ef4 100644
--- a/code/datums/ai/basic_mobs/basic_subtrees/opportunistic_ventcrawler.dm
+++ b/code/datums/ai/basic_mobs/basic_subtrees/opportunistic_ventcrawler.dm
@@ -15,6 +15,6 @@
controller.queue_behavior(/datum/ai_behavior/travel_towards, BB_ENTRY_VENT_TARGET)
return
- controller.set_blackboard_key(BB_CURRENTLY_TARGETTING_VENT, TRUE)
+ controller.set_blackboard_key(BB_CURRENTLY_TARGETING_VENT, TRUE)
controller.queue_behavior(/datum/ai_behavior/crawl_through_vents, BB_ENTRY_VENT_TARGET)
return SUBTREE_RETURN_FINISH_PLANNING // we are going into this vent... no distractions
diff --git a/code/datums/ai/basic_mobs/basic_subtrees/ranged_skirmish.dm b/code/datums/ai/basic_mobs/basic_subtrees/ranged_skirmish.dm
index be395f3dfe4..95a125eea5c 100644
--- a/code/datums/ai/basic_mobs/basic_subtrees/ranged_skirmish.dm
+++ b/code/datums/ai/basic_mobs/basic_subtrees/ranged_skirmish.dm
@@ -14,30 +14,30 @@
. = ..()
if(!controller.blackboard_key_exists(target_key))
return
- controller.queue_behavior(attack_behavior, target_key, BB_TARGETTING_DATUM, BB_BASIC_MOB_CURRENT_TARGET_HIDING_LOCATION, max_range, min_range)
+ controller.queue_behavior(attack_behavior, target_key, BB_TARGETING_STRATEGY, BB_BASIC_MOB_CURRENT_TARGET_HIDING_LOCATION, max_range, min_range)
/// How often will we try to perform our ranged attack?
/datum/ai_behavior/ranged_skirmish
action_cooldown = 1 SECONDS
-/datum/ai_behavior/ranged_skirmish/setup(datum/ai_controller/controller, target_key, targetting_datum_key, hiding_location_key, max_range, min_range)
+/datum/ai_behavior/ranged_skirmish/setup(datum/ai_controller/controller, target_key, targeting_strategy_key, hiding_location_key, max_range, min_range)
. = ..()
var/atom/target = controller.blackboard[hiding_location_key] || controller.blackboard[target_key]
return !QDELETED(target)
-/datum/ai_behavior/ranged_skirmish/perform(seconds_per_tick, datum/ai_controller/controller, target_key, targetting_datum_key, hiding_location_key, max_range, min_range)
+/datum/ai_behavior/ranged_skirmish/perform(seconds_per_tick, datum/ai_controller/controller, target_key, targeting_strategy_key, hiding_location_key, max_range, min_range)
. = ..()
var/atom/target = controller.blackboard[target_key]
if (QDELETED(target))
finish_action(controller, succeeded = FALSE)
return
- var/datum/targetting_datum/targetting_datum = controller.blackboard[targetting_datum_key]
- if(!targetting_datum.can_attack(controller.pawn, target))
+ var/datum/targeting_strategy/targeting_strategy = GET_TARGETING_STRATEGY(controller.blackboard[targeting_strategy_key])
+ if(!targeting_strategy.can_attack(controller.pawn, target))
finish_action(controller, succeeded = FALSE)
return
- var/hiding_target = targetting_datum.find_hidden_mobs(controller.pawn, target)
+ var/hiding_target = targeting_strategy.find_hidden_mobs(controller.pawn, target)
controller.set_blackboard_key(hiding_location_key, hiding_target)
target = hiding_target || target
diff --git a/code/datums/ai/basic_mobs/basic_subtrees/simple_attack_target.dm b/code/datums/ai/basic_mobs/basic_subtrees/simple_attack_target.dm
index 210aaf0aa8b..5b1f5ffbff9 100644
--- a/code/datums/ai/basic_mobs/basic_subtrees/simple_attack_target.dm
+++ b/code/datums/ai/basic_mobs/basic_subtrees/simple_attack_target.dm
@@ -8,7 +8,7 @@
. = ..()
if(!controller.blackboard_key_exists(BB_BASIC_MOB_CURRENT_TARGET))
return
- controller.queue_behavior(melee_attack_behavior, BB_BASIC_MOB_CURRENT_TARGET, BB_TARGETTING_DATUM, BB_BASIC_MOB_CURRENT_TARGET_HIDING_LOCATION)
+ controller.queue_behavior(melee_attack_behavior, BB_BASIC_MOB_CURRENT_TARGET, BB_TARGETING_STRATEGY, BB_BASIC_MOB_CURRENT_TARGET_HIDING_LOCATION)
if (end_planning)
return SUBTREE_RETURN_FINISH_PLANNING //we are going into battle...no distractions.
@@ -20,5 +20,5 @@
. = ..()
if(!controller.blackboard_key_exists(BB_BASIC_MOB_CURRENT_TARGET))
return
- controller.queue_behavior(ranged_attack_behavior, BB_BASIC_MOB_CURRENT_TARGET, BB_TARGETTING_DATUM, BB_BASIC_MOB_CURRENT_TARGET_HIDING_LOCATION)
+ controller.queue_behavior(ranged_attack_behavior, BB_BASIC_MOB_CURRENT_TARGET, BB_TARGETING_STRATEGY, BB_BASIC_MOB_CURRENT_TARGET_HIDING_LOCATION)
return SUBTREE_RETURN_FINISH_PLANNING //we are going into battle...no distractions.
diff --git a/code/datums/ai/basic_mobs/basic_subtrees/simple_find_nearest_target_to_flee.dm b/code/datums/ai/basic_mobs/basic_subtrees/simple_find_nearest_target_to_flee.dm
index 3fe1ada33ba..6630f7d193d 100644
--- a/code/datums/ai/basic_mobs/basic_subtrees/simple_find_nearest_target_to_flee.dm
+++ b/code/datums/ai/basic_mobs/basic_subtrees/simple_find_nearest_target_to_flee.dm
@@ -5,11 +5,11 @@
. = ..()
if (controller.blackboard[BB_BASIC_MOB_STOP_FLEEING])
return
- controller.queue_behavior(/datum/ai_behavior/find_potential_targets/nearest, BB_BASIC_MOB_CURRENT_TARGET, BB_TARGETTING_DATUM, BB_BASIC_MOB_CURRENT_TARGET_HIDING_LOCATION)
+ controller.queue_behavior(/datum/ai_behavior/find_potential_targets/nearest, BB_BASIC_MOB_CURRENT_TARGET, BB_TARGETING_STRATEGY, BB_BASIC_MOB_CURRENT_TARGET_HIDING_LOCATION)
/// Find the nearest thing on our list of 'things which have done damage to me' and set it as the flee target
/datum/ai_planning_subtree/find_nearest_thing_which_attacked_me_to_flee
- var/targeting_key = BB_TARGETTING_DATUM
+ var/targeting_key = BB_TARGETING_STRATEGY
/datum/ai_planning_subtree/find_nearest_thing_which_attacked_me_to_flee/SelectBehaviors(datum/ai_controller/controller, seconds_per_tick)
. = ..()
@@ -18,4 +18,4 @@
controller.queue_behavior(/datum/ai_behavior/target_from_retaliate_list/nearest, BB_BASIC_MOB_RETALIATE_LIST, BB_BASIC_MOB_CURRENT_TARGET, targeting_key, BB_BASIC_MOB_CURRENT_TARGET_HIDING_LOCATION)
/datum/ai_planning_subtree/find_nearest_thing_which_attacked_me_to_flee/from_flee_key
- targeting_key = BB_FLEE_TARGETTING_DATUM
+ targeting_key = BB_FLEE_TARGETING_STRATEGY
diff --git a/code/datums/ai/basic_mobs/basic_subtrees/simple_find_target.dm b/code/datums/ai/basic_mobs/basic_subtrees/simple_find_target.dm
index ec4ef1863ad..1c7d8de9120 100644
--- a/code/datums/ai/basic_mobs/basic_subtrees/simple_find_target.dm
+++ b/code/datums/ai/basic_mobs/basic_subtrees/simple_find_target.dm
@@ -2,7 +2,7 @@
/datum/ai_planning_subtree/simple_find_target/SelectBehaviors(datum/ai_controller/controller, seconds_per_tick)
. = ..()
- controller.queue_behavior(/datum/ai_behavior/find_potential_targets, BB_BASIC_MOB_CURRENT_TARGET, BB_TARGETTING_DATUM, BB_BASIC_MOB_CURRENT_TARGET_HIDING_LOCATION)
+ controller.queue_behavior(/datum/ai_behavior/find_potential_targets, BB_BASIC_MOB_CURRENT_TARGET, BB_TARGETING_STRATEGY, BB_BASIC_MOB_CURRENT_TARGET_HIDING_LOCATION)
// Prevents finding a target if a human is nearby
/datum/ai_planning_subtree/simple_find_target/not_while_observed
diff --git a/code/datums/ai/basic_mobs/basic_subtrees/simple_find_wounded_target.dm b/code/datums/ai/basic_mobs/basic_subtrees/simple_find_wounded_target.dm
index 8840c1ea3a7..7a230014d9a 100644
--- a/code/datums/ai/basic_mobs/basic_subtrees/simple_find_wounded_target.dm
+++ b/code/datums/ai/basic_mobs/basic_subtrees/simple_find_wounded_target.dm
@@ -3,4 +3,4 @@
/datum/ai_planning_subtree/simple_find_wounded_target/SelectBehaviors(datum/ai_controller/controller, seconds_per_tick)
. = ..()
- controller.queue_behavior(/datum/ai_behavior/find_potential_targets/most_wounded, BB_BASIC_MOB_CURRENT_TARGET, BB_TARGETTING_DATUM, BB_BASIC_MOB_CURRENT_TARGET_HIDING_LOCATION)
+ controller.queue_behavior(/datum/ai_behavior/find_potential_targets/most_wounded, BB_BASIC_MOB_CURRENT_TARGET, BB_TARGETING_STRATEGY, BB_BASIC_MOB_CURRENT_TARGET_HIDING_LOCATION)
diff --git a/code/datums/ai/basic_mobs/basic_subtrees/target_retaliate.dm b/code/datums/ai/basic_mobs/basic_subtrees/target_retaliate.dm
index 701f911d273..55ec7387613 100644
--- a/code/datums/ai/basic_mobs/basic_subtrees/target_retaliate.dm
+++ b/code/datums/ai/basic_mobs/basic_subtrees/target_retaliate.dm
@@ -2,7 +2,7 @@
/datum/ai_planning_subtree/target_retaliate
operational_datums = list(/datum/element/ai_retaliate, /datum/component/ai_retaliate_advanced)
/// Blackboard key which tells us how to select valid targets
- var/targetting_datum_key = BB_TARGETTING_DATUM
+ var/targeting_strategy_key = BB_TARGETING_STRATEGY
/// Blackboard key in which to store selected target
var/target_key = BB_BASIC_MOB_CURRENT_TARGET
/// Blackboard key in which to store selected target's hiding place
@@ -12,16 +12,16 @@
/datum/ai_planning_subtree/target_retaliate/SelectBehaviors(datum/ai_controller/controller, seconds_per_tick)
. = ..()
- controller.queue_behavior(/datum/ai_behavior/target_from_retaliate_list, BB_BASIC_MOB_RETALIATE_LIST, target_key, targetting_datum_key, hiding_place_key, check_faction)
+ controller.queue_behavior(/datum/ai_behavior/target_from_retaliate_list, BB_BASIC_MOB_RETALIATE_LIST, target_key, targeting_strategy_key, hiding_place_key, check_faction)
/datum/ai_planning_subtree/target_retaliate/check_faction
check_faction = TRUE
/// Places a mob which you can see and who has recently attacked you into some 'run away from this' AI keys
-/// Can use a different targetting datum than you use to select attack targets
+/// Can use a different targeting strategy than you use to select attack targets
/// Not required if fleeing is the only target behaviour or uses the same target datum
/datum/ai_planning_subtree/target_retaliate/to_flee
- targetting_datum_key = BB_FLEE_TARGETTING_DATUM
+ targeting_strategy_key = BB_FLEE_TARGETING_STRATEGY
target_key = BB_BASIC_MOB_FLEE_TARGET
hiding_place_key = BB_BASIC_MOB_FLEE_TARGET_HIDING_LOCATION
@@ -34,11 +34,11 @@
/// How far can we see stuff?
var/vision_range = 9
-/datum/ai_behavior/target_from_retaliate_list/perform(seconds_per_tick, datum/ai_controller/controller, shitlist_key, target_key, targetting_datum_key, hiding_location_key, check_faction)
+/datum/ai_behavior/target_from_retaliate_list/perform(seconds_per_tick, datum/ai_controller/controller, shitlist_key, target_key, targeting_strategy_key, hiding_location_key, check_faction)
. = ..()
var/mob/living/living_mob = controller.pawn
- var/datum/targetting_datum/targetting_datum = controller.blackboard[targetting_datum_key]
- if(!targetting_datum)
+ var/datum/targeting_strategy/targeting_strategy = GET_TARGETING_STRATEGY(controller.blackboard[targeting_strategy_key])
+ if(!targeting_strategy)
CRASH("No target datum was supplied in the blackboard for [controller.pawn]")
var/list/shitlist = controller.blackboard[shitlist_key]
@@ -47,13 +47,13 @@
if (!check_faction)
controller.set_blackboard_key(BB_TEMPORARILY_IGNORE_FACTION, TRUE)
- if (!QDELETED(existing_target) && (locate(existing_target) in shitlist) && targetting_datum.can_attack(living_mob, existing_target, vision_range))
+ if (!QDELETED(existing_target) && (locate(existing_target) in shitlist) && targeting_strategy.can_attack(living_mob, existing_target, vision_range))
finish_action(controller, succeeded = TRUE, check_faction = check_faction)
return
var/list/enemies_list = list()
for(var/mob/living/potential_target as anything in shitlist)
- if(!targetting_datum.can_attack(living_mob, potential_target, vision_range))
+ if(!targeting_strategy.can_attack(living_mob, potential_target, vision_range))
continue
enemies_list += potential_target
@@ -65,7 +65,7 @@
var/atom/new_target = pick_final_target(controller, enemies_list)
controller.set_blackboard_key(target_key, new_target)
- var/atom/potential_hiding_location = targetting_datum.find_hidden_mobs(living_mob, new_target)
+ var/atom/potential_hiding_location = targeting_strategy.find_hidden_mobs(living_mob, new_target)
if(potential_hiding_location) //If they're hiding inside of something, we need to know so we can go for that instead initially.
controller.set_blackboard_key(hiding_location_key, potential_hiding_location)
diff --git a/code/datums/ai/basic_mobs/generic_controllers.dm b/code/datums/ai/basic_mobs/generic_controllers.dm
index 208c1833add..dae1b944dd3 100644
--- a/code/datums/ai/basic_mobs/generic_controllers.dm
+++ b/code/datums/ai/basic_mobs/generic_controllers.dm
@@ -1,7 +1,7 @@
/// The most basic AI tree which just finds a guy and then runs at them to click them
/datum/ai_controller/basic_controller/simple_hostile
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_movement = /datum/ai_movement/basic_avoidance
@@ -14,7 +14,7 @@
/// Find a target, walk at target, attack intervening obstacles
/datum/ai_controller/basic_controller/simple_hostile_obstacles
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_movement = /datum/ai_movement/basic_avoidance
diff --git a/code/datums/ai/basic_mobs/pet_commands/pet_use_targetted_ability.dm b/code/datums/ai/basic_mobs/pet_commands/pet_use_targeted_ability.dm
similarity index 100%
rename from code/datums/ai/basic_mobs/pet_commands/pet_use_targetted_ability.dm
rename to code/datums/ai/basic_mobs/pet_commands/pet_use_targeted_ability.dm
diff --git a/code/datums/ai/basic_mobs/targetting_datums/basic_targetting_datum.dm b/code/datums/ai/basic_mobs/targeting_strategies/basic_targeting_strategy.dm
similarity index 79%
rename from code/datums/ai/basic_mobs/targetting_datums/basic_targetting_datum.dm
rename to code/datums/ai/basic_mobs/targeting_strategies/basic_targeting_strategy.dm
index d8b7e49c23c..2505b87a717 100644
--- a/code/datums/ai/basic_mobs/targetting_datums/basic_targetting_datum.dm
+++ b/code/datums/ai/basic_mobs/targeting_strategies/basic_targeting_strategy.dm
@@ -1,18 +1,19 @@
-///Datum for basic mobs to define what they can attack.
-/datum/targetting_datum
+///Datum for basic mobs to define what they can attack.GET_TARGETING_STRATEGY\((/[^,]*)\),
+///Global, just like ai_behaviors
+/datum/targeting_strategy
///Returns true or false depending on if the target can be attacked by the mob
-/datum/targetting_datum/proc/can_attack(mob/living/living_mob, atom/target, vision_range)
+/datum/targeting_strategy/proc/can_attack(mob/living/living_mob, atom/target, vision_range)
return
///Returns something the target might be hiding inside of
-/datum/targetting_datum/proc/find_hidden_mobs(mob/living/living_mob, atom/target)
+/datum/targeting_strategy/proc/find_hidden_mobs(mob/living/living_mob, atom/target)
var/atom/target_hiding_location
if(istype(target.loc, /obj/structure/closet) || istype(target.loc, /obj/machinery/disposal) || istype(target.loc, /obj/machinery/sleeper))
target_hiding_location = target.loc
return target_hiding_location
-/datum/targetting_datum/basic
+/datum/targeting_strategy/basic
/// When we do our basic faction check, do we look for exact faction matches?
var/check_factions_exactly = FALSE
/// Whether we care for seeing the target or not
@@ -22,7 +23,7 @@
/// If this blackboard key is TRUE, makes us only target wounded mobs
var/target_wounded_key
-/datum/targetting_datum/basic/can_attack(mob/living/living_mob, atom/the_target, vision_range)
+/datum/targeting_strategy/basic/can_attack(mob/living/living_mob, atom/the_target, vision_range)
var/datum/ai_controller/basic_controller/our_controller = living_mob.ai_controller
if(isnull(our_controller))
@@ -82,29 +83,29 @@
return FALSE
/// Returns true if the mob and target share factions
-/datum/targetting_datum/basic/proc/faction_check(datum/ai_controller/controller, mob/living/living_mob, mob/living/the_target)
+/datum/targeting_strategy/basic/proc/faction_check(datum/ai_controller/controller, mob/living/living_mob, mob/living/the_target)
if (controller.blackboard[BB_ALWAYS_IGNORE_FACTION] || controller.blackboard[BB_TEMPORARILY_IGNORE_FACTION])
return FALSE
return living_mob.faction_check_atom(the_target, exact_match = check_factions_exactly)
/// Subtype more forgiving for items.
/// Careful, this can go wrong and keep a mob hyper-focused on an item it can't lose aggro on
-/datum/targetting_datum/basic/allow_items
+/datum/targeting_strategy/basic/allow_items
-/datum/targetting_datum/basic/allow_items/can_attack(mob/living/living_mob, atom/the_target, vision_range)
+/datum/targeting_strategy/basic/allow_items/can_attack(mob/living/living_mob, atom/the_target, vision_range)
. = ..()
if(isitem(the_target))
// trust fall exercise
return TRUE
/// Subtype which searches for mobs of a size relative to ours
-/datum/targetting_datum/basic/of_size
+/datum/targeting_strategy/basic/of_size
/// If true, we will return mobs which are smaller than us. If false, larger.
var/find_smaller = TRUE
/// If true, we will return mobs which are the same size as us.
var/inclusive = TRUE
-/datum/targetting_datum/basic/of_size/can_attack(mob/living/owner, atom/target, vision_range)
+/datum/targeting_strategy/basic/of_size/can_attack(mob/living/owner, atom/target, vision_range)
if(!isliving(target))
return FALSE
. = ..()
@@ -119,14 +120,14 @@
return !find_smaller
// This is just using the default values but the subtype makes it clearer
-/datum/targetting_datum/basic/of_size/ours_or_smaller
+/datum/targeting_strategy/basic/of_size/ours_or_smaller
-/datum/targetting_datum/basic/of_size/larger
+/datum/targeting_strategy/basic/of_size/larger
find_smaller = FALSE
inclusive = FALSE
/// Makes the mob only attack their own faction. Useful mostly if their attacks do something helpful (e.g. healing touch).
-/datum/targetting_datum/basic/same_faction
+/datum/targeting_strategy/basic/same_faction
-/datum/targetting_datum/basic/same_faction/faction_check(mob/living/living_mob, mob/living/the_target)
+/datum/targeting_strategy/basic/same_faction/faction_check(mob/living/living_mob, mob/living/the_target)
return !..() // inverts logic to ONLY target mobs that share a faction
diff --git a/code/datums/ai/basic_mobs/targetting_datums/dont_target_friends.dm b/code/datums/ai/basic_mobs/targeting_strategies/dont_target_friends.dm
similarity index 55%
rename from code/datums/ai/basic_mobs/targetting_datums/dont_target_friends.dm
rename to code/datums/ai/basic_mobs/targeting_strategies/dont_target_friends.dm
index e2081bf308e..1b52c4986bb 100644
--- a/code/datums/ai/basic_mobs/targetting_datums/dont_target_friends.dm
+++ b/code/datums/ai/basic_mobs/targeting_strategies/dont_target_friends.dm
@@ -1,12 +1,12 @@
/// Don't target an atom in our friends list (or turfs), anything else is fair game
-/datum/targetting_datum/basic/not_friends
+/datum/targeting_strategy/basic/not_friends
/// Stop regarding someone as a valid target once they pass this stat level, setting it to DEAD means you will happily attack corpses
var/attack_until_past_stat = HARD_CRIT
/// If we can try to closed turfs or not
var/attack_closed_turf = FALSE
///Returns true or false depending on if the target can be attacked by the mob
-/datum/targetting_datum/basic/not_friends/can_attack(mob/living/living_mob, atom/target, vision_range)
+/datum/targeting_strategy/basic/not_friends/can_attack(mob/living/living_mob, atom/target, vision_range)
if(attack_closed_turf && isclosedturf(target))
return TRUE
@@ -16,16 +16,16 @@
return ..()
///friends dont care about factions
-/datum/targetting_datum/basic/not_friends/faction_check(mob/living/living_mob, mob/living/the_target)
+/datum/targeting_strategy/basic/not_friends/faction_check(mob/living/living_mob, mob/living/the_target)
return FALSE
-/datum/targetting_datum/basic/not_friends/attack_closed_turfs
+/datum/targeting_strategy/basic/not_friends/attack_closed_turfs
attack_closed_turf = TRUE
-/// Subtype that allows us to target items while deftly avoiding attacking our allies. Be careful when it comes to targetting items as an AI could get trapped targetting something it can't destroy.
-/datum/targetting_datum/basic/not_friends/allow_items
+/// Subtype that allows us to target items while deftly avoiding attacking our allies. Be careful when it comes to targeting items as an AI could get trapped targeting something it can't destroy.
+/datum/targeting_strategy/basic/not_friends/allow_items
-/datum/targetting_datum/basic/not_friends/allow_items/can_attack(mob/living/living_mob, atom/the_target, vision_range)
+/datum/targeting_strategy/basic/not_friends/allow_items/can_attack(mob/living/living_mob, atom/the_target, vision_range)
. = ..()
if(isitem(the_target))
// trust fall exercise
diff --git a/code/datums/ai/basic_mobs/targeting_strategies/with_object.dm b/code/datums/ai/basic_mobs/targeting_strategies/with_object.dm
new file mode 100644
index 00000000000..7cc76d3010c
--- /dev/null
+++ b/code/datums/ai/basic_mobs/targeting_strategies/with_object.dm
@@ -0,0 +1,29 @@
+/**
+ * Find mobs who are holding the bb configurable object type
+ *
+ * This is an extension of basic targeting behaviour, that allows you to
+ * only target the mob if they have a specific item in their hand.
+ *
+ */
+/datum/targeting_strategy/basic/holding_object
+ /// BB key that holds the target typepath to use
+ var/target_item_key = BB_TARGET_HELD_ITEM
+
+///Returns true or false depending on if the target can be attacked by the mob
+/datum/targeting_strategy/basic/holding_object/can_attack(mob/living/living_mob, atom/target, vision_range)
+ var/datum/ai_controller/controller = living_mob.ai_controller
+ var/object_type_path = controller.blackboard[target_item_key]
+
+ if (object_type_path == null)
+ return FALSE // no op
+ if(!ismob(target))
+ return FALSE // no hands no problems
+
+ // Look at me, type casting like a grown up
+ var/mob/targetmob = target
+ // Check if our parent behaviour agrees we can attack this target (we ignore faction by default)
+ var/can_attack = ..()
+ if(can_attack && targetmob.is_holding_item_of_type(object_type_path))
+ return TRUE // they have the item
+ // No valid target
+ return FALSE
diff --git a/code/datums/ai/basic_mobs/targetting_datums/with_object.dm b/code/datums/ai/basic_mobs/targetting_datums/with_object.dm
deleted file mode 100644
index 91e99bb4a22..00000000000
--- a/code/datums/ai/basic_mobs/targetting_datums/with_object.dm
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Find mobs who are holding the configurable object type
- *
- * This is an extension of basic targeting behaviour, that allows you to
- * only target the mob if they have a specific item in their hand.
- *
- */
-/datum/targetting_datum/basic/holding_object
- // We will find mobs who are holding this object in their hands
- var/object_type_path = null
-
-/**
- * Create an instance of the holding object targeting datum
- *
- * * object_type_path Pass an object type path, this will be compared to the items
- * in targets hands to filter the target list.
- */
-/datum/targetting_datum/basic/holding_object/New(object_type_path)
- if (!ispath(object_type_path))
- stack_trace("trying to create an item targeting datum with no valid typepath")
- // Leaving object type as null will make this basically a noop
- return
- src.object_type_path = object_type_path
-
-///Returns true or false depending on if the target can be attacked by the mob
-/datum/targetting_datum/basic/holding_object/can_attack(mob/living/living_mob, atom/target, vision_range)
- if (object_type_path == null)
- return FALSE // no op
- if(!ismob(target))
- return FALSE // no hands no problems
-
- // Look at me, type casting like a grown up
- var/mob/targetmob = target
- // Check if our parent behaviour agrees we can attack this target (we ignore faction by default)
- var/can_attack = ..()
- if(can_attack && targetmob.is_holding_item_of_type(object_type_path))
- return TRUE // they have the item
- // No valid target
- return FALSE
diff --git a/code/datums/ai/dog/dog_behaviors.dm b/code/datums/ai/dog/dog_behaviors.dm
index 6c9cb779bb3..c7723eab1a1 100644
--- a/code/datums/ai/dog/dog_behaviors.dm
+++ b/code/datums/ai/dog/dog_behaviors.dm
@@ -7,18 +7,18 @@
behavior_flags = AI_BEHAVIOR_REQUIRE_MOVEMENT | AI_BEHAVIOR_MOVE_AND_PERFORM
required_distance = 3
-/datum/ai_behavior/basic_melee_attack/dog/perform(seconds_per_tick, datum/ai_controller/controller, target_key, targetting_datum_key, hiding_location_key)
+/datum/ai_behavior/basic_melee_attack/dog/perform(seconds_per_tick, datum/ai_controller/controller, target_key, targeting_strategy_key, hiding_location_key)
controller.behavior_cooldowns[src] = world.time + action_cooldown
var/mob/living/living_pawn = controller.pawn
if(!(isturf(living_pawn.loc) || HAS_TRAIT(living_pawn, TRAIT_AI_BAGATTACK))) // Void puppies can attack from inside bags
- finish_action(controller, FALSE, target_key, targetting_datum_key, hiding_location_key)
+ finish_action(controller, FALSE, target_key, targeting_strategy_key, hiding_location_key)
return
// Unfortunately going to repeat this check in parent call but what can you do
var/atom/target = controller.blackboard[target_key]
- var/datum/targetting_datum/targetting_datum = controller.blackboard[targetting_datum_key]
- if (!targetting_datum.can_attack(living_pawn, target))
- finish_action(controller, FALSE, target_key, targetting_datum_key, hiding_location_key)
+ var/datum/targeting_strategy/targeting_strategy = GET_TARGETING_STRATEGY(controller.blackboard[targeting_strategy_key])
+ if (!targeting_strategy.can_attack(living_pawn, target))
+ finish_action(controller, FALSE, target_key, targeting_strategy_key, hiding_location_key)
return
if (!living_pawn.Adjacent(target))
diff --git a/code/datums/ai/dog/dog_controller.dm b/code/datums/ai/dog/dog_controller.dm
index a95e3d57b6b..6710fa9eb76 100644
--- a/code/datums/ai/dog/dog_controller.dm
+++ b/code/datums/ai/dog/dog_controller.dm
@@ -2,7 +2,7 @@
blackboard = list(
BB_DOG_HARASS_HARM = TRUE,
BB_VISION_RANGE = AI_DOG_VISION_RANGE,
- BB_PET_TARGETTING_DATUM = new /datum/targetting_datum/basic/not_friends,
+ BB_PET_TARGETING_STRATEGY = /datum/targeting_strategy/basic/not_friends,
)
ai_movement = /datum/ai_movement/basic_avoidance
idle_behavior = /datum/idle_behavior/idle_dog
@@ -19,9 +19,11 @@
blackboard = list(
BB_DOG_HARASS_HARM = TRUE,
BB_VISION_RANGE = AI_DOG_VISION_RANGE,
- BB_PET_TARGETTING_DATUM = new /datum/targetting_datum/basic/not_friends,
- // Find nearby mobs with tongs in hand.
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic/holding_object(/obj/item/kitchen/tongs),
+ BB_PET_TARGETING_STRATEGY = /datum/targeting_strategy/basic/not_friends,
+ // Find nearby mobs ...
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic/holding_object,
+ // With tongs in hand!
+ BB_TARGET_HELD_ITEM = /obj/item/kitchen/tongs,
BB_BABIES_PARTNER_TYPES = list(/mob/living/basic/pet/dog),
BB_BABIES_CHILD_TYPES = list(/mob/living/basic/pet/dog/corgi/puppy = 95, /mob/living/basic/pet/dog/corgi/puppy/void = 5),
)
@@ -31,7 +33,7 @@
/datum/ai_planning_subtree/make_babies, // Ian WILL prioritise sex over following your instructions
/datum/ai_planning_subtree/pet_planning,
/datum/ai_planning_subtree/dog_harassment,
- // Find targets to run away from (uses the targetting datum from above)
+ // Find targets to run away from (uses the targeting strategy from above)
/datum/ai_planning_subtree/simple_find_target,
// Flee from that target
/datum/ai_planning_subtree/flee_target,
diff --git a/code/datums/ai/dog/dog_subtrees.dm b/code/datums/ai/dog/dog_subtrees.dm
index 66198b61ac3..62f63da54bd 100644
--- a/code/datums/ai/dog/dog_subtrees.dm
+++ b/code/datums/ai/dog/dog_subtrees.dm
@@ -4,27 +4,27 @@
/datum/ai_planning_subtree/dog_harassment/SelectBehaviors(datum/ai_controller/controller, seconds_per_tick)
if(!SPT_PROB(10, seconds_per_tick))
return
- controller.queue_behavior(/datum/ai_behavior/find_hated_dog_target, BB_DOG_HARASS_TARGET, BB_PET_TARGETTING_DATUM)
+ controller.queue_behavior(/datum/ai_behavior/find_hated_dog_target, BB_DOG_HARASS_TARGET, BB_PET_TARGETING_STRATEGY)
var/atom/harass_target = controller.blackboard[BB_DOG_HARASS_TARGET]
if (isnull(harass_target))
return
- controller.queue_behavior(/datum/ai_behavior/basic_melee_attack/dog, BB_DOG_HARASS_TARGET, BB_PET_TARGETTING_DATUM)
+ controller.queue_behavior(/datum/ai_behavior/basic_melee_attack/dog, BB_DOG_HARASS_TARGET, BB_PET_TARGETING_STRATEGY)
return SUBTREE_RETURN_FINISH_PLANNING
/datum/ai_behavior/find_hated_dog_target
-/datum/ai_behavior/find_hated_dog_target/setup(datum/ai_controller/controller, target_key, targetting_datum_key)
+/datum/ai_behavior/find_hated_dog_target/setup(datum/ai_controller/controller, target_key, targeting_strategy_key)
. = ..()
var/mob/living/dog = controller.pawn
- var/datum/targetting_datum/targetting_datum = controller.blackboard[targetting_datum_key]
+ var/datum/targeting_strategy/targeting_strategy = GET_TARGETING_STRATEGY(controller.blackboard[targeting_strategy_key])
for(var/mob/living/iter_living in oview(2, dog))
if(iter_living.stat != CONSCIOUS || !HAS_TRAIT(iter_living, TRAIT_HATED_BY_DOGS))
continue
if(!isnull(dog.buckled))
dog.audible_message(span_notice("[dog] growls at [iter_living], yet [dog.p_they()] [dog.p_are()] much too comfy to move."), hearing_distance = COMBAT_MESSAGE_RANGE)
continue
- if(!targetting_datum.can_attack(dog, iter_living))
+ if(!targeting_strategy.can_attack(dog, iter_living))
continue
dog.audible_message(span_warning("[dog] growls at [iter_living], seemingly annoyed by [iter_living.p_their()] presence."), hearing_distance = COMBAT_MESSAGE_RANGE)
diff --git a/code/datums/components/healing_touch.dm b/code/datums/components/healing_touch.dm
index a81de7ab04a..8efbfa627a8 100644
--- a/code/datums/components/healing_touch.dm
+++ b/code/datums/components/healing_touch.dm
@@ -26,8 +26,8 @@
var/valid_biotypes
/// Which kinds of carbon limbs can we heal, has no effect on non-carbon mobs. Set to null if you don't care about excluding prosthetics.
var/required_bodytype
- /// How targetting yourself works, expects one of HEALING_TOUCH_ANYONE, HEALING_TOUCH_NOT_SELF, or HEALING_TOUCH_SELF_ONLY
- var/self_targetting
+ /// How targeting yourself works, expects one of HEALING_TOUCH_ANYONE, HEALING_TOUCH_NOT_SELF, or HEALING_TOUCH_SELF_ONLY
+ var/self_targeting
/// Text to print when action starts, replaces %SOURCE% with healer and %TARGET% with healed mob
var/action_text
/// Text to print when action completes, replaces %SOURCE% with healer and %TARGET% with healed mob
@@ -47,7 +47,7 @@
list/valid_targets_typecache = list(),
valid_biotypes = MOB_ORGANIC | MOB_MINERAL,
required_bodytype = BODYTYPE_ORGANIC,
- self_targetting = HEALING_TOUCH_NOT_SELF,
+ self_targeting = HEALING_TOUCH_NOT_SELF,
action_text = "%SOURCE% begins healing %TARGET%",
complete_text = "%SOURCE% finishes healing %TARGET%",
show_health = FALSE,
@@ -65,7 +65,7 @@
src.valid_targets_typecache = valid_targets_typecache.Copy()
src.valid_biotypes = valid_biotypes
src.required_bodytype = required_bodytype
- src.self_targetting = self_targetting
+ src.self_targeting = self_targeting
src.action_text = action_text
src.complete_text = complete_text
src.show_health = show_health
@@ -98,7 +98,7 @@
healer.balloon_alert(healer, "busy!")
return COMPONENT_CANCEL_ATTACK_CHAIN
- switch (self_targetting)
+ switch (self_targeting)
if (HEALING_TOUCH_NOT_SELF)
if (target == healer)
healer.balloon_alert(healer, "can't heal yourself!")
diff --git a/code/datums/components/lock_on_cursor.dm b/code/datums/components/lock_on_cursor.dm
index 0ccac6ee2f9..30140dd95bd 100644
--- a/code/datums/components/lock_on_cursor.dm
+++ b/code/datums/components/lock_on_cursor.dm
@@ -8,13 +8,13 @@
*/
/datum/component/lock_on_cursor
dupe_mode = COMPONENT_DUPE_ALLOWED
- /// Appearance to overlay onto whatever we are targetting
+ /// Appearance to overlay onto whatever we are targeting
var/mutable_appearance/lock_appearance
/// Current images we are displaying to the client
var/list/image/lock_images
/// Typecache of things we are allowed to target
var/list/target_typecache
- /// Cache of weakrefs to ignore targetting formatted as `list(weakref = TRUE)`
+ /// Cache of weakrefs to ignore targeting formatted as `list(weakref = TRUE)`
var/list/immune_weakrefs
/// Number of things we can target at once
var/lock_amount
diff --git a/code/datums/components/pet_commands/fetch.dm b/code/datums/components/pet_commands/fetch.dm
index ae33983e1d0..fa0b3193a44 100644
--- a/code/datums/components/pet_commands/fetch.dm
+++ b/code/datums/components/pet_commands/fetch.dm
@@ -3,7 +3,7 @@
* Watch for someone throwing or pointing at something and then go get it and bring it back.
* If it's food we might eat it instead.
*/
-/datum/pet_command/point_targetting/fetch
+/datum/pet_command/point_targeting/fetch
command_name = "Fetch"
command_desc = "Command your pet to retrieve something you throw or point at."
radial_icon = 'icons/mob/actions/actions_spells.dmi'
@@ -16,22 +16,22 @@
/// If true, this is a poorly trained pet who will eat food you throw instead of bringing it back
var/will_eat_targets = TRUE
-/datum/pet_command/point_targetting/fetch/New(mob/living/parent)
+/datum/pet_command/point_targeting/fetch/New(mob/living/parent)
. = ..()
if(isnull(parent))
return
parent.AddElement(/datum/element/ai_held_item) // We don't remove this on destroy because they might still be holding something
-/datum/pet_command/point_targetting/fetch/add_new_friend(mob/living/tamer)
+/datum/pet_command/point_targeting/fetch/add_new_friend(mob/living/tamer)
. = ..()
RegisterSignal(tamer, COMSIG_MOB_THROW, PROC_REF(listened_throw))
-/datum/pet_command/point_targetting/fetch/remove_friend(mob/living/unfriended)
+/datum/pet_command/point_targeting/fetch/remove_friend(mob/living/unfriended)
. = ..()
UnregisterSignal(unfriended, COMSIG_MOB_THROW)
/// A friend has thrown something, if we're listening or at least not busy then go get it
-/datum/pet_command/point_targetting/fetch/proc/listened_throw(mob/living/carbon/thrower)
+/datum/pet_command/point_targeting/fetch/proc/listened_throw(mob/living/carbon/thrower)
SIGNAL_HANDLER
var/mob/living/parent = weak_parent.resolve()
@@ -57,7 +57,7 @@
RegisterSignal(thrown_thing, COMSIG_MOVABLE_THROW_LANDED, PROC_REF(listen_throw_land))
/// A throw we were listening to has finished, see if it's in range for us to try grabbing it
-/datum/pet_command/point_targetting/fetch/proc/listen_throw_land(obj/item/thrown_thing, datum/thrownthing/throwing_datum)
+/datum/pet_command/point_targeting/fetch/proc/listen_throw_land(obj/item/thrown_thing, datum/thrownthing/throwing_datum)
SIGNAL_HANDLER
UnregisterSignal(thrown_thing, COMSIG_MOVABLE_THROW_LANDED)
@@ -74,7 +74,7 @@
parent.ai_controller.set_blackboard_key(BB_FETCH_DELIVER_TO, throwing_datum.thrower)
// Don't try and fetch turfs or anchored objects if someone points at them
-/datum/pet_command/point_targetting/fetch/look_for_target(mob/living/pointing_friend, obj/item/pointed_atom)
+/datum/pet_command/point_targeting/fetch/look_for_target(mob/living/pointing_friend, obj/item/pointed_atom)
if (!istype(pointed_atom))
return FALSE
if (pointed_atom.anchored)
@@ -87,7 +87,7 @@
parent.ai_controller.set_blackboard_key(BB_FETCH_DELIVER_TO, pointing_friend)
// Finally, plan our actions
-/datum/pet_command/point_targetting/fetch/execute_action(datum/ai_controller/controller)
+/datum/pet_command/point_targeting/fetch/execute_action(datum/ai_controller/controller)
controller.queue_behavior(/datum/ai_behavior/forget_failed_fetches)
var/atom/target = controller.blackboard[BB_CURRENT_PET_TARGET]
diff --git a/code/datums/components/pet_commands/pet_command.dm b/code/datums/components/pet_commands/pet_command.dm
index 7899ffce40a..7762b9b2aa8 100644
--- a/code/datums/components/pet_commands/pet_command.dm
+++ b/code/datums/components/pet_commands/pet_command.dm
@@ -109,25 +109,25 @@
CRASH("Pet command execute action not implemented.")
/**
- * # Point Targetting Pet Command
+ * # Point Targeting Pet Command
* As above but also listens for you pointing at something and marks it as a target
*/
-/datum/pet_command/point_targetting
+/datum/pet_command/point_targeting
/// Text describing an action we perform upon receiving a new target
var/pointed_reaction
- /// Blackboard key for targetting datum, this is likely going to need it
- var/targetting_datum_key = BB_PET_TARGETTING_DATUM
+ /// Blackboard key for targeting strategy, this is likely going to need it
+ var/targeting_strategy_key = BB_PET_TARGETING_STRATEGY
-/datum/pet_command/point_targetting/add_new_friend(mob/living/tamer)
+/datum/pet_command/point_targeting/add_new_friend(mob/living/tamer)
. = ..()
RegisterSignal(tamer, COMSIG_MOB_POINTED, PROC_REF(look_for_target))
-/datum/pet_command/point_targetting/remove_friend(mob/living/unfriended)
+/datum/pet_command/point_targeting/remove_friend(mob/living/unfriended)
. = ..()
UnregisterSignal(unfriended, COMSIG_MOB_POINTED)
/// Target the pointed atom for actions
-/datum/pet_command/point_targetting/proc/look_for_target(mob/living/friend, atom/pointed_atom)
+/datum/pet_command/point_targeting/proc/look_for_target(mob/living/friend, atom/pointed_atom)
SIGNAL_HANDLER
var/mob/living/parent = weak_parent.resolve()
diff --git a/code/datums/components/pet_commands/pet_commands_basic.dm b/code/datums/components/pet_commands/pet_commands_basic.dm
index 263f9b17f5b..a9a58a43def 100644
--- a/code/datums/components/pet_commands/pet_commands_basic.dm
+++ b/code/datums/components/pet_commands/pet_commands_basic.dm
@@ -118,7 +118,7 @@
* # Pet Command: Attack
* Tells a pet to chase and bite the next thing you point at
*/
-/datum/pet_command/point_targetting/attack
+/datum/pet_command/point_targeting/attack
command_name = "Attack"
command_desc = "Command your pet to attack things that you point out to it."
radial_icon = 'icons/effects/effects.dmi'
@@ -133,13 +133,13 @@
var/attack_behaviour = /datum/ai_behavior/basic_melee_attack
// Refuse to target things we can't target, chiefly other friends
-/datum/pet_command/point_targetting/attack/set_command_target(mob/living/parent, atom/target)
+/datum/pet_command/point_targeting/attack/set_command_target(mob/living/parent, atom/target)
if (!target)
return
var/mob/living/living_parent = parent
if (!living_parent.ai_controller)
return
- var/datum/targetting_datum/targeter = living_parent.ai_controller.blackboard[targetting_datum_key]
+ var/datum/targeting_strategy/targeter = GET_TARGETING_STRATEGY(living_parent.ai_controller.blackboard[targeting_strategy_key])
if (!targeter)
return
if (!targeter.can_attack(living_parent, target))
@@ -147,21 +147,21 @@
return
return ..()
-/// Display feedback about not targetting something
-/datum/pet_command/point_targetting/attack/proc/refuse_target(mob/living/parent, atom/target)
+/// Display feedback about not targeting something
+/datum/pet_command/point_targeting/attack/proc/refuse_target(mob/living/parent, atom/target)
var/mob/living/living_parent = parent
living_parent.balloon_alert_to_viewers("[refuse_reaction]")
living_parent.visible_message(span_notice("[living_parent] refuses to attack [target]."))
-/datum/pet_command/point_targetting/attack/execute_action(datum/ai_controller/controller)
- controller.queue_behavior(attack_behaviour, BB_CURRENT_PET_TARGET, targetting_datum_key)
+/datum/pet_command/point_targeting/attack/execute_action(datum/ai_controller/controller)
+ controller.queue_behavior(attack_behaviour, BB_CURRENT_PET_TARGET, targeting_strategy_key)
return SUBTREE_RETURN_FINISH_PLANNING
/**
* # Pet Command: Targetted Ability
* Tells a pet to use some kind of ability on the next thing you point at
*/
-/datum/pet_command/point_targetting/use_ability
+/datum/pet_command/point_targeting/use_ability
command_name = "Use ability"
command_desc = "Command your pet to use one of its special skills on something that you point out to it."
radial_icon = 'icons/mob/actions/actions_spells.dmi'
@@ -172,7 +172,7 @@
/// Blackboard key where a reference to some kind of mob ability is stored
var/pet_ability_key
-/datum/pet_command/point_targetting/use_ability/execute_action(datum/ai_controller/controller)
+/datum/pet_command/point_targeting/use_ability/execute_action(datum/ai_controller/controller)
if (!pet_ability_key)
return
var/datum/action/cooldown/using_action = controller.blackboard[pet_ability_key]
@@ -207,7 +207,7 @@
if(victim.stat > controller.blackboard[BB_TARGET_MINIMUM_STAT])
controller.clear_blackboard_key(BB_ACTIVE_PET_COMMAND)
return
- controller.queue_behavior(protect_behavior, BB_CURRENT_PET_TARGET, BB_PET_TARGETTING_DATUM)
+ controller.queue_behavior(protect_behavior, BB_CURRENT_PET_TARGET, BB_PET_TARGETING_STRATEGY)
return SUBTREE_RETURN_FINISH_PLANNING
/datum/pet_command/protect_owner/set_command_active(mob/living/parent, mob/living/victim)
diff --git a/code/datums/components/revenge_ability.dm b/code/datums/components/revenge_ability.dm
index f03bc992276..8d9faec52e0 100644
--- a/code/datums/components/revenge_ability.dm
+++ b/code/datums/components/revenge_ability.dm
@@ -8,7 +8,7 @@
/// The ability to use when we are attacked
var/datum/action/cooldown/ability
/// Optional datum for validating targets
- var/datum/targetting_datum/targetting
+ var/datum/targeting_strategy/targeting
/// Trigger only if target is at least this far away
var/min_range
/// Trigger only if target is at least this close
@@ -16,12 +16,12 @@
/// Target the ability at ourself instead of at the offender
var/target_self
-/datum/component/revenge_ability/Initialize(datum/action/cooldown/ability, datum/targetting_datum/targetting, min_range = 0, max_range = INFINITY, target_self = FALSE)
+/datum/component/revenge_ability/Initialize(datum/action/cooldown/ability, datum/targeting_strategy/targeting, min_range = 0, max_range = INFINITY, target_self = FALSE)
. = ..()
if (!isliving(parent))
return COMPONENT_INCOMPATIBLE
src.ability = ability
- src.targetting = targetting
+ src.targeting = targeting
src.min_range = min_range
src.max_range = max_range
src.target_self = target_self
@@ -45,7 +45,7 @@
var/distance = get_dist(ability_user, attacker)
if (distance < min_range || distance > max_range)
return
- if (targetting && !targetting.can_attack(victim, attacker))
+ if (targeting && !targeting.can_attack(victim, attacker))
return
INVOKE_ASYNC(ability, TYPE_PROC_REF(/datum/action/cooldown, InterceptClickOn), ability_user, null, (target_self) ? ability_user : attacker)
diff --git a/code/datums/elements/door_pryer.dm b/code/datums/elements/door_pryer.dm
index a17687407e3..b7f213b3856 100644
--- a/code/datums/elements/door_pryer.dm
+++ b/code/datums/elements/door_pryer.dm
@@ -22,7 +22,7 @@
. = ..()
UnregisterSignal(source, COMSIG_LIVING_UNARMED_ATTACK)
-/// If we're targetting an airlock, open it
+/// If we're targeting an airlock, open it
/datum/element/door_pryer/proc/on_attack(mob/living/basic/attacker, atom/target, proximity_flag)
SIGNAL_HANDLER
if(!proximity_flag || !istype(target, /obj/machinery/door/airlock))
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 9249a4a12da..1e874fed1a6 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -1221,7 +1221,7 @@
return src
/**
- * tryEmbed() is for when you want to try embedding something without dealing with the damage + hit messages of calling hitby() on the item while targetting the target.
+ * tryEmbed() is for when you want to try embedding something without dealing with the damage + hit messages of calling hitby() on the item while targeting the target.
*
* Really, this is used mostly with projectiles with shrapnel payloads, from [/datum/element/embed/proc/checkEmbedProjectile], and called on said shrapnel. Mostly acts as an intermediate between different embed elements.
*
diff --git a/code/game/objects/items/melee/baton.dm b/code/game/objects/items/melee/baton.dm
index 8a8635d879a..9dd35dfb25f 100644
--- a/code/game/objects/items/melee/baton.dm
+++ b/code/game/objects/items/melee/baton.dm
@@ -42,22 +42,22 @@
/// Boolean on whether people with chunky fingers can use this baton.
var/chunky_finger_usable = FALSE
- /// The context to show when the baton is active and targetting a living thing
+ /// The context to show when the baton is active and targeting a living thing
var/context_living_target_active = "Stun"
- /// The context to show when the baton is active and targetting a living thing in combat mode
+ /// The context to show when the baton is active and targeting a living thing in combat mode
var/context_living_target_active_combat_mode = "Stun"
- /// The context to show when the baton is inactive and targetting a living thing
+ /// The context to show when the baton is inactive and targeting a living thing
var/context_living_target_inactive = "Prod"
- /// The context to show when the baton is inactive and targetting a living thing in combat mode
+ /// The context to show when the baton is inactive and targeting a living thing in combat mode
var/context_living_target_inactive_combat_mode = "Attack"
- /// The RMB context to show when the baton is active and targetting a living thing
+ /// The RMB context to show when the baton is active and targeting a living thing
var/context_living_rmb_active = "Attack"
- /// The RMB context to show when the baton is inactive and targetting a living thing
+ /// The RMB context to show when the baton is inactive and targeting a living thing
var/context_living_rmb_inactive = "Attack"
/obj/item/melee/baton/Initialize(mapload)
diff --git a/code/modules/antagonists/heretic/knowledge/cosmic_lore.dm b/code/modules/antagonists/heretic/knowledge/cosmic_lore.dm
index 566bd183142..508d142fa27 100644
--- a/code/modules/antagonists/heretic/knowledge/cosmic_lore.dm
+++ b/code/modules/antagonists/heretic/knowledge/cosmic_lore.dm
@@ -248,7 +248,7 @@
/datum/pet_command/idle,
/datum/pet_command/free,
/datum/pet_command/follow,
- /datum/pet_command/point_targetting/attack/star_gazer
+ /datum/pet_command/point_targeting/attack/star_gazer
)
/datum/heretic_knowledge/ultimate/cosmic_final/is_valid_sacrifice(mob/living/carbon/human/sacrifice)
diff --git a/code/modules/antagonists/traitor/objectives/destroy_heirloom.dm b/code/modules/antagonists/traitor/objectives/destroy_heirloom.dm
index c3dd93f01e2..0d62ecece5f 100644
--- a/code/modules/antagonists/traitor/objectives/destroy_heirloom.dm
+++ b/code/modules/antagonists/traitor/objectives/destroy_heirloom.dm
@@ -17,7 +17,7 @@
abstract_type = /datum/traitor_objective/destroy_heirloom
- /// The jobs that this objective is targetting.
+ /// The jobs that this objective is targeting.
var/list/target_jobs
/// the item we need to destroy
var/obj/item/target_item
diff --git a/code/modules/antagonists/traitor/objectives/kidnapping.dm b/code/modules/antagonists/traitor/objectives/kidnapping.dm
index 4a463b2b616..d74b586efae 100644
--- a/code/modules/antagonists/traitor/objectives/kidnapping.dm
+++ b/code/modules/antagonists/traitor/objectives/kidnapping.dm
@@ -5,7 +5,7 @@
abstract_type = /datum/traitor_objective/target_player/kidnapping
- /// The jobs that this objective is targetting.
+ /// The jobs that this objective is targeting.
var/list/target_jobs
/// Area that the target needs to be delivered to
var/area/dropoff_area
diff --git a/code/modules/antagonists/traitor/objectives/kill_pet.dm b/code/modules/antagonists/traitor/objectives/kill_pet.dm
index ae28f5dbf4c..8ea89cb44d0 100644
--- a/code/modules/antagonists/traitor/objectives/kill_pet.dm
+++ b/code/modules/antagonists/traitor/objectives/kill_pet.dm
@@ -31,7 +31,7 @@
/mob/living/basic/sloth/paperwork,
)
)
- /// The head that we are targetting
+ /// The head that we are targeting
var/datum/job/target
/// Whether or not we only take from the traitor's own department head or not.
var/limited_to_department_head = TRUE
diff --git a/code/modules/mob/living/basic/blob_minions/blob_ai.dm b/code/modules/mob/living/basic/blob_minions/blob_ai.dm
index fc21d030d07..5aad05d4656 100644
--- a/code/modules/mob/living/basic/blob_minions/blob_ai.dm
+++ b/code/modules/mob/living/basic/blob_minions/blob_ai.dm
@@ -4,7 +4,7 @@
*/
/datum/ai_controller/basic_controller/blobbernaut
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_TARGET_MINIMUM_STAT = HARD_CRIT,
)
@@ -21,7 +21,7 @@
*/
/datum/ai_controller/basic_controller/blob_zombie
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_TARGET_MINIMUM_STAT = HARD_CRIT,
)
@@ -39,7 +39,7 @@
*/
/datum/ai_controller/basic_controller/blob_spore
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_TARGET_MINIMUM_STAT = HARD_CRIT,
)
diff --git a/code/modules/mob/living/basic/clown/clown_ai.dm b/code/modules/mob/living/basic/clown/clown_ai.dm
index f54c432140e..b3f5a9f9aef 100644
--- a/code/modules/mob/living/basic/clown/clown_ai.dm
+++ b/code/modules/mob/living/basic/clown/clown_ai.dm
@@ -1,6 +1,6 @@
/datum/ai_controller/basic_controller/clown
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_BASIC_MOB_SPEAK_LINES = null,
)
@@ -14,7 +14,7 @@
/datum/ai_controller/basic_controller/clown/murder
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_BASIC_MOB_SPEAK_LINES = null,
BB_TARGET_MINIMUM_STAT = HARD_CRIT,
)
diff --git a/code/modules/mob/living/basic/cult/constructs/_construct.dm b/code/modules/mob/living/basic/cult/constructs/_construct.dm
index 534cb3a7eac..6181eb3d0f4 100644
--- a/code/modules/mob/living/basic/cult/constructs/_construct.dm
+++ b/code/modules/mob/living/basic/cult/constructs/_construct.dm
@@ -68,7 +68,7 @@
heal_time = 0,\
valid_targets_typecache = typecacheof(list(/mob/living/basic/construct, /mob/living/basic/shade)),\
valid_biotypes = MOB_MINERAL | MOB_SPIRIT,\
- self_targetting = can_repair_self ? HEALING_TOUCH_ANYONE : HEALING_TOUCH_NOT_SELF,\
+ self_targeting = can_repair_self ? HEALING_TOUCH_ANYONE : HEALING_TOUCH_NOT_SELF,\
action_text = "%SOURCE% begins repairing %TARGET%'s dents.",\
complete_text = "%TARGET%'s dents are repaired.",\
show_health = TRUE,\
diff --git a/code/modules/mob/living/basic/cult/constructs/construct_ai.dm b/code/modules/mob/living/basic/cult/constructs/construct_ai.dm
index 6f79b327915..b8417affed9 100644
--- a/code/modules/mob/living/basic/cult/constructs/construct_ai.dm
+++ b/code/modules/mob/living/basic/cult/constructs/construct_ai.dm
@@ -6,8 +6,8 @@
*/
/datum/ai_controller/basic_controller/artificer
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic/same_faction/construct,
- BB_FLEE_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic/same_faction/construct,
+ BB_FLEE_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_TARGET_WOUNDED_ONLY = TRUE,
)
@@ -27,7 +27,7 @@
*/
/datum/ai_controller/basic_controller/juggernaut
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_TARGET_MINIMUM_STAT = HARD_CRIT,
)
@@ -46,9 +46,9 @@
*/
/datum/ai_controller/basic_controller/proteon
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_TARGET_MINIMUM_STAT = HARD_CRIT,
- BB_FLEE_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_FLEE_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_movement = /datum/ai_movement/basic_avoidance
@@ -68,7 +68,7 @@
*/
/datum/ai_controller/basic_controller/wraith
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_TARGET_MINIMUM_STAT = HARD_CRIT,
)
@@ -80,11 +80,11 @@
/datum/ai_planning_subtree/basic_melee_attack_subtree,
)
-/// Targetting datum that will only allow mobs that constructs can heal.
-/datum/targetting_datum/basic/same_faction/construct
+/// Targeting strategy that will only allow mobs that constructs can heal.
+/datum/targeting_strategy/basic/same_faction/construct
target_wounded_key = BB_TARGET_WOUNDED_ONLY
-/datum/targetting_datum/basic/same_faction/construct/can_attack(mob/living/living_mob, atom/the_target, vision_range, check_faction = TRUE)
+/datum/targeting_strategy/basic/same_faction/construct/can_attack(mob/living/living_mob, atom/the_target, vision_range, check_faction = TRUE)
if(isconstruct(the_target) || istype(the_target, /mob/living/basic/shade))
return ..()
return FALSE
diff --git a/code/modules/mob/living/basic/farm_animals/bee/_bee.dm b/code/modules/mob/living/basic/farm_animals/bee/_bee.dm
index 692a7f108d1..dfaff9f4efc 100644
--- a/code/modules/mob/living/basic/farm_animals/bee/_bee.dm
+++ b/code/modules/mob/living/basic/farm_animals/bee/_bee.dm
@@ -61,7 +61,7 @@
/datum/pet_command/beehive/enter,
/datum/pet_command/beehive/exit,
/datum/pet_command/follow/bee,
- /datum/pet_command/point_targetting/attack/swirl,
+ /datum/pet_command/point_targeting/attack/swirl,
/datum/pet_command/scatter,
)
diff --git a/code/modules/mob/living/basic/farm_animals/bee/bee_ai_behavior.dm b/code/modules/mob/living/basic/farm_animals/bee/bee_ai_behavior.dm
index 67e98a5f3d3..0c48a945381 100644
--- a/code/modules/mob/living/basic/farm_animals/bee/bee_ai_behavior.dm
+++ b/code/modules/mob/living/basic/farm_animals/bee/bee_ai_behavior.dm
@@ -83,9 +83,9 @@
if(valid_hives.len)
return pick(valid_hives)
-/datum/targetting_datum/basic/bee
+/datum/targeting_strategy/basic/bee
-/datum/targetting_datum/basic/bee/can_attack(mob/living/owner, atom/target, vision_range)
+/datum/targeting_strategy/basic/bee/can_attack(mob/living/owner, atom/target, vision_range)
if(!isliving(target))
return FALSE
. = ..()
@@ -117,7 +117,7 @@
required_distance = 0
///swirl around the owner in menacing fashion
-/datum/pet_command/point_targetting/attack/swirl
+/datum/pet_command/point_targeting/attack/swirl
command_name = "Swirl"
command_desc = "Your pets will swirl around you and attack whoever you point at!"
speech_commands = list("swirl", "spiral", "swarm")
@@ -127,7 +127,7 @@
///the owner we will swarm around
var/key_to_swarm = BB_SWARM_TARGET
-/datum/pet_command/point_targetting/attack/swirl/try_activate_command(mob/living/commander)
+/datum/pet_command/point_targeting/attack/swirl/try_activate_command(mob/living/commander)
var/mob/living/living_pawn = weak_parent.resolve()
if(isnull(living_pawn))
return
@@ -138,7 +138,7 @@
controller.set_blackboard_key(key_to_swarm, commander)
return ..()
-/datum/pet_command/point_targetting/attack/swirl/execute_action(datum/ai_controller/controller)
+/datum/pet_command/point_targeting/attack/swirl/execute_action(datum/ai_controller/controller)
if(controller.blackboard_key_exists(BB_CURRENT_PET_TARGET))
return ..()
controller.queue_behavior(/datum/ai_behavior/swirl_around_target, BB_SWARM_TARGET)
diff --git a/code/modules/mob/living/basic/farm_animals/bee/bee_ai_subtree.dm b/code/modules/mob/living/basic/farm_animals/bee/bee_ai_subtree.dm
index 6379f239ba0..3d56dd990dc 100644
--- a/code/modules/mob/living/basic/farm_animals/bee/bee_ai_subtree.dm
+++ b/code/modules/mob/living/basic/farm_animals/bee/bee_ai_subtree.dm
@@ -1,7 +1,7 @@
/datum/ai_controller/basic_controller/bee
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic/bee,
- BB_PET_TARGETTING_DATUM = new /datum/targetting_datum/basic/not_friends,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic/bee,
+ BB_PET_TARGETING_STRATEGY = /datum/targeting_strategy/basic/not_friends,
)
ai_traits = STOP_MOVING_WHEN_PULLED
@@ -25,7 +25,7 @@
/datum/ai_controller/basic_controller/queen_bee
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic/bee,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic/bee,
)
ai_traits = STOP_MOVING_WHEN_PULLED
diff --git a/code/modules/mob/living/basic/farm_animals/chicken/chick.dm b/code/modules/mob/living/basic/farm_animals/chicken/chick.dm
index 311b311e8fd..9e4af384aee 100644
--- a/code/modules/mob/living/basic/farm_animals/chicken/chick.dm
+++ b/code/modules/mob/living/basic/farm_animals/chicken/chick.dm
@@ -66,7 +66,7 @@
/datum/ai_controller/basic_controller/chick
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_FIND_MOM_TYPES = list(/mob/living/basic/chicken),
)
diff --git a/code/modules/mob/living/basic/farm_animals/chicken/chicken.dm b/code/modules/mob/living/basic/farm_animals/chicken/chicken.dm
index 99ff6b52748..9508f8fae3b 100644
--- a/code/modules/mob/living/basic/farm_animals/chicken/chicken.dm
+++ b/code/modules/mob/living/basic/farm_animals/chicken/chicken.dm
@@ -78,7 +78,7 @@ GLOBAL_VAR_INIT(chicken_count, 0)
/datum/ai_controller/basic_controller/chicken
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_traits = STOP_MOVING_WHEN_PULLED
diff --git a/code/modules/mob/living/basic/farm_animals/cow/cow_ai.dm b/code/modules/mob/living/basic/farm_animals/cow/cow_ai.dm
index 81e1d722b01..e1e611a28c2 100644
--- a/code/modules/mob/living/basic/farm_animals/cow/cow_ai.dm
+++ b/code/modules/mob/living/basic/farm_animals/cow/cow_ai.dm
@@ -1,6 +1,6 @@
/datum/ai_controller/basic_controller/cow
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic/allow_items(),
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic/allow_items,
BB_BASIC_MOB_TIP_REACTING = FALSE,
BB_BASIC_MOB_TIPPER = null,
)
diff --git a/code/modules/mob/living/basic/farm_animals/cow/cow_moonicorn.dm b/code/modules/mob/living/basic/farm_animals/cow/cow_moonicorn.dm
index 6eaef1bf5c3..f499859e19e 100644
--- a/code/modules/mob/living/basic/farm_animals/cow/cow_moonicorn.dm
+++ b/code/modules/mob/living/basic/farm_animals/cow/cow_moonicorn.dm
@@ -44,7 +44,7 @@
/datum/ai_controller/basic_controller/cow/moonicorn
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic/allow_items/moonicorn(),
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic/allow_items/moonicorn,
BB_BASIC_MOB_TIP_REACTING = FALSE,
BB_BASIC_MOB_TIPPER = null,
)
@@ -60,14 +60,14 @@
)
///moonicorns will not attack people holding something that could tame them.
-/datum/targetting_datum/basic/allow_items/moonicorn
+/datum/targeting_strategy/basic/allow_items/moonicorn
-/datum/targetting_datum/basic/allow_items/moonicorn/can_attack(mob/living/living_mob, atom/the_target, vision_range)
+/datum/targeting_strategy/basic/allow_items/moonicorn/can_attack(mob/living/living_mob, atom/the_target, vision_range)
. = ..()
if(!.)
return FALSE
- if(isliving(the_target)) //Targetting vs living mobs
+ if(isliving(the_target)) //Targeting vs living mobs
var/mob/living/living_target = the_target
for(var/obj/item/food/grown/galaxythistle/tame_food in living_target.held_items)
return FALSE //heyyy this can tame me! let's NOT fight
diff --git a/code/modules/mob/living/basic/farm_animals/cow/cow_wisdom.dm b/code/modules/mob/living/basic/farm_animals/cow/cow_wisdom.dm
index b62f57abf54..4e80fd4bcfe 100644
--- a/code/modules/mob/living/basic/farm_animals/cow/cow_wisdom.dm
+++ b/code/modules/mob/living/basic/farm_animals/cow/cow_wisdom.dm
@@ -22,7 +22,7 @@
return //cannot tame me! and I don't care about eatin' nothing, neither!
/datum/ai_controller/basic_controller/cow/wisdom
- //don't give a targetting datum
+ //don't give a targeting strategy
blackboard = list(
BB_BASIC_MOB_TIP_REACTING = FALSE,
BB_BASIC_MOB_TIPPER = null,
diff --git a/code/modules/mob/living/basic/farm_animals/deer.dm b/code/modules/mob/living/basic/farm_animals/deer.dm
index 7907e668443..7f2fbb68fe1 100644
--- a/code/modules/mob/living/basic/farm_animals/deer.dm
+++ b/code/modules/mob/living/basic/farm_animals/deer.dm
@@ -35,7 +35,7 @@
/datum/ai_controller/basic_controller/deer
blackboard = list(
BB_STATIONARY_MOVE_TO_TARGET = TRUE,
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_traits = STOP_MOVING_WHEN_PULLED
ai_movement = /datum/ai_movement/basic_avoidance
diff --git a/code/modules/mob/living/basic/farm_animals/goat/goat_ai.dm b/code/modules/mob/living/basic/farm_animals/goat/goat_ai.dm
index f8463b19675..5928344fee4 100644
--- a/code/modules/mob/living/basic/farm_animals/goat/goat_ai.dm
+++ b/code/modules/mob/living/basic/farm_animals/goat/goat_ai.dm
@@ -1,7 +1,7 @@
/// Goats are normally content to sorta hang around and crunch any plant in sight, but they will go ape on someone who attacks them.
/datum/ai_controller/basic_controller/goat
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_traits = STOP_MOVING_WHEN_PULLED
diff --git a/code/modules/mob/living/basic/farm_animals/gorilla/gorilla_ai.dm b/code/modules/mob/living/basic/farm_animals/gorilla/gorilla_ai.dm
index daf5b7af083..28a727fdb1b 100644
--- a/code/modules/mob/living/basic/farm_animals/gorilla/gorilla_ai.dm
+++ b/code/modules/mob/living/basic/farm_animals/gorilla/gorilla_ai.dm
@@ -1,7 +1,7 @@
/// Pretty basic, just click people to death. Also hunt and eat bananas.
/datum/ai_controller/basic_controller/gorilla
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic/allow_items,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic/allow_items,
BB_TARGET_MINIMUM_STAT = UNCONSCIOUS,
BB_EMOTE_KEY = "ooga",
BB_EMOTE_CHANCE = 40,
@@ -27,7 +27,7 @@
/datum/ai_controller/basic_controller/gorilla/lesser
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic/allow_items,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic/allow_items,
BB_EMOTE_KEY = "ooga",
BB_EMOTE_CHANCE = 60,
)
diff --git a/code/modules/mob/living/basic/farm_animals/pig.dm b/code/modules/mob/living/basic/farm_animals/pig.dm
index c0ad3f6b349..94183d044c5 100644
--- a/code/modules/mob/living/basic/farm_animals/pig.dm
+++ b/code/modules/mob/living/basic/farm_animals/pig.dm
@@ -47,7 +47,7 @@
/datum/ai_controller/basic_controller/pig
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_traits = STOP_MOVING_WHEN_PULLED
diff --git a/code/modules/mob/living/basic/farm_animals/pony.dm b/code/modules/mob/living/basic/farm_animals/pony.dm
index e1765f0fdba..df8f3a1fd4e 100644
--- a/code/modules/mob/living/basic/farm_animals/pony.dm
+++ b/code/modules/mob/living/basic/farm_animals/pony.dm
@@ -106,7 +106,7 @@
/datum/ai_controller/basic_controller/pony
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_traits = STOP_MOVING_WHEN_PULLED
diff --git a/code/modules/mob/living/basic/farm_animals/rabbit.dm b/code/modules/mob/living/basic/farm_animals/rabbit.dm
index 19fd0120ba7..f77772ab17c 100644
--- a/code/modules/mob/living/basic/farm_animals/rabbit.dm
+++ b/code/modules/mob/living/basic/farm_animals/rabbit.dm
@@ -49,7 +49,7 @@
/datum/ai_controller/basic_controller/rabbit
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_traits = STOP_MOVING_WHEN_PULLED
ai_movement = /datum/ai_movement/basic_avoidance
diff --git a/code/modules/mob/living/basic/farm_animals/sheep.dm b/code/modules/mob/living/basic/farm_animals/sheep.dm
index ac320d80804..e32da910ab9 100644
--- a/code/modules/mob/living/basic/farm_animals/sheep.dm
+++ b/code/modules/mob/living/basic/farm_animals/sheep.dm
@@ -81,7 +81,7 @@
/datum/ai_controller/basic_controller/sheep
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_traits = STOP_MOVING_WHEN_PULLED
ai_movement = /datum/ai_movement/basic_avoidance
diff --git a/code/modules/mob/living/basic/festivus_pole.dm b/code/modules/mob/living/basic/festivus_pole.dm
index f6dd1a41a2b..aec6de74e1e 100644
--- a/code/modules/mob/living/basic/festivus_pole.dm
+++ b/code/modules/mob/living/basic/festivus_pole.dm
@@ -51,7 +51,7 @@
/datum/ai_controller/basic_controller/festivus_pole
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic(),
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_LOW_PRIORITY_HUNTING_TARGET = null, // APCs
)
diff --git a/code/modules/mob/living/basic/heretic/flesh_stalker.dm b/code/modules/mob/living/basic/heretic/flesh_stalker.dm
index f6a051334d2..c8a3342141f 100644
--- a/code/modules/mob/living/basic/heretic/flesh_stalker.dm
+++ b/code/modules/mob/living/basic/heretic/flesh_stalker.dm
@@ -27,7 +27,7 @@
/datum/ai_controller/basic_controller/stalker
ai_traits = CAN_ACT_IN_STASIS
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_movement = /datum/ai_movement/basic_avoidance
diff --git a/code/modules/mob/living/basic/heretic/raw_prophet.dm b/code/modules/mob/living/basic/heretic/raw_prophet.dm
index f3bb1efa7e9..1f5b8601abd 100644
--- a/code/modules/mob/living/basic/heretic/raw_prophet.dm
+++ b/code/modules/mob/living/basic/heretic/raw_prophet.dm
@@ -85,7 +85,7 @@
/// Walk and attack people, blind them when we can
/datum/ai_controller/basic_controller/raw_prophet
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_movement = /datum/ai_movement/basic_avoidance
diff --git a/code/modules/mob/living/basic/heretic/rust_walker.dm b/code/modules/mob/living/basic/heretic/rust_walker.dm
index 9dff3c01e31..f3239824d01 100644
--- a/code/modules/mob/living/basic/heretic/rust_walker.dm
+++ b/code/modules/mob/living/basic/heretic/rust_walker.dm
@@ -50,7 +50,7 @@
/// Converts unconverted terrain, sprays pocket sand around
/datum/ai_controller/basic_controller/rust_walker
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_movement = /datum/ai_movement/basic_avoidance
diff --git a/code/modules/mob/living/basic/heretic/star_gazer.dm b/code/modules/mob/living/basic/heretic/star_gazer.dm
index a8af89a7f71..f7ab925440d 100644
--- a/code/modules/mob/living/basic/heretic/star_gazer.dm
+++ b/code/modules/mob/living/basic/heretic/star_gazer.dm
@@ -66,7 +66,7 @@
target.apply_status_effect(/datum/status_effect/star_mark)
target.apply_damage(damage = 5, damagetype = CLONE)
- var/datum/targetting_datum/target_confirmer = ai_controller.blackboard[BB_TARGETTING_DATUM]
+ var/datum/targeting_strategy/target_confirmer = GET_TARGETING_STRATEGY(ai_controller.blackboard[BB_TARGETING_STRATEGY])
for(var/mob/living/nearby_mob in range(1, src))
if(target == nearby_mob || !target_confirmer?.can_attack(src, nearby_mob))
continue
@@ -78,9 +78,9 @@
/datum/ai_controller/basic_controller/star_gazer
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_TARGET_MINIMUM_STAT = HARD_CRIT,
- BB_PET_TARGETTING_DATUM = new /datum/targetting_datum/basic/not_friends/attack_closed_turfs,
+ BB_PET_TARGETING_STRATEGY = /datum/targeting_strategy/basic/not_friends/attack_closed_turfs,
)
ai_movement = /datum/ai_movement/basic_avoidance
@@ -104,7 +104,7 @@
can_attack_turfs = TRUE
can_attack_dense_objects = TRUE
-/datum/pet_command/point_targetting/attack/star_gazer
+/datum/pet_command/point_targeting/attack/star_gazer
speech_commands = list("attack", "sic", "kill", "slash them")
command_feedback = "stares!"
pointed_reaction = "stares intensely!"
diff --git a/code/modules/mob/living/basic/icemoon/ice_demon/ice_demon_ai.dm b/code/modules/mob/living/basic/icemoon/ice_demon/ice_demon_ai.dm
index 3f197860618..20bcd8a69a1 100644
--- a/code/modules/mob/living/basic/icemoon/ice_demon/ice_demon_ai.dm
+++ b/code/modules/mob/living/basic/icemoon/ice_demon/ice_demon_ai.dm
@@ -1,6 +1,6 @@
/datum/ai_controller/basic_controller/ice_demon
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_LIST_SCARY_ITEMS = list(
/obj/item/weldingtool,
/obj/item/flashlight/flare,
diff --git a/code/modules/mob/living/basic/icemoon/ice_whelp/ice_whelp_ai.dm b/code/modules/mob/living/basic/icemoon/ice_whelp/ice_whelp_ai.dm
index 2d9715caf37..725dcc09b5e 100644
--- a/code/modules/mob/living/basic/icemoon/ice_whelp/ice_whelp_ai.dm
+++ b/code/modules/mob/living/basic/icemoon/ice_whelp/ice_whelp_ai.dm
@@ -1,7 +1,7 @@
#define ENRAGE_ADDITION 25
/datum/ai_controller/basic_controller/ice_whelp
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic/allow_items,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic/allow_items,
BB_TARGET_MINIMUM_STAT = HARD_CRIT,
BB_WHELP_ENRAGED = 0,
)
diff --git a/code/modules/mob/living/basic/jungle/leaper/leaper.dm b/code/modules/mob/living/basic/jungle/leaper/leaper.dm
index 6c866a6a955..88622d31474 100644
--- a/code/modules/mob/living/basic/jungle/leaper/leaper.dm
+++ b/code/modules/mob/living/basic/jungle/leaper/leaper.dm
@@ -44,9 +44,9 @@
/datum/pet_command/follow,
/datum/pet_command/untargetted_ability/blood_rain,
/datum/pet_command/untargetted_ability/summon_toad,
- /datum/pet_command/point_targetting/attack,
- /datum/pet_command/point_targetting/use_ability/flop,
- /datum/pet_command/point_targetting/use_ability/bubble,
+ /datum/pet_command/point_targeting/attack,
+ /datum/pet_command/point_targeting/use_ability/flop,
+ /datum/pet_command/point_targeting/use_ability/bubble,
)
/mob/living/basic/leaper/Initialize(mapload)
diff --git a/code/modules/mob/living/basic/jungle/leaper/leaper_ai.dm b/code/modules/mob/living/basic/jungle/leaper/leaper_ai.dm
index 63e32f069ed..526ce2adf58 100644
--- a/code/modules/mob/living/basic/jungle/leaper/leaper_ai.dm
+++ b/code/modules/mob/living/basic/jungle/leaper/leaper_ai.dm
@@ -1,7 +1,7 @@
/datum/ai_controller/basic_controller/leaper
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
- BB_PET_TARGETTING_DATUM = new /datum/targetting_datum/basic/not_friends,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
+ BB_PET_TARGETING_STRATEGY = /datum/targeting_strategy/basic/not_friends,
)
ai_movement = /datum/ai_movement/basic_avoidance
@@ -39,7 +39,7 @@
ability_key = BB_LEAPER_SUMMON
finish_planning = FALSE
-/datum/pet_command/point_targetting/use_ability/flop
+/datum/pet_command/point_targeting/use_ability/flop
command_name = "Flop"
command_desc = "Command your pet to belly flop your target!"
radial_icon = 'icons/mob/actions/actions_items.dmi'
@@ -47,7 +47,7 @@
speech_commands = list("flop", "crush")
pet_ability_key = BB_LEAPER_FLOP
-/datum/pet_command/point_targetting/use_ability/bubble
+/datum/pet_command/point_targeting/use_ability/bubble
command_name = "Poison Bubble"
command_desc = "Launch poisonous bubbles at your target!"
radial_icon = 'icons/obj/weapons/guns/projectiles.dmi'
diff --git a/code/modules/mob/living/basic/jungle/mega_arachnid/mega_arachnid_ai.dm b/code/modules/mob/living/basic/jungle/mega_arachnid/mega_arachnid_ai.dm
index 8964ebf837e..fa2a86787d8 100644
--- a/code/modules/mob/living/basic/jungle/mega_arachnid/mega_arachnid_ai.dm
+++ b/code/modules/mob/living/basic/jungle/mega_arachnid/mega_arachnid_ai.dm
@@ -1,6 +1,6 @@
/datum/ai_controller/basic_controller/mega_arachnid
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_BASIC_MOB_FLEE_DISTANCE = 5,
)
diff --git a/code/modules/mob/living/basic/jungle/seedling/seedling.dm b/code/modules/mob/living/basic/jungle/seedling/seedling.dm
index 46c67ffa0e4..5a958d3ca7c 100644
--- a/code/modules/mob/living/basic/jungle/seedling/seedling.dm
+++ b/code/modules/mob/living/basic/jungle/seedling/seedling.dm
@@ -212,9 +212,9 @@
/datum/pet_command/idle,
/datum/pet_command/free,
/datum/pet_command/follow,
- /datum/pet_command/point_targetting/attack,
- /datum/pet_command/point_targetting/use_ability/solarbeam,
- /datum/pet_command/point_targetting/use_ability/rapidseeds,
+ /datum/pet_command/point_targeting/attack,
+ /datum/pet_command/point_targeting/use_ability/solarbeam,
+ /datum/pet_command/point_targeting/use_ability/rapidseeds,
)
//abilities
diff --git a/code/modules/mob/living/basic/jungle/seedling/seedling_ai.dm b/code/modules/mob/living/basic/jungle/seedling/seedling_ai.dm
index e3f9fe083a6..2ed4811e46f 100644
--- a/code/modules/mob/living/basic/jungle/seedling/seedling_ai.dm
+++ b/code/modules/mob/living/basic/jungle/seedling/seedling_ai.dm
@@ -1,7 +1,7 @@
/datum/ai_controller/basic_controller/seedling
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
- BB_PET_TARGETTING_DATUM = new /datum/targetting_datum/basic/not_friends,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
+ BB_PET_TARGETING_STRATEGY = /datum/targeting_strategy/basic/not_friends,
BB_WEEDLEVEL_THRESHOLD = 3,
BB_WATERLEVEL_THRESHOLD = 90,
)
@@ -141,8 +141,8 @@
/datum/ai_controller/basic_controller/seedling/meanie
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
- BB_PET_TARGETTING_DATUM = new /datum/targetting_datum/basic/not_friends,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
+ BB_PET_TARGETING_STRATEGY = /datum/targeting_strategy/basic/not_friends,
)
planning_subtrees = list(
/datum/ai_planning_subtree/pet_planning,
@@ -161,7 +161,7 @@
finish_planning = FALSE
///pet commands
-/datum/pet_command/point_targetting/use_ability/solarbeam
+/datum/pet_command/point_targeting/use_ability/solarbeam
command_name = "Launch solarbeam"
command_desc = "Command your pet to launch a solarbeam at your target!"
radial_icon = 'icons/effects/beam.dmi'
@@ -169,7 +169,7 @@
speech_commands = list("beam", "solar")
pet_ability_key = BB_SOLARBEAM_ABILITY
-/datum/pet_command/point_targetting/use_ability/rapidseeds
+/datum/pet_command/point_targeting/use_ability/rapidseeds
command_name = "Rapid seeds"
command_desc = "Command your pet to launch a volley of seeds at your target!"
radial_icon = 'icons/obj/weapons/guns/projectiles.dmi'
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 f9c54d09ca2..95603ce9afd 100644
--- a/code/modules/mob/living/basic/jungle/venus_human_trap.dm
+++ b/code/modules/mob/living/basic/jungle/venus_human_trap.dm
@@ -255,7 +255,7 @@
/datum/ai_controller/basic_controller/human_trap
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_movement = /datum/ai_movement/basic_avoidance
diff --git a/code/modules/mob/living/basic/lavaland/basilisk/basilisk.dm b/code/modules/mob/living/basic/lavaland/basilisk/basilisk.dm
index d4fef239bf8..90b99a533f9 100644
--- a/code/modules/mob/living/basic/lavaland/basilisk/basilisk.dm
+++ b/code/modules/mob/living/basic/lavaland/basilisk/basilisk.dm
@@ -77,7 +77,7 @@
/datum/ai_controller/basic_controller/basilisk
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_AGGRO_RANGE = 5,
)
diff --git a/code/modules/mob/living/basic/lavaland/bileworm/bileworm_ai.dm b/code/modules/mob/living/basic/lavaland/bileworm/bileworm_ai.dm
index 0093e69220c..ea979febff3 100644
--- a/code/modules/mob/living/basic/lavaland/bileworm/bileworm_ai.dm
+++ b/code/modules/mob/living/basic/lavaland/bileworm/bileworm_ai.dm
@@ -1,6 +1,6 @@
/datum/ai_controller/basic_controller/bileworm
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic/bileworm(),
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic/bileworm,
)
planning_subtrees = list(
@@ -9,7 +9,7 @@
/datum/ai_planning_subtree/bileworm_execute,
)
-/datum/targetting_datum/basic/bileworm
+/datum/targeting_strategy/basic/bileworm
ignore_sight = TRUE
/datum/ai_planning_subtree/bileworm_attack
diff --git a/code/modules/mob/living/basic/lavaland/brimdemon/brimdemon_ai.dm b/code/modules/mob/living/basic/lavaland/brimdemon/brimdemon_ai.dm
index 18f614359c0..a8f049d6f11 100644
--- a/code/modules/mob/living/basic/lavaland/brimdemon/brimdemon_ai.dm
+++ b/code/modules/mob/living/basic/lavaland/brimdemon/brimdemon_ai.dm
@@ -3,7 +3,7 @@
*/
/datum/ai_controller/basic_controller/brimdemon
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_TARGET_MINIMUM_STAT = HARD_CRIT,
)
diff --git a/code/modules/mob/living/basic/lavaland/goldgrub/goldgrub.dm b/code/modules/mob/living/basic/lavaland/goldgrub/goldgrub.dm
index 7e014f20378..79bfc160804 100644
--- a/code/modules/mob/living/basic/lavaland/goldgrub/goldgrub.dm
+++ b/code/modules/mob/living/basic/lavaland/goldgrub/goldgrub.dm
@@ -36,7 +36,7 @@
/datum/pet_command/free,
/datum/pet_command/grub_spit,
/datum/pet_command/follow,
- /datum/pet_command/point_targetting/fetch,
+ /datum/pet_command/point_targeting/fetch,
)
/mob/living/basic/mining/goldgrub/Initialize(mapload)
diff --git a/code/modules/mob/living/basic/lavaland/goldgrub/goldgrub_ai.dm b/code/modules/mob/living/basic/lavaland/goldgrub/goldgrub_ai.dm
index 7e7a72ec412..53054052e58 100644
--- a/code/modules/mob/living/basic/lavaland/goldgrub/goldgrub_ai.dm
+++ b/code/modules/mob/living/basic/lavaland/goldgrub/goldgrub_ai.dm
@@ -1,7 +1,7 @@
/datum/ai_controller/basic_controller/goldgrub
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
- BB_PET_TARGETTING_DATUM = new /datum/targetting_datum/basic/not_friends,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
+ BB_PET_TARGETING_STRATEGY = /datum/targeting_strategy/basic/not_friends,
BB_ORE_IGNORE_TYPES = list(/obj/item/stack/ore/iron, /obj/item/stack/ore/glass),
BB_STORM_APPROACHING = FALSE,
)
@@ -20,7 +20,7 @@
/datum/ai_controller/basic_controller/babygrub
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_ORE_IGNORE_TYPES = list(/obj/item/stack/ore/glass),
BB_FIND_MOM_TYPES = list(/mob/living/basic/mining/goldgrub),
BB_IGNORE_MOM_TYPES = list(/mob/living/basic/mining/goldgrub/baby),
diff --git a/code/modules/mob/living/basic/lavaland/goliath/goliath.dm b/code/modules/mob/living/basic/lavaland/goliath/goliath.dm
index 20beac22176..f8064c32569 100644
--- a/code/modules/mob/living/basic/lavaland/goliath/goliath.dm
+++ b/code/modules/mob/living/basic/lavaland/goliath/goliath.dm
@@ -80,10 +80,10 @@
tentacles.Grant(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)
+ AddComponent(/datum/component/revenge_ability, melee_tentacles, targeting = GET_TARGETING_STRATEGY(ai_controller.blackboard[BB_TARGETING_STRATEGY]), max_range = 1, target_self = TRUE)
tentacle_line = new (src)
tentacle_line.Grant(src)
- AddComponent(/datum/component/revenge_ability, tentacle_line, targetting = ai_controller.blackboard[BB_TARGETTING_DATUM], min_range = 2, max_range = 9)
+ AddComponent(/datum/component/revenge_ability, tentacle_line, targeting = GET_TARGETING_STRATEGY(ai_controller.blackboard[BB_TARGETING_STRATEGY]), min_range = 2, max_range = 9)
tentacles_ready()
RegisterSignal(src, COMSIG_MOB_ABILITY_FINISHED, PROC_REF(used_ability))
diff --git a/code/modules/mob/living/basic/lavaland/goliath/goliath_ai.dm b/code/modules/mob/living/basic/lavaland/goliath/goliath_ai.dm
index 48f0e213e73..76c230520df 100644
--- a/code/modules/mob/living/basic/lavaland/goliath/goliath_ai.dm
+++ b/code/modules/mob/living/basic/lavaland/goliath/goliath_ai.dm
@@ -3,7 +3,7 @@
/datum/ai_controller/basic_controller/goliath
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic/allow_items,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic/allow_items,
BB_TARGET_MINIMUM_STAT = HARD_CRIT,
)
@@ -27,7 +27,7 @@
/// Go for the tentacles if they're available
/datum/ai_behavior/basic_melee_attack/goliath
-/datum/ai_behavior/basic_melee_attack/goliath/perform(seconds_per_tick, datum/ai_controller/controller, target_key, targetting_datum_key, hiding_location_key, health_ratio_key)
+/datum/ai_behavior/basic_melee_attack/goliath/perform(seconds_per_tick, datum/ai_controller/controller, target_key, targeting_strategy_key, hiding_location_key, health_ratio_key)
var/time_on_target = controller.blackboard[BB_BASIC_MOB_HAS_TARGET_TIME] || 0
if (time_on_target < MIN_TIME_TO_TENTACLE)
return ..()
diff --git a/code/modules/mob/living/basic/lavaland/hivelord/hivelord_ai.dm b/code/modules/mob/living/basic/lavaland/hivelord/hivelord_ai.dm
index fd7983de397..1fb05cd7a01 100644
--- a/code/modules/mob/living/basic/lavaland/hivelord/hivelord_ai.dm
+++ b/code/modules/mob/living/basic/lavaland/hivelord/hivelord_ai.dm
@@ -1,7 +1,7 @@
/// Basically just keep away and shit out worms
/datum/ai_controller/basic_controller/hivelord
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_AGGRO_RANGE = 5, // Only get mad at people nearby
)
diff --git a/code/modules/mob/living/basic/lavaland/hivelord/spawn_hivelord_brood.dm b/code/modules/mob/living/basic/lavaland/hivelord/spawn_hivelord_brood.dm
index 63a66d4c4e3..7d50806e63a 100644
--- a/code/modules/mob/living/basic/lavaland/hivelord/spawn_hivelord_brood.dm
+++ b/code/modules/mob/living/basic/lavaland/hivelord/spawn_hivelord_brood.dm
@@ -10,7 +10,7 @@
cooldown_time = 2 SECONDS
melee_cooldown_time = 0
shared_cooldown = NONE
- /// If a mob is not clicked directly, inherit targetting data from this blackboard key and setting it upon this target key
+ /// If a mob is not clicked directly, inherit targeting data from this blackboard key and setting it upon this target key
var/ai_target_key = BB_BASIC_MOB_CURRENT_TARGET
/// What are we actually spawning?
var/spawn_type = /mob/living/basic/hivelord_brood
diff --git a/code/modules/mob/living/basic/lavaland/legion/legion_ai.dm b/code/modules/mob/living/basic/lavaland/legion/legion_ai.dm
index 9167846b685..1bae1b30353 100644
--- a/code/modules/mob/living/basic/lavaland/legion/legion_ai.dm
+++ b/code/modules/mob/living/basic/lavaland/legion/legion_ai.dm
@@ -1,7 +1,7 @@
/// Keep away and launch skulls at every opportunity, prioritising injured allies
/datum/ai_controller/basic_controller/legion
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic/legion,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic/legion,
BB_TARGET_MINIMUM_STAT = HARD_CRIT,
BB_AGGRO_RANGE = 5, // Unobservant
BB_BASIC_MOB_FLEE_DISTANCE = 6,
@@ -16,10 +16,10 @@
/datum/ai_planning_subtree/flee_target/legion,
)
-/// Chase and attack whatever we are targetting, if it's friendly we will heal them
+/// Chase and attack whatever we are targeting, if it's friendly we will heal them
/datum/ai_controller/basic_controller/legion_brood
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic/legion,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic/legion,
BB_TARGET_MINIMUM_STAT = HARD_CRIT,
)
@@ -31,9 +31,9 @@
)
/// Target nearby friendlies if they are hurt (and are not themselves Legions)
-/datum/targetting_datum/basic/legion
+/datum/targeting_strategy/basic/legion
-/datum/targetting_datum/basic/legion/faction_check(datum/ai_controller/controller, mob/living/living_mob, mob/living/the_target)
+/datum/targeting_strategy/basic/legion/faction_check(datum/ai_controller/controller, mob/living/living_mob, mob/living/the_target)
if (!living_mob.faction_check_atom(the_target, exact_match = check_factions_exactly))
return FALSE
if (istype(the_target, living_mob.type))
diff --git a/code/modules/mob/living/basic/lavaland/legion/spawn_legions.dm b/code/modules/mob/living/basic/lavaland/legion/spawn_legions.dm
index f68c5f7fafe..bd9b2c2aff9 100644
--- a/code/modules/mob/living/basic/lavaland/legion/spawn_legions.dm
+++ b/code/modules/mob/living/basic/lavaland/legion/spawn_legions.dm
@@ -10,7 +10,7 @@
cooldown_time = 2 SECONDS
melee_cooldown_time = 0
shared_cooldown = NONE
- /// If a mob is not clicked directly, inherit targetting data from this blackboard key and setting it upon this target key
+ /// If a mob is not clicked directly, inherit targeting data from this blackboard key and setting it upon this target key
var/ai_target_key = BB_BASIC_MOB_CURRENT_TARGET
/// What are we actually spawning?
var/spawn_type = /mob/living/basic/legion_brood
diff --git a/code/modules/mob/living/basic/lavaland/lobstrosity/lobstrosity_ai.dm b/code/modules/mob/living/basic/lavaland/lobstrosity/lobstrosity_ai.dm
index c89cc3b9c07..727b70bc4fa 100644
--- a/code/modules/mob/living/basic/lavaland/lobstrosity/lobstrosity_ai.dm
+++ b/code/modules/mob/living/basic/lavaland/lobstrosity/lobstrosity_ai.dm
@@ -1,6 +1,6 @@
/datum/ai_controller/basic_controller/lobstrosity
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_TARGET_MINIMUM_STAT = HARD_CRIT,
BB_LOBSTROSITY_EXPLOIT_TRAITS = list(TRAIT_INCAPACITATED, TRAIT_FLOORED, TRAIT_IMMOBILIZED, TRAIT_KNOCKEDOUT),
BB_LOBSTROSITY_FINGER_LUST = 0
@@ -34,7 +34,7 @@
/datum/ai_behavior/basic_melee_attack/lobster
-/datum/ai_behavior/basic_melee_attack/lobster/perform(seconds_per_tick, datum/ai_controller/controller, target_key, targetting_datum_key, hiding_location_key)
+/datum/ai_behavior/basic_melee_attack/lobster/perform(seconds_per_tick, datum/ai_controller/controller, target_key, targeting_strategy_key, hiding_location_key)
var/mob/living/target = controller.blackboard[target_key]
if (isnull(target))
return ..()
diff --git a/code/modules/mob/living/basic/lavaland/mook/mook.dm b/code/modules/mob/living/basic/lavaland/mook/mook.dm
index 463c9d5de79..93e28069321 100644
--- a/code/modules/mob/living/basic/lavaland/mook/mook.dm
+++ b/code/modules/mob/living/basic/lavaland/mook/mook.dm
@@ -41,8 +41,8 @@
var/list/pet_commands = list(
/datum/pet_command/idle,
/datum/pet_command/free,
- /datum/pet_command/point_targetting/attack,
- /datum/pet_command/point_targetting/fetch,
+ /datum/pet_command/point_targeting/attack,
+ /datum/pet_command/point_targeting/fetch,
)
/mob/living/basic/mining/mook/Initialize(mapload)
diff --git a/code/modules/mob/living/basic/lavaland/mook/mook_ai.dm b/code/modules/mob/living/basic/lavaland/mook/mook_ai.dm
index 0fc2873531e..b3bd9e1c4d5 100644
--- a/code/modules/mob/living/basic/lavaland/mook/mook_ai.dm
+++ b/code/modules/mob/living/basic/lavaland/mook/mook_ai.dm
@@ -1,12 +1,12 @@
///commands the chief can pick from
GLOBAL_LIST_INIT(mook_commands, list(
- new /datum/pet_command/point_targetting/attack,
- new /datum/pet_command/point_targetting/fetch,
+ new /datum/pet_command/point_targeting/attack,
+ new /datum/pet_command/point_targeting/fetch,
))
/datum/ai_controller/basic_controller/mook
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic/mook,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic/mook,
BB_BLACKLIST_MINERAL_TURFS = list(/turf/closed/mineral/gibtonite, /turf/closed/mineral/strong),
BB_MAXIMUM_DISTANCE_TO_VILLAGE = 7,
BB_STORM_APPROACHING = FALSE,
@@ -28,7 +28,7 @@ GLOBAL_LIST_INIT(mook_commands, list(
)
///check for faction if not a ash walker, otherwise just attack
-/datum/targetting_datum/basic/mook/faction_check(datum/ai_controller/controller, mob/living/living_mob, mob/living/the_target)
+/datum/targeting_strategy/basic/mook/faction_check(datum/ai_controller/controller, mob/living/living_mob, mob/living/the_target)
if(FACTION_ASHWALKER in living_mob.faction)
return FALSE
@@ -212,7 +212,7 @@ GLOBAL_LIST_INIT(mook_commands, list(
///bard mook plays nice music for the village
/datum/ai_controller/basic_controller/mook/bard
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic/mook,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic/mook,
BB_MAXIMUM_DISTANCE_TO_VILLAGE = 10,
BB_STORM_APPROACHING = FALSE,
BB_SONG_LINES = MOOK_SONG,
@@ -264,10 +264,10 @@ GLOBAL_LIST_INIT(mook_commands, list(
///healer mooks guard the village from intruders and heal the miner mooks when they come home
/datum/ai_controller/basic_controller/mook/support
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic/mook,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic/mook,
BB_MAXIMUM_DISTANCE_TO_VILLAGE = 10,
BB_STORM_APPROACHING = FALSE,
- BB_PET_TARGETTING_DATUM = new /datum/targetting_datum/basic/not_friends,
+ BB_PET_TARGETING_STRATEGY = /datum/targeting_strategy/basic/not_friends,
)
idle_behavior = /datum/idle_behavior/walk_near_target/mook_village
planning_subtrees = list(
@@ -324,7 +324,7 @@ GLOBAL_LIST_INIT(mook_commands, list(
///the chief would rather command his mooks to attack people than attack them himself
/datum/ai_controller/basic_controller/mook/tribal_chief
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic/mook,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic/mook,
BB_STORM_APPROACHING = FALSE,
)
idle_behavior = /datum/idle_behavior/walk_near_target/mook_village
@@ -349,7 +349,7 @@ GLOBAL_LIST_INIT(mook_commands, list(
if(!locate(/mob/living/basic/mining/mook) in oview(command_distance, controller.pawn))
return
if(controller.blackboard_key_exists(BB_BASIC_MOB_CURRENT_TARGET))
- controller.queue_behavior(/datum/ai_behavior/issue_commands, BB_BASIC_MOB_CURRENT_TARGET, /datum/pet_command/point_targetting/attack)
+ controller.queue_behavior(/datum/ai_behavior/issue_commands, BB_BASIC_MOB_CURRENT_TARGET, /datum/pet_command/point_targeting/attack)
return
var/atom/ore_target = controller.blackboard[BB_ORE_TARGET]
@@ -359,7 +359,7 @@ GLOBAL_LIST_INIT(mook_commands, list(
if(get_dist(ore_target, living_pawn) <= 1)
return
- controller.queue_behavior(/datum/ai_behavior/issue_commands, BB_ORE_TARGET, /datum/pet_command/point_targetting/fetch)
+ controller.queue_behavior(/datum/ai_behavior/issue_commands, BB_ORE_TARGET, /datum/pet_command/point_targeting/fetch)
/datum/ai_behavior/issue_commands
action_cooldown = 5 SECONDS
diff --git a/code/modules/mob/living/basic/lavaland/watcher/watcher.dm b/code/modules/mob/living/basic/lavaland/watcher/watcher.dm
index 28ed712d061..c3c30526dff 100644
--- a/code/modules/mob/living/basic/lavaland/watcher/watcher.dm
+++ b/code/modules/mob/living/basic/lavaland/watcher/watcher.dm
@@ -62,7 +62,7 @@
var/datum/action/cooldown/mob_cooldown/watcher_gaze/gaze = new gaze_attack(src)
gaze.Grant(src)
ai_controller.set_blackboard_key(BB_GENERIC_ACTION, gaze)
- AddComponent(/datum/component/revenge_ability, gaze, targetting = ai_controller.blackboard[BB_TARGETTING_DATUM])
+ AddComponent(/datum/component/revenge_ability, gaze, targeting = GET_TARGETING_STRATEGY(ai_controller.blackboard[BB_TARGETING_STRATEGY]))
/mob/living/basic/mining/watcher/update_overlays()
. = ..()
diff --git a/code/modules/mob/living/basic/lavaland/watcher/watcher_ai.dm b/code/modules/mob/living/basic/lavaland/watcher/watcher_ai.dm
index 348bbcfcaa7..c962ca50c12 100644
--- a/code/modules/mob/living/basic/lavaland/watcher/watcher_ai.dm
+++ b/code/modules/mob/living/basic/lavaland/watcher/watcher_ai.dm
@@ -1,6 +1,6 @@
/datum/ai_controller/basic_controller/watcher
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_traits = PAUSE_DURING_DO_AFTER
diff --git a/code/modules/mob/living/basic/minebots/minebot.dm b/code/modules/mob/living/basic/minebots/minebot.dm
index ad03da1e697..6bc0202aed5 100644
--- a/code/modules/mob/living/basic/minebots/minebot.dm
+++ b/code/modules/mob/living/basic/minebots/minebot.dm
@@ -40,7 +40,7 @@
/datum/pet_command/automate_mining,
/datum/pet_command/free/minebot,
/datum/pet_command/follow,
- /datum/pet_command/point_targetting/attack/minebot,
+ /datum/pet_command/point_targeting/attack/minebot,
)
/mob/living/basic/mining_drone/Initialize(mapload)
diff --git a/code/modules/mob/living/basic/minebots/minebot_ai.dm b/code/modules/mob/living/basic/minebots/minebot_ai.dm
index f4a2adda9e1..4aba93c4265 100644
--- a/code/modules/mob/living/basic/minebots/minebot_ai.dm
+++ b/code/modules/mob/living/basic/minebots/minebot_ai.dm
@@ -1,7 +1,7 @@
/datum/ai_controller/basic_controller/minebot
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
- BB_PET_TARGETTING_DATUM = new /datum/targetting_datum/basic/not_friends,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
+ BB_PET_TARGETING_STRATEGY = /datum/targeting_strategy/basic/not_friends,
BB_BLACKLIST_MINERAL_TURFS = list(/turf/closed/mineral/gibtonite),
BB_AUTOMATED_MINING = FALSE,
)
@@ -201,10 +201,10 @@
radial_icon_state = "mech_eject"
ability_key = BB_MINEBOT_DUMP_ABILITY
-/datum/pet_command/point_targetting/attack/minebot
+/datum/pet_command/point_targeting/attack/minebot
attack_behaviour = /datum/ai_behavior/basic_ranged_attack/minebot
-/datum/pet_command/point_targetting/attack/minebot/execute_action(datum/ai_controller/controller)
+/datum/pet_command/point_targeting/attack/minebot/execute_action(datum/ai_controller/controller)
controller.set_blackboard_key(BB_AUTOMATED_MINING, FALSE)
var/mob/living/living_pawn = controller.pawn
if(!living_pawn.combat_mode)
diff --git a/code/modules/mob/living/basic/pets/dog/_dog.dm b/code/modules/mob/living/basic/pets/dog/_dog.dm
index dd3b3b3a463..f835d7c5e17 100644
--- a/code/modules/mob/living/basic/pets/dog/_dog.dm
+++ b/code/modules/mob/living/basic/pets/dog/_dog.dm
@@ -7,10 +7,10 @@
speech_commands = list("good dog")
// Set correct attack behaviour
-/datum/pet_command/point_targetting/attack/dog
+/datum/pet_command/point_targeting/attack/dog
attack_behaviour = /datum/ai_behavior/basic_melee_attack/dog
-/datum/pet_command/point_targetting/attack/dog/set_command_active(mob/living/parent, mob/living/commander)
+/datum/pet_command/point_targeting/attack/dog/set_command_active(mob/living/parent, mob/living/commander)
. = ..()
parent.ai_controller.set_blackboard_key(BB_DOG_HARASS_HARM, TRUE)
@@ -40,8 +40,8 @@
/datum/pet_command/free,
/datum/pet_command/good_boy/dog,
/datum/pet_command/follow/dog,
- /datum/pet_command/point_targetting/attack/dog,
- /datum/pet_command/point_targetting/fetch,
+ /datum/pet_command/point_targeting/attack/dog,
+ /datum/pet_command/point_targeting/fetch,
/datum/pet_command/play_dead,
)
diff --git a/code/modules/mob/living/basic/pets/fox.dm b/code/modules/mob/living/basic/pets/fox.dm
index 150abdc676b..7d74a6a36e4 100644
--- a/code/modules/mob/living/basic/pets/fox.dm
+++ b/code/modules/mob/living/basic/pets/fox.dm
@@ -39,8 +39,8 @@
/datum/ai_controller/basic_controller/fox
blackboard = list(
BB_ALWAYS_IGNORE_FACTION = TRUE,
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic/of_size/ours_or_smaller,
- BB_FLEE_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic/of_size/ours_or_smaller,
+ BB_FLEE_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_movement = /datum/ai_movement/basic_avoidance
diff --git a/code/modules/mob/living/basic/pets/penguin.dm b/code/modules/mob/living/basic/pets/penguin.dm
index 35abc784e37..671c2cf30c1 100644
--- a/code/modules/mob/living/basic/pets/penguin.dm
+++ b/code/modules/mob/living/basic/pets/penguin.dm
@@ -84,7 +84,7 @@
/datum/ai_controller/basic_controller/penguin
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_traits = STOP_MOVING_WHEN_PULLED
@@ -178,7 +178,7 @@
/datum/ai_controller/basic_controller/penguin/baby
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_FIND_MOM_TYPES = list(/mob/living/basic/pet/penguin),
BB_IGNORE_MOM_TYPES = list(/mob/living/basic/pet/penguin/baby),
)
diff --git a/code/modules/mob/living/basic/pets/sloth.dm b/code/modules/mob/living/basic/pets/sloth.dm
index aaeeb218b2c..0b1546ccf93 100644
--- a/code/modules/mob/living/basic/pets/sloth.dm
+++ b/code/modules/mob/living/basic/pets/sloth.dm
@@ -75,8 +75,8 @@ GLOBAL_DATUM(cargo_sloth, /mob/living/basic/sloth)
/// They're really passive in game, so they just wanna get away if you start smacking them. No trees in space from them to use for clawing your eyes out, but they will try if desperate.
/datum/ai_controller/basic_controller/sloth
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
- BB_FLEE_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
+ BB_FLEE_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_traits = STOP_MOVING_WHEN_PULLED
diff --git a/code/modules/mob/living/basic/ruin_defender/flesh.dm b/code/modules/mob/living/basic/ruin_defender/flesh.dm
index 7d13c7e6621..85f48a8f672 100644
--- a/code/modules/mob/living/basic/ruin_defender/flesh.dm
+++ b/code/modules/mob/living/basic/ruin_defender/flesh.dm
@@ -1,6 +1,6 @@
/datum/ai_controller/basic_controller/living_limb_flesh
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_TARGET_MINIMUM_STAT = HARD_CRIT,
)
@@ -78,13 +78,13 @@
return
step(victim, pick(GLOB.cardinals))
to_chat(victim, span_warning("Your [current_bodypart] moves on its own!"))
-
+
/mob/living/basic/living_limb_flesh/melee_attack(mob/living/carbon/human/target, list/modifiers, ignore_cooldown)
. = ..()
if (!ishuman(target) || target.stat == DEAD || HAS_TRAIT(target, TRAIT_NODISMEMBER))
return
-
+
var/list/zone_candidates = target.get_missing_limbs()
for(var/obj/item/bodypart/bodypart in target.bodyparts)
if(bodypart.body_zone == BODY_ZONE_HEAD || bodypart.body_zone == BODY_ZONE_CHEST)
@@ -96,10 +96,10 @@
if(bodypart.brute_dam < 20)
continue
zone_candidates += bodypart.body_zone
-
+
if(!length(zone_candidates))
return
-
+
var/target_zone = pick(zone_candidates)
var/obj/item/bodypart/target_part = target.get_bodypart(target_zone)
if(isnull(target_part))
@@ -117,7 +117,7 @@
part_type = /obj/item/bodypart/leg/left/flesh
if(BODY_ZONE_R_LEG)
part_type = /obj/item/bodypart/leg/right/flesh
-
+
target.visible_message(span_danger("[src] [target_part ? "tears off and attaches itself" : "attaches itself"] to where [target][target.p_s()] limb used to be!"))
current_bodypart = new part_type(TRUE) //dont_spawn_flesh, we cant use named arguments here
current_bodypart.replace_limb(target, TRUE)
diff --git a/code/modules/mob/living/basic/ruin_defender/living_floor.dm b/code/modules/mob/living/basic/ruin_defender/living_floor.dm
index f7e8cefa12e..851a0873657 100644
--- a/code/modules/mob/living/basic/ruin_defender/living_floor.dm
+++ b/code/modules/mob/living/basic/ruin_defender/living_floor.dm
@@ -9,7 +9,7 @@
/datum/ai_controller/basic_controller/living_floor
max_target_distance = 2
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_TARGET_MINIMUM_STAT = HARD_CRIT,
)
@@ -46,7 +46,7 @@
attack_verb_simple = "bite"
ai_controller = /datum/ai_controller/basic_controller/living_floor
melee_attack_cooldown = 0.5 SECONDS // get real
-
+
var/icon_aggro = "floor-hostile"
var/desc_aggro = "This flooring is alive and filled with teeth, better not step on that. Being covered in plating, it is immune to damage. Seems vulnerable to prying though."
@@ -61,8 +61,8 @@
if(!istype(victim) || istype(victim, /mob/living/basic/living_floor) || victim.stat == DEAD)
return
if(victim.loc == loc) //guaranteed bite
- var/datum/targetting_datum/basic/targetting = ai_controller.blackboard[BB_TARGETTING_DATUM]
- if(targetting.can_attack(src, victim))
+ var/datum/targeting_strategy/basic/targeting = GET_TARGETING_STRATEGY(ai_controller.blackboard[BB_TARGETING_STRATEGY])
+ if(targeting.can_attack(src, victim))
melee_attack(victim)
icon_state = icon_aggro
desc = desc_aggro
diff --git a/code/modules/mob/living/basic/ruin_defender/skeleton.dm b/code/modules/mob/living/basic/ruin_defender/skeleton.dm
index 125787319b0..3ca9211451e 100644
--- a/code/modules/mob/living/basic/ruin_defender/skeleton.dm
+++ b/code/modules/mob/living/basic/ruin_defender/skeleton.dm
@@ -161,7 +161,7 @@
/// Skeletons mostly just beat people to death, but they'll also find and drink milk.
/datum/ai_controller/basic_controller/skeleton
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic/allow_items,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic/allow_items,
BB_TARGET_MINIMUM_STAT = HARD_CRIT,
BB_EMOTE_KEY = "rattles",
BB_EMOTE_CHANCE = 20,
diff --git a/code/modules/mob/living/basic/ruin_defender/stickman.dm b/code/modules/mob/living/basic/ruin_defender/stickman.dm
index 107973135c7..588a75c6346 100644
--- a/code/modules/mob/living/basic/ruin_defender/stickman.dm
+++ b/code/modules/mob/living/basic/ruin_defender/stickman.dm
@@ -33,7 +33,7 @@
/datum/ai_controller/basic_controller/stickman
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic()
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_movement = /datum/ai_movement/basic_avoidance
diff --git a/code/modules/mob/living/basic/ruin_defender/wizard/wizard_ai.dm b/code/modules/mob/living/basic/ruin_defender/wizard/wizard_ai.dm
index ad3fd51b0f9..4430b1339a7 100644
--- a/code/modules/mob/living/basic/ruin_defender/wizard/wizard_ai.dm
+++ b/code/modules/mob/living/basic/ruin_defender/wizard/wizard_ai.dm
@@ -5,7 +5,7 @@
*/
/datum/ai_controller/basic_controller/wizard
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_TARGET_MINIMUM_STAT = HARD_CRIT,
)
diff --git a/code/modules/mob/living/basic/space_fauna/ant.dm b/code/modules/mob/living/basic/space_fauna/ant.dm
index 7748d9120d7..26a904340b7 100644
--- a/code/modules/mob/living/basic/space_fauna/ant.dm
+++ b/code/modules/mob/living/basic/space_fauna/ant.dm
@@ -45,7 +45,7 @@
/datum/ai_controller/basic_controller/ant
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_movement = /datum/ai_movement/basic_avoidance
diff --git a/code/modules/mob/living/basic/space_fauna/bear/bear_ai_subtree.dm b/code/modules/mob/living/basic/space_fauna/bear/bear_ai_subtree.dm
index 851c0bb8029..335e7257e50 100644
--- a/code/modules/mob/living/basic/space_fauna/bear/bear_ai_subtree.dm
+++ b/code/modules/mob/living/basic/space_fauna/bear/bear_ai_subtree.dm
@@ -1,6 +1,6 @@
/datum/ai_controller/basic_controller/bear
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_movement = /datum/ai_movement/basic_avoidance
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 75be113f651..53199375359 100644
--- a/code/modules/mob/living/basic/space_fauna/carp/carp.dm
+++ b/code/modules/mob/living/basic/space_fauna/carp/carp.dm
@@ -58,7 +58,7 @@
/datum/pet_command/idle,
/datum/pet_command/free,
/datum/pet_command/follow,
- /datum/pet_command/point_targetting/attack
+ /datum/pet_command/point_targeting/attack
)
/// Carp want to eat raw meat
var/static/list/desired_food = list(/obj/item/food/meat/slab, /obj/item/food/meat/rawcutlet)
@@ -103,7 +103,7 @@
teleport = new(src)
teleport.Grant(src)
ai_controller.set_blackboard_key(BB_CARP_RIFT, teleport)
- ai_controller.set_blackboard_key(BB_OBSTACLE_TARGETTING_WHITELIST, allowed_obstacle_targets)
+ ai_controller.set_blackboard_key(BB_OBSTACLE_TARGETING_WHITELIST, allowed_obstacle_targets)
/// Tell the elements and the blackboard what food we want to eat
/mob/living/basic/carp/proc/setup_eating()
diff --git a/code/modules/mob/living/basic/space_fauna/carp/carp_ai_actions.dm b/code/modules/mob/living/basic/space_fauna/carp/carp_ai_actions.dm
index b1343a7aeed..9e767bab3af 100644
--- a/code/modules/mob/living/basic/space_fauna/carp/carp_ai_actions.dm
+++ b/code/modules/mob/living/basic/space_fauna/carp/carp_ai_actions.dm
@@ -1,6 +1,6 @@
#define MAGICARP_SPELL_TARGET_SEEK_RANGE 4
-/datum/pet_command/point_targetting/use_ability/magicarp
+/datum/pet_command/point_targeting/use_ability/magicarp
pet_ability_key = BB_MAGICARP_SPELL
/datum/ai_planning_subtree/attack_obstacle_in_path/carp
@@ -16,18 +16,18 @@
/// Interrupt your attack chain if: you have a spell, it's not on cooldown, and it has a target
/datum/ai_behavior/basic_melee_attack/magicarp
-/datum/ai_behavior/basic_melee_attack/magicarp/perform(seconds_per_tick, datum/ai_controller/controller, target_key, targetting_datum_key, hiding_location_key, health_ratio_key)
+/datum/ai_behavior/basic_melee_attack/magicarp/perform(seconds_per_tick, datum/ai_controller/controller, target_key, targeting_strategy_key, hiding_location_key, health_ratio_key)
var/datum/action/cooldown/using_action = controller.blackboard[BB_MAGICARP_SPELL]
if (QDELETED(using_action))
return ..()
- if (!controller.blackboard[BB_MAGICARP_SPELL_SPECIAL_TARGETTING] && using_action.IsAvailable())
+ if (!controller.blackboard[BB_MAGICARP_SPELL_SPECIAL_TARGETING] && using_action.IsAvailable())
finish_action(controller, succeeded = FALSE)
return
return ..()
/**
* Find a target for the magicarp's spell
- * This gets weird because different spells want different targetting
+ * This gets weird because different spells want different targeting
* but I didn't want a new ai controller for every different spell
*/
/datum/ai_planning_subtree/find_nearest_magicarp_spell_target
@@ -37,12 +37,12 @@
if (!using_action?.IsAvailable())
return
- var/spell_targetting = controller.blackboard[BB_MAGICARP_SPELL_SPECIAL_TARGETTING]
- if (!spell_targetting)
- controller.queue_behavior(/datum/ai_behavior/find_potential_targets/nearest/magicarp, BB_MAGICARP_SPELL_TARGET, BB_TARGETTING_DATUM, BB_BASIC_MOB_CURRENT_TARGET_HIDING_LOCATION)
+ var/spell_targeting = controller.blackboard[BB_MAGICARP_SPELL_SPECIAL_TARGETING]
+ if (!spell_targeting)
+ controller.queue_behavior(/datum/ai_behavior/find_potential_targets/nearest/magicarp, BB_MAGICARP_SPELL_TARGET, BB_TARGETING_STRATEGY, BB_BASIC_MOB_CURRENT_TARGET_HIDING_LOCATION)
return
- switch(spell_targetting)
+ switch(spell_targeting)
if (MAGICARP_SPELL_CORPSES)
controller.queue_behavior(/datum/ai_behavior/find_and_set/friendly_corpses, BB_MAGICARP_SPELL_TARGET, MAGICARP_SPELL_TARGET_SEEK_RANGE)
return
diff --git a/code/modules/mob/living/basic/space_fauna/carp/carp_controllers.dm b/code/modules/mob/living/basic/space_fauna/carp/carp_controllers.dm
index 5bf664d1687..0befb20987c 100644
--- a/code/modules/mob/living/basic/space_fauna/carp/carp_controllers.dm
+++ b/code/modules/mob/living/basic/space_fauna/carp/carp_controllers.dm
@@ -10,8 +10,8 @@
/datum/ai_controller/basic_controller/carp
blackboard = list(
BB_BASIC_MOB_STOP_FLEEING = TRUE,
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic/allow_items,
- BB_PET_TARGETTING_DATUM = new /datum/targetting_datum/basic/not_friends
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic/allow_items,
+ BB_PET_TARGETING_STRATEGY = /datum/targeting_strategy/basic/not_friends,
)
ai_movement = /datum/ai_movement/basic_avoidance
@@ -37,8 +37,8 @@
/datum/ai_controller/basic_controller/carp/pet
blackboard = list(
BB_BASIC_MOB_STOP_FLEEING = TRUE,
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
- BB_PET_TARGETTING_DATUM = new /datum/targetting_datum/basic/not_friends
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
+ BB_PET_TARGETING_STRATEGY = /datum/targeting_strategy/basic/not_friends,
)
ai_traits = STOP_MOVING_WHEN_PULLED
planning_subtrees = list(
@@ -81,8 +81,8 @@
/datum/ai_controller/basic_controller/carp/passive
blackboard = list(
BB_BASIC_MOB_STOP_FLEEING = TRUE,
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
- BB_PET_TARGETTING_DATUM = new /datum/targetting_datum/basic/not_friends,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
+ BB_PET_TARGETING_STRATEGY = /datum/targeting_strategy/basic/not_friends,
)
ai_traits = STOP_MOVING_WHEN_PULLED
planning_subtrees = list(
diff --git a/code/modules/mob/living/basic/space_fauna/carp/magicarp.dm b/code/modules/mob/living/basic/space_fauna/carp/magicarp.dm
index 32f02b880db..65d16cfb490 100644
--- a/code/modules/mob/living/basic/space_fauna/carp/magicarp.dm
+++ b/code/modules/mob/living/basic/space_fauna/carp/magicarp.dm
@@ -56,8 +56,8 @@ GLOBAL_LIST_INIT(magicarp_spell_colours, list(
/datum/pet_command/idle,
/datum/pet_command/free,
/datum/pet_command/follow,
- /datum/pet_command/point_targetting/attack,
- /datum/pet_command/point_targetting/use_ability/magicarp,
+ /datum/pet_command/point_targeting/attack,
+ /datum/pet_command/point_targeting/use_ability/magicarp,
)
/// List of all projectiles we can fire.
/// Non-static, because subtypes can have their own lists.
@@ -91,15 +91,15 @@ GLOBAL_LIST_INIT(magicarp_spell_colours, list(
ai_controller.set_blackboard_key(BB_MAGICARP_SPELL, spell)
assign_spell_ai(spell_type)
-/// If you have certain spells, use a different targetting datum
+/// If you have certain spells, use a different targeting strategy
/mob/living/basic/carp/magic/proc/assign_spell_ai(spell_type)
- var/static/list/spell_special_targetting = list(
+ var/static/list/spell_special_targeting = list(
/obj/projectile/magic/animate = MAGICARP_SPELL_OBJECTS,
/obj/projectile/magic/door = MAGICARP_SPELL_WALLS,
/obj/projectile/magic/resurrection = MAGICARP_SPELL_CORPSES,
)
- ai_controller.set_blackboard_key(BB_MAGICARP_SPELL_SPECIAL_TARGETTING, spell_special_targetting[spell_type])
+ ai_controller.set_blackboard_key(BB_MAGICARP_SPELL_SPECIAL_TARGETING, spell_special_targeting[spell_type])
/// Shoot when you click away from you
/mob/living/basic/carp/magic/RangedAttack(atom/atom_target, modifiers)
diff --git a/code/modules/mob/living/basic/space_fauna/cat_surgeon.dm b/code/modules/mob/living/basic/space_fauna/cat_surgeon.dm
index 487727fb53c..02faf7c2cc9 100644
--- a/code/modules/mob/living/basic/space_fauna/cat_surgeon.dm
+++ b/code/modules/mob/living/basic/space_fauna/cat_surgeon.dm
@@ -64,7 +64,7 @@
/datum/ai_controller/basic_controller/cat_butcherer
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_movement = /datum/ai_movement/basic_avoidance
diff --git a/code/modules/mob/living/basic/space_fauna/eyeball/eyeball_ai_subtree.dm b/code/modules/mob/living/basic/space_fauna/eyeball/eyeball_ai_subtree.dm
index b3033b27a4b..29ea1dfc352 100644
--- a/code/modules/mob/living/basic/space_fauna/eyeball/eyeball_ai_subtree.dm
+++ b/code/modules/mob/living/basic/space_fauna/eyeball/eyeball_ai_subtree.dm
@@ -1,6 +1,6 @@
/datum/ai_controller/basic_controller/eyeball
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic/eyeball,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic/eyeball,
BB_EYE_DAMAGE_THRESHOLD = 10,
)
@@ -22,7 +22,7 @@
return SUBTREE_RETURN_FINISH_PLANNING
controller.queue_behavior(/datum/ai_behavior/find_the_blind, BB_BLIND_TARGET, BB_EYE_DAMAGE_THRESHOLD)
-/datum/targetting_datum/basic/eyeball/can_attack(mob/living/owner, atom/target, vision_range)
+/datum/targeting_strategy/basic/eyeball/can_attack(mob/living/owner, atom/target, vision_range)
. = ..()
if(!.)
return FALSE
diff --git a/code/modules/mob/living/basic/space_fauna/faithless.dm b/code/modules/mob/living/basic/space_fauna/faithless.dm
index 5cfdd4b47b6..39f5652d1a0 100644
--- a/code/modules/mob/living/basic/space_fauna/faithless.dm
+++ b/code/modules/mob/living/basic/space_fauna/faithless.dm
@@ -55,7 +55,7 @@
/datum/ai_controller/basic_controller/faithless
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_TARGET_MINIMUM_STAT = UNCONSCIOUS,
BB_LOW_PRIORITY_HUNTING_TARGET = null, // lights
)
diff --git a/code/modules/mob/living/basic/space_fauna/garden_gnome.dm b/code/modules/mob/living/basic/space_fauna/garden_gnome.dm
index d9dfc3c5343..40debc7622b 100644
--- a/code/modules/mob/living/basic/space_fauna/garden_gnome.dm
+++ b/code/modules/mob/living/basic/space_fauna/garden_gnome.dm
@@ -125,7 +125,7 @@
/datum/ai_controller/basic_controller/garden_gnome
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic(),
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_movement = /datum/ai_movement/basic_avoidance
diff --git a/code/modules/mob/living/basic/space_fauna/ghost.dm b/code/modules/mob/living/basic/space_fauna/ghost.dm
index ad79fefc3e6..981357d1a13 100644
--- a/code/modules/mob/living/basic/space_fauna/ghost.dm
+++ b/code/modules/mob/living/basic/space_fauna/ghost.dm
@@ -94,7 +94,7 @@
/datum/ai_controller/basic_controller/ghost
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_movement = /datum/ai_movement/basic_avoidance
diff --git a/code/modules/mob/living/basic/space_fauna/hivebot/hivebot_subtree.dm b/code/modules/mob/living/basic/space_fauna/hivebot/hivebot_subtree.dm
index 5bd957a7609..067b0a03c13 100644
--- a/code/modules/mob/living/basic/space_fauna/hivebot/hivebot_subtree.dm
+++ b/code/modules/mob/living/basic/space_fauna/hivebot/hivebot_subtree.dm
@@ -1,6 +1,6 @@
/datum/ai_controller/basic_controller/hivebot
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_movement = /datum/ai_movement/basic_avoidance
diff --git a/code/modules/mob/living/basic/space_fauna/killer_tomato.dm b/code/modules/mob/living/basic/space_fauna/killer_tomato.dm
index a3fd64eb798..c859289b56d 100644
--- a/code/modules/mob/living/basic/space_fauna/killer_tomato.dm
+++ b/code/modules/mob/living/basic/space_fauna/killer_tomato.dm
@@ -42,7 +42,7 @@
/datum/ai_controller/basic_controller/killer_tomato
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_movement = /datum/ai_movement/basic_avoidance
diff --git a/code/modules/mob/living/basic/space_fauna/lightgeist.dm b/code/modules/mob/living/basic/space_fauna/lightgeist.dm
index 9ab6ffe6778..5847b2b6d77 100644
--- a/code/modules/mob/living/basic/space_fauna/lightgeist.dm
+++ b/code/modules/mob/living/basic/space_fauna/lightgeist.dm
@@ -78,7 +78,7 @@
/datum/ai_controller/basic_controller/lightgeist
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/lightgeist,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/lightgeist,
)
ai_traits = STOP_MOVING_WHEN_PULLED
@@ -91,13 +91,13 @@
)
/// Attack only mobs who have damage that we can heal, I think this is specific enough not to be a generic type
-/datum/targetting_datum/lightgeist
+/datum/targeting_strategy/lightgeist
/// Types of mobs we can heal, not in a blackboard key because there is no point changing this at runtime because the component will already exist
var/heal_biotypes = MOB_ORGANIC | MOB_MINERAL
/// Type of limb we can heal
var/required_bodytype = BODYTYPE_ORGANIC
-/datum/targetting_datum/lightgeist/can_attack(mob/living/living_mob, mob/living/target, vision_range)
+/datum/targeting_strategy/lightgeist/can_attack(mob/living/living_mob, mob/living/target, vision_range)
if (!isliving(target) || target.stat == DEAD)
return FALSE
if (!(heal_biotypes & target.mob_biotypes))
diff --git a/code/modules/mob/living/basic/space_fauna/meteor_heart/meteor_heart_ai.dm b/code/modules/mob/living/basic/space_fauna/meteor_heart/meteor_heart_ai.dm
index 7684011bd66..09659956c58 100644
--- a/code/modules/mob/living/basic/space_fauna/meteor_heart/meteor_heart_ai.dm
+++ b/code/modules/mob/living/basic/space_fauna/meteor_heart/meteor_heart_ai.dm
@@ -1,7 +1,7 @@
/// A spellcasting AI which does not move
/datum/ai_controller/basic_controller/meteor_heart
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic(),
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_TARGETLESS_TIME = 0,
)
diff --git a/code/modules/mob/living/basic/space_fauna/morph.dm b/code/modules/mob/living/basic/space_fauna/morph.dm
index 32115d05602..22cce322b13 100644
--- a/code/modules/mob/living/basic/space_fauna/morph.dm
+++ b/code/modules/mob/living/basic/space_fauna/morph.dm
@@ -200,7 +200,7 @@
/// Only real human-powered intelligence is capable of playing prop hunt in SS13 (until further notice).
/datum/ai_controller/basic_controller/morph
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_movement = /datum/ai_movement/basic_avoidance
diff --git a/code/modules/mob/living/basic/space_fauna/mushroom.dm b/code/modules/mob/living/basic/space_fauna/mushroom.dm
index 056a4558081..b45c2714d4a 100644
--- a/code/modules/mob/living/basic/space_fauna/mushroom.dm
+++ b/code/modules/mob/living/basic/space_fauna/mushroom.dm
@@ -57,7 +57,7 @@
/datum/ai_controller/basic_controller/mushroom
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic/mushroom,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic/mushroom,
BB_TARGET_MINIMUM_STAT = DEAD,
)
@@ -70,10 +70,10 @@
)
-/datum/targetting_datum/basic/mushroom
+/datum/targeting_strategy/basic/mushroom
///we only attacked another mushrooms
-/datum/targetting_datum/basic/mushroom/faction_check(datum/ai_controller/controller, mob/living/living_mob, mob/living/the_target)
+/datum/targeting_strategy/basic/mushroom/faction_check(datum/ai_controller/controller, mob/living/living_mob, mob/living/the_target)
return !living_mob.faction_check_atom(the_target, exact_match = check_factions_exactly)
/datum/ai_planning_subtree/find_and_hunt_target/mushroom_food
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 c4ea41cad37..720e0c031c0 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
@@ -48,7 +48,7 @@
/datum/ai_controller/basic_controller/paper_wizard
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_WRITING_LIST = list(
"I can turn the paper into gold and ink into diamonds!",
"Your fate is written and sealed!",
diff --git a/code/modules/mob/living/basic/space_fauna/regal_rat/regal_rat_actions.dm b/code/modules/mob/living/basic/space_fauna/regal_rat/regal_rat_actions.dm
index e617ae0a670..1ab7bd36594 100644
--- a/code/modules/mob/living/basic/space_fauna/regal_rat/regal_rat_actions.dm
+++ b/code/modules/mob/living/basic/space_fauna/regal_rat/regal_rat_actions.dm
@@ -56,7 +56,7 @@
/datum/pet_command/free,
/datum/pet_command/protect_owner,
/datum/pet_command/follow,
- /datum/pet_command/point_targetting/attack/mouse
+ /datum/pet_command/point_targeting/attack/mouse
)
/// Commands you can give to glockroaches
var/static/list/glockroach_commands = list(
@@ -64,7 +64,7 @@
/datum/pet_command/free,
/datum/pet_command/protect_owner/glockroach,
/datum/pet_command/follow,
- /datum/pet_command/point_targetting/attack/glockroach
+ /datum/pet_command/point_targeting/attack/glockroach
)
/datum/action/cooldown/mob_cooldown/riot/Activate(atom/target)
@@ -193,7 +193,7 @@
return TRUE
// Command you can give to a mouse to make it kill someone
-/datum/pet_command/point_targetting/attack/mouse
+/datum/pet_command/point_targeting/attack/mouse
speech_commands = list("attack", "sic", "kill", "cheese em")
command_feedback = "squeak!" // Frogs and roaches can squeak too it's fine
pointed_reaction = "and squeaks aggressively"
@@ -201,7 +201,7 @@
attack_behaviour = /datum/ai_behavior/basic_melee_attack
// Command you can give to a mouse to make it kill someone
-/datum/pet_command/point_targetting/attack/glockroach
+/datum/pet_command/point_targeting/attack/glockroach
speech_commands = list("attack", "sic", "kill", "cheese em")
command_feedback = "squeak!"
pointed_reaction = "and cocks its gun"
diff --git a/code/modules/mob/living/basic/space_fauna/regal_rat/regal_rat_ai.dm b/code/modules/mob/living/basic/space_fauna/regal_rat/regal_rat_ai.dm
index 8a7013b9623..073029bef3c 100644
--- a/code/modules/mob/living/basic/space_fauna/regal_rat/regal_rat_ai.dm
+++ b/code/modules/mob/living/basic/space_fauna/regal_rat/regal_rat_ai.dm
@@ -1,7 +1,7 @@
/datum/ai_controller/basic_controller/regal_rat
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
- BB_FLEE_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
+ BB_FLEE_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_movement = /datum/ai_movement/basic_avoidance
diff --git a/code/modules/mob/living/basic/space_fauna/snake/snake.dm b/code/modules/mob/living/basic/space_fauna/snake/snake.dm
index 164752e277d..135402a5b44 100644
--- a/code/modules/mob/living/basic/space_fauna/snake/snake.dm
+++ b/code/modules/mob/living/basic/space_fauna/snake/snake.dm
@@ -71,7 +71,7 @@
/// Snakes are primarily concerned with getting those tasty, tasty mice, but aren't afraid to strike back at those who attack them
/datum/ai_controller/basic_controller/snake
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic/not_friends/allow_items,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic/not_friends/allow_items,
)
ai_traits = STOP_MOVING_WHEN_PULLED
diff --git a/code/modules/mob/living/basic/space_fauna/spaceman.dm b/code/modules/mob/living/basic/space_fauna/spaceman.dm
index 5851bfa531b..8a9ba36287a 100644
--- a/code/modules/mob/living/basic/space_fauna/spaceman.dm
+++ b/code/modules/mob/living/basic/space_fauna/spaceman.dm
@@ -32,7 +32,7 @@
/datum/ai_controller/basic_controller/spaceman
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_movement = /datum/ai_movement/basic_avoidance
diff --git a/code/modules/mob/living/basic/space_fauna/spider/giant_spider/giant_spider_ai.dm b/code/modules/mob/living/basic/space_fauna/spider/giant_spider/giant_spider_ai.dm
index 7dd61b72070..ae971fd2558 100644
--- a/code/modules/mob/living/basic/space_fauna/spider/giant_spider/giant_spider_ai.dm
+++ b/code/modules/mob/living/basic/space_fauna/spider/giant_spider/giant_spider_ai.dm
@@ -1,7 +1,7 @@
/// Attacks people it can see, spins webs if it can't see anything to attack.
/datum/ai_controller/basic_controller/giant_spider
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic(),
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_traits = STOP_MOVING_WHEN_PULLED | PAUSE_DURING_DO_AFTER
@@ -30,7 +30,7 @@
/// Used by Araneus, who only attacks those who attack first. He is house-trained and will not web up the HoS office.
/datum/ai_controller/basic_controller/giant_spider/retaliate
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
planning_subtrees = list(
@@ -43,8 +43,8 @@
/// Retaliates, hunts other maintenance creatures, runs away from larger attackers, and spins webs.
/datum/ai_controller/basic_controller/giant_spider/pest
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic/of_size/ours_or_smaller(), // Hunt mobs our size
- BB_FLEE_TARGETTING_DATUM = new /datum/targetting_datum/basic/of_size/larger(), // Run away from mobs bigger than we are
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic/of_size/ours_or_smaller, // Hunt mobs our size
+ BB_FLEE_TARGETING_STRATEGY = /datum/targeting_strategy/basic/of_size/larger, // Run away from mobs bigger than we are
)
idle_behavior = /datum/idle_behavior/idle_random_walk
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 c79731bcdd1..99e4b2b03cc 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
@@ -225,7 +225,7 @@
heal_brute = 15,\
heal_burn = 15,\
heal_time = 3 SECONDS,\
- self_targetting = HEALING_TOUCH_SELF_ONLY,\
+ self_targeting = HEALING_TOUCH_SELF_ONLY,\
interaction_key = DOAFTER_SOURCE_SPIDER,\
valid_targets_typecache = typecacheof(list(/mob/living/basic/spider/growing/young/tangle, /mob/living/basic/spider/giant/tangle)),\
extra_checks = CALLBACK(src, PROC_REF(can_mend)),\
@@ -275,7 +275,7 @@
heal_brute = 50,\
heal_burn = 50,\
heal_time = 5 SECONDS,\
- self_targetting = HEALING_TOUCH_SELF_ONLY,\
+ self_targeting = HEALING_TOUCH_SELF_ONLY,\
interaction_key = DOAFTER_SOURCE_SPIDER,\
valid_targets_typecache = typecacheof(list(/mob/living/basic/spider/growing/young/tank, /mob/living/basic/spider/giant/tank)),\
extra_checks = CALLBACK(src, PROC_REF(can_mend)),\
diff --git a/code/modules/mob/living/basic/space_fauna/spider/spiderlings/spiderling.dm b/code/modules/mob/living/basic/space_fauna/spider/spiderlings/spiderling.dm
index f36b1bc46ba..2bce05b1a61 100644
--- a/code/modules/mob/living/basic/space_fauna/spider/spiderlings/spiderling.dm
+++ b/code/modules/mob/living/basic/space_fauna/spider/spiderlings/spiderling.dm
@@ -61,7 +61,7 @@
/// Opportunistically hops in and out of vents, if it can find one. We aren't interested in attacking due to how weak we are, we gotta be quick and hidey.
/datum/ai_controller/basic_controller/spiderling
blackboard = list(
- BB_FLEE_TARGETTING_DATUM = new /datum/targetting_datum/basic/of_size/larger, // Run away from mobs bigger than we are
+ BB_FLEE_TARGETING_STRATEGY = /datum/targeting_strategy/basic/of_size/larger, // Run away from mobs bigger than we are
BB_VENTCRAWL_COOLDOWN = 20 SECONDS, // enough time to get splatted while we're out in the open.
BB_TIME_TO_GIVE_UP_ON_VENT_PATHING = 30 SECONDS,
)
diff --git a/code/modules/mob/living/basic/space_fauna/spider/young_spider/young_spider.dm b/code/modules/mob/living/basic/space_fauna/spider/young_spider/young_spider.dm
index bdaf7d03faa..8c17833c0c7 100644
--- a/code/modules/mob/living/basic/space_fauna/spider/young_spider/young_spider.dm
+++ b/code/modules/mob/living/basic/space_fauna/spider/young_spider/young_spider.dm
@@ -29,7 +29,7 @@
/// Used by all young spiders if they ever appear.
/datum/ai_controller/basic_controller/young_spider
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic(),
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_BASIC_MOB_FLEE_DISTANCE = 6,
)
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 809755e3555..3a9bad4e75f 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
@@ -135,7 +135,7 @@
heal_brute = 10,\
heal_burn = 10,\
heal_time = 3 SECONDS,\
- self_targetting = HEALING_TOUCH_SELF_ONLY,\
+ self_targeting = HEALING_TOUCH_SELF_ONLY,\
interaction_key = DOAFTER_SOURCE_SPIDER,\
valid_targets_typecache = typecacheof(list(/mob/living/basic/spider/growing/young/tangle, /mob/living/basic/spider/giant/tangle)),\
extra_checks = CALLBACK(src, PROC_REF(can_mend)),\
@@ -174,7 +174,7 @@
heal_brute = 5,\
heal_burn = 5,\
heal_time = 2 SECONDS,\
- self_targetting = HEALING_TOUCH_SELF_ONLY,\
+ self_targeting = HEALING_TOUCH_SELF_ONLY,\
interaction_key = DOAFTER_SOURCE_SPIDER,\
valid_targets_typecache = typecacheof(list(/mob/living/basic/spider/growing/young/tank, /mob/living/basic/spider/giant/tank)),\
extra_checks = CALLBACK(src, PROC_REF(can_mend)),\
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 c525c03bda0..801aa271d91 100644
--- a/code/modules/mob/living/basic/space_fauna/statue/statue.dm
+++ b/code/modules/mob/living/basic/space_fauna/statue/statue.dm
@@ -141,7 +141,7 @@
/datum/ai_controller/basic_controller/statue
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic(),
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_LOW_PRIORITY_HUNTING_TARGET = null, // lights
)
diff --git a/code/modules/mob/living/basic/space_fauna/supermatter_spider.dm b/code/modules/mob/living/basic/space_fauna/supermatter_spider.dm
index 2a3ba326eac..02fd9ed1bcf 100644
--- a/code/modules/mob/living/basic/space_fauna/supermatter_spider.dm
+++ b/code/modules/mob/living/basic/space_fauna/supermatter_spider.dm
@@ -82,7 +82,7 @@
/datum/ai_controller/basic_controller/supermatter_spider
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_movement = /datum/ai_movement/basic_avoidance
diff --git a/code/modules/mob/living/basic/space_fauna/wumborian_fugu/wumborian_ai.dm b/code/modules/mob/living/basic/space_fauna/wumborian_fugu/wumborian_ai.dm
index e405ee3755a..1b4e2cdd620 100644
--- a/code/modules/mob/living/basic/space_fauna/wumborian_fugu/wumborian_ai.dm
+++ b/code/modules/mob/living/basic/space_fauna/wumborian_fugu/wumborian_ai.dm
@@ -1,7 +1,7 @@
/// Cowardly when small, aggressive when big. Tries to transform whenever possible.
/datum/ai_controller/basic_controller/wumborian_fugu
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic(),
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_movement = /datum/ai_movement/basic_avoidance
diff --git a/code/modules/mob/living/basic/trader/trader_ai.dm b/code/modules/mob/living/basic/trader/trader_ai.dm
index d6cf0095c7d..5f447ab3229 100644
--- a/code/modules/mob/living/basic/trader/trader_ai.dm
+++ b/code/modules/mob/living/basic/trader/trader_ai.dm
@@ -1,6 +1,6 @@
/datum/ai_controller/basic_controller/trader
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_movement = /datum/ai_movement/basic_avoidance
diff --git a/code/modules/mob/living/basic/tree.dm b/code/modules/mob/living/basic/tree.dm
index 2a0806b105c..01e9579d24e 100644
--- a/code/modules/mob/living/basic/tree.dm
+++ b/code/modules/mob/living/basic/tree.dm
@@ -100,7 +100,7 @@
/datum/ai_controller/basic_controller/tree
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic(),
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_movement = /datum/ai_movement/basic_avoidance
diff --git a/code/modules/mob/living/basic/trooper/trooper_ai.dm b/code/modules/mob/living/basic/trooper/trooper_ai.dm
index 27a9950aa29..cf71b38f45b 100644
--- a/code/modules/mob/living/basic/trooper/trooper_ai.dm
+++ b/code/modules/mob/living/basic/trooper/trooper_ai.dm
@@ -1,6 +1,6 @@
/datum/ai_controller/basic_controller/trooper
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_TARGET_MINIMUM_STAT = HARD_CRIT,
BB_REINFORCEMENTS_SAY = "411 in progress, requesting backup!"
)
@@ -95,5 +95,5 @@
/datum/ai_controller/basic_controller/trooper/viscerator
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
diff --git a/code/modules/mob/living/basic/vermin/cockroach.dm b/code/modules/mob/living/basic/vermin/cockroach.dm
index 71d55bf223c..595ef0b37d7 100644
--- a/code/modules/mob/living/basic/vermin/cockroach.dm
+++ b/code/modules/mob/living/basic/vermin/cockroach.dm
@@ -60,8 +60,8 @@
/datum/ai_controller/basic_controller/cockroach
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic(),
- BB_PET_TARGETTING_DATUM = new /datum/targetting_datum/basic/not_friends,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
+ BB_PET_TARGETING_STRATEGY = /datum/targeting_strategy/basic/not_friends,
)
ai_traits = STOP_MOVING_WHEN_PULLED
diff --git a/code/modules/mob/living/basic/vermin/crab.dm b/code/modules/mob/living/basic/vermin/crab.dm
index 276ed86d4de..3dd3d0db0fe 100644
--- a/code/modules/mob/living/basic/vermin/crab.dm
+++ b/code/modules/mob/living/basic/vermin/crab.dm
@@ -78,8 +78,8 @@
/datum/ai_controller/basic_controller/crab
blackboard = list(
BB_ALWAYS_IGNORE_FACTION = TRUE,
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic/of_size/ours_or_smaller,
- BB_FLEE_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic/of_size/ours_or_smaller,
+ BB_FLEE_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_traits = STOP_MOVING_WHEN_PULLED
diff --git a/code/modules/mob/living/basic/vermin/frog.dm b/code/modules/mob/living/basic/vermin/frog.dm
index 152797b2683..162848d062a 100644
--- a/code/modules/mob/living/basic/vermin/frog.dm
+++ b/code/modules/mob/living/basic/vermin/frog.dm
@@ -94,8 +94,8 @@
/datum/ai_controller/basic_controller/frog
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic(),
- BB_PET_TARGETTING_DATUM = new /datum/targetting_datum/basic/not_friends
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
+ BB_PET_TARGETING_STRATEGY = /datum/targeting_strategy/basic/not_friends,
)
ai_movement = /datum/ai_movement/basic_avoidance
diff --git a/code/modules/mob/living/basic/vermin/lizard.dm b/code/modules/mob/living/basic/vermin/lizard.dm
index d1a30826f4a..760dfecc28f 100644
--- a/code/modules/mob/living/basic/vermin/lizard.dm
+++ b/code/modules/mob/living/basic/vermin/lizard.dm
@@ -55,7 +55,7 @@
/datum/ai_controller/basic_controller/lizard
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic/allow_items(),
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic/allow_items,
)
ai_traits = STOP_MOVING_WHEN_PULLED
diff --git a/code/modules/mob/living/basic/vermin/mouse.dm b/code/modules/mob/living/basic/vermin/mouse.dm
index 2929085fb93..c1ba3c12e36 100644
--- a/code/modules/mob/living/basic/vermin/mouse.dm
+++ b/code/modules/mob/living/basic/vermin/mouse.dm
@@ -379,7 +379,7 @@
blackboard = list( // Always cowardly
BB_CURRENT_HUNTING_TARGET = null, // cheese
BB_LOW_PRIORITY_HUNTING_TARGET = null, // cable
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic(), // Use this to find people to run away from
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic, // Use this to find people to run away from
BB_BASIC_MOB_FLEE_DISTANCE = 3,
)
@@ -411,8 +411,8 @@
/// AI controller for rats, slightly more complex than mice becuase they attack people
/datum/ai_controller/basic_controller/mouse/rat
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
- BB_PET_TARGETTING_DATUM = new /datum/targetting_datum/basic/not_friends,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
+ BB_PET_TARGETING_STRATEGY = /datum/targeting_strategy/basic/not_friends,
BB_BASIC_MOB_CURRENT_TARGET = null, // heathen
BB_CURRENT_HUNTING_TARGET = null, // cheese
BB_LOW_PRIORITY_HUNTING_TARGET = null, // cable
diff --git a/code/modules/mob/living/basic/vermin/space_bat.dm b/code/modules/mob/living/basic/vermin/space_bat.dm
index 232febf0f97..24718c8481a 100644
--- a/code/modules/mob/living/basic/vermin/space_bat.dm
+++ b/code/modules/mob/living/basic/vermin/space_bat.dm
@@ -42,7 +42,7 @@
///Controller for space bats, has nothing unique, just retaliation.
/datum/ai_controller/basic_controller/space_bat
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_traits = STOP_MOVING_WHEN_PULLED
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 14f03ce29a2..fe81afcad25 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -2576,7 +2576,7 @@ GLOBAL_LIST_EMPTY(fire_appearances)
lazarus_policy = get_policy(ROLE_LAZARUS_BAD) || "You have been revived by a malfunctioning lazarus injector! You are now enslaved by whoever revived you."
to_chat(src, span_boldnotice(lazarus_policy))
-/// Proc for giving a mob a new 'friend', generally used for AI control and targetting. Returns false if already friends.
+/// Proc for giving a mob a new 'friend', generally used for AI control and targeting. Returns false if already friends.
/mob/living/proc/befriend(mob/living/new_friend)
SHOULD_CALL_PARENT(TRUE)
var/friend_ref = REF(new_friend)
diff --git a/code/modules/mob/living/simple_animal/bot/firebot.dm b/code/modules/mob/living/simple_animal/bot/firebot.dm
index 59d08fe7339..98d34fc2f71 100644
--- a/code/modules/mob/living/simple_animal/bot/firebot.dm
+++ b/code/modules/mob/living/simple_animal/bot/firebot.dm
@@ -119,7 +119,7 @@
if(!(bot_cover_flags & BOT_COVER_EMAGGED))
return
- to_chat(user, span_warning("You enable the very ironically named \"fighting with fire\" mode, and disable the targetting safeties.")) // heheehe. funny
+ to_chat(user, span_warning("You enable the very ironically named \"fighting with fire\" mode, and disable the targeting safeties.")) // heheehe. funny
audible_message(span_danger("[src] buzzes oddly!"))
playsound(src, SFX_SPARKS, 75, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm
index 4dd2c464a2f..9d215ed35fc 100644
--- a/code/modules/mob/living/simple_animal/hostile/hostile.dm
+++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm
@@ -172,7 +172,7 @@
Goto(P.starting, move_to_delay, 3)
return ..()
-//////////////HOSTILE MOB TARGETTING AND AGGRESSION////////////
+//////////////HOSTILE MOB TARGETING AND AGGRESSION////////////
/mob/living/simple_animal/hostile/proc/ListTargets() //Step 1, find out what we can see
var/atom/target_from = GET_TARGETS_FROM(src)
@@ -196,7 +196,7 @@
possible_targets = ListTargets()
for(var/atom/pos_targ as anything in possible_targets)
- if(Found(pos_targ)) //Just in case people want to override targetting
+ if(Found(pos_targ)) //Just in case people want to override targeting
all_potential_targets = list(pos_targ)
break
@@ -422,7 +422,7 @@
LoseAggro()
SEND_SIGNAL(src, COMSIG_HOSTILE_MOB_LOST_TARGET) // SKYRAT EDIT ADDITION
-//////////////END HOSTILE MOB TARGETTING AND AGGRESSION////////////
+//////////////END HOSTILE MOB TARGETING AND AGGRESSION////////////
/mob/living/simple_animal/hostile/death(gibbed)
LoseTarget()
diff --git a/code/modules/mob/living/simple_animal/hostile/ooze.dm b/code/modules/mob/living/simple_animal/hostile/ooze.dm
index 37b04e839b5..714e3f1b600 100644
--- a/code/modules/mob/living/simple_animal/hostile/ooze.dm
+++ b/code/modules/mob/living/simple_animal/hostile/ooze.dm
@@ -299,7 +299,7 @@
/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)
-///Ability that allows the owner to fire healing globules at mobs, targetting specific limbs.
+///Ability that allows the owner to fire healing globules at mobs, targeting specific limbs.
/datum/action/cooldown/globules
name = "Fire Mending globule"
desc = "Fires a mending globule at someone, healing a specific limb of theirs."
diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm
index 6808728a833..2c2f8519e25 100644
--- a/code/modules/mob/mob_defines.dm
+++ b/code/modules/mob/mob_defines.dm
@@ -20,7 +20,7 @@
// we never want to hide a turf because it's not lit
// We can rely on the lighting plane to handle that for us
see_in_dark = 1e6
- // A list of factions that this mob is currently in, for hostile mob targetting, amongst other things
+ // A list of factions that this mob is currently in, for hostile mob targeting, amongst other things
faction = list(FACTION_NEUTRAL)
/// The current client inhabiting this mob. Managed by login/logout
/// This exists so we can do cleanup in logout for occasions where a client was transfere rather then destroyed
diff --git a/code/modules/religion/religion_sects.dm b/code/modules/religion/religion_sects.dm
index 3135fddeace..8b96c210511 100644
--- a/code/modules/religion/religion_sects.dm
+++ b/code/modules/religion/religion_sects.dm
@@ -168,7 +168,7 @@
eth_stomach.adjust_charge(60)
did_we_charge = TRUE
- //if we're not targetting a robot part we stop early
+ //if we're not targeting a robot part we stop early
var/obj/item/bodypart/bodypart = blessed.get_bodypart(chap.zone_selected)
if(IS_ORGANIC_LIMB(bodypart))
if(!did_we_charge)
diff --git a/code/modules/vehicles/mecha/combat/savannah_ivanov.dm b/code/modules/vehicles/mecha/combat/savannah_ivanov.dm
index 1851e6b39b1..1aa4223b98c 100644
--- a/code/modules/vehicles/mecha/combat/savannah_ivanov.dm
+++ b/code/modules/vehicles/mecha/combat/savannah_ivanov.dm
@@ -292,7 +292,7 @@
/**
* ## end_missile_targeting
*
- * Called by the ivanov strike datum action or other actions that would end targetting
+ * Called by the ivanov strike datum action or other actions that would end targeting
* Unhooks signals into clicking to call drop_missile plus other flavor like the overlay
*/
/datum/action/vehicle/sealed/mecha/ivanov_strike/proc/end_missile_targeting()
diff --git a/code/modules/vehicles/mecha/mecha_construction_paths.dm b/code/modules/vehicles/mecha/mecha_construction_paths.dm
index fb572f7d128..3ff01b51166 100644
--- a/code/modules/vehicles/mecha/mecha_construction_paths.dm
+++ b/code/modules/vehicles/mecha/mecha_construction_paths.dm
@@ -503,7 +503,7 @@
list(
"key" = /obj/item/circuitboard/mecha/honker/targeting,
"action" = ITEM_DELETE,
- "desc" = "Prank targetting board can be added!",
+ "desc" = "Prank targeting board can be added!",
"forward_message" = "added prank"
),
list(
diff --git a/code/modules/vehicles/mecha/mecha_damage.dm b/code/modules/vehicles/mecha/mecha_damage.dm
index 08f294f202f..8a06aaf298f 100644
--- a/code/modules/vehicles/mecha/mecha_damage.dm
+++ b/code/modules/vehicles/mecha/mecha_damage.dm
@@ -9,7 +9,7 @@
* Pretty simple, adds armor, you can choose against what
* ## Internal damage
* When taking damage will force you to take some time to repair, encourages improvising in a fight
- * Targetting different def zones will damage them to encurage a more strategic approach to fights
+ * Targeting different def zones will damage them to encurage a more strategic approach to fights
* where they target the "dangerous" modules
*/
diff --git a/code/modules/vehicles/mecha/mecha_defense.dm b/code/modules/vehicles/mecha/mecha_defense.dm
index 3df6ba94992..107cc965329 100644
--- a/code/modules/vehicles/mecha/mecha_defense.dm
+++ b/code/modules/vehicles/mecha/mecha_defense.dm
@@ -9,7 +9,7 @@
* Pretty simple, adds armor, you can choose against what
* ## Internal damage
* When taking damage will force you to take some time to repair, encourages improvising in a fight
- * Targetting different def zones will damage them to encurage a more strategic approach to fights
+ * Targeting different def zones will damage them to encurage a more strategic approach to fights
* where they target the "dangerous" modules
*/
diff --git a/modular_skyrat/master_files/code/modules/mob/living/simple_animal/friendly/bumbles.dm b/modular_skyrat/master_files/code/modules/mob/living/simple_animal/friendly/bumbles.dm
index 10ca65f4acd..28f8f3994b6 100644
--- a/modular_skyrat/master_files/code/modules/mob/living/simple_animal/friendly/bumbles.dm
+++ b/modular_skyrat/master_files/code/modules/mob/living/simple_animal/friendly/bumbles.dm
@@ -117,7 +117,7 @@
// Bumble AI controller that adds find flowers, resting, and buzzing subtrees.
/datum/ai_controller/basic_controller/bumbles
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic/allow_items(),
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic/allow_items,
)
ai_traits = STOP_MOVING_WHEN_PULLED
diff --git a/modular_skyrat/master_files/code/modules/mob/living/simple_animal/friendly/dogs.dm b/modular_skyrat/master_files/code/modules/mob/living/simple_animal/friendly/dogs.dm
index d878d5d2b46..7856a35690d 100644
--- a/modular_skyrat/master_files/code/modules/mob/living/simple_animal/friendly/dogs.dm
+++ b/modular_skyrat/master_files/code/modules/mob/living/simple_animal/friendly/dogs.dm
@@ -127,7 +127,7 @@
borgi.set_movement_target(target)
borgi.blackboard[BB_DOG_HARASS_TARGET] = WEAKREF(target)
- borgi.queue_behavior(/datum/ai_behavior/basic_melee_attack/dog, BB_DOG_HARASS_TARGET, BB_PET_TARGETTING_DATUM)
+ borgi.queue_behavior(/datum/ai_behavior/basic_melee_attack/dog, BB_DOG_HARASS_TARGET, BB_PET_TARGETING_STRATEGY)
/mob/living/basic/pet/dog/corgi/borgi/proc/on_attack_hand(datum/source, mob/living/target)
SIGNAL_HANDLER
@@ -268,7 +268,7 @@
BB_DOG_HARASS_HARM = TRUE,
BB_VISION_RANGE = AI_DOG_VISION_RANGE,
BB_DOG_IS_SLOW = TRUE,
- BB_PET_TARGETTING_DATUM = new /datum/targetting_datum/basic(),
+ BB_PET_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
planning_subtrees = list(
@@ -298,7 +298,7 @@
if(!SPT_PROB(chance, seconds_per_tick))
return
- controller.queue_behavior(/datum/ai_behavior/find_potential_targets, BB_BASIC_MOB_CURRENT_TARGET, BB_PET_TARGETTING_DATUM, BB_BASIC_MOB_CURRENT_TARGET_HIDING_LOCATION)
+ controller.queue_behavior(/datum/ai_behavior/find_potential_targets, BB_BASIC_MOB_CURRENT_TARGET, BB_PET_TARGETING_STRATEGY, BB_BASIC_MOB_CURRENT_TARGET_HIDING_LOCATION)
return
// Attack.
diff --git a/modular_skyrat/modules/awaymissions_skyrat/mothership_astrum/abductor_ai.dm b/modular_skyrat/modules/awaymissions_skyrat/mothership_astrum/abductor_ai.dm
index 8d33efb03d5..19726907ae7 100644
--- a/modular_skyrat/modules/awaymissions_skyrat/mothership_astrum/abductor_ai.dm
+++ b/modular_skyrat/modules/awaymissions_skyrat/mothership_astrum/abductor_ai.dm
@@ -3,7 +3,7 @@
*/
/datum/ai_controller/basic_controller/abductor
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_TARGET_MINIMUM_STAT = HARD_CRIT,
)
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 ab91108bae6..dcf1b0a556f 100644
--- a/modular_skyrat/modules/clock_cult/code/mobs/clockwork_marauder.dm
+++ b/modular_skyrat/modules/clock_cult/code/mobs/clockwork_marauder.dm
@@ -119,7 +119,7 @@ GLOBAL_LIST_EMPTY(clockwork_marauders)
/datum/ai_controller/basic_controller/clockwork_marauder
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
BB_TARGET_MINIMUM_STAT = HARD_CRIT,
)
diff --git a/modular_skyrat/modules/mold/code/mold_mobs.dm b/modular_skyrat/modules/mold/code/mold_mobs.dm
index c7ba1226435..3e539b6472b 100644
--- a/modular_skyrat/modules/mold/code/mold_mobs.dm
+++ b/modular_skyrat/modules/mold/code/mold_mobs.dm
@@ -83,7 +83,7 @@
/datum/ai_controller/basic_controller/oil_shambler
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_movement = /datum/ai_movement/basic_avoidance
@@ -147,7 +147,7 @@
/datum/ai_controller/basic_controller/diseased_rat
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_movement = /datum/ai_movement/basic_avoidance
@@ -204,7 +204,7 @@
/datum/ai_controller/basic_controller/electric_mosquito
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_movement = /datum/ai_movement/basic_avoidance
@@ -276,7 +276,7 @@
/datum/ai_controller/basic_controller/centaur
blackboard = list(
- BB_TARGETTING_DATUM = new /datum/targetting_datum/basic,
+ BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic,
)
ai_movement = /datum/ai_movement/basic_avoidance
diff --git a/tgstation.dme b/tgstation.dme
index 289a9895b97..3509d7f84bc 100644
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -928,18 +928,18 @@
#include "code\datums\ai\basic_mobs\basic_ai_behaviors\basic_attacking.dm"
#include "code\datums\ai\basic_mobs\basic_ai_behaviors\climb_tree.dm"
#include "code\datums\ai\basic_mobs\basic_ai_behaviors\find_parent.dm"
-#include "code\datums\ai\basic_mobs\basic_ai_behaviors\nearest_targetting.dm"
+#include "code\datums\ai\basic_mobs\basic_ai_behaviors\nearest_targeting.dm"
#include "code\datums\ai\basic_mobs\basic_ai_behaviors\pick_up_item.dm"
#include "code\datums\ai\basic_mobs\basic_ai_behaviors\run_away_from_target.dm"
#include "code\datums\ai\basic_mobs\basic_ai_behaviors\set_travel_destination.dm"
#include "code\datums\ai\basic_mobs\basic_ai_behaviors\step_towards_turf.dm"
#include "code\datums\ai\basic_mobs\basic_ai_behaviors\stop_and_stare.dm"
#include "code\datums\ai\basic_mobs\basic_ai_behaviors\targeted_mob_ability.dm"
-#include "code\datums\ai\basic_mobs\basic_ai_behaviors\targetting.dm"
+#include "code\datums\ai\basic_mobs\basic_ai_behaviors\targeting.dm"
#include "code\datums\ai\basic_mobs\basic_ai_behaviors\tipped_reaction.dm"
#include "code\datums\ai\basic_mobs\basic_ai_behaviors\travel_towards.dm"
#include "code\datums\ai\basic_mobs\basic_ai_behaviors\ventcrawling.dm"
-#include "code\datums\ai\basic_mobs\basic_ai_behaviors\wounded_targetting.dm"
+#include "code\datums\ai\basic_mobs\basic_ai_behaviors\wounded_targeting.dm"
#include "code\datums\ai\basic_mobs\basic_ai_behaviors\write_on_paper.dm"
#include "code\datums\ai\basic_mobs\basic_subtrees\attack_adjacent_target.dm"
#include "code\datums\ai\basic_mobs\basic_subtrees\attack_obstacle_in_path.dm"
@@ -975,11 +975,11 @@
#include "code\datums\ai\basic_mobs\pet_commands\fetch.dm"
#include "code\datums\ai\basic_mobs\pet_commands\pet_command_planning.dm"
#include "code\datums\ai\basic_mobs\pet_commands\pet_follow_friend.dm"
-#include "code\datums\ai\basic_mobs\pet_commands\pet_use_targetted_ability.dm"
+#include "code\datums\ai\basic_mobs\pet_commands\pet_use_targeted_ability.dm"
#include "code\datums\ai\basic_mobs\pet_commands\play_dead.dm"
-#include "code\datums\ai\basic_mobs\targetting_datums\basic_targetting_datum.dm"
-#include "code\datums\ai\basic_mobs\targetting_datums\dont_target_friends.dm"
-#include "code\datums\ai\basic_mobs\targetting_datums\with_object.dm"
+#include "code\datums\ai\basic_mobs\targeting_strategies\basic_targeting_strategy.dm"
+#include "code\datums\ai\basic_mobs\targeting_strategies\dont_target_friends.dm"
+#include "code\datums\ai\basic_mobs\targeting_strategies\with_object.dm"
#include "code\datums\ai\cursed\cursed_behaviors.dm"
#include "code\datums\ai\cursed\cursed_controller.dm"
#include "code\datums\ai\cursed\cursed_subtrees.dm"