1using System.Collections.Generic;
34 window.SetActive(enable:
false);
51 textHeader.text =
"knownRecipe".lang();
53 if (recipes.Count == 0)
64 for (
int i = 0; i < crafter.
numIng; i++)
70 string[] array2 = i
switch
80 string[] array3 = array2;
81 foreach (
string text2
in array3)
83 if (text2 != array2[0])
87 AddThing(text2,
null);
91 AddThing(a.thing, (a.type ==
"FixedResource") ?
"noInherit" :
null);
106 note.SetActive(traitRollingFortune !=
null);
107 if (traitRollingFortune !=
null)
111 window.SetActive(enable:
true);
112 window.RebuildLayout(recursive:
true);
113 void AddThing(
string id,
string lang)
115 if (
id.IsEmpty() ||
id ==
"notImplemented" ||
id ==
"any")
121 id =
id.Replace(
"%",
"@");
122 string[] array =
id.Split(
'@');
125 if (
id.StartsWith(
'#'))
127 text =
id.Replace(
"#",
"");
132 if (array.Length >= 2)
137 Image componentInChildren = transform.GetComponentInChildren<Image>();
141 if (!text.IsEmpty() || lang !=
null)
143 Util.Instantiate(
moldCat, transform).GetComponentInChildren<
UIText>().SetText((lang ??
"category").lang());
147 s =
"ingCat".lang(@ref);
150 component.tooltip.lang = s.ToTitleCase();
158 textHeader.text =
"knownFuel".lang();
187 window.SetActive(enable:
true);
188 window.RebuildLayout(recursive:
true);
189 void AddThing(
string id)
191 if (
id.IsEmpty() ||
id ==
"notImplemented" ||
id ==
"any")
197 id =
id.Replace(
"%",
"@");
198 string[] array =
id.Split(
'@');
201 if (
id.StartsWith(
'#'))
203 cat =
id.Replace(
"#",
"");
210 if (array.Length >= 2)
215 Image componentInChildren = transform.GetComponentInChildren<Image>();
221 Transform obj2 =
Util.Instantiate(
moldCat, transform);
223 obj2.GetComponentInChildren<
UIText>().SetText(
"(" +
"category".lang() +
")");
224 s =
"ingCat".
lang(@ref);
226 component.tooltip.lang = s.ToTitleCase();
virtual string GetName(int i)
static SourceManager sources
HashSet< int > knownCraft
int GetColorInt(SourceMaterial.Row mat)
void SetImage(Image image, Sprite sprite=null, int matCol=0, bool setNativeSize=true, int dir=0, int idSkin=0)
SourceCategory.Row Category
SourceMaterial.Row DefaultMaterial
Dictionary< string, CardRow > map
SourceCategory categories
void InitFuel(Card _owner)
override void Add(object item)
FortuneRollData GetOrCreateFortuneRollData(bool refresh=true)