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

Classes

class  RecipeVariation
 

Public Member Functions

void Init ()
 
void SetArea (Area a)
 
void SetRecipe (Recipe r)
 
void Clear ()
 
void RefreshBalance ()
 
void RefreshImages ()
 
void Refresh ()
 
void OnRotate ()
 
void RefreshQuality ()
 
void RefreshList ()
 

Public Attributes

UIText textName
 
UIText textDetail
 
UIText textCost
 
UIText textInfo
 
UIText textQuality
 
UIText textReqSkill
 
UIText textCostSP
 
Thing factory
 
Recipe recipe
 
Area area
 
UIList listIngredients
 
UIList listVariations
 
Image imageArea
 
Image imageIcon
 
UINote note
 
Color colorCost
 
Color colorPredict
 
GameObject goMoney
 
GameObject goIngredients
 
GameObject goInfo
 
bool main
 
bool CraftMode
 
StockSearchMode searchMode
 
DropdownGrid ddList
 
DropdownGrid ddFactory
 
ButtonGrid buttonProduct
 
Dictionary< string, int > lastMats = new Dictionary<string, int>()
 
bool hideMode = true
 
List< DropdownRecipedds = new List<DropdownRecipe>()
 

Properties

HitSummary summary [get]
 
- 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]
 

Additional Inherited Members

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

Detailed Description

Definition at line 7 of file UIRecipeInfo.cs.

Member Function Documentation

◆ Clear()

void UIRecipeInfo.Clear ( )
inline

Definition at line 150 of file UIRecipeInfo.cs.

151 {
152 recipe = null;
153 area = null;
154 if (main)
155 {
156 goIngredients.SetActive(value: false);
157 goInfo.SetActive(value: false);
158 if ((bool)listVariations)
159 {
160 listVariations.SetActive(enable: false);
161 }
162 }
163 if (textName.text != "")
164 {
165 UIText uIText = textName;
166 string text2 = (textDetail.text = "");
167 uIText.text = text2;
168 RefreshList();
170 if ((bool)imageArea)
171 {
172 imageArea.SetActive(enable: false);
173 }
174 note.Clear();
175 note.Build();
176 this.RebuildLayout(recursive: true);
177 }
178 }
void Clear()
Definition: UINote.cs:35
void Build()
Definition: UINote.cs:49
GameObject goInfo
Definition: UIRecipeInfo.cs:54
void RefreshList()
GameObject goIngredients
Definition: UIRecipeInfo.cs:52
void RefreshBalance()
UIList listVariations
Definition: UIRecipeInfo.cs:38
UIText textName
Definition: UIRecipeInfo.cs:16
Recipe recipe
Definition: UIRecipeInfo.cs:32
Image imageArea
Definition: UIRecipeInfo.cs:40
Definition: UIText.cs:6

References area, UINote.Build(), UINote.Clear(), goInfo, goIngredients, imageArea, listVariations, main, note, recipe, RefreshBalance(), RefreshList(), and textName.

Referenced by SetArea(), and SetRecipe().

◆ Init()

void UIRecipeInfo.Init ( )
inline

Definition at line 79 of file UIRecipeInfo.cs.

80 {
81 DropdownRecipe.colorCost = colorCost;
82 DropdownRecipe.colorPredict = colorPredict;
83 SetRecipe(null);
84 }
Color colorPredict
Definition: UIRecipeInfo.cs:48
Color colorCost
Definition: UIRecipeInfo.cs:46
void SetRecipe(Recipe r)

References colorCost, colorPredict, and SetRecipe().

Referenced by BuildMenu.Init().

◆ OnRotate()

void UIRecipeInfo.OnRotate ( )
inline

Definition at line 381 of file UIRecipeInfo.cs.

382 {
383 if (listVariations.gameObject.activeSelf)
384 {
386 }
388 }
int _dir
Definition: Recipe.cs:175
UISelectableGroup group
Definition: UIList.cs:205
void RefreshImages()
void Select(UIButton button, bool check=true)

