Elin Decompiled Documentation EA 23.295 Stable
Loading...
Searching...
No Matches
AIAct Class Reference
Inheritance diagram for AIAct:
Act Element EClass AIProgress AIWork AI_AttackHome AI_Bladder AI_Clean AI_Cook AI_Craft AI_Dance AI_Deconstruct AI_Drink AI_Eat AI_Equip AI_Fish AI_Fuck AI_Goto AI_GotoHearth AI_Grab< T > AI_Haul AI_Idle AI_LeaveMap AI_Massage AI_Offer AI_OpenGambleChest AI_Paint AI_PassTime AI_PlayMusic AI_Practice AI_Pray AI_Read AI_ReleaseHeld AI_Shopping AI_TargetCard AI_Trolley AI_UseCrafter AI_Wait DynamicAIAct Goal Task

Public Types

enum  Status { Running , Fail , Success }
 
- Public Types inherited from Act
enum  CostType { None , MP , SP }
 

Public Member Functions

override string ToString ()
 
override MultiSprite GetStateIcon ()
 
virtual bool ShouldAllyAttack (Chara tg)
 
virtual Point GetDestination ()
 
AIProgress GetProgress ()
 
string GetCurrentActionText ()
 
override bool IsToolValid ()
 
GetChild< T > ()
 
virtual void OnStart ()
 
void SetOwner (Chara c)
 
virtual void OnSetOwner ()
 
void SetChild (AIAct seq, Func< Status > _onChildFail=null)
 
void Start ()
 
override bool Perform ()
 
Status Restart ()
 
Status Success (Action action=null)
 
virtual void OnSuccess ()
 
bool TryCancel (Card c)
 
virtual Status Cancel ()
 
virtual void OnCancel ()
 
virtual void OnCancelOrSuccess ()
 
virtual bool CanManualCancel ()
 
Status KeepRunning ()
 
void Reset ()
 
virtual void OnReset ()
 
Status Tick ()
 
virtual IEnumerable< StatusRun ()
 
Status TickChild ()
 
Status Do (AIAct _seq, Func< Status > _onChildFail=null)
 
Status DoGotoInteraction (Point pos, Func< Status > _onChildFail=null)
 
Status DoGoto (Point pos, int dist=0, bool ignoreConnection=false, Func< Status > _onChildFail=null)
 
Status DoGoto (Card card, Func< Status > _onChildFail=null)
 
Status DoGoto (Card card, int dist, bool ignoreConnection=false, Func< Status > _onChildFail=null)
 
Status DoGotoSpot (Card card, Func< Status > _onChildFail=null)
 
Status DoGoto< T > (Func< Status > _onChildFail=null)
 
Status DoGotoSpot< T > (Func< Status > _onChildFail=null, bool ignoreAccessType=false)
 
Status DoGrab (Card card, int num=-1, bool pickHeld=false, Func< Status > _onChildFail=null)
 
Status DoGrab< T > ()
 
Status DoProgress ()
 
Status DoIdle (int repeat=3)
 
Status DoWait (int count=1)
 
virtual AIProgress CreateProgress ()
 
virtual void OnCreateProgress (Progress_Custom p)
 
virtual bool CanProgress ()
 
virtual void OnBeforeProgress ()
 
virtual void OnProgress ()
 
virtual void OnProgressComplete ()
 
void SimulateZone (int days)
 
virtual void OnSimulateZone (int days)
 
virtual void OnSimulatePosition ()
 
- Public Member Functions inherited from Act
virtual CursorInfo GetCursorIcon (Card c)
 
virtual MultiSprite GetStateIcon ()
 
override Sprite GetSprite ()
 
virtual bool ShowMouseHint (Card c)
 
virtual bool IsValidTC (Card c)
 
virtual string GetHintText (string str="")
 
virtual string GetText (string str="")
 
virtual string GetTextSmall (Card c)
 
bool IsTargetHostileParty ()
 
virtual Color GetActPlanColor ()
 
virtual bool Perform ()
 
bool Perform (Chara _cc, Card _tc=null, Point _tp=null)
 
virtual bool ValidatePerform (Chara _cc, Card _tc, Point _tp)
 
virtual bool CanPerform ()
 
bool CanPerform (Chara _cc, Card _tc=null, Point _tp=null)
 
virtual bool IsToolValid ()
 
new void SetImage (Image image)
 
virtual void OnMarkMapHighlights ()
 
virtual bool ShouldMapHighlight (Point p)
 
- Public Member Functions inherited from Element
virtual SourceElement.Row GetSource ()
 
virtual int GetSourcePotential (int v)
 
virtual Sprite GetSprite ()
 
int GetMaterialSourceValue (Thing t, int v)
 
virtual long GetSourceValue (long v, int lv, SourceValueType type)
 
virtual Sprite GetIcon (string suffix="")
 
bool IsActive (Card c)
 
int SortVal (bool charaSheet=false)
 
virtual bool CanLink (ElementContainer owner)
 
bool HasTag (string tag)
 
void SetImage (Image i)
 
virtual string GetDetail ()
 
bool IsFactionElement (Chara c)
 
Element GetParent (Card c)
 
void WriteNote (UINote n, ElementContainer owner=null, Action< UINote > onWriteNote=null)
 
void WriteNoteWithRef (UINote n, ElementContainer owner, Action< UINote > onWriteNote, Element refEle)
 
void _WriteNote (UINote n, Chara c, Act act)
 
void AddHeaderAbility (UINote n)
 
void _WriteNote (UINote n, ElementContainer owner, Action< UINote > onWriteNote, bool isRef, bool addHeader=true)
 
void AddEncNote (UINote n, Card Card, ElementContainer.NoteMode mode=ElementContainer.NoteMode.Default, Func< Element, string, string > funcText=null, Action< UINote, Element > onAddNote=null)
 
virtual void OnWriteNote (UINote n, ElementContainer owner)
 
virtual void OnChangeValue ()
 
void CheckLevelBonus (ElementContainer owner, UINote n=null)
 
int GetSortVal (UIList.SortMode m)
 
virtual Act.Cost GetCost (Chara c)
 
virtual int GetPower (Card c)
 
virtual void SetTextValue (UIText text, bool shorten=false)
 
virtual bool IsPurchaseFeatReqMet (ElementContainer owner, int lv=-1)
 
virtual void WritePurchaseReq (UINote n, int lv=1)
 

Public Attributes

new Chara owner
 
Status status
 
IEnumerator< StatusEnumerator
 
AIAct child
 
AIAct parent
 
byte restartCount
 
Func< StatusonChildFail
 
Func< bool > isFail
 
- Public Attributes inherited from Element
SourceElement.Row _source
 
