mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-15 04:01:41 +00:00
## About The Pull Request Hey there, This just refactors sloths to the basic mob framework. Nothing new should be added beyond them seeming a bit more sluggish and being a bit smarter about the fights they pick/running away. ## Why It's Good For The Game Three more subtypes off the list, we are now sub-200 simple animals left to refactor. If people want to play catch with their sloth it should be much easier to fit that in now. ## Changelog 🆑 refactor: Sloths are now basic mobs, however their overall sluggish behavior shouldn't have changed much- let us know if anything is broken. /🆑
16 lines
598 B
Plaintext
16 lines
598 B
Plaintext
/datum/ai_planning_subtree/climb_trees
|
|
operational_datums = list(/datum/component/tree_climber)
|
|
///chance to climb a tree
|
|
var/climb_chance = 35
|
|
|
|
/datum/ai_planning_subtree/climb_trees/SelectBehaviors(datum/ai_controller/controller, seconds_per_tick)
|
|
|
|
if(!SPT_PROB(climb_chance, seconds_per_tick))
|
|
return
|
|
|
|
if(controller.blackboard_key_exists(BB_CLIMBED_TREE))
|
|
controller.queue_behavior(/datum/ai_behavior/climb_tree, BB_CLIMBED_TREE)
|
|
return SUBTREE_RETURN_FINISH_PLANNING
|
|
|
|
controller.queue_behavior(/datum/ai_behavior/find_and_set/valid_tree, BB_CLIMBED_TREE, /obj/structure/flora/tree)
|