References Recipe._dir, UIList.group, listVariations, recipe, RefreshImages(), and UISelectableGroup.Select().

Referenced by Recipe.Rotate(), RecipeCard.Rotate(), and Recipe.SetDir().

◆ Refresh()

void UIRecipeInfo.Refresh ( )
inline

Definition at line 244 of file UIRecipeInfo.cs.

245 {
246 if (recipe == null)
247 {
248 return;
249 }
251 {
252 Thing thing = recipe.ingredients[0].thing;
253 if (thing == null || thing.isDestroyed || thing.ExistsOnMap)
254 {
255 return;
256 }
257 }
258 Recipe r = recipe;
259 r.OnSelected();
260 RefreshList();
262 if (r.UseStock && r.ingredients[0].thing == null)
263 {
264 return;
265 }
266 textName.text = r.GetName();
267 string text = "";
268 int[] tiles = recipe.renderRow.tiles;
270 {
271 text = text + "(" + recipe.id + " " + recipe.renderRow.idRenderData + "/" + ((tiles.Length != 0) ? tiles[0] : (-1)) + ")" + Environment.NewLine;
272 }
273 textDetail.SetActive(enable: true);
274 if (CraftMode)
275 {
276 if (main)
277 {
279 int num = EMono.player.recipes.knownRecipes.TryGetValue(r.id, 0);
280 textInfo.SetText("recipe_lv".lang(num.ToString() ?? ""));
281 text += r.GetDetail();
282 }
283 else
284 {
285 text += r.GetDetail();
286 r.WriteNote(note);
287 }
288 }
289 else
290 {
291 string detail = r.GetDetail();
292 if (!detail.IsEmpty())
293 {
294 text = text + detail + "\n\n";
295 }
296 text = text + "( " + r.tileType.LangPlaceType.lang() + " ) " + (r.tileType.LangPlaceType + "_hint").lang();
297 if (r.UseStock && r.ingredients[0].thing != null)
298 {
299 r.ingredients[0].thing.WriteNote(note, null, IInspect.NoteMode.Recipe);
300 }
301 else
302 {
303 r.WriteNote(note);
304 }
305 if (!r.UseStock && r.source.NeedFactory)
306 {
307 PropSet propSet = EMono._map.Installed.cardMap.TryGetValue(r.source.idFactory);
308 if ((propSet == null || propSet.Count == 0) && EMono.pc.things.Find((Thing t) => t.id == r.source.idFactory) == null)
309 {
310 note.Space(8);
311 note.AddText("noFactory".lang(r.source.NameFactory), FontColor.Bad);
312 note.Build();
313 }
314 }
315 }
316 textDetail.SetText(text);
317 if ((bool)goMoney)
318 {
319 goMoney.transform.SetAsLastSibling();
320 }
321 if (main)
322 {
323 if ((bool)listVariations)
324 {
325 UIList uIList = listVariations;
326 bool flag = r.CanRotate && r.renderRow != null;
327 int[] array = (flag ? r.renderRow._tiles : null);
328 if (flag && array.Length <= 1)
329 {
330 flag = false;
331 }
332 uIList.SetActive(flag);
333 if (flag)
334 {
335 uIList.Clear();
336 uIList.callbacks = new UIList.Callback<RecipeVariation, ButtonGrid>
337 {
338 onClick = delegate(RecipeVariation a, ButtonGrid b)
339 {
340 r.SetDir(a.dir);
341 },
342 onInstantiate = delegate(RecipeVariation a, ButtonGrid b)
343 {
345 },
346 onRedraw = delegate(RecipeVariation a, ButtonGrid b, int i)
347 {
349 }
350 };
351 for (int j = 0; j < array.Length; j++)
352 {
353 uIList.Add(new RecipeVariation
354 {
355 recipe = r,
356 dir = j
357 });
358 }
359 uIList.Refresh();
360 uIList.group.Init(r._dir);
361 }
362 }
363 if ((bool)goMoney)
364 {
365 goMoney.SetActive(!CraftMode);
366 }
367 }
368 else
369 {
371 if ((bool)goMoney)
372 {
373 goMoney.SetActive(r.CostMoney != 0);
374 }
375 }
377 this.SetActive(enable: true);
378 this.RebuildLayout(recursive: true);
379 }
FontColor
Definition: FontColor.cs:2
void SetRecipeVariation(UIRecipeInfo.RecipeVariation a)
Definition: ButtonGrid.cs:518
bool isDestroyed
Definition: Card.cs:71
bool ExistsOnMap
Definition: Card.cs:1961
ThingContainer things
Definition: Card.cs:34
bool showExtra
Definition: CoreDebug.cs:167
Definition: EMono.cs:4
static Chara pc
Definition: EMono.cs:13
static Player player
Definition: EMono.cs:11
static Map _map
Definition: EMono.cs:17
static CoreDebug debug
Definition: EMono.cs:45
PropsInstalled Installed
Definition: Map.cs:123
RecipeManager recipes
Definition: Player.cs:898
Dictionary< string, PropSet > cardMap
Definition: Props.cs:10
Dictionary< string, int > knownRecipes
string idFactory
Definition: RecipeSource.cs:85
string NameFactory
Definition: RecipeSource.cs:73
bool NeedFactory
Definition: RecipeSource.cs:61
Definition: Recipe.cs:7
string id
Definition: Recipe.cs:161
virtual int GetRefVal()
Definition: Recipe.cs:405
virtual void WriteNote(UINote n)
Definition: Recipe.cs:787
virtual string GetIdThing()
Definition: Recipe.cs:422
virtual void SetDir(int d)
Definition: Recipe.cs:868
virtual TileType tileType
Definition: Recipe.cs:198
virtual void OnSelected()
Definition: Recipe.cs:817
virtual RenderRow renderRow
Definition: Recipe.cs:193
RecipeSource source
Definition: Recipe.cs:187
List< Ingredient > ingredients
Definition: Recipe.cs:164
bool VirtualBlock
Definition: Recipe.cs:173
virtual int CostMoney
Definition: Recipe.cs:279
virtual string GetDetail()
Definition: Recipe.cs:782
bool UseStock
Definition: Recipe.cs:167
string GetName()
Definition: Recipe.cs:760
bool IngAsProduct
Definition: Recipe.cs:170
int[] tiles
Definition: RenderRow.cs:10
Thing Find(int uid)
ThingStack GetThingStack(string id, int refVal=-1)
Definition: Thing.cs:8
virtual string LangPlaceType
Definition: TileType.cs:119
Definition: UIList.cs:9
override void Clear()
Definition: UIList.cs:349
override void Add(object item)
Definition: UIList.cs:302
virtual void Refresh(bool highlightLast=false)
Definition: UIList.cs:424
UIItem AddText(string text, FontColor color=FontColor.DontChange)
Definition: UINote.cs:113
void Space(int sizeY=0, int sizeX=1)
Definition: UINote.cs:62
UIText textInfo
Definition: UIRecipeInfo.cs:22
GameObject goMoney
Definition: UIRecipeInfo.cs:50
UIList listIngredients
Definition: UIRecipeInfo.cs:36
UIText textDetail
Definition: UIRecipeInfo.cs:18
virtual void Init(int index=0, UnityAction< int > action=null, bool directChildren=false)
void SetText(string s)
Definition: UIText.cs:159
NoteMode
Definition: IInspect.cs:7

