Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
AM_StateEditor.cs
Go to the documentation of this file.
2{
3 public override bool IsBuildMode => true;
4
6
8
10
11 public override void OnUpdateCursor()
12 {
14 }
15
16 public override HitResult HitTest(Point point, Point start)
17 {
18 if (GetDestState(point).HasValue)
19 {
20 return HitResult.Valid;
21 }
22 return base.HitTest(point, start);
23 }
24
25 public override void OnProcessTiles(Point point, int dir)
26 {
27 PlaceState? destState = GetDestState(point);
28 foreach (Card item in point.ListCards())
29 {
30 if (item.isThing && destState.HasValue && item.placeState != destState)
31 {
32 item.SetPlaceState(destState.Value);
33 }
34 }
35 SE.ClickGeneral();
36 }
37
39 {
40 PlaceState? result = null;
41 foreach (Card item in point.ListCards())
42 {
43 if (item.isThing && !item.isNPCProperty)
44 {
45 if (item.placeState == PlaceState.installed)
46 {
47 result = PlaceState.roaming;
48 }
49 else if (item.placeState == PlaceState.roaming)
50 {
51 result = PlaceState.installed;
52 }
53 if (result.HasValue)
54 {
55 break;
56 }
57 }
58 }
59 return result;
60 }
61}
HitResult
Definition: HitResult.cs:2
PlaceState
Definition: PlaceState.cs:2
override void OnUpdateCursor()
override HitResult HitTest(Point point, Point start)
override bool IsBuildMode
PlaceState? GetDestState(Point point)
override BaseTileSelector.HitType hitType
override BaseTileMap.CardIconMode cardIconMode
override BaseTileSelector.SelectType selectType
override void OnProcessTiles(Point point, int dir)
void SetCursorOnMap(CursorInfo cursor)
Definition: ActionMode.cs:565
Definition: Card.cs:11
static CursorInfo Select
Definition: CursorSystem.cs:58
Definition: Point.cs:9