int id
 
int vBase
 
int vExp
 
int vPotential
 
int vTempPotential
 
int vLink
 
int vSource
 
int vSourcePotential
 
ElementContainer owner
 

Properties

virtual bool IsRunning [get]
 
bool IsChildRunning [get]
 
bool IsMoveAI [get]
 
virtual int MaxRestart [get]
 
virtual new string Name [get]
 
virtual MultiSprite stateIcon [get]
 
virtual Sprite actionIcon [get]
 
virtual bool IsNoGoal [get]
 
virtual bool IsAutoTurn [get]
 
virtual bool IsIdle [get]
 
virtual bool CancelOnAggro [get]
 
virtual bool PushChara [get]
 
virtual int MaxProgress [get]
 
virtual bool ShowProgress [get]
 
virtual bool UseTurbo [get]
 
virtual int CurrentProgress [get]
 
virtual bool ShowCursor [get]
 
virtual bool CancelWhenDamaged [get]
 
virtual bool CancelWhenMoved [get]
 
virtual bool InformCancel [get]
 
virtual Thing RenderThing [get]
 
AIAct Current [get]
 
override bool IsAct [get]
 
override bool ShowPotential [get]
 
override bool UsePotential [get]
 
override bool ShowRelativeAttribute [get]
 
virtual bool HasProgress [get]
 
- Properties inherited from Act
override bool ShowPotential [get]
 
override bool UsePotential [get]
 
override bool ShowRelativeAttribute [get]
 
virtual CursorInfo CursorIcon [get]
 
virtual string ID [get]
 
virtual bool IsAct [get]
 
virtual bool WillEndTurn [get]
 
virtual bool CloseLayers [get]
 
virtual int LeftHand [get]
 
virtual int RightHand [get]
 
virtual int ElementPowerMod [get]
 
virtual bool ShowMapHighlight [get]
 
virtual bool ShowMapHighlightBlock [get]
 
virtual bool PickHeldOnStart [get]
 
virtual bool DropHeldOnStart [get]
 
virtual bool CanPressRepeat [get]
 
virtual bool CanAutofire [get]
 
virtual bool ResetAxis [get]
 
virtual bool RequireTool [get]
 
virtual bool IsHostileAct [get]
 
virtual bool HideRightInfo [get]
 
virtual bool ShouldEndMimicry [get]
 
virtual bool HaveLongPressAction [get]
 
virtual float Radius [get]
 
virtual int PerformDistance [get]
 
virtual int MaxRadius [get]
 
virtual TargetType TargetType [get]
 
virtual bool LocalAct [get]
 
virtual bool CanRapidFire [get]
 
virtual float RapidDelay [get]
 
virtual bool ShowAuto [get]
 
- Properties inherited from Element
SourceElement.Row source [get]
 
virtual int DisplayValue [get]
 
virtual int MinValue [get]
 
int Value [get]
 
int ValueWithoutLink [get]
 
virtual int MinPotential [get]
 
int Potential [get]
 
virtual bool CanGainExp [get]
 
bool IsFlag [get]
 
virtual string Name [get]
 
virtual string FullName [get]
 
virtual int ExpToNext [get]
 
virtual bool UseExpMod [get]
 
virtual int CostTrain [get]
 
virtual int CostLearn [get]
 
virtual bool ShowXP [get]
 
virtual bool ShowMsgOnValueChanged [get]
 
virtual bool ShowValue [get]
 
virtual bool ShowPotential [get]
 
virtual bool UsePotential [get]
 
virtual bool PotentialAsStock [get]
 
virtual bool ShowRelativeAttribute [get]
 
virtual bool ShowBonuses [get]
 
virtual string ShortName [get]
 
bool IsGlobalElement [get]
 
bool IsFactionWideElement [get]
 
bool IsPartyWideElement [get]
 
virtual bool ShowEncNumber [get]
 
bool IsTrait [get]
 
bool IsFoodTrait [get]
 
bool IsFoodTraitMain [get]
 
bool IsMainAttribute [get]
 
Act act [get]
 