References Recipe._dir, EMono._map, UIList.Add(), UINote.AddText(), UINote.Build(), Props.cardMap, UIList.Clear(), Recipe.CostMoney, CraftMode, EMono.debug, UIRecipeInfo.RecipeVariation.dir, Card.ExistsOnMap, ThingContainer.Find(), Recipe.GetDetail(), Recipe.GetIdThing(), Recipe.GetName(), Recipe.GetRefVal(), ThingContainer.GetThingStack(), goMoney, UIList.group, Recipe.id, RecipeSource.idFactory, Recipe.IngAsProduct, Recipe.ingredients, UISelectableGroup.Init(), Map.Installed, Card.isDestroyed, RecipeManager.knownRecipes, TileType.LangPlaceType, listIngredients, listVariations, main, RecipeSource.NameFactory, RecipeSource.NeedFactory, note, Recipe.OnSelected(), EMono.pc, EMono.player, recipe, Player.recipes, UIList.Refresh(), RefreshBalance(), RefreshImages(), RefreshList(), Recipe.renderRow, Recipe.SetDir(), ButtonGrid.SetRecipeVariation(), UIText.SetText(), CoreDebug.showExtra, Recipe.source, UINote.Space(), textDetail, textInfo, Card.things, RenderRow.tiles, Recipe.tileType, Recipe.UseStock, Recipe.VirtualBlock, and Recipe.WriteNote().

