Elin Decompiled Documentation EA 23.276 Nightly Patch 2
Loading...
Searching...
No Matches
TraitFakeObj.cs
Go to the documentation of this file.
2{
3 public Cell cell = new Cell();
4
6 {
7 get
8 {
9 if (!obj.HasGrowth)
10 {
11 return null;
12 }
13 GrowSystem.cell = cell;
14 cell.objVal = (byte)(owner.dir % obj.growth.StageLength * 30);
15 cell.objDir = owner.dir;
16 cell.obj = (byte)owner.refVal;
17 return obj.growth;
18 }
19 }
20
21 public SourceObj.Row obj => EClass.sources.objs.map.TryGetValue(owner.refVal, 0);
22
23 public override TileMode tileMode => TileMode.FakeObj;
24
25 public override RenderData GetRenderData()
26 {
27 return obj.renderData;
28 }
29
30 public override SourcePref GetPref()
31 {
32 return obj.pref;
33 }
34
35 public int GetMaxDir()
36 {
37 if (growth != null && !(growth is GrowSystemTreeCoralwood))
38 {
39 return growth.StageLength;
40 }
41 return obj._tiles.Length;
42 }
43
44 public override string GetName()
45 {
46 if (owner.refVal != 0)
47 {
48 return "_fakeblock".lang(obj.GetName().ToLower());
49 }
50 return base.GetName();
51 }
52}
int refVal
Definition: Card.cs:207
int dir
Definition: Card.cs:147
Definition: Cell.cs:7
Definition: EClass.cs:6
static SourceManager sources
Definition: EClass.cs:43
virtual int StageLength
Definition: GrowSystem.cs:65
SourceObj objs
string GetName(int id)
Definition: SourceObj.cs:149
SourceObj.Row obj
Definition: TraitFakeObj.cs:21
int GetMaxDir()
Definition: TraitFakeObj.cs:35
override SourcePref GetPref()
Definition: TraitFakeObj.cs:30
GrowSystem growth
Definition: TraitFakeObj.cs:6
override TileMode tileMode
Definition: TraitFakeObj.cs:23
override RenderData GetRenderData()
Definition: TraitFakeObj.cs:25
override string GetName()
Definition: TraitFakeObj.cs:44
TileMode
Definition: Trait.cs:9
Card owner
Definition: Trait.cs:28