20 lines
817 B
Python
20 lines
817 B
Python
from __future__ import annotations
|
|
|
|
from dataclasses import dataclass, field
|
|
|
|
|
|
@dataclass
|
|
class AIController:
|
|
"""The "AI slot" on an NPC Character (see Character.ai): names which behavior drives this
|
|
character each tick (see resources/logic/ai.py::AI_BEHAVIORS) plus whatever small bit of
|
|
scratch state that behavior needs to remember between ticks - a next-move cooldown, a
|
|
patrol waypoint index, a target entity id, etc. Purely data, same as AbilityBarSlot
|
|
(engine/ui.py) - the dispatch/behavior logic itself lives in resources/logic/ai.py.
|
|
|
|
A Character with `ai is None` is never ticked at all - that's what makes the player (and
|
|
any inert/decorative Character) exempt without needing a special case anywhere.
|
|
"""
|
|
|
|
behavior_id: str
|
|
state: dict = field(default_factory=dict)
|