Referenced by BaseTileSelector.ExecuteSummary(), and SetRecipe().

◆ RefreshBalance()

void UIRecipeInfo.RefreshBalance ( )
inline

Definition at line 180 of file UIRecipeInfo.cs.

181 {
182 if (!main)
183 {
184 return;
185 }
186 string text = Lang._Number(EMono.pc.GetCurrency());
187 if (summary.money != 0)
188 {
189 text = text + "<color=" + colorCost.ToHex() + "> -" + summary.money + "</color>";
190 }
191 textCost.SetText(text);
192 foreach (DropdownRecipe dd in dds)
193 {
194 dd.RefreshLabel();
195 }
196 if ((bool)ddList)
197 {
198 ddList.Redraw();
199 }
200 if ((bool)textCostSP)
201 {
202 int countValid = summary.countValid;
203 int num = ((countValid == 0) ? (-1) : (recipe.source.GetSPCost(summary.factory) * countValid));
204 text = ((num == -1) ? "-" : (num.ToString() ?? ""));
205 DOTweenAnimation component = textCostSP.GetComponent<DOTweenAnimation>();
206 Transform transform = textCostSP.Find("nerun");
207 bool flag = num >= EMono.pc.stamina.value;
208 if ((bool)component && !flag)
209 {
210 component.DOPause();
211 }
212 textCostSP.SetText(text, (num == -1) ? FontColor.Bad : ((num < EMono.pc.stamina.value) ? FontColor.Good : FontColor.Warning));
213 if ((bool)component && flag)
214 {
215 component.tween.Restart();
216 }
217 if ((bool)transform)
218 {
219 transform.SetActive(flag);
220 }
221 }
222 }
int GetCurrency(string id="money")
Definition: Card.cs:3652
Stats stamina
Definition: Chara.cs:955
int countValid
Definition: HitSummary.cs:10
int money
Definition: HitSummary.cs:6
Thing factory
Definition: HitSummary.cs:18
Definition: Lang.cs:6
static string _Number(int a)
Definition: Lang.cs:157
int GetSPCost(Card factory)
virtual int value
Definition: Stats.cs:56
HitSummary summary
Definition: UIRecipeInfo.cs:77
UIText textCost
Definition: UIRecipeInfo.cs:20
DropdownGrid ddList
Definition: UIRecipeInfo.cs:62
List< DropdownRecipe > dds
Definition: UIRecipeInfo.cs:75
UIText textCostSP
Definition: UIRecipeInfo.cs:28

References Lang._Number(), colorCost, HitSummary.countValid, ddList, dds, HitSummary.factory, Card.GetCurrency(), RecipeSource.GetSPCost(), main, HitSummary.money, EMono.pc, recipe, DropdownGrid.Redraw(), DropdownRecipe.RefreshLabel(), UIText.SetText(), Recipe.source, Chara.stamina, summary, textCost, textCostSP, and Stats.value.

