mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-15 20:12:21 +00:00
* port minebots to basic mobs and add some behavior * remove unused define * update is_blocked_turf usage * fix radio, goldgrub, and armor upgrade * standardize blackboard names * Apply suggestions from code review Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: warriorstar-orion <orion@snowfrost.garden> * lewc review * whoops * Apply suggestions from code review Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> Signed-off-by: warriorstar-orion <orion@snowfrost.garden> --------- Signed-off-by: warriorstar-orion <orion@snowfrost.garden> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
15 lines
718 B
Plaintext
15 lines
718 B
Plaintext
/**
|
|
* # Pet Planning
|
|
* Perform behaviour based on what pet commands you have received. This is delegated to the pet command datum.
|
|
* When a command is set, we blackboard a key to our currently active command.
|
|
* The blackboard also has a weak reference to every command datum available to us.
|
|
* We use the key to figure out which datum to run, then ask it to figure out how to execute its action.
|
|
*/
|
|
/datum/ai_planning_subtree/pet_planning
|
|
|
|
/datum/ai_planning_subtree/pet_planning/select_behaviors(datum/ai_controller/controller, seconds_per_tick)
|
|
var/datum/pet_command/command = controller.blackboard[BB_ACTIVE_PET_COMMAND]
|
|
if(!command)
|
|
return // Do something else
|
|
return command.execute_action(controller)
|