Elin Decompiled Documentation EA 23.319 Nightly Patch 1
Loading...
Searching...
No Matches
AI_PryOpen.cs
Go to the documentation of this file.
2{
4
5 public override bool HasProgress => true;
6
7 public override bool IsHostileAct
8 {
9 get
10 {
11 if (base.target != null)
12 {
13 return base.target.isNPCProperty;
14 }
15 return false;
16 }
17 }
18
19 public override bool CanManualCancel()
20 {
21 return true;
22 }
23
24 public override AIProgress CreateProgress()
25 {
26 return new Progress_Custom
27 {
28 canProgress = CanProgress,
29 onProgressBegin = delegate
30 {
31 owner.Say("pry_start", owner, base.target);
32 },
33 onProgress = delegate(Progress_Custom p)
34 {
35 owner.PlaySound("lock_pry");
36 if (p.progress >= 3)
37 {
38 if (base.target.trait.TryPryOpenLock(owner, msgFail: false) == LockOpenState.Success)
39 {
41 }
42 else if (EClass._zone.IsCrime(owner, this))
43 {
45 }
46 }
47 },
48 onProgressComplete = delegate
49 {
50 }
51 }.SetDuration(100, 10);
52 }
53
54 public override void OnCancelOrSuccess()
55 {
56 if (owner != null && !base.target.isDestroyed && base.target.c_lockLv != 0)
57 {
58 owner.Say("pry_end", owner, base.target);
59 }
60 EClass.Sound.Stop("lock_pry");
61 }
62}
LockOpenState
Definition: LockOpenState.cs:2
new Chara owner
Definition: AIAct.cs:14
void CompleteProgress()
Definition: AIProgress.cs:64
int progress
Definition: AIProgress.cs:5
override bool IsHostileAct
Definition: AI_PryOpen.cs:8
override CursorInfo CursorIcon
Definition: AI_PryOpen.cs:3
override void OnCancelOrSuccess()
Definition: AI_PryOpen.cs:54
override bool CanManualCancel()
Definition: AI_PryOpen.cs:19
override bool HasProgress
Definition: AI_PryOpen.cs:5
override AIProgress CreateProgress()
Definition: AI_PryOpen.cs:24
override bool CanProgress()
bool isDestroyed
Definition: Card.cs:78
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:6562
Point pos
Definition: Card.cs:60
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:7240
static CursorInfo Container
Definition: CursorSystem.cs:82
Definition: EClass.cs:6
static Zone _zone
Definition: EClass.cs:21
static SoundManager Sound
Definition: EClass.cs:47
bool TryWitnessCrime(Chara criminal, Chara target=null, int radius=4, Func< Chara, bool > funcWitness=null)
Definition: Point.cs:878
bool IsCrime(Chara c, Act act)
Definition: Zone.cs:3714