Referenced by Clear(), Refresh(), LayerCraft.RefreshProduct(), and BaseTileSelector.RefreshSummary().

◆ RefreshImages()

void UIRecipeInfo.RefreshImages ( )
inline

Definition at line 224 of file UIRecipeInfo.cs.

225 {
226 Recipe recipe = this.recipe;
227 if ((bool)listVariations)
228 {
229 listVariations.Redraw();
230 }
231 if ((bool)imageIcon)
232 {
234 {
235 recipe.ingredients[0].thing.SetImage(imageIcon, recipe._dir, recipe.ingredients[0].thing.trait.IdSkin);
236 }
237 else
238 {
240 }
241 }
242 }
int idSkin
Definition: Recipe.cs:181
virtual SourceMaterial.Row GetColorMaterial()
Definition: Recipe.cs:481
int GetColorInt(SourceMaterial.Row mat)
Definition: RenderRow.cs:417
void SetImage(Image image, Sprite sprite=null, int matCol=0, bool setNativeSize=true, int dir=0, int idSkin=0)
Definition: RenderRow.cs:346
Image imageIcon
Definition: UIRecipeInfo.cs:42

References Recipe._dir, RenderRow.GetColorInt(), Recipe.GetColorMaterial(), Recipe.idSkin, imageIcon, Recipe.ingredients, listVariations, recipe, UIList.Redraw(), Recipe.renderRow, RenderRow.SetImage(), Recipe.UseStock, and Recipe.VirtualBlock.

Referenced by OnRotate(), Refresh(), and DropdownGrid.TrySelect().

◆ RefreshList()

void UIRecipeInfo.RefreshList ( )
inline

Definition at line 398 of file UIRecipeInfo.cs.

