Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
TraitHouseBoard.cs
Go to the documentation of this file.
1using Newtonsoft.Json;
2using UnityEngine;
3
5{
6 public class Data
7 {
8 [JsonProperty]
9 public int idRoofStyle;
10
11 [JsonProperty]
12 public int height;
13
14 [JsonProperty]
15 public int idBGM;
16
17 [JsonProperty]
18 public int heightFix;
19
20 [JsonProperty]
21 public int idRoofTile;
22
23 [JsonProperty]
24 public int idBlock = 30;
25
26 [JsonProperty]
27 public int idRamp;
28
29 [JsonProperty]
30 public int idDeco;
31
32 [JsonProperty]
33 public int idDeco2;
34
35 [JsonProperty]
36 public int decoFix;
37
38 [JsonProperty]
39 public int decoFix2;
40
41 [JsonProperty]
42 public int colRoof;
43
44 [JsonProperty]
45 public int colBlock;
46
47 [JsonProperty]
48 public int colDeco;
49
50 [JsonProperty]
51 public int colDeco2;
52
53 [JsonProperty]
54 public bool reverse;
55
56 [JsonProperty]
57 public bool snow;
58
59 [JsonProperty]
60 public bool altRoof;
61 }
62
63 public Data data
64 {
65 get
66 {
67 return owner.GetObj<Data>(1);
68 }
69 set
70 {
71 owner.SetObj(1, value);
72 }
73 }
74
75 public override bool IsHomeItem => true;
76
77 public override bool CanBeMasked => true;
78
79 public override bool ShouldTryRefreshRoom => true;
80
81 public override bool MaskOnBuild => true;
82
83 public override bool ShowContextOnPick => true;
84
85 public bool CanBeUsed
86 {
87 get
88 {
89 if (owner.IsInstalled && owner.pos.cell.room != null)
90 {
91 return data != null;
92 }
93 return false;
94 }
95 }
96
97 public void ApplyData()
98 {
99 if (owner.IsInstalled && owner.pos.cell.room != null)
100 {
102 }
103 }
104
105 public override void TrySetAct(ActPlan p)
106 {
108 {
109 return;
110 }
111 Room room = owner.pos.cell.room;
112 if (room != null && room.lot.board == this)
113 {
114 p.TrySetAct("actLotBGM", delegate
115 {
116 EClass.ui.AddLayer<LayerEditPlaylist>().Activate(this);
117 return false;
118 }, owner);
119 p.TrySetAct("actChangeRoof", delegate
120 {
121 EClass.ui.AddLayer<LayerEditHouse>().SetBoard(this);
122 return false;
123 }, owner);
124 }
125 }
126
127 public override void OnChangePlaceState(PlaceState state)
128 {
129 Debug.Log("Lot OnChangePlaceState " + owner?.ToString() + ": " + owner.placeState.ToString() + "/" + owner.pos);
130 EClass._map.rooms.dirtyLots = true;
131 }
132}
PlaceState
Definition: PlaceState.cs:2
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:344
void SetObj(int id, object o)
Definition: BaseCard.cs:91
PlaceState placeState
Definition: Card.cs:79
Point pos
Definition: Card.cs:55
bool IsInstalled
Definition: Card.cs:2241
Room room
Definition: Cell.cs:102
bool enable
Definition: CoreDebug.cs:285
Definition: EClass.cs:5
static Zone _zone
Definition: EClass.cs:20
static CoreDebug debug
Definition: EClass.cs:48
static UI ui
Definition: EClass.cs:16
void RefreshData(TraitHouseBoard.Data data)
Definition: Lot.cs:212
TraitHouseBoard board
Definition: Lot.cs:80
Cell cell
Definition: Point.cs:51
Definition: Room.cs:4
Lot lot
Definition: Room.cs:21
override void OnChangePlaceState(PlaceState state)
override bool IsHomeItem
override bool ShouldTryRefreshRoom
override void TrySetAct(ActPlan p)
override bool CanBeMasked
override bool MaskOnBuild
override bool ShowContextOnPick
Card owner
Definition: Trait.cs:26
bool IsPCFaction
Definition: Zone.cs:464