|
@@ -15,7 +15,7 @@ interface AIOptions {
|
|
}
|
|
}
|
|
|
|
|
|
class AI {
|
|
class AI {
|
|
- public actor : Thing;
|
|
|
|
|
|
+ public actor : Person;
|
|
public wanderer = true;
|
|
public wanderer = true;
|
|
public wandersOn : Region;
|
|
public wandersOn : Region;
|
|
public wanderChance = 50;
|
|
public wanderChance = 50;
|
|
@@ -171,12 +171,11 @@ class AI {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- // TODO: Make this a rulebook. This happens every time an aggressive action is done.
|
|
|
|
- public async getPoked (action : Action) {
|
|
|
|
|
|
+ public getPoked (action : Action) {
|
|
this.reactingTo = action;
|
|
this.reactingTo = action;
|
|
if (this.actor instanceof Person) {
|
|
if (this.actor instanceof Person) {
|
|
//AIRules.getPoked(this.actor, action);
|
|
//AIRules.getPoked(this.actor, action);
|
|
- await AI.reacttoRules.execute({
|
|
|
|
|
|
+ return AI.reacttoRules.execute({
|
|
noun : this.actor
|
|
noun : this.actor
|
|
}, ...this.extraReacttoRules);
|
|
}, ...this.extraReacttoRules);
|
|
}
|
|
}
|