399 {
400 if ((bool)textReqSkill)
401 {
402 string str = "";
403 FontColor c = FontColor.Good;
404 if (recipe != null)
405 {
406 Element reqSkill = recipe.source.GetReqSkill();
407 int value = EMono.pc.elements.GetOrCreateElement(reqSkill).Value;
408 _ = reqSkill.Name + " " + reqSkill.Value;
409 str = "reqSkill2".lang(reqSkill.Name, reqSkill.Value.ToString() ?? "", value.ToString() ?? "");
410 if (value < reqSkill.Value)
411 {
412 c = FontColor.Warning;
413 }
414 }
415 textReqSkill.SetText(str.IsEmpty("noReqSkill".lang()), c);
416 }
417 if ((bool)ddFactory)
418 {
419 List<GridItem> list = new List<GridItem>();
421 {
422 GridItemCardSource gridItemCardSource = new GridItemCardSource
423 {
425 };
426 if (factory != null && recipe.source.idFactory == factory.id)
427 {
428 gridItemCardSource.thing = factory;
429 }
430 list.Add(gridItemCardSource);
431 }
432 ddFactory.Build(list);
433 }
435 if ((bool)ddList)
436 {
437 ddList.SetActive(recipe != null && !recipe.UseStock);
438 if (recipe != null && !recipe.UseStock)
439 {
440 ddList.recipeInfo = this;
441 ddList.lastMats = lastMats;
443 }
444 return;
445 }
446 Recipe r = recipe;
447 UIList uIList = listIngredients;
448 uIList.Clear();
449 dds.Clear();
450 if (r == null || r.UseStock)
451 {
452 return;
453 }
454 uIList.callbacks = new UIList.Callback<Recipe.Ingredient, UIItem>
455 {
456 onClick = delegate
457 {
458 },
459 onInstantiate = delegate(Recipe.Ingredient ingredient, UIItem b)
460 {
461 DropdownRecipe dropdownRecipe = b.dd as DropdownRecipe;
462 dropdownRecipe.recipe = r;
463 dds.Add(dropdownRecipe);
464 ThingStack thingStack = EMono._map.Stocked.ListThingStack(ingredient, searchMode);
465 int num = thingStack.count;
466 Color color = ((num >= ingredient.req) ? SkinManager.CurrentColors.textGood : SkinManager.CurrentColors.textBad);
467 dropdownRecipe.SetList(0, new List<string> { ingredient.id }, (string n, int i) => "<color=" + color.ToHex() + ">" + ingredient.GetName() + " x " + ingredient.req + " (" + num + ")</color>", delegate
468 {
469 });
470 dropdownRecipe.textLabel.text = dropdownRecipe.orgLabel.text;
471 if ((bool)textCost)
472 {
473 textCost.text = r.CostMoney.ToString() ?? "";
474 }
475 }
476 };
477 foreach (Recipe.Ingredient ingredient in r.ingredients)
478 {
479 uIList.Add(ingredient);
480 }
481 uIList.Refresh();
482 }
ElementContainerCard elements
Definition: Card.cs:37
string id
Definition: Card.cs:31
Thing Add(string id, int num=1, int lv=1)
Definition: Card.cs:2878
void BuildIngredients(Recipe _recipe, Image _icon, Action _onValueChange, StockSearchMode _searchMode)
Definition: DropdownGrid.cs:88
void Build(List< GridItem > items)
Definition: DropdownGrid.cs:51
static SourceManager sources
Definition: EMono.cs:41
Element GetOrCreateElement(Element ele)
int Value
Definition: ELEMENT.cs:282
virtual string Name
Definition: ELEMENT.cs:294
PropsStocked Stocked
Definition: Map.cs:121
ThingStack ListThingStack(Recipe.Ingredient ing, StockSearchMode searchMode)
Definition: Props.cs:204
Element GetReqSkill()
static SkinColorProfile CurrentColors
Definition: SkinManager.cs:84
Dictionary< string, CardRow > map
Definition: SourceCard.cs:8
SourceCard cards
int count
Definition: ThingStack.cs:7
Definition: UIItem.cs:5
Dictionary< string, int > lastMats
Definition: UIRecipeInfo.cs:69
void RefreshQuality()
DropdownGrid ddFactory
Definition: UIRecipeInfo.cs:64
UIText textReqSkill
Definition: UIRecipeInfo.cs:26
StockSearchMode searchMode
Definition: UIRecipeInfo.cs:60

References EMono._map, UIList.Add(), Card.Add(), DropdownGrid.Build(), DropdownGrid.BuildIngredients(), SourceManager.cards, UIList.Clear(), Color, Recipe.CostMoney, ThingStack.count, SkinManager.CurrentColors, ddFactory, ddList, dds, Card.elements, factory, ElementContainer.GetOrCreateElement(), RecipeSource.GetReqSkill(), Card.id, RecipeSource.idFactory, imageIcon, Recipe.ingredients, lastMats, listIngredients, Props.ListThingStack(), SourceCard.map, Element.Name, RecipeSource.NeedFactory, DropdownRecipe.orgLabel, EMono.pc, recipe, UIList.Refresh(), RefreshQuality(), searchMode, UIText.SetText(), Recipe.source, EMono.sources, Map.Stocked, SkinColorProfile.textBad, textCost, SkinColorProfile.textGood, textReqSkill, Recipe.UseStock, and Element.Value.

Referenced by Clear(), Refresh(), and SetArea().

◆ RefreshQuality()

void UIRecipeInfo.RefreshQuality ( )
inline

Definition at line 390 of file UIRecipeInfo.cs.

391 {
392 if ((bool)textQuality)
393 {
395 }
396 }
void SetTextDifficulty(UIText text)
Definition: Recipe.cs:936
UIText textQuality
Definition: UIRecipeInfo.cs:24

References recipe, Recipe.SetTextDifficulty(), and textQuality.

Referenced by RefreshList().

◆ SetArea()

void UIRecipeInfo.SetArea ( Area  a)
inline

