Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
CardInspector Class Reference
Inheritance diagram for CardInspector:
EMono

Public Member Functions

void SetCard (Card c, bool select=true)
 

Public Attributes

Card card
 
List< EditorTagtags = new List<EditorTag>()
 
string traitVals
 

Static Public Attributes

static CardInspector Instance
 
- Static Public Attributes inherited from EMono
static Core core
 

Protected Member Functions

IEnumerable< string > _SpawnList ()
 

Properties

string Info [get]
 
string idEditor [get, set]
 
string trait [get, set]
 
string BGM [get, set]
 
bool IsTape [get]
 
string spawnList [get, set]
 
- Properties inherited from EMono
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SoundManager Sound [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static CoreDebug debug [get]
 

Private Member Functions

IEnumerable< string > _TapeList ()
 
IEnumerable< string > Traits ()
 
IEnumerable< Type > GetInheritedClasses (Type MyType, Type exclude=null)
 
void Awake ()
 
void OnValidate ()
 

Additional Inherited Members

- Static Public Member Functions inherited from EMono
static int rnd (int a)
 

Detailed Description

Definition at line 7 of file CardInspector.cs.

Member Function Documentation

◆ _SpawnList()

IEnumerable< string > CardInspector._SpawnList ( )
inlineprotected

Definition at line 137 of file CardInspector.cs.

138 {
139 return EMono.editorSources.spawnLists.GetListString();
140 }
Definition: EMono.cs:4
static SourceManager editorSources
Definition: EMono.cs:43
SourceSpawnList spawnLists

References EMono.editorSources, and SourceManager.spawnLists.

◆ _TapeList()

IEnumerable< string > CardInspector._TapeList ( )
inlineprivate

Definition at line 109 of file CardInspector.cs.

110 {
111 List<string> list = new List<string>();
112 foreach (BGMData bgm in EMono.core.refs.bgms)
113 {
114 list.Add(bgm.name);
115 }
116 return list;
117 }
List< BGMData > bgms
Definition: CoreRef.cs:365
CoreRef refs
Definition: Core.cs:51
static Core core
Definition: EMono.cs:5

References CoreRef.bgms, EMono.core, and Core.refs.

◆ Awake()

void CardInspector.Awake ( )
inlineprivate

Definition at line 142 of file CardInspector.cs.

143 {
144 Instance = this;
145 }
static CardInspector Instance
Definition: CardInspector.cs:9

References Instance.

◆ GetInheritedClasses()

IEnumerable< Type > CardInspector.GetInheritedClasses ( Type  MyType,
Type  exclude = null 
)
inlineprivate

Definition at line 130 of file CardInspector.cs.

131 {
132 return from TheType in Assembly.GetAssembly(MyType).GetTypes()
133 where TheType.IsClass && TheType.IsSubclassOf(MyType) && (exclude == null || !TheType.IsSubclassOf(exclude))
134 select TheType;
135 }

Referenced by Traits().

◆ OnValidate()

void CardInspector.OnValidate ( )
inlineprivate

Definition at line 169 of file CardInspector.cs.

170 {
171 if (!Application.isPlaying || !EMono.core.IsGameStarted || card == null)
172 {
173 return;
174 }
175 string text = null;
176 bool flag = true;
177 if (tags != null)
178 {
179 foreach (EditorTag tag in tags)
180 {
181 text = text + (flag ? "" : ",") + tag;
182 flag = false;
183 }
184 }
185 card.c_editorTags = text;
186 card.c_editorTraitVal = (traitVals.IsEmpty() ? null : traitVals);
187 }
EditorTag
Definition: EditorTag.cs:2
string traitVals
List< EditorTag > tags
bool IsGameStarted
Definition: Core.cs:84

References card, EMono.core, Core.IsGameStarted, tags, and traitVals.

◆ SetCard()

void CardInspector.SetCard ( Card  c,
bool  select = true 
)
inline

Definition at line 147 of file CardInspector.cs.

148 {
149 card = c;
150 tags.Clear();
151 if (c != null && !c.c_editorTags.IsEmpty())
152 {
153 string[] array = c.c_editorTags.Split(',');
154 foreach (string text in array)
155 {
156 try
157 {
158 tags.Add(text.ToEnum<EditorTag>());
159 }
160 catch
161 {
162 Debug.Log("No Editor Tag Found:" + text);
163 }
164 }
165 }
167 }
string c_editorTags
Definition: Card.cs:1601
string c_editorTraitVal
Definition: Card.cs:1613

References Card.c_editorTags, Card.c_editorTraitVal, card, Debug, tags, and traitVals.

Referenced by AM_EditMarker.OnProcessTiles().

◆ Traits()

IEnumerable< string > CardInspector.Traits ( )
inlineprivate

Definition at line 119 of file CardInspector.cs.

120 {
121 IEnumerable<Type> obj = ((card == null || !card.isChara) ? GetInheritedClasses(typeof(Trait), typeof(TraitChara)) : GetInheritedClasses(typeof(TraitChara)));
122 List<string> list = new List<string> { "" };
123 foreach (Type item in obj)
124 {
125 list.Add(item.Name);
126 }
127 return list;
128 }
IEnumerable< Type > GetInheritedClasses(Type MyType, Type exclude=null)
virtual bool isChara
Definition: Card.cs:1959
Definition: Trait.cs:7

References card, GetInheritedClasses(), Card.isChara, and item.

Member Data Documentation

◆ card

Card CardInspector.card

Definition at line 11 of file CardInspector.cs.

Referenced by OnValidate(), SetCard(), and Traits().

◆ Instance

CardInspector CardInspector.Instance
static

Definition at line 9 of file CardInspector.cs.

Referenced by Awake(), and AM_EditMarker.OnProcessTiles().

◆ tags

List<EditorTag> CardInspector.tags = new List<EditorTag>()

Definition at line 13 of file CardInspector.cs.

Referenced by OnValidate(), and SetCard().

◆ traitVals

string CardInspector.traitVals

Definition at line 15 of file CardInspector.cs.

Referenced by OnValidate(), and SetCard().

Property Documentation

◆ BGM

string CardInspector.BGM
getset

Definition at line 59 of file CardInspector.cs.

60 {
61 get
62 {
63 if (card == null || card.refVal == 0)
64 {
65 return "0";
66 }
67 BGMData bGMData = EMono.core.refs.bgms.FirstOrDefault((BGMData a) => a.id == card.refVal);
68 if (!(bGMData == null))
69 {
70 return bGMData.name;
71 }
72 return "0";
73 }
74 set
75 {
76 if (card != null)
77 {
78 card.refVal = value.Split(' ')[0].ToInt();
79 }
80 }
81 }
int refVal
Definition: Card.cs:190

◆ idEditor

string CardInspector.idEditor
getset

Definition at line 29 of file CardInspector.cs.

30 {
31 get
32 {
33 return card?.c_idEditor;
34 }
35 set
36 {
37 if (card != null)
38 {
39 card.c_idEditor = value;
40 }
41 }
42 }
string c_idEditor
Definition: Card.cs:1589

◆ Info

string CardInspector.Info
get

Definition at line 17 of file CardInspector.cs.

18 {
19 get
20 {
21 if (card != null)
22 {
23 return card.id + "(" + card.NameSimple + ")";
24 }
25 return "";
26 }
27 }

◆ IsTape

bool CardInspector.IsTape
get

Definition at line 83 of file CardInspector.cs.

◆ spawnList

string CardInspector.spawnList
getset

Definition at line 85 of file CardInspector.cs.

86 {
87 get
88 {
89 if (card == null || card.c_idRefCard.IsEmpty() || !EMono.editorSources.spawnLists.map.ContainsKey(card.c_idRefCard))
90 {
91 return "-";
92 }
94 if (row != null)
95 {
96 return row.id;
97 }
98 return "-";
99 }
100 set
101 {
102 if (card != null)
103 {
104 card.c_idRefCard = value;
105 }
106 }
107 }
string c_idRefCard
Definition: Card.cs:1637

◆ trait

string CardInspector.trait
getset

Definition at line 44 of file CardInspector.cs.

45 {
46 get
47 {
48 return card?.c_idTrait;
49 }
50 set
51 {
52 if (card != null)
53 {
54 card.c_idTrait = value;
55 }
56 }
57 }
string c_idTrait
Definition: Card.cs:1625

The documentation for this class was generated from the following file: