Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
BuildMenu.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using UnityEngine;
4using UnityEngine.UI;
5
6public class BuildMenu : EMono
7{
8 public enum Mode
9 {
10 Build,
11 None,
12 Hide,
13 Area,
15 }
16
17 public GridLayoutGroup gridTab;
18
20
22
24
25 public Dictionary<string, int> catDic = new Dictionary<string, int>();
26
28
30
31 public RectTransform transOption;
32
33 public RectTransform transMain;
34
35 public Vector2 posInfo2;
36
37 public Vector2 posInfo1;
38
39 public Vector2 posOption;
40
41 public CanvasGroup cg;
42
43 public float hideSpeed;
44
45 public float intervalSearch;
46
47 public bool moveInfo1;
48
50
51 public InputField inputSearch;
52
53 public string currentCat;
54
55 public string lastCat;
56
58
59 [NonSerialized]
60 public string[] categories = new string[20]
61 {
62 "wall", "floor", "foundation", "door", "furniture", "storage", "spot", "mount", "facility", "tool",
63 "deco", "mech", "light", "junk", "ext", "goods", "food", "obj", "other", "area"
64 };
65
66 [NonSerialized]
68
69 public Dictionary<string, int> counts = new Dictionary<string, int>();
70
71 public Dictionary<string, UIButton> tabs = new Dictionary<string, UIButton>();
72
73 private Vector2 orgPos;
74
75 private Vector2 orgPosOption;
76
77 public static BuildMenu Instance;
78
80
81 public static bool dirtyCat;
82
83 private float timerSearch;
84
85 public string lastSearch;
86
87 public HashSet<Recipe> searchRecipes = new HashSet<Recipe>();
88
89 private bool firstRefresh = true;
90
92
93 public static void Toggle()
94 {
96 EMono.player.hotbars.bars[3].dirty = true;
98 EMono.player.hotbars.bars[4].dirty = true;
100 {
102 }
103 else if (ActionMode.LastBuildMode != null)
104 {
106 }
107 else if (EMono.debug.godBuild || (EMono.Branch != null && EMono.Branch.elements.Has(4006)))
108 {
110 }
111 else
112 {
114 }
115 }
116
117 public static void Activate()
118 {
119 if (!Instance)
120 {
121 Instance = Util.Instantiate<BuildMenu>("UI/BuildMenu/BuildMenu", EMono.ui);
122 Instance.Init();
123 }
124 if (EMono.debug.godBuild)
125 {
127 }
130 EMono.screen.focusPos = null;
131 }
132
133 public void OnActivate()
134 {
136 {
138 }
139 EMono.ui.HideFloats();
140 this.SetActive(mode != Mode.None);
141 transMain.SetActive(mode == Mode.Build && (EMono.debug.godBuild || EMono._zone.elements.Has(4005)));
142 switch (mode)
143 {
144 case Mode.Build:
145 {
146 string cat = EMono.player.pref.lastBuildCategory.IsEmpty("wall");
147 SelectCategory(cat);
148 Refresh();
149 cg.GetComponentInChildren<UIScrollView>()?.RebuildLayout(recursive: true);
150 buttonUndo.onClick.RemoveAllListeners();
151 buttonUndo.onClick.AddListener(delegate
152 {
154 });
155 buttonUndo.SetTooltip("note", delegate(UITooltip tp)
156 {
158 });
159 break;
160 }
161 case Mode.Area:
163 Refresh();
164 break;
165 }
166 if (EMono.debug.enable)
167 {
169 }
171 }
172
173 public static void Deactivate()
174 {
175 if ((bool)Instance)
176 {
177 UnityEngine.Object.DestroyImmediate(Instance.gameObject);
178 if (EMono.game.altUI)
179 {
181 }
182 EMono.ui.ShowFloats();
184 }
185 }
186
187 public void Init()
188 {
189 info1.Init();
190 info2.Init();
191 info2.transform.position = info1.transform.position;
192 orgPos = info1.Rect().anchoredPosition;
193 orgPosOption = transOption.anchoredPosition;
194 for (int i = 0; i < categories.Length; i++)
195 {
196 if (!categories[i].IsEmpty())
197 {
198 catDic.Add(categories[i], i);
199 }
200 }
201 UIButton t = gridTab.CreateMold<UIButton>();
202 for (int j = 0; j < categories.Length - 1; j++)
203 {
204 int _i = j;
205 UIButton uIButton = Util.Instantiate(t, gridTab);
206 uIButton.onClick.AddListener(delegate
207 {
208 ClearSearch(refresh: false);
210 });
211 uIButton.mainText.SetText(("cat_" + categories[j]).lang());
212 tabs[categories[j]] = uIButton;
213 if (categories[j].IsEmpty())
214 {
215 uIButton.mainText.SetActive(enable: false);
216 uIButton.interactable = false;
217 }
218 }
219 groupTab.Init(-1);
220 EMono.ui.hud.frame.SetActive(EMono.game.altUI);
221 inputSearch.onValueChanged.AddListener(Search);
222 inputSearch.onSubmit.AddListener(Search);
223 if (EMono.game.altUI)
224 {
225 EMono.Sound.SwitchPlaylist(EMono.Sound.playlistBuild);
226 }
227 }
228
229 public void Search(string s)
230 {
231 s = s.ToLower();
232 buttonClearSearch.SetActive(inputSearch.text != "");
233 if (!(s == lastSearch))
234 {
236 lastSearch = s;
237 }
238 }
239
240 private void _Search()
241 {
242 string s = lastSearch;
244 HashSet<Recipe> newRecipes = new HashSet<Recipe>();
245 if (!s.IsEmpty())
246 {
248 {
249 if (item.noListing || item.isBridgePillar || (!EMono.debug.godBuild && !item.alwaysKnown && !EMono.player.recipes.knownRecipes.ContainsKey(item.id)) || (!item.row.GetSearchName(jp: false).Contains(s) && !item.row.GetSearchName(jp: true).Contains(s) && !item.id.Contains(s) && !item.row.category.Contains(s)))
250 {
251 continue;
252 }
253 for (int i = 0; i < ((item.row.skins == null) ? 1 : (item.row.skins.Length + 1)); i++)
254 {
255 Recipe recipe = Recipe.Create(item);
256 recipe.idSkin = i;
257 if (recipe == null)
258 {
259 Debug.Log(item.Name + "/" + item.id);
260 }
261 else
262 {
263 newRecipes.Add(recipe);
264 }
265 }
266 }
267 foreach (Thing thing in EMono._map.Stocked.Things)
268 {
269 if (EMono._map.Stocked.ShouldListAsResource(thing) && (thing.source.name.Contains(s) || thing.source.name_JP.Contains(s) || thing.NameOne.Contains(s)))
270 {
271 Recipe recipe2 = Recipe.Create(thing);
272 if (recipe2 == null)
273 {
274 Debug.Log(thing.Name + "/" + thing.id);
275 }
276 else
277 {
278 newRecipes.Add(recipe2);
279 }
280 }
281 }
282 EMono.pc.things.Foreach(delegate(Thing t)
283 {
284 if (t.trait.CanBeDropped && !t.trait.CanOnlyCarry && (t.source.name.Contains(s) || t.source.name_JP.Contains(s) || t.NameOne.Contains(s)))
285 {
286 Recipe recipe3 = Recipe.Create(t);
287 if (recipe3 == null)
288 {
289 Debug.Log(t.Name + "/" + t.id);
290 }
291 else
292 {
293 newRecipes.Add(recipe3);
294 }
295 }
296 });
297 }
298 if (!newRecipes.SetEquals(searchRecipes))
299 {
300 searchRecipes = newRecipes;
302 }
303 lastSearch = s;
304 }
305
306 public void ClearSearch()
307 {
308 ClearSearch(refresh: true);
309 }
310
311 public void ClearSearch(bool refresh)
312 {
313 SE.Click();
314 inputSearch.text = "";
315 timerSearch = 0f;
316 lastSearch = "";
317 if (refresh)
318 {
320 }
321 }
322
323 public static void Show()
324 {
325 if ((bool)Instance)
326 {
327 Instance.SetActive(enable: true);
328 }
329 }
330
331 public static void Hide()
332 {
333 if ((bool)Instance)
334 {
335 Instance.SetActive(enable: false);
336 }
337 }
338
339 private void LateUpdate()
340 {
341 Refresh();
342 if (timerSearch > 0f)
343 {
345 if (timerSearch <= 0f)
346 {
347 _Search();
348 }
349 }
350 }
351
352 public void Refresh()
353 {
354 ButtonGrid buttonGrid = InputModuleEX.GetComponentOf<ButtonGrid>();
355 if ((bool)buttonGrid && buttonGrid.recipe == null && buttonGrid.area == null)
356 {
357 buttonGrid = null;
358 }
359 bool flag = EMono.scene.actionMode.ShouldHideBuildMenu || (EMono.scene.actionMode != ActionMode.Build && EMono.scene.actionMode != ActionMode.Inspect && EMono.scene.actionMode != ActionMode.EditArea);
360 cg.SetActive(!flag, delegate(bool enabled)
361 {
362 if (enabled)
363 {
366 }
367 });
369 transOption.anchoredPosition = (groupTab.gameObject.activeInHierarchy ? orgPosOption : posOption);
370 if (info1.hideMode != flag || firstRefresh)
371 {
372 info1.hideMode = flag;
373 if (moveInfo1)
374 {
375 info1.Rect().anchoredPosition = (flag ? posInfo1 : orgPos);
376 }
377 }
378 if ((bool)buttonGrid && !flag)
379 {
380 info2.transform.position = buttonGrid.transform.position;
381 info2.Rect().anchoredPosition = new Vector2(info2.Rect().anchoredPosition.x + posInfo2.x, posInfo2.y);
382 if (buttonGrid.area != null)
383 {
384 info2.SetArea(buttonGrid.area);
385 }
386 else
387 {
388 info2.SetRecipe(buttonGrid.recipe);
389 }
390 info2.SetActive(enable: true);
391 }
392 else
393 {
394 info2.SetActive(enable: false);
395 }
396 firstRefresh = false;
397 }
398
399 public void SelectCategory(string cat)
400 {
401 if (dirtyCat || !(currentCat == cat))
402 {
403 dirtyCat = false;
404 groupTab.Select(catDic[cat]);
405 RefreshCategory(cat);
406 }
407 }
408
409 public void Select(AM_Picker.Result r)
410 {
411 EInput.Consume(consumeAxis: false, 10);
413 ClearSearch(refresh: false);
414 RefreshCategory(r.source.recipeCat);
415 foreach (object @object in list.objects)
416 {
417 Recipe recipe = @object as Recipe;
418 if (r.source == recipe.source && (r.thing == null || r.thing.idSkin == recipe.idSkin))
419 {
420 int index = list.GetIndex(recipe);
421 if (index != -1)
422 {
423 list.dsv.scrollByItemIndex(index);
424 list.Refresh();
425 }
426 break;
427 }
428 }
429 ButtonGrid[] componentsInChildren = list.GetComponentsInChildren<ButtonGrid>();
430 foreach (ButtonGrid buttonGrid in componentsInChildren)
431 {
432 if (buttonGrid.recipe.source == r.source && (r.thing == null || r.thing.idSkin == buttonGrid.recipe.idSkin))
433 {
434 info1.lastMats[buttonGrid.recipe.id] = r.mat.id;
435 buttonGrid.onClick.Invoke();
436 break;
437 }
438 }
439 }
440
441 public void Unselect()
442 {
443 info1.SetRecipe(null);
444 list.Select(null);
445 }
446
448 {
449 UIDynamicList uIDynamicList = listArea;
450 List<Area> list = new List<Area>();
451 foreach (SourceArea.Row row in EMono.sources.areas.rows)
452 {
453 Area area = Area.Create(row.id);
454 area.data.name = null;
455 list.Add(area);
456 }
457 uIDynamicList.Clear();
458 object selected = null;
459 uIDynamicList.callbacks = new UIList.Callback<Area, ButtonGrid>
460 {
461 onClick = delegate(Area a, ButtonGrid b)
462 {
463 SE.Click();
466 {
468 }
469 EMono.ui.hud.hint.Refresh();
470 info1.SetArea(a);
471 },
472 onRedraw = delegate(Area a, ButtonGrid b, int i)
473 {
474 b.SetRecipe(a);
475 if (info1.area != null && a.source == info1.area.source)
476 {
477 selected = a;
478 }
479 }
480 };
481 foreach (Area item in list)
482 {
483 if (item.isListable)
484 {
485 uIDynamicList.Add(item);
486 }
487 }
488 uIDynamicList.List();
489 }
490
491 public void RefreshCategory(string cat)
492 {
493 cat = cat.IsEmpty(categories[0]);
494 EMono.player.pref.lastBuildCategory = cat;
495 currentCat = cat;
496 list.Clear();
497 object selected = null;
498 counts.Clear();
499 list.callbacks = new UIList.Callback<Recipe, ButtonGrid>
500 {
501 onClick = delegate(Recipe a, ButtonGrid b)
502 {
503 SE.Click();
504 EMono.ui.hud.hint.Refresh();
505 EMono.player.pref.lastBuildRecipe = a.source.id;
506 if (a.UseStock && (a.ingredients[0].uid == 0 || a.ingredients[0].thing == null))
507 {
508 Debug.LogError("expection: invalid ingredient:" + a.ingredients[0].uid);
509 }
510 if (info1.recipe != a && !a.UseStock)
511 {
512 foreach (Recipe.Ingredient ingredient in a.ingredients)
513 {
514 ingredient.SetThing();
515 }
516 }
517 if (a.UseStock && (a.ingredients[0].uid == 0 || a.ingredients[0].thing == null))
518 {
519 Debug.LogError("expection: invalid ingredient:" + a.ingredients[0].uid);
520 }
521 info1.SetRecipe(a);
522 if (a.UseStock && (a.ingredients[0].uid == 0 || a.ingredients[0].thing == null))
523 {
524 Debug.LogError("expection: invalid ingredient:" + a.ingredients[0].uid);
525 }
527 ActionMode.Build.StartBuild(a, () => list.GetComp<ButtonGrid>(a));
528 info1.SetRecipe(a);
529 list.Select(a);
530 if (a.UseStock && (a.ingredients[0].uid == 0 || a.ingredients[0].thing == null))
531 {
532 Debug.LogError("expection: invalid ingredient:" + a.ingredients[0].uid);
533 }
534 },
535 onRedraw = delegate(Recipe a, ButtonGrid b, int i)
536 {
537 b.SetActive(a != null);
538 if (a != null)
539 {
540 b.SetRecipe(a);
541 if (info1.recipe != null && a.id == info1.recipe.id)
542 {
543 selected = a;
544 }
546 }
547 },
548 onList = delegate
549 {
550 string[] array = categories;
551 foreach (string key in array)
552 {
553 counts[key] = 0;
554 }
555 if (inputSearch.text != "")
556 {
557 foreach (Recipe searchRecipe in searchRecipes)
558 {
559 if (searchRecipe.UseStock)
560 {
561 Thing thing = searchRecipe.ingredients[0].thing;
562 if (thing == null || thing.isDestroyed || thing.ExistsOnMap || (thing.parentCard != null && thing.parentCard.c_lockLv > 0))
563 {
564 continue;
565 }
566 }
567 list.Add(searchRecipe);
568 }
569 return;
570 }
572 {
573 if (EMono.debug.godBuild || !(item.row.GetAlias != "block_invisi") || (!item.noListing && !item.row.tileType.EditorTile && EMono.player.recipes.IsKnown(item.id) && (item.row.factory.Length == 0 || !(item.row.factory[0] == "none"))))
574 {
575 counts[item.recipeCat]++;
576 if (!(item.recipeCat != cat))
577 {
578 for (int k = 0; k < ((item.row.skins != null) ? item.row.skins.Length : 0) + 1; k++)
579 {
580 Recipe recipe = Recipe.Create(item);
581 recipe.idSkin = k;
582 list.Add(recipe);
583 }
584 }
585 }
586 }
588 {
589 foreach (Thing thing2 in EMono._map.Stocked.Things)
590 {
592 {
593 counts[thing2.trait.RecipeCat]++;
594 if (thing2.trait.RecipeCat == cat)
595 {
596 Card rootCard = thing2.GetRootCard();
597 if (rootCard != null && rootCard.c_lockLv == 0)
598 {
600 }
601 }
602 }
603 }
604 EMono.pc.things.Foreach(delegate(Thing t)
605 {
607 {
609 if (t.trait.RecipeCat == cat && t.invY != 1)
610 {
612 }
613 }
614 });
615 }
616 if (cat == "other")
617 {
618 list.objects.Sort((object a, object b) => string.Compare((a as Recipe).id, (b as Recipe).id));
619 }
620 else if (cat == "wall" || cat == "floor" || cat == "foundation" || cat == "obj")
621 {
622 list.objects.Sort((object a, object b) => (a as Recipe).renderRow.sort - (b as Recipe).renderRow.sort);
623 }
624 else
625 {
626 list.objects.Sort(delegate(object a, object b)
627 {
628 Recipe recipe2 = a as Recipe;
629 Recipe recipe3 = b as Recipe;
630 int num = recipe2.renderRow.sort - recipe3.renderRow.sort;
631 if (num == 0)
632 {
633 RecipeCard recipeCard = recipe2 as RecipeCard;
634 RecipeCard recipeCard2 = recipe3 as RecipeCard;
635 num = ((recipeCard == null || recipeCard2 == null) ? string.Compare(recipe2.id, recipe3.id) : string.Compare(recipeCard.sourceCard._origin.IsEmpty(recipeCard.sourceCard.id), recipeCard2.sourceCard._origin.IsEmpty(recipeCard2.sourceCard.id)));
636 if (num == 0)
637 {
638 num = (recipe2.IngAsProduct ? recipe2.ingredients[0].uid : 0) - (recipe3.IngAsProduct ? recipe3.ingredients[0].uid : 0);
639 }
640 }
641 return num;
642 });
643 }
644 array = categories;
645 foreach (string text in array)
646 {
647 if (!(text == "area") && !(text == ""))
648 {
649 if (counts[text] == 0)
650 {
651 tabs[text].subText.text = "";
652 }
653 else
654 {
655 tabs[text].subText.text = counts[text].ToString() ?? "";
656 }
657 }
658 }
659 }
660 };
661 list.List();
662 if (lastCat != currentCat)
663 {
664 list.Scroll();
665 }
666 groupTab.Select(catDic[cat]);
667 if (selected != null)
668 {
669 list.Select(selected);
670 }
672 list.RebuildLayoutTo<BuildMenu>();
673 }
674
675 public void OnClickPicker()
676 {
678 }
679}
void StartBuild(Recipe r, Func< ButtonGrid > _button)
Definition: AM_Build.cs:156
void SetArea(Area a)
void Activate(Thing t)
static AM_Inspect Inspect
Definition: ActionMode.cs:23
static AM_Picker Picker
Definition: ActionMode.cs:43
static AM_Build Build
Definition: ActionMode.cs:49
static AM_EditArea EditArea
Definition: ActionMode.cs:53
void Activate(bool toggle=true, bool forceActivate=false)
Definition: ActionMode.cs:339
virtual BuildMenu.Mode buildMenuMode
Definition: ActionMode.cs:186
static AM_Terrain Terrain
Definition: ActionMode.cs:65
static ActionMode LastBuildMode
Definition: ActionMode.cs:79
static AM_CreateArea CreateArea
Definition: ActionMode.cs:51
Definition: Area.cs:4
static Area Create(string id)
Definition: Area.cs:104
SourceArea.Row source
Definition: BaseArea.cs:50
InputField inputSearch
Definition: BuildMenu.cs:51
void ClearSearch(bool refresh)
Definition: BuildMenu.cs:311
RectTransform transMain
Definition: BuildMenu.cs:33
RectTransform transOption
Definition: BuildMenu.cs:31
CanvasGroup cg
Definition: BuildMenu.cs:41
float hideSpeed
Definition: BuildMenu.cs:43
void SelectCategory(string cat)
Definition: BuildMenu.cs:399
Mode mode
Definition: BuildMenu.cs:91
float intervalSearch
Definition: BuildMenu.cs:45
static void Deactivate()
Definition: BuildMenu.cs:173
GridLayoutGroup gridTab
Definition: BuildMenu.cs:17
string lastSearch
Definition: BuildMenu.cs:85
void Select(AM_Picker.Result r)
Definition: BuildMenu.cs:409
static BuildMenu Instance
Definition: BuildMenu.cs:77
UIDynamicList list
Definition: BuildMenu.cs:21
UISelectableGroup groupTab
Definition: BuildMenu.cs:19
static void Hide()
Definition: BuildMenu.cs:331
Vector2 posOption
Definition: BuildMenu.cs:39
Dictionary< string, int > counts
Definition: BuildMenu.cs:69
static void Show()
Definition: BuildMenu.cs:323
void ClearSearch()
Definition: BuildMenu.cs:306
void OnActivate()
Definition: BuildMenu.cs:133
string[] categories
Definition: BuildMenu.cs:60
void _Search()
Definition: BuildMenu.cs:240
Vector2 posInfo1
Definition: BuildMenu.cs:37
Vector2 orgPos
Definition: BuildMenu.cs:73
static void Toggle()
Definition: BuildMenu.cs:93
UIRecipeInfo info1
Definition: BuildMenu.cs:27
Dictionary< string, int > catDic
Definition: BuildMenu.cs:25
void LateUpdate()
Definition: BuildMenu.cs:339
ButtonRecipe lastButtonRecipe
Definition: BuildMenu.cs:67
Vector2 orgPosOption
Definition: BuildMenu.cs:75
UIButton buttonUndo
Definition: BuildMenu.cs:79
void RefreshCategoryArea()
Definition: BuildMenu.cs:447
void Init()
Definition: BuildMenu.cs:187
void Refresh()
Definition: BuildMenu.cs:352
void Unselect()
Definition: BuildMenu.cs:441
static bool dirtyCat
Definition: BuildMenu.cs:81
TerrainMenu terrainMenu
Definition: BuildMenu.cs:49
static void Activate()
Definition: BuildMenu.cs:117
string lastCat
Definition: BuildMenu.cs:55
void RefreshCategory(string cat)
Definition: BuildMenu.cs:491
UIDynamicList listArea
Definition: BuildMenu.cs:23
Vector2 posInfo2
Definition: BuildMenu.cs:35
HashSet< Recipe > searchRecipes
Definition: BuildMenu.cs:87
void OnClickPicker()
Definition: BuildMenu.cs:675
float timerSearch
Definition: BuildMenu.cs:83
Dictionary< string, UIButton > tabs
Definition: BuildMenu.cs:71
UIRecipeInfo info2
Definition: BuildMenu.cs:29
bool firstRefresh
Definition: BuildMenu.cs:89
UIButton buttonClearSearch
Definition: BuildMenu.cs:57
bool moveInfo1
Definition: BuildMenu.cs:47
string currentCat
Definition: BuildMenu.cs:53
void Search(string s)
Definition: BuildMenu.cs:229
Area area
Definition: ButtonGrid.cs:18
void SetRecipe()
Definition: ButtonGrid.cs:533
Recipe recipe
Definition: ButtonGrid.cs:20
string _origin
Definition: CardRow.cs:15
string id
Definition: CardRow.cs:7
Definition: Card.cs:11
bool isDestroyed
Definition: Card.cs:71
string id
Definition: Card.cs:31
string NameOne
Definition: Card.cs:2017
int c_lockLv
Definition: Card.cs:924
int invY
Definition: Card.cs:1831
string Name
Definition: Card.cs:2013
bool ExistsOnMap
Definition: Card.cs:1961
Trait trait
Definition: Card.cs:49
bool c_isImportant
Definition: Card.cs:984
ThingContainer things
Definition: Card.cs:34
Card GetRootCard()
Definition: Card.cs:3173
Card parentCard
Definition: Card.cs:99
Thing GetDebugContainer()
Definition: CoreDebug.cs:751
bool enable
Definition: CoreDebug.cs:285
bool godBuild
Definition: CoreDebug.cs:303
void EnableDebugResource()
Definition: CoreDebug.cs:763
bool hidePCItemsInBuild
Definition: CoreDebug.cs:208
Definition: Core.cs:14
static float delta
Definition: Core.cs:17
Definition: EInput.cs:8
static void Consume(int _skipFrame)
Definition: EInput.cs:656
static int skipFrame
Definition: EInput.cs:287
Definition: EMono.cs:4
static Chara pc
Definition: EMono.cs:13
static Player player
Definition: EMono.cs:11
static Zone _zone
Definition: EMono.cs:19
static BaseGameScreen screen
Definition: EMono.cs:29
static Game game
Definition: EMono.cs:7
static Scene scene
Definition: EMono.cs:27
static UI ui
Definition: EMono.cs:15
static SoundManager Sound
Definition: EMono.cs:39
static FactionBranch Branch
Definition: EMono.cs:21
static Map _map
Definition: EMono.cs:17
static CoreDebug debug
Definition: EMono.cs:45
static SourceManager sources
Definition: EMono.cs:41
bool Has(int ele)
ElementContainerZone elements
bool altUI
Definition: Game.cs:261
Hotbar[] bars
Definition: HotbarManager.cs:6
void ResetHotbar(int id)
Definition: HotbarManager.cs:8
bool dirty
Definition: Hotbar.cs:89
void ResetEditorPos()
Definition: Map.cs:357
TaskManager tasks
Definition: Map.cs:34
PropsStocked Stocked
Definition: Map.cs:121
void RevealAll(bool reveal=true)
Definition: Map.cs:899
string lastBuildCategory
Definition: Player.cs:26
RecipeManager recipes
Definition: Player.cs:898
Pref pref
Definition: Player.cs:814
HotbarManager hotbars
Definition: Player.cs:886
List< Thing > Things
Definition: Props.cs:37
bool ShouldListAsResource(Thing t)
Definition: Props.cs:174
CardRow sourceCard
Definition: RecipeCard.cs:20
static void BuildList()
static List< RecipeSource > list
Definition: RecipeManager.cs:9
bool IsKnown(string id)
Dictionary< string, int > knownRecipes
Definition: Recipe.cs:7
string id
Definition: Recipe.cs:161
virtual RenderRow renderRow
Definition: Recipe.cs:193
RecipeSource source
Definition: Recipe.cs:187
List< Ingredient > ingredients
Definition: Recipe.cs:164
static Recipe Create(RecipeSource _source, int idMat=-1, Thing ing=null)
Definition: Recipe.cs:308
virtual void OnChangeIngredient()
Definition: Recipe.cs:532
bool UseStock
Definition: Recipe.cs:167
int idSkin
Definition: Recipe.cs:181
virtual void BuildIngredientList()
Definition: Recipe.cs:509
bool IngAsProduct
Definition: Recipe.cs:170
int sort
Definition: RenderRow.cs:18
ActionMode actionMode
Definition: Scene.cs:77
SourceArea areas
UndoManager undo
Definition: TaskManager.cs:64
void Foreach(Action< Thing > action, bool onlyAccessible=true)
Definition: Thing.cs:8
SourceThing.Row source
Definition: Thing.cs:11
virtual Recipe GetBuildModeRecipe()
Definition: Trait.cs:763
virtual string RecipeCat
Definition: Trait.cs:353
virtual bool CanBeDropped
Definition: Trait.cs:289
virtual bool CanOnlyCarry
Definition: Trait.cs:283
UIText mainText
Definition: UIButton.cs:102
void SetTooltip(Action< UITooltip > onShowTooltip=null, bool enable=true)
Definition: UIButton.cs:361
override void List()
List< object > objects
int GetIndex(object o)
void Scroll(int index=0)
override void Add(object o)
bool Select(object o, bool invoke=false)
DynamicScrollView dsv
bool RefreshHighlight(bool invoke=false)
override void Clear()
Definition: UIList.cs:9
void SetArea(Area a)
Definition: UIRecipeInfo.cs:86
Dictionary< string, int > lastMats
Definition: UIRecipeInfo.cs:69
void SetRecipe(Recipe r)
Recipe recipe
Definition: UIRecipeInfo.cs:32
void Select(UIButton button, bool check=true)
virtual void Init(int index=0, UnityAction< int > action=null, bool directChildren=false)
void SetText(string s)
Definition: UIText.cs:159
UINote note
Definition: UITooltip.cs:21
void WriteNote(UINote n)
Definition: UndoManager.cs:76
void Perform()
Definition: UndoManager.cs:93
void RefreshBGM()
Definition: Zone.cs:2742
ElementContainerZone elements
Definition: Zone.cs:43