Definition at line 86 of file UIRecipeInfo.cs.

87 {
88 if (a == null)
89 {
90 Clear();
91 return;
92 }
93 if (main)
94 {
95 goInfo.SetActive(value: true);
96 goIngredients.SetActive(value: false);
97 }
98 if (area != a)
99 {
100 area = a;
101 recipe = null;
102 textName.text = a.Name;
103 textDetail.SetActive(enable: true);
104 textDetail.SetText(a.source.GetDetail());
105 note.Clear();
106 note.Build();
107 if (!main)
108 {
109 listIngredients.SetActive(enable: false);
110 }
111 RefreshList();
112 if ((bool)imageArea)
113 {
114 imageArea.SetActive(enable: true);
115 }
116 if ((bool)listVariations)
117 {
118 listVariations.SetActive(enable: false);
119 }
120 this.SetActive(enable: true);
121 this.RebuildLayout(recursive: true);
122 }
123 }
virtual string Name
Definition: BaseArea.cs:37
SourceArea.Row source
Definition: BaseArea.cs:50

References area, UINote.Build(), UINote.Clear(), Clear(), goInfo, goIngredients, imageArea, listIngredients, listVariations, main, BaseArea.Name, note, recipe, RefreshList(), UIText.SetText(), BaseArea.source, and textDetail.

Referenced by BuildMenu.Refresh(), and BuildMenu.RefreshCategoryArea().

◆ SetRecipe()

void UIRecipeInfo.SetRecipe ( Recipe  r)
inline

Definition at line 125 of file UIRecipeInfo.cs.

126 {
127 if ((bool)imageArea)
128 {
129 imageArea.SetActive(enable: false);
130 }
131 area = null;
132 if (r == null)
133 {
134 textDetail.SetActive(enable: false);
135 Clear();
136 return;
137 }
138 if (main)
139 {
140 goInfo.SetActive(value: true);
141 goIngredients.SetActive(r.ingredients.Count > 0 && !r.UseStock);
142 }
143 if (recipe != r)
144 {
145 recipe = r;
146 Refresh();
147 }
148 }
void Refresh()

References area, Clear(), goInfo, goIngredients, imageArea, Recipe.ingredients, main, recipe, Refresh(), textDetail, and Recipe.UseStock.

Referenced by Init(), BuildMenu.Refresh(), BuildMenu.RefreshCategory(), LayerCraft.RefreshRecipe(), and BuildMenu.Unselect().

Member Data Documentation

◆ area

Area UIRecipeInfo.area

Definition at line 34 of file UIRecipeInfo.cs.

Referenced by Clear(), BuildMenu.RefreshCategoryArea(), SetArea(), and SetRecipe().

◆ buttonProduct

ButtonGrid UIRecipeInfo.buttonProduct

Definition at line 66 of file UIRecipeInfo.cs.

Referenced by LayerCraft.RefreshProduct().

◆ colorCost

Color UIRecipeInfo.colorCost

Definition at line 46 of file UIRecipeInfo.cs.

Referenced by Init(), and RefreshBalance().

◆ colorPredict

Color UIRecipeInfo.colorPredict

Definition at line 48 of file UIRecipeInfo.cs.

Referenced by Init().

◆ CraftMode

bool UIRecipeInfo.CraftMode

Definition at line 58 of file UIRecipeInfo.cs.

Referenced by Refresh().

◆ ddFactory

DropdownGrid UIRecipeInfo.ddFactory

Definition at line 64 of file UIRecipeInfo.cs.

Referenced by RefreshList().

◆ ddList

DropdownGrid UIRecipeInfo.ddList

Definition at line 62 of file UIRecipeInfo.cs.

Referenced by LayerCraft.OnAfterInit(), RefreshBalance(), and RefreshList().

◆ dds

List<DropdownRecipe> UIRecipeInfo.dds = new List<DropdownRecipe>()

Definition at line 75 of file UIRecipeInfo.cs.

