mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-30 02:52:30 +00:00
## About The Pull Request the bear now a basic and he have a new behaviers. the bear now can go to climbed the trees! he will looked for a tree to climbing and if he founded a tree he will go climb him. also the bear now love honey he will look for a bee hives to stole the honey from it so botanists must be care. the bear will drag the honey behind him so u must chased him to get the honey back again ## Why It's Good For The Game the bear is a basic now so he and have more behavier for more depth mechanis ## Changelog 🆑 refactor: the bear is a basic now. please report any bugs add: the bear will climb trees and search honey /🆑
18 lines
594 B
Plaintext
18 lines
594 B
Plaintext
/datum/ai_planning_subtree/climb_trees
|
|
///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
|
|
|
|
var/obj/structure/flora/tree/target = controller.blackboard[BB_CLIMBED_TREE]
|
|
|
|
if(QDELETED(target))
|
|
controller.queue_behavior(/datum/ai_behavior/find_and_set/valid_tree, BB_CLIMBED_TREE, /obj/structure/flora/tree)
|
|
return
|
|
|
|
controller.queue_behavior(/datum/ai_behavior/climb_tree, BB_CLIMBED_TREE)
|
|
return SUBTREE_RETURN_FINISH_PLANNING
|