Plans beta
Class of @v12-engine/engine/ai
export declare class Plans implements AiAreaA brain's plans (ai.plans): build for what is to be built, production for what is to be trained and researched, the game's build order over both. want is the one door: a want of a building goes to the build plan; one of a unit goes to the build plan for its buildings, and the production plan trains it
Members
constructor
constructor(
ai: Brain, options?: PlansOptions);Constructs a new instance of the Plans class
afresh
readonly afresh = "the save remembers what the computer player planned in a shape this brain does not read: it plans afresh";What the log says where a save's memory of it is of a shape it does not read
ai
readonly ai: Brain;The brain they plan for
build
readonly build: BuildPlan;What to build, and the steps to it
drop
drop(id: string): boolean;Takes a want out, by id
follow
follow(): PlansReport['order'] | undefined;Works on the game's build order, once a think: the first item not had (what stands, is on its way or is queued counted; counts of a type adding up along the order) is a want before all others (order, priority 1000), and following is true. Called by the build plan as it thinks; a module may call it sooner
following
get following(): boolean;Whether the game's build order is still being followed: what the computer would make of itself waits
id
readonly id = "plans";Its id among the brain's areas: what its memory and its report are kept under
production
readonly production: ProductionPlan;What to train and research
remembers
remembers(): boolean;Whether it has anything to remember now: one that does not is left out of a save
report
report(): PlansReport;The purse and each plan's part, for the report
restore
restore(memory: unknown): boolean;Takes back what save gave: whether it was read
save
save(): PlansMemory;Gives a copy of the plans' memory, for a save of the brain
want
want(def: Want): string;Adds a want: what the brain works towards from now (BuildPlan.want). Gives back its id