{ "dm_type": "/datum/ai_controller/basic_controller/bot/cleanbot", "type": "selector", "children": [ { "type": "subtree", "subtype": "/datum/bt_node/subtree/escape_captivity/pacifist" }, { "type": "subtree", "subtype": "/datum/bt_node/subtree/bot_respond_to_summon" }, { "type": "decorator", "decorator": "/datum/bt_node/decorator/override_id_set", "vars": { "observer_abort": "BT_ABORT_LOWER_PRIORITY", "override_id": "SUBPLAN_ID_PET_COMMAND" }, "child": { "type": "subtree", "subtype": "/datum/bt_node/subtree", "override_id": "SUBPLAN_ID_PET_COMMAND" } }, { "type": "decorator", "decorator": "/datum/bt_node/decorator/bot_is_emagged", "vars": { "invert": true }, "child": { "type": "parallel", "failure_policy": "BT_PARALLEL_FAILURE_CHILD_ONE", "success_policy": "BT_PARALLEL_SUCCESS_CHILD_ONE", "repeat_secondary": true, "repeat_secondary_delay": "BASIC_MOB_FIND_TARGET_RATE", "finish_on_primary": true, "children": [ { "type": "selector", "children": [ { "type": "decorator", "decorator": "/datum/bt_node/decorator/bb_key_set", "vars": { "key": "BB_CURRENT_TARGET", "observer_abort": "BT_ABORT_BOTH" }, "child": { "type": "sequence", "children": [ { "type": "leaf", "behavior": "/datum/bt_node/ai_behavior/move_to_target", "vars": { "target_key": "BB_CURRENT_TARGET", "required_dist": 1, "finish_on_arrival": true } }, { "type": "leaf", "behavior": "/datum/bt_node/ai_behavior/execute_clean", "vars": { "target_key": "BB_CURRENT_TARGET" } } ] } }, { "type": "selector", "children": [ { "type": "decorator", "decorator": "/datum/bt_node/decorator/bb_key_set", "vars": { "observer_abort": "BT_ABORT_BOTH", "key": "BB_FRIENDLY_JANITOR" }, "child": { "type": "sequence", "children": [ { "type": "leaf", "behavior": "/datum/bt_node/ai_behavior/move_to_target", "vars": { "target_key": "BB_FRIENDLY_JANITOR", "required_dist": 1, "finish_on_arrival": true, "movement_type": "/datum/ai_movement/basic_avoidance" } }, { "type": "leaf", "behavior": "/datum/bt_node/ai_behavior/befriend_target", "vars": { "target_key": "BB_FRIENDLY_JANITOR", "befriend_message": "BB_FRIENDLY_MESSAGE" } } ] } }, { "type": "decorator", "decorator": "/datum/bt_node/decorator/bb_key_set", "vars": { "key": "BB_FRIENDLY_JANITOR", "invert": true }, "child": { "type": "leaf", "behavior": "/datum/bt_node/ai_behavior/acquire_target/update_interaction_target", "vars": { "target_key": "BB_FRIENDLY_JANITOR", "target_source": "/datum/target_source/oview_single_type/human_mob", "targeting_strategy": "/datum/targeting_strategy/conscious_human/cleanbot_whisperer", "vision_range": 5, "time_between_perform": "30 SECONDS" } } } ] }, { "type": "decorator", "decorator": "/datum/bt_node/decorator/key_off_cooldown", "vars": { "observer_abort": "BT_ABORT_NONE", "cooldown_key": "BB_POST_CLEAN_COOLDOWN" }, "child": { "type": "subtree", "subtype": "/datum/bt_node/subtree/bot_patrol" } } ] }, { "type": "leaf", "behavior": "/datum/bt_node/ai_behavior/acquire_target/update_interaction_target", "vars": { "time_between_perform": "3 SECONDS", "target_key": "BB_CURRENT_TARGET", "targeting_strategy": "/datum/targeting_strategy/pickup_item", "target_source": "/datum/target_source/cleanbot_cleanables", "vision_range": 5, "ignore_list_key": "BB_TEMPORARY_IGNORE_LIST", "must_be_reachable": true, "reach_distance": 15 } }, { "type": "subtree", "subtype": "/datum/bt_node/subtree/bot_salute_authority" } ] } }, { "type": "decorator", "decorator": "/datum/bt_node/decorator/bot_is_emagged", "child": { "type": "parallel", "failure_policy": "BT_PARALLEL_FAILURE_CHILD_ONE", "success_policy": "BT_PARALLEL_SUCCESS_CHILD_ONE", "repeat_secondary": true, "repeat_secondary_delay": "BASIC_MOB_FIND_TARGET_RATE", "finish_on_primary": true, "children": [ { "type": "selector", "children": [ { "type": "decorator", "decorator": "/datum/bt_node/decorator/cooldown", "vars": { "observer_abort": "BT_ABORT_LOWER_PRIORITY", "cooldown_key": "BB_ACID_SPRAY_COOLDOWN", "cooldown_duration": 30 }, "child": { "type": "decorator", "decorator": "/datum/bt_node/decorator/bb_key_set", "vars": { "observer_abort": "BT_ABORT_BOTH", "key": "BB_ACID_SPRAY_TARGET" }, "child": { "type": "sequence", "children": [ { "type": "leaf", "behavior": "/datum/bt_node/ai_behavior/move_to_target", "vars": { "target_key": "BB_ACID_SPRAY_TARGET", "required_dist": 0, "finish_on_arrival": true, "movement_type": "/datum/ai_movement/basic_avoidance" } }, { "type": "leaf", "behavior": "/datum/bt_node/ai_behavior/execute_clean", "vars": { "target_key": "BB_ACID_SPRAY_TARGET" } } ] } } }, { "type": "leaf", "behavior": "/datum/bt_node/ai_behavior/use_mob_ability", "vars": { "ability_key": "BB_CLEANBOT_FOAM" } }, { "type": "decorator", "decorator": "/datum/bt_node/decorator/key_off_cooldown", "vars": { "cooldown_key": "BB_POST_CLEAN_COOLDOWN" }, "child": { "type": "subtree", "subtype": "/datum/bt_node/subtree/bot_patrol" } } ] }, { "type": "leaf", "behavior": "/datum/bt_node/ai_behavior/acquire_target/update_interaction_target", "vars": { "target_key": "BB_ACID_SPRAY_TARGET", "target_source": "/datum/target_source/oview_single_type/human_mob", "targeting_strategy": "/datum/targeting_strategy/conscious_human", "ignore_list_key": "BB_TEMPORARY_IGNORE_LIST", "vision_range": 5, "time_between_perform": "30 SECONDS" } } ] } } ] }