Elin Decompiled Documentation EA 23.153 Nightly
Loading...
Searching...
No Matches
TraitToolWaterCan.cs
Go to the documentation of this file.
1using UnityEngine;
2
4{
5 public int MaxCharge => Mathf.Max(1, owner.material.hardness / 4 + Mathf.Clamp(owner.QualityLv * 2, 0, 40) + 3);
6
7 public override bool HasCharges => true;
8
9 public override void TrySetHeldAct(ActPlan p)
10 {
11 if (!p.TrySetAct(new TaskWater
12 {
13 dest = p.pos
14 }, owner) && !p.TrySetAct(new ActDrawWater
15 {
16 waterCan = this
17 }, owner))
18 {
20 {
21 waterCan = this
22 }, owner);
23 }
24 }
25}
bool TrySetAct(string lang, Func< bool > onPerform, Card tc, CursorInfo cursor=null, int dist=1, bool isHostileAct=false, bool localAct=true, bool canRepeat=false)
Definition: ActPlan.cs:345
SourceMaterial.Row material
Definition: Card.cs:1987
int QualityLv
Definition: Card.cs:2363
override bool HasCharges
override void TrySetHeldAct(ActPlan p)
Card owner
Definition: Trait.cs:26