Referenced by RefreshBalance(), and RefreshList().

◆ factory

Thing UIRecipeInfo.factory

Definition at line 30 of file UIRecipeInfo.cs.

Referenced by RefreshList().

◆ goInfo

GameObject UIRecipeInfo.goInfo

Definition at line 54 of file UIRecipeInfo.cs.

Referenced by Clear(), SetArea(), and SetRecipe().

◆ goIngredients

GameObject UIRecipeInfo.goIngredients

Definition at line 52 of file UIRecipeInfo.cs.

Referenced by Clear(), SetArea(), and SetRecipe().

◆ goMoney

GameObject UIRecipeInfo.goMoney

Definition at line 50 of file UIRecipeInfo.cs.

Referenced by Refresh().

◆ hideMode

bool UIRecipeInfo.hideMode = true

Definition at line 72 of file UIRecipeInfo.cs.

Referenced by BuildMenu.Refresh().

◆ imageArea

Image UIRecipeInfo.imageArea

Definition at line 40 of file UIRecipeInfo.cs.

Referenced by Clear(), SetArea(), and SetRecipe().

◆ imageIcon

Image UIRecipeInfo.imageIcon

Definition at line 42 of file UIRecipeInfo.cs.

Referenced by RefreshImages(), and RefreshList().

◆ lastMats

Dictionary<string, int> UIRecipeInfo.lastMats = new Dictionary<string, int>()

Definition at line 69 of file UIRecipeInfo.cs.

Referenced by HitSummary.Execute(), RefreshList(), and BuildMenu.Select().

◆ listIngredients

UIList UIRecipeInfo.listIngredients

Definition at line 36 of file UIRecipeInfo.cs.

Referenced by Refresh(), RefreshList(), and SetArea().

◆ listVariations

UIList UIRecipeInfo.listVariations

Definition at line 38 of file UIRecipeInfo.cs.

Referenced by Clear(), OnRotate(), Refresh(), RefreshImages(), and SetArea().

◆ main

bool UIRecipeInfo.main

Definition at line 56 of file UIRecipeInfo.cs.

Referenced by Clear(), Refresh(), RefreshBalance(), SetArea(), and SetRecipe().

◆ note

UINote UIRecipeInfo.note

Definition at line 44 of file UIRecipeInfo.cs.

Referenced by Clear(), Refresh(), LayerCraft.RefreshProduct(), and SetArea().

◆ recipe

◆ searchMode

StockSearchMode UIRecipeInfo.searchMode

Definition at line 60 of file UIRecipeInfo.cs.

Referenced by RefreshList().

◆ textCost

UIText UIRecipeInfo.textCost

Definition at line 20 of file UIRecipeInfo.cs.

Referenced by RefreshBalance(), and RefreshList().

◆ textCostSP

UIText UIRecipeInfo.textCostSP

Definition at line 28 of file UIRecipeInfo.cs.

Referenced by RefreshBalance().

◆ textDetail

UIText UIRecipeInfo.textDetail

Definition at line 18 of file UIRecipeInfo.cs.

Referenced by Refresh(), SetArea(), and SetRecipe().

◆ textInfo

UIText UIRecipeInfo.textInfo

Definition at line 22 of file UIRecipeInfo.cs.

Referenced by Refresh().

◆ textName

UIText UIRecipeInfo.textName

Definition at line 16 of file UIRecipeInfo.cs.

Referenced by Clear().

◆ textQuality

UIText UIRecipeInfo.textQuality

Definition at line 24 of file UIRecipeInfo.cs.

Referenced by RefreshQuality().

◆ textReqSkill

UIText UIRecipeInfo.textReqSkill

Definition at line 26 of file UIRecipeInfo.cs.

Referenced by RefreshList().

Property Documentation

◆ summary

HitSummary UIRecipeInfo.summary
get

Definition at line 77 of file UIRecipeInfo.cs.

Referenced by RefreshBalance().


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