Elin Decompiled Documentation EA 23.167 Nightly
Loading...
Searching...
No Matches
TraitFakeBlock.cs
Go to the documentation of this file.
1using System.Collections.Generic;
2
3public class TraitFakeBlock : Trait
4{
5 public override TileMode tileMode => TileMode.FakeBlock;
6
7 public override void OnCreate(int lv)
8 {
9 owner.refVal = 1;
10 }
11
12 public override void OnCrafted(Recipe recipe, List<Thing> ings)
13 {
14 TraitBlock traitBlock = ings[0].trait as TraitBlock;
15 owner.refVal = traitBlock.source.id;
16 }
17
18 public override void TrySetHeldAct(ActPlan p)
19 {
20 if (p.pos.cell._block != 0)
21 {
22 p.TrySetAct("actCopyBlock", delegate
23 {
26 SE.Play("offering");
29 return false;
30 });
31 }
32 }
33}
Point pos
Definition: ActPlan.cs:150
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
virtual CardRenderer _CreateRenderer()
Definition: Card.cs:5594
void Dye(string idMat)
Definition: Card.cs:5632
int refVal
Definition: Card.cs:190
byte _block
Definition: Cell.cs:30
static Recipe recipe
Definition: HotItemHeld.cs:9
SourceMaterial.Row matBlock
Definition: Point.cs:55
SourceBlock.Row sourceBlock
Definition: Point.cs:63
Cell cell
Definition: Point.cs:51
Definition: Recipe.cs:7
int id
Definition: TileRow.cs:8
override TileRow source
Definition: TraitBlock.cs:3
override TileMode tileMode
override void OnCreate(int lv)
override void TrySetHeldAct(ActPlan p)
override void OnCrafted(Recipe recipe, List< Thing > ings)
Definition: Trait.cs:7
virtual Recipe GetRecipe()
Definition: Trait.cs:799
TileMode
Definition: Trait.cs:9
Card owner
Definition: Trait.cs:27