- Properties inherited from EClass
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Faction Wilds [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static SoundManager Sound [get]
 
static CoreDebug debug [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from Act
static void SetReference (Chara _cc, Card _tc=null, Point _tp=null)
 
static void SetTool (Thing t)
 
- Static Public Member Functions inherited from Element
static string GetName (string alias)
 
static SourceElement.Row Get (int id)
 
static Dictionary< int, int > GetElementMap (int[] list)
 
static Dictionary< int, int > GetElementMap (int[] list, Dictionary< int, int > map)
 
static SourceElement.Row GetRandomElement (int lv=1, bool useWeight=true)
 
static Element Create (int id, int v=0)
 
static Element Create (string id, int v=1)
 
static int GetId (string alias)
 
static int GetResistLv (int v)
 
static long GetResistDamage (long dmg, int v, int power=0)
 
- Static Public Member Functions inherited from EClass
static int rndSeed (int a, int seed)
 
static int rnd (long a)
 
static int rnd (int a)
 
static int curve (long _a, int start, int step, int rate=75)
 
static int sqrt (int a)
 
static int rndHalf (int a)
 
static float rndf (float a)
 
static int rndSqrt (int a)
 
static void Wait (float a, Card c)
 
static void Wait (float a, Point p)
 
static int Bigger (int a, int b)
 
static int Smaller (int a, int b)
 
- Static Public Attributes inherited from Act
static Chara CC
 
static Card TC
 
static Point TP = new Point()
 
static Thing TOOL
 
static int powerMod = 100
 
static bool forcePt
 
static Act CurrentAct
 
- Static Public Attributes inherited from Element
const int Div = 5
 
static Element Void = new Element()
 
static int[] List_MainAttributes = new int[9] { 70, 72, 71, 77, 74, 75, 76, 73, 79 }
 
static int[] List_MainAttributesMajor = new int[8] { 70, 72, 71, 77, 74, 75, 76, 73 }
 
static int[] List_Body = new int[4] { 70, 72, 71, 77 }
 
static int[] List_Mind = new int[4] { 74, 75, 76, 73 }
 
static List< SourceElement.RowListElements = new List<SourceElement.Row>()
 
static List< SourceElement.RowListAttackElements = new List<SourceElement.Row>()
 
- Static Public Attributes inherited from EClass
static Core core
 

Detailed Description

Definition at line 5 of file AIAct.cs.

Member Enumeration Documentation

◆ Status

Enumerator
Running 
Fail 
Success 

Definition at line 7 of file AIAct.cs.

8 {
10 Fail,
12 }

Member Function Documentation

◆ Cancel()

virtual Status AIAct.Cancel ( )
inlinevirtual

Reimplemented in AI_Massage, and Task.

Definition at line 305 of file AIAct.cs.

306 {
307 status = Status.Fail;
308 if (owner != null && owner.held != null && !owner.IsPC)
309 {
310 owner.PickHeld();
311 }
312 OnCancel();
314 Reset();
315 return status;
316 }
virtual void OnCancelOrSuccess()
Definition: AIAct.cs:322
virtual void OnCancel()
Definition: AIAct.cs:318
void Reset()
Definition: AIAct.cs:340
Status status
Definition: AIAct.cs:16
new Chara owner
Definition: AIAct.cs:14
Status
Definition: AIAct.cs:8
Card held
Definition: Chara.cs:70
override bool IsPC
Definition: Chara.cs:626
void PickHeld(bool msg=false)
Definition: Chara.cs:4606

References Chara.held, Chara.IsPC, OnCancel(), OnCancelOrSuccess(), owner, Chara.PickHeld(), Reset(), and status.

Referenced by AM_Adv._OnUpdateInput(), Chara.AddCondition(), AM_Adv.AxisMove(), QueueManager.Cancel(), AI_OpenLock.CreateProgress(), AI_PracticeDummy.CreateProgress(), DoGoto(), DoGotoInteraction(), DoGotoSpot(), DoGrab(), Chara.IsEnemyOnPath(), Card.MoveImmediate(), TraitNewZone.MoveZone(), AM_Adv.OnActivate(), AI_Torture.OnCancelOrSuccess(), TaskDig.OnCreateProgress(), TaskHarvest.OnCreateProgress(), TaskMine.OnCreateProgress(), TaskPlow.OnCreateProgress(), LayerDragGrid.OnKill(), AI_Fish.ProgressFish.OnProgress(), AM_Adv.PressedActionMove(), AI_Bladder.Run(), AI_Cook.Run(), AI_Deconstruct.Run(), AI_Drink.Run(), AI_Eat.Run(), AI_Equip.Run(), AI_Fish.Run(), AI_Fuck.Run(), AI_Goto.Run(), AI_Grab< T >.Run(), AI_Idle.Run(), AI_Offer.Run(), AI_PlayMusic.Run(), AI_Read.Run(), AI_Shear.Run(), AI_Slaughter.Run(), AI_Steal.Run(), AI_TargetCard.Run(), AI_UseCrafter.Run(), AIProgress.Run(), GoalCombat.Run(), GoalManualMove.Run(), GoalSpot.Run(), GoalTask.Run(), Chara.SetAI(), SetChild(), Chara.SetEnemy(), Card.Teleport(), ActThrow.Throw(), Tick(), Player.TryAbortAutoCombat(), TryCancel(), AM_Adv.TryCancelInteraction(), AI_Goto.TryGoTo(), and Chara.UnmakeMinion().

◆ CanManualCancel()

virtual bool AIAct.CanManualCancel ( )
inlinevirtual

Reimplemented in AI_Eat, AI_Fish, AI_Goto, AI_PassTime, AI_Practice, AI_Slaughter, AI_Trolley, AI_UseCrafter, GoalCombat, TaskBuild, TaskChopWood, TaskClean, TaskCraft, TaskCullLife, TaskDrawWater, TaskDump, TaskHarvest, TaskPoint, TaskPourWater, and TaskWater.

Definition at line 326 of file AIAct.cs.

327 {
328 if (IsChildRunning)
329 {
330 return child is AI_Goto;
331 }
332 return false;
333 }
AIAct child
Definition: AIAct.cs:20
bool IsChildRunning
Definition: AIAct.cs:43

References child, and IsChildRunning.

Referenced by AM_Adv._OnUpdateInput(), and AM_Adv.TryCancelInteraction().

◆ CanProgress()

virtual bool AIAct.CanProgress ( )
inlinevirtual

Reimplemented in AI_TargetCard, BaseTaskHarvest, Progress_Custom, Task, TaskChopWood, TaskCraft, TaskDrawWater, TaskHarvest, TaskPlow, and TaskPourWater.

Definition at line 575 of file AIAct.cs.

576 {
577 return true;
578 }

Referenced by CreateProgress(), and AIProgress.Run().

◆ CreateProgress()

virtual AIProgress AIAct.CreateProgress ( )
inlinevirtual

Reimplemented in AI_Fish, AI_OpenLock, AI_PracticeDummy, and AI_Torture.

Definition at line 555 of file AIAct.cs.

556 {
557 Progress_Custom progress_Custom = new Progress_Custom
558 {
559 onProgress = delegate
560 {
561 OnProgress();
562 },
563 onProgressComplete = OnProgressComplete,
564 canProgress = CanProgress,
565 onBeforeProgress = OnBeforeProgress
566 };
567 OnCreateProgress(progress_Custom);
568 return progress_Custom;
569 }
virtual void OnProgress()
Definition: AIAct.cs:584
virtual void OnBeforeProgress()
Definition: AIAct.cs:580
virtual void OnCreateProgress(Progress_Custom p)
Definition: AIAct.cs:571
virtual void OnProgressComplete()
Definition: AIAct.cs:588
virtual bool CanProgress()
Definition: AIAct.cs:575

References CanProgress(), OnBeforeProgress(), OnCreateProgress(), OnProgress(), and OnProgressComplete().

Referenced by DoProgress(), AIWork_Lumberjack.GetWork(), and AIWork_Research.GetWork().

◆ Do()

Status AIAct.Do ( AIAct  _seq,
Func< Status _onChildFail = null 
)
inline

◆ DoGoto() [1/3]

Status AIAct.DoGoto ( Card  card,
Func< Status _onChildFail = null 
)
inline

Definition at line 456 of file AIAct.cs.

457 {
458 return DoGoto(card, (card.isChara || card.pos.cell.blocked) ? 1 : 0, ignoreConnection: false, _onChildFail);
459 }
Status DoGoto(Point pos, int dist=0, bool ignoreConnection=false, Func< Status > _onChildFail=null)
Definition: AIAct.cs:446

References card, and DoGoto().

◆ DoGoto() [2/3]

Status AIAct.DoGoto ( Card  card,
int  dist,
bool  ignoreConnection = false,
Func< Status _onChildFail = null 
)
inline

Definition at line 461 of file AIAct.cs.

462 {
463 if (card != null && card == owner.held)
464 {
465 return Status.Running;
466 }
467 if (card == null || !card.ExistsOnMap)
468 {
469 return _onChildFail?.Invoke() ?? Cancel();
470 }
471 SetChild(new AI_Goto(card, dist, ignoreConnection), _onChildFail);
472 return TickChild();
473 }
virtual Status Cancel()
Definition: AIAct.cs:305

References Cancel(), card, Chara.held, owner, SetChild(), and TickChild().

◆ DoGoto() [3/3]

◆ DoGoto< T >()

Status AIAct.DoGoto< T > ( Func< Status _onChildFail = null)
inline
Type Constraints
T :Trait 

Definition at line 491 of file AIAct.cs.

491 : Trait
492 {
493 return DoGoto(EClass._map.Installed.traits.GetTraitSet<T>().GetRandom()?.owner, _onChildFail);
494 }
Definition: EClass.cs:6
static Map _map
Definition: EClass.cs:19
PropsInstalled Installed
Definition: Map.cs:123
TraitManager traits
Definition: Props.cs:18
TraitSet GetTraitSet(Type t)
Definition: TraitManager.cs:94
Trait GetRandom()
Definition: TraitSet.cs:7
Definition: Trait.cs:7
Card owner
Definition: Trait.cs:28

References EClass._map, DoGoto(), TraitSet.GetRandom(), TraitManager.GetTraitSet(), Map.Installed, Trait.owner, and Props.traits.

◆ DoGotoInteraction()

Status AIAct.DoGotoInteraction ( Point  pos,
Func< Status _onChildFail = null 
)
inline

Definition at line 436 of file AIAct.cs.

437 {
438 if (pos == null || !pos.IsValid)
439 {
440 return _onChildFail?.Invoke() ?? Cancel();
441 }
442 SetChild(new AI_Goto(pos, 0, _ignoreConnection: false, _interaction: true), _onChildFail);
443 return TickChild();
444 }

References Cancel(), Point.IsValid, SetChild(), and TickChild().

Referenced by AI_TargetCard.Run(), and DynamicAIAct.Run().

◆ DoGotoSpot()

Status AIAct.DoGotoSpot ( Card  card,
Func< Status _onChildFail = null 
)
inline

Definition at line 475 of file AIAct.cs.

476 {
477 if (card != null && card == owner.held)
478 {
479 return Status.Running;
480 }
481 if (card == null || !card.ExistsOnMap)
482 {
483 return _onChildFail?.Invoke() ?? Cancel();
484 }
485 Point randomPoint = card.trait.GetRandomPoint();
486 int dist = (randomPoint.cell.blocked ? 1 : 0);
487 SetChild(new AI_Goto(randomPoint, dist), _onChildFail);
488 return TickChild();
489 }
Definition: Point.cs:9

References Cancel(), card, Chara.held, owner, SetChild(), and TickChild().

Referenced by AI_Idle.Run().

◆ DoGotoSpot< T >()

Status AIAct.DoGotoSpot< T > ( Func< Status _onChildFail = null,
bool  ignoreAccessType = false 
)
inline
Type Constraints
T :Trait 

Definition at line 496 of file AIAct.cs.

496 : Trait
497 {
498 Trait random = EClass._map.Installed.traits.GetTraitSet<T>().GetRandom(ignoreAccessType ? null : owner);
499 if (random != null)
500 {
501 DoGoto(random.GetRandomPoint(null, ignoreAccessType ? null : owner), 0, ignoreConnection: false, _onChildFail);
502 }
503 return _onChildFail?.Invoke() ?? Status.Fail;
504 }
Point GetRandomPoint(Func< Point, bool > func=null, Chara accessChara=null)
Definition: Trait.cs:761

References EClass._map, DoGoto(), Trait.GetRandomPoint(), TraitManager.GetTraitSet(), Map.Installed, owner, and Props.traits.

◆ DoGrab()

Status AIAct.DoGrab ( Card  card,
int  num = -1,
bool  pickHeld = false,
Func< Status _onChildFail = null 
)
inline

Definition at line 506 of file AIAct.cs.

507 {
508 if (card != null && card == owner.held)
509 {
510 return Status.Running;
511 }
512 if (card == null || !card.GetRootCard().ExistsOnMap)
513 {
514 return Cancel();
515 }
516 SetChild(new AI_Grab
517 {
518 target = card,
519 num = num,
520 pickHeld = pickHeld
521 }, _onChildFail);
522 return TickChild();
523 }

References Cancel(), card, Chara.held, owner, SetChild(), and TickChild().

Referenced by AI_Drink.Run(), AI_Eat.Run(), AI_HaulResource.Run(), AI_Offer.Run(), AI_Read.Run(), and TaskMoveInstalled.Run().

◆ DoGrab< T >()

Status AIAct.DoGrab< T > ( )
inline
Type Constraints
T :Trait 

Definition at line 525 of file AIAct.cs.

525 : Trait
526 {
527 SetChild(new AI_Grab<T>());
528 return TickChild();
529 }

References SetChild(), and TickChild().

◆ DoIdle()

Status AIAct.DoIdle ( int  repeat = 3)
inline

Definition at line 537 of file AIAct.cs.

538 {
539 SetChild(new AI_Idle
540 {
541 maxRepeat = repeat
542 }, KeepRunning);
543 return TickChild();
544 }
Status KeepRunning()
Definition: AIAct.cs:335

References KeepRunning(), SetChild(), and TickChild().

Referenced by AI_Clean.Run(), AIWork.Run(), AIWork_Explore.Run(), GoalGraze.Run(), GoalIdle.Run(), GoalVisitorGuest.Run(), and GoalWork.Run().

◆ DoProgress()

Status AIAct.DoProgress ( )
inline

Definition at line 531 of file AIAct.cs.

532 {
534 return TickChild();
535 }
virtual AIProgress CreateProgress()
Definition: AIAct.cs:555

References CreateProgress(), SetChild(), and TickChild().

Referenced by AI_Fish.Run(), AI_PracticeDummy.Run(), AI_TargetCard.Run(), AI_Torture.Run(), TaskCraft.Run(), and TaskPoint.Run().

◆ DoWait()

Status AIAct.DoWait ( int  count = 1)
inline

Definition at line 546 of file AIAct.cs.

547 {
548 SetChild(new AI_Wait
549 {
550 count = count
551 }, KeepRunning);
552 return TickChild();
553 }

References KeepRunning(), SetChild(), and TickChild().

Referenced by AI_Churyu.Run(), AI_Dance.Run(), AI_Fish.Run(), AI_Mofu.Run(), and DynamicAIAct.Run().

◆ GetChild< T >()

T AIAct.GetChild< T > ( )
inline
Type Constraints
T :AIAct 

Definition at line 175 of file AIAct.cs.

175 : AIAct
176 {
177 if (this is T)
178 {
179 return this as T;
180 }
181 AIAct aIAct = child;
182 return ((aIAct != null) ? aIAct.GetChild<T>() : null) ?? null;
183 }
Definition: AIAct.cs:6

References child.

◆ GetCurrentActionText()

string AIAct.GetCurrentActionText ( )
inline

Definition at line 157 of file AIAct.cs.

158 {
159 if (IsChildRunning && child.source.id != 0 && !child.source.name_JP.IsEmpty())
160 {
162 }
163 return base.source.GetName().IsEmpty("idle".lang());
164 }
string GetCurrentActionText()
Definition: AIAct.cs:157
SourceElement.Row source
Definition: ELEMENT.cs:278

References child, GetCurrentActionText(), IsChildRunning, and Element.source.

Referenced by Chara.GetActionText(), and GetCurrentActionText().

◆ GetDestination()

virtual Point AIAct.GetDestination ( )
inlinevirtual

Reimplemented in AI_Goto.

Definition at line 139 of file AIAct.cs.

140 {
141 if (!IsChildRunning)
142 {
143 return owner.pos;
144 }
145 return child.GetDestination();
146 }
virtual Point GetDestination()
Definition: AIAct.cs:139
Point pos
Definition: Card.cs:60

References child, GetDestination(), IsChildRunning, owner, and Card.pos.

Referenced by GetDestination(), and Chara.GetDestination().

◆ GetProgress()

AIProgress AIAct.GetProgress ( )
inline

Definition at line 148 of file AIAct.cs.

149 {
150 if (IsChildRunning)
151 {
152 return child.GetProgress();
153 }
154 return this as AIProgress;
155 }
AIProgress GetProgress()
Definition: AIAct.cs:148

References child, GetProgress(), and IsChildRunning.

Referenced by UIAutoTurn._Update(), and GetProgress().

◆ GetStateIcon()

override MultiSprite AIAct.GetStateIcon ( )
inlinevirtual

Reimplemented from Act.

Definition at line 129 of file AIAct.cs.

130 {
131 return (child ?? this).stateIcon;
132 }

References child.

Referenced by CharaRenderer.RefreshStateIcon().

◆ IsToolValid()

override bool AIAct.IsToolValid ( )
inlinevirtual

Reimplemented from Act.

Definition at line 166 of file AIAct.cs.

167 {
168 if (owner == EClass.pc && Act.TOOL != null)
169 {
170 return Act.TOOL.parent == EClass.pc;
171 }
172 return false;
173 }
Definition: ACT.cs:62
static Thing TOOL
Definition: ACT.cs:83
static Chara pc
Definition: EClass.cs:15

References owner, EClass.pc, and Act.TOOL.

Referenced by TaskCut.OnProgress().

◆ KeepRunning()

◆ OnBeforeProgress()

virtual void AIAct.OnBeforeProgress ( )
inlinevirtual

Reimplemented in Progress_Custom, and TaskCraft.

Definition at line 580 of file AIAct.cs.

581 {
582 }

Referenced by CreateProgress(), and AIProgress.Run().

◆ OnCancel()

virtual void AIAct.OnCancel ( )
inlinevirtual

Reimplemented in AI_PassTime, AI_PlayMusic, AI_Trolley, and AI_UseCrafter.

Definition at line 318 of file AIAct.cs.

319 {
320 }

Referenced by Cancel().

◆ OnCancelOrSuccess()

virtual void AIAct.OnCancelOrSuccess ( )
inlinevirtual

Reimplemented in AI_Practice, AI_Slaughter, AI_Torture, and TaskDump.

Definition at line 322 of file AIAct.cs.

323 {
324 }

Referenced by Cancel(), and Success().

◆ OnCreateProgress()

virtual void AIAct.OnCreateProgress ( Progress_Custom  p)
inlinevirtual

Reimplemented in AIWork_Lumberjack, AIWork_Research, TaskChopWood, TaskCraft, TaskCut, TaskDig, TaskDrawWater, TaskHarvest, TaskMine, TaskPlow, and TaskPourWater.

Definition at line 571 of file AIAct.cs.

572 {
573 }

Referenced by CreateProgress().

◆ OnProgress()

virtual void AIAct.OnProgress ( )
inlinevirtual

Reimplemented in AI_Farm, AI_Fish.ProgressFish, AI_Water, Progress_Custom, TaskCraft, and TaskCut.

Definition at line 584 of file AIAct.cs.

585 {
586 }

Referenced by CreateProgress(), and AIProgress.Run().

◆ OnProgressComplete()

virtual void AIAct.OnProgressComplete ( )
inlinevirtual

◆ OnReset()

virtual void AIAct.OnReset ( )
inlinevirtual

Reimplemented in AI_Bladder, AI_Goto, and Task.

Definition at line 362 of file AIAct.cs.

363 {
364 }

Referenced by Reset().

◆ OnSetOwner()

virtual void AIAct.OnSetOwner ( )
inlinevirtual

Reimplemented in AI_Drink, and AI_Read.

Definition at line 196 of file AIAct.cs.

197 {
198 }

Referenced by SetOwner().

◆ OnSimulatePosition()

virtual void AIAct.OnSimulatePosition ( )
inlinevirtual

Reimplemented in GoalGraze, GoalSleep, and GoalWork.

Definition at line 604 of file AIAct.cs.

605 {
606 }

Referenced by Zone.Simulate().

◆ OnSimulateZone()

virtual void AIAct.OnSimulateZone ( int  days)
inlinevirtual

Definition at line 600 of file AIAct.cs.

601 {
602 }

Referenced by SimulateZone().

◆ OnStart()

virtual void AIAct.OnStart ( )
inlinevirtual

Reimplemented in AI_Eat, AI_Fish.ProgressFish, AI_Idle, AI_PassTime, AI_UseCrafter, BaseTaskHarvest, and TaskCut.

Definition at line 185 of file AIAct.cs.

186 {
187 }

Referenced by Start().

◆ OnSuccess()

virtual void AIAct.OnSuccess ( )
inlinevirtual

Reimplemented in AI_UseCrafter, and Task.

Definition at line 276 of file AIAct.cs.

277 {
278 }

Referenced by Success().

◆ Perform()

override bool AIAct.Perform ( )
inlinevirtual

Reimplemented from Act.

Reimplemented in DynamicAIAct.

Definition at line 245 of file AIAct.cs.

246 {
247 Act.CC.SetAIImmediate(this);
248 return false;
249 }
static Chara CC
Definition: ACT.cs:77
void SetAIImmediate(AIAct g)
Definition: Chara.cs:9140

References Act.CC, and Chara.SetAIImmediate().

◆ Reset()

void AIAct.Reset ( )
inline

Definition at line 340 of file AIAct.cs.

341 {
342 if (owner != null)
343 {
344 if (child != null)
345 {
346 child.Reset();
347 }
348 OnReset();
349 if (Enumerator != null)
350 {
351 Enumerator.Dispose();
352 Enumerator = null;
353 }
354 owner = null;
355 child = null;
356 restartCount = 0;
357 onChildFail = null;
358 isFail = null;
359 }
360 }
byte restartCount
Definition: AIAct.cs:24
Func< Status > onChildFail
Definition: AIAct.cs:26
IEnumerator< Status > Enumerator
Definition: AIAct.cs:18
Func< bool > isFail
Definition: AIAct.cs:28
virtual void OnReset()
Definition: AIAct.cs:362

References child, Enumerator, isFail, onChildFail, OnReset(), owner, Reset(), and restartCount.

Referenced by Cancel(), ActPlan.Item.Perform(), Reset(), Restart(), SetChild(), and Success().

◆ Restart()

Status AIAct.Restart ( )
inline

Definition at line 251 of file AIAct.cs.

252 {
253 restartCount++;
255 {
256 return Success();
257 }
258 byte b = restartCount;
259 Chara chara = owner;
260 Reset();
261 SetOwner(chara);
262 restartCount = b;
263 return status = Status.Running;
264 }
void SetOwner(Chara c)
Definition: AIAct.cs:189
virtual int MaxRestart
Definition: AIAct.cs:66
Definition: Chara.cs:10

References MaxRestart, owner, Reset(), restartCount, SetOwner(), status, and Success.

Referenced by AI_Churyu.Run(), AI_Fish.Run(), AI_Idle.Run(), AI_Mofu.Run(), AIWork.Run(), GoalVisitorEnemy.Run(), GoalVisitorGuest.Run(), NoGoal.Run(), TaskCraft.Run(), and AI_Goto.TryGoTo().

◆ Run()

◆ SetChild()

void AIAct.SetChild ( AIAct  seq,
Func< Status _onChildFail = null 
)
inline

Definition at line 200 of file AIAct.cs.

201 {
202 if (child != null)
203 {
204 child.Reset();
205 }
206 child = seq;
207 child.parent = this;
209 onChildFail = _onChildFail ?? new Func<Status>(Cancel);
210 }

References Cancel(), child, onChildFail, owner, Reset(), and SetOwner().

Referenced by Do(), DoGoto(), DoGotoInteraction(), DoGotoSpot(), DoGrab(), DoGrab< T >(), DoIdle(), DoProgress(), and DoWait().

◆ SetOwner()

void AIAct.SetOwner ( Chara  c)
inline

Definition at line 189 of file AIAct.cs.

190 {
191 owner = c;
192 status = Status.Running;
193 OnSetOwner();
194 }
virtual void OnSetOwner()
Definition: AIAct.cs:196

References OnSetOwner(), owner, and status.

Referenced by BaseTaskHarvest.GetBestTool(), Restart(), Chara.SetAI(), and SetChild().

◆ ShouldAllyAttack()

virtual bool AIAct.ShouldAllyAttack ( Chara  tg)
inlinevirtual

Reimplemented in AI_Fuck, and AI_Shear.

Definition at line 134 of file AIAct.cs.

135 {
136 return child?.ShouldAllyAttack(tg) ?? true;
137 }
virtual bool ShouldAllyAttack(Chara tg)
Definition: AIAct.cs:134

References child, and ShouldAllyAttack().

Referenced by Chara.FindNewEnemy(), GoalCombat.Run(), and ShouldAllyAttack().

◆ SimulateZone()

void AIAct.SimulateZone ( int  days)
inline

Definition at line 592 of file AIAct.cs.

593 {
594 if (owner.conSuspend == null)
595 {
596 OnSimulateZone(days);
597 }
598 }
virtual void OnSimulateZone(int days)
Definition: AIAct.cs:600
ConSuspend conSuspend
Definition: Chara.cs:104

References Chara.conSuspend, OnSimulateZone(), and owner.

Referenced by Zone.Simulate().

◆ Start()

void AIAct.Start ( )
inline

Definition at line 212 of file AIAct.cs.

213 {
214 Enumerator = Run().GetEnumerator();
215 OnStart();
216 if (owner == null)
217 {
218 return;
219 }
220 if (owner.held != null)
221 {
222 if (DropHeldOnStart)
223 {
224 owner.DropHeld();
225 }
226 else if (PickHeldOnStart)
227 {
228 owner.PickHeld();
229 }
230 }
232 {
234 }
235 if (RightHand != 0)
236 {
238 }
239 if (owner.IsPC && UseTurbo)
240 {
242 }
243 }
virtual bool UseTurbo
Definition: AIAct.cs:88
virtual void OnStart()
Definition: AIAct.cs:185
virtual IEnumerable< Status > Run()
Definition: AIAct.cs:407
void SetTurbo(int mtp=-1)
Definition: AM_Adv.cs:1086
virtual bool PickHeldOnStart
Definition: ACT.cs:117
virtual int RightHand
Definition: ACT.cs:109
virtual int LeftHand
Definition: ACT.cs:107
virtual bool DropHeldOnStart
Definition: ACT.cs:119
virtual bool ShouldEndMimicry
Definition: ACT.cs:133
static AM_Adv Adv
Definition: ActionMode.cs:15
void SetTempHand(int right=0, int left=0)
Definition: Chara.cs:6872
Card DropHeld(Point dropPos=null)
Definition: Chara.cs:4683
ConBaseTransmuteMimic mimicry
Definition: Chara.cs:106
virtual bool ShouldEndMimicry(Act act)
void Kill(bool silent=false)
Definition: Condition.cs:91

References ActionMode.Adv, Chara.DropHeld(), Act.DropHeldOnStart, Enumerator, Chara.held, Chara.IsPC, Condition.Kill(), Act.LeftHand, Chara.mimicry, OnStart(), owner, Chara.PickHeld(), Act.PickHeldOnStart, Act.RightHand, Run(), Chara.SetTempHand(), AM_Adv.SetTurbo(), Act.ShouldEndMimicry, ConBaseTransmuteMimic.ShouldEndMimicry(), and UseTurbo.

Referenced by Tick().

◆ Success()

Status AIAct.Success ( Action  action = null)
inline

Definition at line 266 of file AIAct.cs.

267 {
268 status = Status.Success;
269 OnSuccess();
270 action?.Invoke();
272 Reset();
273 return status;
274 }
virtual void OnSuccess()
Definition: AIAct.cs:276

References OnCancelOrSuccess(), OnSuccess(), Reset(), and status.

Referenced by InvOwnerDraglet.OnClick().

◆ Tick()

Status AIAct.Tick ( )
inline

Definition at line 366 of file AIAct.cs.

367 {
368 if (owner == null || (isFail != null && isFail()))
369 {
370 return Cancel();
371 }
372 if (IsChildRunning)
373 {
374 switch (child.Tick())
375 {
376 case Status.Fail:
377 if (onChildFail != null)
378 {
379 return onChildFail();
380 }
381 return Status.Fail;
382 case Status.Running:
383 return Status.Running;
384 case Status.Success:
385 if (owner == null || (isFail != null && isFail()))
386 {
387 return Cancel();
388 }
389 break;
390 }
391 }
392 if (Enumerator == null)
393 {
394 Start();
395 if (status != 0)
396 {
397 return status;
398 }
399 }
400 if (!Enumerator.MoveNext())
401 {
402 return Success();
403 }
404 return status;
405 }
Status Tick()
Definition: AIAct.cs:366
void Start()
Definition: AIAct.cs:212

References Cancel(), child, Enumerator, IsChildRunning, isFail, onChildFail, owner, Start(), status, Success, and Tick().

Referenced by Chara.ChooseNewGoal(), Tick(), and TickChild().

◆ TickChild()

Status AIAct.TickChild ( )
inline

Definition at line 412 of file AIAct.cs.

413 {
414 if (child == null || onChildFail == null)
415 {
416 Debug.Log(child?.ToString() + "/" + onChildFail);
417 return Status.Fail;
418 }
419 if (child.Tick() == Status.Fail)
420 {
421 if (onChildFail != null)
422 {
423 return onChildFail();
424 }
425 return Status.Fail;
426 }
427 return Status.Running;
428 }
override string ToString()
Definition: AIAct.cs:124

References child, Debug, onChildFail, Tick(), and ToString().

Referenced by Do(), DoGoto(), DoGotoInteraction(), DoGotoSpot(), DoGrab(), DoGrab< T >(), DoIdle(), DoProgress(), and DoWait().

◆ ToString()

override string AIAct.ToString ( )
inline

Definition at line 124 of file AIAct.cs.

125 {
126 return GetType().Name;
127 }

Referenced by Chara.GetHoverText2(), UIQueue.OnAdd(), TickChild(), Chara.ToString(), GoalCombat.TryUseAbility(), and WidgetDebug.UpdateText().

◆ TryCancel()

bool AIAct.TryCancel ( Card  c)
inline

Definition at line 280 of file AIAct.cs.

281 {
282 if (!IsRunning || Enumerator == null)
283 {
284 return false;
285 }
286 if (InformCancel)
287 {
288 if (owner.IsPC)
289 {
290 owner.Say("cancel_act_pc", owner);
291 }
292 else if (c != null)
293 {
294 owner.Say("cancel_act", owner, c);
295 }
296 else
297 {
298 owner.Say("cancel_act2", owner);
299 }
300 }
301 Cancel();
302 return true;
303 }
virtual bool InformCancel
Definition: AIAct.cs:98
virtual bool IsRunning
Definition: AIAct.cs:31
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:7099

References Cancel(), Enumerator, InformCancel, Chara.IsPC, IsRunning, owner, and Card.Say().

Referenced by Chara.MoveByForce().

Member Data Documentation

◆ child

◆ Enumerator

IEnumerator<Status> AIAct.Enumerator

Definition at line 18 of file AIAct.cs.

Referenced by Reset(), Start(), Tick(), and TryCancel().

◆ isFail

◆ onChildFail

Func<Status> AIAct.onChildFail

Definition at line 26 of file AIAct.cs.

Referenced by Reset(), SetChild(), Tick(), and TickChild().

◆ owner

new Chara AIAct.owner

Definition at line 14 of file AIAct.cs.

Referenced by AIWork.AddDeliverable(), Recipe.Build(), RecipeCard.Build(), GoalCombat.BuildAbilityList(), Cancel(), GoalCombat.CanManualCancel(), TaskPoint.CanPerform(), AI_TargetCard.CanProgress(), TaskChopWood.CanProgress(), TaskHarvest.CanProgress(), TaskBuild.CanRotateBlock(), AI_OpenLock.CreateProgress(), AI_PracticeDummy.CreateProgress(), AI_Torture.CreateProgress(), DoGoto(), DoGotoSpot(), DoGotoSpot< T >(), DoGrab(), TaskBuild.DrawMarker(), AI_Fish.ProgressFish.Fail(), GoalWork.FindWork(), AI_Fuck.Finish(), GetDestination(), TaskMine.GetHitResult(), AI_Mofu.GetMofu(), GoalGraze.GetPos(), BaseTaskHarvest.GetText(), TaskBuild.GetText(), GoalHobby.GetWorks(), GoalWork.GetWorks(), TaskHarvest.HarvestThing(), AI_HaulResource.HoldingResource(), AI_Goto.IsDestinationReached(), IsToolValid(), AI_OpenGambleChest.IsValid(), AI_Eat.IsValidTarget(), AI_PassTime.OnCancel(), AI_Practice.OnCancelOrSuccess(), AIWork_Lumberjack.OnCreateProgress(), AIWork_Research.OnCreateProgress(), TaskChopWood.OnCreateProgress(), TaskDig.OnCreateProgress(), TaskDrawWater.OnCreateProgress(), TaskHarvest.OnCreateProgress(), TaskMine.OnCreateProgress(), TaskPlow.OnCreateProgress(), TaskPourWater.OnCreateProgress(), AI_Farm.OnProgress(), AI_Fish.ProgressFish.OnProgress(), AI_Water.OnProgress(), TaskCraft.OnProgress(), TaskCut.OnProgress(), AI_Fish.ProgressFish.OnProgressComplete(), AI_Sleep.OnProgressComplete(), AI_Water.OnProgressComplete(), TaskBuild.OnProgressComplete(), TaskCraft.OnProgressComplete(), TaskDig.OnProgressComplete(), TaskMine.OnProgressComplete(), TaskMoveInstalled.OnProgressComplete(), AI_Bladder.OnReset(), AI_Drink.OnSetOwner(), AI_Read.OnSetOwner(), GoalGraze.OnSimulatePosition(), GoalSleep.OnSimulatePosition(), GoalWork.OnSimulatePosition(), AI_Fish.ProgressFish.OnStart(), AI_Idle.OnStart(), AI_UseCrafter.OnStart(), TaskCut.OnStart(), Reset(), Restart(), AI_ArmPillow.Run(), AI_AttackHome.Run(), AI_Bladder.Run(), AI_Churyu.Run(), AI_Clean.Run(), AI_Cook.Run(), AI_Craft_Snowman.Run(), AI_Dance.Run(), AI_Deconstruct.Run(), AI_Drink.Run(), AI_Eat.Run(), AI_Equip.Run(), AI_Fish.Run(), AI_Fuck.Run(), AI_Goto.Run(), AI_GotoHearth.Run(), AI_Grab< T >.Run(), AI_Haul.Run(), AI_HaulResource.Run(), AI_Idle.Run(), AI_Massage.Run(), AI_Mofu.Run(), AI_Offer.Run(), AI_OpenGambleChest.Run(), AI_Paint.Run(), AI_PassTime.Run(), AI_PlayMusic.Run(), AI_Pray.Run(), AI_Read.Run(), AI_ReleaseHeld.Run(), AI_Shear.Run(), AI_Shopping.Run(), AI_Slaughter.Run(), AI_Steal.Run(), AI_TargetCard.Run(), AI_Torture.Run(), AI_Trolley.Run(), AI_UseCrafter.Run(), AIProgress.Run(), AIWork.Run(), DynamicAIAct.Run(), GoalCombat.Run(), GoalIdle.Run(), GoalNeeds.Run(), GoalSiege.Run(), GoalSleep.Run(), GoalSpot.Run(), GoalVisitorGuest.Run(), GoalWait.Run(), GoalWork.Run(), NoGoal.Run(), TaskClean.Run(), TaskCullLife.Run(), TaskMoveInstalled.Run(), TaskPoint.Run(), TaskWater.Run(), SetChild(), AIWork.SetDestination(), SetOwner(), SimulateZone(), Start(), AI_Trolley.Stop(), Tick(), GoalTask.TryAssignAreaTask(), GoalTask.TryAssignTask(), TryCancel(), AI_Goto.TryGoTo(), GoalCombat.TryMove(), TraitBaseSpellbook.TryProgress(), TaskManager.Designations.TryRemoveDesignation(), GoalCombat.TryThrow(), GoalCombat.TryUseAbility(), GoalAutoCombat.TryUseRanged(), GoalCombat.TryUseRanged(), GoalWork.TryWork(), and GoalWork.ValidateHobby().

◆ parent

AIAct AIAct.parent

Definition at line 22 of file AIAct.cs.

◆ restartCount

byte AIAct.restartCount

Definition at line 24 of file AIAct.cs.

Referenced by Reset(), Restart(), and AI_Churyu.Run().

◆ status

Property Documentation

◆ actionIcon

virtual Sprite AIAct.actionIcon
get

Definition at line 72 of file AIAct.cs.

◆ CancelOnAggro

virtual bool AIAct.CancelOnAggro
get

Definition at line 80 of file AIAct.cs.

◆ CancelWhenDamaged

virtual bool AIAct.CancelWhenDamaged
get

Definition at line 94 of file AIAct.cs.

◆ CancelWhenMoved

virtual bool AIAct.CancelWhenMoved
get

Definition at line 96 of file AIAct.cs.

Referenced by Chara.MoveByForce().

◆ Current

AIAct AIAct.Current
get

Definition at line 102 of file AIAct.cs.

103 {
104 get
105 {
106 if (!IsChildRunning)
107 {
108 return this;
109 }
110 return child.Current;
111 }
112 }
AIAct Current
Definition: AIAct.cs:103

Referenced by Chara._Move(), AI_Torture.CreateProgress(), and Chara.MoveByForce().

◆ CurrentProgress

virtual int AIAct.CurrentProgress
get

Definition at line 90 of file AIAct.cs.

◆ HasProgress

virtual bool AIAct.HasProgress
get

Definition at line 122 of file AIAct.cs.

◆ InformCancel

virtual bool AIAct.InformCancel
get

Definition at line 98 of file AIAct.cs.

Referenced by TryCancel().

◆ IsAct

override bool AIAct.IsAct
get

Definition at line 114 of file AIAct.cs.

◆ IsAutoTurn

virtual bool AIAct.IsAutoTurn
get

Definition at line 76 of file AIAct.cs.

Referenced by UIAutoTurn._Update().

◆ IsChildRunning

bool AIAct.IsChildRunning
get

Definition at line 42 of file AIAct.cs.

43 {
44 get
45 {
46 if (child != null && child.status == Status.Running)
47 {
48 return child.owner != null;
49 }
50 return false;
51 }
52 }

Referenced by CanManualCancel(), GetCurrentActionText(), GetDestination(), GetProgress(), and Tick().

◆ IsIdle

virtual bool AIAct.IsIdle
get

Definition at line 78 of file AIAct.cs.

◆ IsMoveAI

bool AIAct.IsMoveAI
get

Definition at line 54 of file AIAct.cs.

55 {
56 get
57 {
58 if (!IsChildRunning)
59 {
60 return this is AI_Goto;
61 }
62 return child.IsMoveAI;
63 }
64 }
bool IsMoveAI
Definition: AIAct.cs:55

Referenced by Chara.TryPush().

◆ IsNoGoal

virtual bool AIAct.IsNoGoal
get

◆ IsRunning

◆ MaxProgress

virtual int AIAct.MaxProgress
get

Definition at line 84 of file AIAct.cs.

Referenced by UIAutoTurn._Update().

◆ MaxRestart

virtual int AIAct.MaxRestart
get

Definition at line 66 of file AIAct.cs.

Referenced by Restart().

◆ Name

◆ PushChara

virtual bool AIAct.PushChara
get

Definition at line 82 of file AIAct.cs.

Referenced by Chara._Move().

◆ RenderThing

virtual Thing AIAct.RenderThing
get

Definition at line 100 of file AIAct.cs.

◆ ShowCursor

virtual bool AIAct.ShowCursor
get

Definition at line 92 of file AIAct.cs.

Referenced by BaseTileSelector.OnUpdate().

◆ ShowPotential

override bool AIAct.ShowPotential
get

Definition at line 116 of file AIAct.cs.

◆ ShowProgress

virtual bool AIAct.ShowProgress
get

Definition at line 86 of file AIAct.cs.

◆ ShowRelativeAttribute

override bool AIAct.ShowRelativeAttribute
get

Definition at line 120 of file AIAct.cs.

◆ stateIcon

virtual MultiSprite AIAct.stateIcon
getprotected

Definition at line 70 of file AIAct.cs.

◆ UsePotential

override bool AIAct.UsePotential
get

Definition at line 118 of file AIAct.cs.

◆ UseTurbo

virtual bool AIAct.UseTurbo
get

Definition at line 88 of file AIAct.cs.

Referenced by ActPlan.Item.Perform(), and Start().


The documentation for this class was generated from the following file: