Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
TraitEcoMark.cs
Go to the documentation of this file.
1public class TraitEcoMark : Trait
2{
3 public override bool IsTool => true;
4
5 public override void TrySetHeldAct(ActPlan p)
6 {
7 p.pos.Things.ForEach(delegate(Thing t)
8 {
9 if (t.IsInstalled && t.IsFurniture && t.Evalue(652) <= 0 && !t.IsUnique)
10 {
11 p.TrySetAct("actEco".lang(t.Name), delegate
12 {
13 Msg.Say("put_ecomark", t);
14 SE.Play("click_paper");
15 owner.ModNum(-1);
16 t.elements.SetBase(652, 10);
17 int num = (t.isWeightChanged ? t.c_weight : t.source.weight);
18 t.ChangeWeight(num * 100 / 110);
19 return false;
20 });
21 }
22 });
23 }
24}
Point pos
Definition: ActPlan.cs:149
bool IsUnique
Definition: Card.cs:1967
bool IsFurniture
Definition: Card.cs:2111
bool IsInstalled
Definition: Card.cs:2241
int Evalue(int ele)
Definition: Card.cs:2431
List< Thing > Things
Definition: Point.cs:314
Definition: Thing.cs:8
override bool IsTool
Definition: TraitEcoMark.cs:3
override void TrySetHeldAct(ActPlan p)
Definition: TraitEcoMark.cs:5
Definition: Trait.cs:7