def register_human(entity, player=False): _register(entity, player=player) _ai = entity["ai"] # Healing _ai["brain"].add_planner(brains.heal()) # Combat _ai["brain"].add_planner(brains.combat()) # Regrouping # NOTE: Not sure what I want this functionality to do # Maybe once squads have evolved a bit more I will approach # it again. # _ai['brain'].add_planner(brains.squad_leader_regroup()) # Panic # _ai['brain'].add_planner(brains.panic()) # Food # _ai['brain'].add_planner(brains.food()) # Search # _ai['brain'].add_planner(brains.search_for_weapon()) # _ai['brain'].add_planner(brains.search_for_ammo()) # _ai['brain'].add_planner(brains.search_for_container()) _ai["brain"].add_planner(brains.search_for_target()) # Reload _ai["brain"].add_planner(brains.reload()) entities.register_event(entity, "logic", _human_logic) entities.register_event(entity, "logic_offline", _human_logic_offline)
def register_human(entity, player=False): _register(entity, player=player) _ai = entity['ai'] #Healing _ai['brain'].add_planner(brains.heal()) #Combat _ai['brain'].add_planner(brains.combat()) #Regrouping #NOTE: Not sure what I want this functionality to do #Maybe once squads have evolved a bit more I will approach #it again. #_ai['brain'].add_planner(brains.squad_leader_regroup()) #Panic #_ai['brain'].add_planner(brains.panic()) #Food #_ai['brain'].add_planner(brains.food()) #Search #_ai['brain'].add_planner(brains.search_for_weapon()) #_ai['brain'].add_planner(brains.search_for_ammo()) #_ai['brain'].add_planner(brains.search_for_container()) _ai['brain'].add_planner(brains.search_for_target()) #Reload _ai['brain'].add_planner(brains.reload()) entities.register_event(entity, 'logic', _human_logic) entities.register_event(entity, 'logic_offline', _human_logic_offline)
def register_robot(entity, player=False): _register(entity, player=player) _ai = entity["ai"] # Combat _ai["brain"].add_planner(brains.robot_combat()) # Reload _ai["brain"].add_planner(brains.reload()) entities.register_event(entity, "logic", _human_logic) entities.register_event(entity, "logic_offline", _human_logic_offline)
def register_robot(entity, player=False): _register(entity, player=player) _ai = entity['ai'] #Combat _ai['brain'].add_planner(brains.robot_combat()) #Reload _ai['brain'].add_planner(brains.reload()) entities.register_event(entity, 'logic', _human_logic) entities.register_event(entity, 'logic_offline', _human_logic_offline)