Elin Decompiled Documentation EA 23.302 Nightly
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 && base.target.trait.TryPryOpenLock(owner, msgFail: false) == LockOpenState.Success)
37 {
39 }
40 },
41 onProgressComplete = delegate
42 {
43 }
44 }.SetDuration(100, 10);
45 }
46
47 public override void OnCancelOrSuccess()
48 {
49 if (owner != null && !base.target.isDestroyed && base.target.c_lockLv != 0)
50 {
51 owner.Say("pry_end", owner, base.target);
52 }
53 EClass.Sound.Stop("lock_pry");
54 }
55}
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:47
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:6447
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:7125
static CursorInfo Container
Definition: CursorSystem.cs:82
Definition: EClass.cs:6
static SoundManager Sound
Definition: EClass.cs:47