Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
AIWork_Lumberjack.cs
Go to the documentation of this file.
2{
3 public override int destDist => 1;
4
5 public override bool FuncWorkPoint(Point p)
6 {
7 return p.growth?.IsTree ?? false;
8 }
9
10 public override AIAct GetWork(Point p)
11 {
12 GrowSystem growth = p.growth;
13 if (growth != null && !growth.IsTree)
14 {
15 return null;
16 }
17 return CreateProgress();
18 }
19
20 public override void OnCreateProgress(Progress_Custom p)
21 {
22 p.onProgress = delegate
23 {
24 owner.PlaySound(EClass.sources.things.map["log"].DefaultMaterial.GetSoundImpact());
25 };
26 }
27
28 public override void OnPerformWork(bool realtime)
29 {
30 }
31}
Definition: AIAct.cs:6
virtual AIProgress CreateProgress()
Definition: AIAct.cs:541
new Chara owner
Definition: AIAct.cs:14
override bool FuncWorkPoint(Point p)
override AIAct GetWork(Point p)
override void OnCreateProgress(Progress_Custom p)
override int destDist
override void OnPerformWork(bool realtime)
Definition: AIWork.cs:5
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:5404
Definition: EClass.cs:5
static SourceManager sources
Definition: EClass.cs:42
virtual bool IsTree
Definition: GrowSystem.cs:87
Definition: Point.cs:9
GrowSystem growth
Definition: Point.cs:77
SourceThing things