Files
Bubberstation/code/datums/ai/cursed/cursed_behaviors.dm
SkyratBot 65b8082678 [MIRROR] Harddel Fix Pack #42 + Better Live Reftracking Support [MDB IGNORE] (#10639)
* Harddel Fix Pack #42 + Better Live Reftracking Support

* awooga

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-01-12 21:57:49 +00:00

9 lines
539 B
Plaintext

/datum/ai_behavior/item_move_close_and_attack/ghostly/cursed
/datum/ai_behavior/item_move_close_and_attack/ghostly/cursed/reset_blackboard(datum/ai_controller/controller, succeeded, target_key, throw_count_key)
var/datum/weakref/target_ref = controller.blackboard[target_key]
var/atom/throw_target = target_ref?.resolve()
//dropping our target from the blackboard if they are no longer a valid target after the attack behavior
if(get_dist(throw_target, controller.pawn) > CURSED_VIEW_RANGE)
controller.blackboard[target_key] = null