mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 14:39:58 +01:00
fix mob ai using attacks while inside pokeballs (#81671)
## About The Pull Request fixes pokemon AI still being active while inside the pokeball closes #81669 ## Why It's Good For The Game fixes pokemon AI still being active while inside the pokeball ## Changelog 🆑 fix: fixes pokemon ai still being active when inside the pokeball /🆑
This commit is contained in:
@@ -8,7 +8,8 @@
|
||||
. = ..()
|
||||
if(!controller.blackboard[targeting_strategy_key])
|
||||
CRASH("No targeting strategy was supplied in the blackboard for [controller.pawn]")
|
||||
|
||||
if(HAS_TRAIT(controller.pawn, TRAIT_HANDS_BLOCKED))
|
||||
return FALSE
|
||||
//Hiding location is priority
|
||||
var/atom/target = controller.blackboard[hiding_location_key] || controller.blackboard[target_key]
|
||||
if(QDELETED(target))
|
||||
@@ -67,6 +68,8 @@
|
||||
|
||||
/datum/ai_behavior/basic_ranged_attack/setup(datum/ai_controller/controller, target_key, targeting_strategy_key, hiding_location_key)
|
||||
. = ..()
|
||||
if(HAS_TRAIT(controller.pawn, TRAIT_HANDS_BLOCKED))
|
||||
return FALSE
|
||||
var/atom/target = controller.blackboard[hiding_location_key] || controller.blackboard[target_key]
|
||||
if(QDELETED(target))
|
||||
return FALSE
|
||||
|
||||
Reference in New Issue
Block a user