Elin Decompiled Documentation EA 23.153 Nightly
Loading...
Searching...
No Matches
ActClearWater.cs
Go to the documentation of this file.
1public class ActClearWater : Act
2{
4
6
8
9 public override bool CanPerform()
10 {
11 if (HasWaterSource(Act.TP) && waterPot != null)
12 {
13 return waterPot.owner.c_charges > 0;
14 }
15 return false;
16 }
17
18 public override bool Perform()
19 {
20 Act.CC.PlaySound("water_draw");
22 Act.CC.Say("water_clear", Act.CC, waterPot.owner);
23 return true;
24 }
25
26 public static bool HasWaterSource(Point p)
27 {
28 foreach (Thing thing in p.Things)
29 {
30 if (thing.trait is TraitWell || thing.trait is TraitBath || thing.id == "387" || thing.id == "486" || thing.id == "876" || thing.id == "867" || thing.id == "1158")
31 {
32 return true;
33 }
34 }
35 return false;
36 }
37}
override bool Perform()
override CursorInfo CursorIcon
Definition: ActClearWater.cs:7
TraitToolWaterPot waterPot
Definition: ActClearWater.cs:3
override bool CanPerform()
Definition: ActClearWater.cs:9
static bool HasWaterSource(Point p)
Definition: ACT.cs:62
static Point TP
Definition: ACT.cs:81
static Chara CC
Definition: ACT.cs:77
string id
Definition: Card.cs:31
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:5776
void SetCharge(int a)
Definition: Card.cs:3789
Trait trait
Definition: Card.cs:49
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:6423
static CursorInfo Hand
Definition: CursorSystem.cs:60
Definition: Point.cs:9
static TargetTypeGround Ground
Definition: TargetType.cs:15
Definition: Thing.cs:8
Card owner
Definition: Trait.cs:26