Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
AM_EditMarker.cs
Go to the documentation of this file.
1using System.Collections.Generic;
2using System.Linq;
3
5{
7
8 public override bool IsBuildMode => true;
9
10 public override void OnDeactivate()
11 {
12 base.OnDeactivate();
13 foreach (Card item in ((IEnumerable<Card>)EClass._map.things).Concat((IEnumerable<Card>)EClass._map.charas))
14 {
15 if (item.c_editorTags.IsEmpty())
16 {
17 continue;
18 }
19 string[] array = item.c_editorTags.Split(',');
20 for (int i = 0; i < array.Length; i++)
21 {
22 if (array[i].ToEnum<EditorTag>() == EditorTag.Empty)
23 {
24 item.RemoveThings();
25 }
26 }
27 }
28 }
29
30 public override string GetSimpleText(Card c)
31 {
32 string text = "";
33 if (!c.c_idEditor.IsEmpty())
34 {
35 text = text + "id:" + c.c_idEditor + "\n";
36 }
37 if (!c.c_idTrait.IsEmpty())
38 {
39 text = text + "trait:" + c.c_idTrait + "\n";
40 }
41 if (!c.c_editorTraitVal.IsEmpty())
42 {
43 text = text + "vals:" + c.c_editorTraitVal + "\n";
44 }
45 if (!c.c_editorTags.IsEmpty())
46 {
47 text = text + "tags:" + c.c_editorTags + "\n";
48 }
49 return text;
50 }
51
52 public override HitResult HitTest(Point point, Point start)
53 {
54 Card target = GetTarget(point);
55 if (target != null && target.isPlayerCreation)
56 {
57 return HitResult.Valid;
58 }
59 return base.HitTest(point, start);
60 }
61
62 public override void OnProcessTiles(Point point, int dir)
63 {
64 Card target = GetTarget(point);
66 }
67
68 public Card GetTarget(Point point)
69 {
70 Chara firstChara = point.FirstChara;
71 if (firstChara != null)
72 {
73 return firstChara;
74 }
75 return point.LastThing;
76 }
77}
EditorTag
Definition: EditorTag.cs:2
HitResult
Definition: HitResult.cs:2
override HitResult HitTest(Point point, Point start)
override string GetSimpleText(Card c)
override void OnProcessTiles(Point point, int dir)
override void OnDeactivate()
override bool IsBuildMode
Definition: AM_EditMarker.cs:8
Card GetTarget(Point point)
override BaseTileSelector.SelectType selectType
Definition: AM_EditMarker.cs:6
void SetCard(Card c, bool select=true)
static CardInspector Instance
Definition: CardInspector.cs:9
Definition: Card.cs:11
string c_idTrait
Definition: Card.cs:1625
string c_idEditor
Definition: Card.cs:1589
string c_editorTags
Definition: Card.cs:1601
bool isPlayerCreation
Definition: Card.cs:466
string c_editorTraitVal
Definition: Card.cs:1613
Definition: Chara.cs:10
Definition: EClass.cs:5
static Map _map
Definition: EClass.cs:18
List< Thing > things
Definition: Map.cs:49
List< Chara > charas
Definition: Map.cs:81
Definition: Point.cs:9
Thing LastThing
Definition: Point.cs:290
Chara FirstChara
Definition: Point.cs:264