mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 09:08:30 +01:00
Targeting Datums Renamed (and global) (#79513)
## About The Pull Request [Implements the backend required to make targeting datums global](https://github.com/tgstation/tgstation/commit/6901ead12e419530b7f646ea21094d4432d7385e) It's inconsistent with the rest of basic ai for these to have a high degree of state, plus like, such a waste yaknow? [Implements GET_TARGETING_STRATEGY](https://github.com/tgstation/tgstation/commit/d79c29134d03424a9f8bacd64c08cb41775fe8c0) Regexes used: new.*(/datum/targetting_datum[^,(]*)\(*\)* -> GET_TARGETING_STRATEGY($1) Renamed all instances of targetting to targeting (also targetting datum -> targeting strategy) I've used GET_TARGETING_STRATEGY at the source where the keys are actually used, rather then in the listing. This works out just fine. ## Why It's Good For The Game Not a misspelled name through the whole codebase, very slightly less memory load for basically no downside (slight cpu cost maybe but not a significant one. --------- Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
This commit is contained in:
co-authored by
John Willard
parent
c6c1f3a578
commit
9696dd1a1d
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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!"
|
||||
|
||||
Reference in New Issue
Block a user