From 31e9187f90b5a76ad761cbd4f4ff451e294019ce Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 28 Jun 2021 02:00:59 +0200 Subject: [PATCH] added AI settings to the example action --- ExampleMod.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ExampleMod.cs b/ExampleMod.cs index 9945ddc..ed35694 100644 --- a/ExampleMod.cs +++ b/ExampleMod.cs @@ -73,6 +73,13 @@ namespace ExampleMod { // hidden means the action won't be displayed in the ring menu return ActionType.CanExecuteResult.Hidden; }, + Ai = { + // we allow the action to be done even if the solved needs aren't low enough on a person + CanDoRandomly = true, + SolvedNeeds = new[] {NeedType.Energy}, + // make people more likely to sit down in the grass if they're uncomfortable + PassivePriority = p => p.Emotion == EmotionType.Uncomfortable ? 150 : 25 + }, // since this action doesn't use objects (like chairs etc.), we set a texture to display instead Texture = this.uiTextures[1, 0] });