Elin Decompiled Documentation EA 23.333 Myaightly Patch 1
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) || (EMono._zone is Zone_Tent && EMono.pc.homeBranch.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 continue;
272 }
273 Recipe recipe2 = Recipe.Create(thing);
274 if (!recipe2.source.noListing)
275 {
276 if (recipe2 == null)
277 {
278 Debug.Log(thing.Name + "/" + thing.id);
279 }
280 else
281 {
282 newRecipes.Add(recipe2);
283 }
284 }
285 }
286 EMono.pc.things.Foreach(delegate(Thing t)
287 {
288 if (t.trait.CanBeDropped && !t.trait.CanOnlyCarry && !t.isEquipped && (t.source.name.Contains(s) || t.source.name_JP.Contains(s) || t.NameOne.Contains(s)))
289 {
290 Recipe recipe3 = Recipe.Create(t);
291 if (!recipe3.source.noListing)
292 {
293 if (recipe3 == null)
294 {
295 Debug.Log(t.Name + "/" + t.id);
296 }
297 else
298 {
299 newRecipes.Add(recipe3);
300 }
301 }
302 }
303 });
304 }
305 if (!newRecipes.SetEquals(searchRecipes))
306 {
307 searchRecipes = newRecipes;
309 }
310 lastSearch = s;
311 }
312
313 public void ClearSearch()
314 {
315 ClearSearch(refresh: true);
316 }
317
318 public void ClearSearch(bool refresh)
319 {
320 SE.Click();
321 inputSearch.text = "";
322 timerSearch = 0f;
323 lastSearch = "";
324 if (refresh)
325 {
327 }
328 }
329
330 public static void Show()
331 {
332 if ((bool)Instance)
333 {
334 Instance.SetActive(enable: true);
335 }
336 }
337
338 public static void Hide()
339 {
340 if ((bool)Instance)
341 {
342 Instance.SetActive(enable: false);
343 }
344 }
345
346 private void LateUpdate()
347 {
348 Refresh();
349 if (timerSearch > 0f)
350 {
352 if (timerSearch <= 0f)
353 {
354 _Search();
355 }
356 }
357 }
358
359 public void Refresh()
360 {
361 ButtonGrid buttonGrid = InputModuleEX.GetComponentOf<ButtonGrid>();
362 if ((bool)buttonGrid && buttonGrid.recipe == null && buttonGrid.area == null)
363 {
364 buttonGrid = null;
365 }
366 bool flag = EMono.scene.actionMode.ShouldHideBuildMenu || (EMono.scene.actionMode != ActionMode.Build && EMono.scene.actionMode != ActionMode.Inspect && EMono.scene.actionMode != ActionMode.EditArea);
367 cg.SetActive(!flag, delegate(bool enabled)
368 {
369 if (enabled)
370 {
373 }
374 });
376 transOption.anchoredPosition = (groupTab.gameObject.activeInHierarchy ? orgPosOption : posOption);
377 if (info1.hideMode != flag || firstRefresh)
378 {
379 info1.hideMode = flag;
380 if (moveInfo1)
381 {
382 info1.Rect().anchoredPosition = (flag ? posInfo1 : orgPos);
383 }
384 }
385 if ((bool)buttonGrid && !flag)
386 {
387 info2.transform.position = buttonGrid.transform.position;
388 info2.Rect().anchoredPosition = new Vector2(info2.Rect().anchoredPosition.x + posInfo2.x, posInfo2.y);
389 if (buttonGrid.area != null)
390 {
391 info2.SetArea(buttonGrid.area);
392 }
393 else
394 {
395 info2.SetRecipe(buttonGrid.recipe);
396 }
397 info2.SetActive(enable: true);
398 }
399 else
400 {
401 info2.SetActive(enable: false);
402 }
403 firstRefresh = false;
404 }
405
406 public void SelectCategory(string cat)
407 {
408 if (dirtyCat || !(currentCat == cat))
409 {
410 dirtyCat = false;
411 groupTab.Select(catDic[cat]);
412 RefreshCategory(cat);
413 }
414 }
415
416 public void Select(AM_Picker.Result r)
417 {
418 EInput.Consume(consumeAxis: false, 10);
420 ClearSearch(refresh: false);
421 RefreshCategory(r.source.recipeCat);
422 foreach (object @object in list.objects)
423 {
424 Recipe recipe = @object as Recipe;
425 if (r.source == recipe.source && (r.thing == null || r.thing.idSkin == recipe.idSkin))
426 {
427 int index = list.GetIndex(recipe);
428 if (index != -1)
429 {
430 list.dsv.scrollByItemIndex(index);
431 list.Refresh();
432 }
433 break;
434 }
435 }
436 ButtonGrid[] componentsInChildren = list.GetComponentsInChildren<ButtonGrid>();
437 foreach (ButtonGrid buttonGrid in componentsInChildren)
438 {
439 if (buttonGrid.recipe.source == r.source && (r.thing == null || r.thing.idSkin == buttonGrid.recipe.idSkin))
440 {
441 info1.lastMats[buttonGrid.recipe.id] = r.mat.id;
442 buttonGrid.onClick.Invoke();
443 break;
444 }
445 }
446 }
447
448 public void Unselect()
449 {
450 info1.SetRecipe(null);
451 list.Select(null);
452 }
453
455 {
456 UIDynamicList uIDynamicList = listArea;
457 List<Area> list = new List<Area>();
458 foreach (SourceArea.Row row in EMono.sources.areas.rows)
459 {
460 Area area = Area.Create(row.id);
461 area.data.name = null;
462 list.Add(area);
463 }
464 uIDynamicList.Clear();
465 object selected = null;
466 uIDynamicList.callbacks = new UIList.Callback<Area, ButtonGrid>
467 {
468 onClick = delegate(Area a, ButtonGrid b)
469 {
470 SE.Click();
473 {
475 }
476 EMono.ui.hud.hint.Refresh();
477 info1.SetArea(a);
478 },
479 onRedraw = delegate(Area a, ButtonGrid b, int i)
480 {
481 b.SetRecipe(a);
482 if (info1.area != null && a.source == info1.area.source)
483 {
484 selected = a;
485 }
486 }
487 };
488 foreach (Area item in list)
489 {
490 if (item.isListable)
491 {
492 uIDynamicList.Add(item);
493 }
494 }
495 uIDynamicList.List();
496 }
497
498 public void RefreshCategory(string cat)
499 {
500 cat = cat.IsEmpty(categories[0]);
501 EMono.player.pref.lastBuildCategory = cat;
502 currentCat = cat;
503 list.Clear();
504 object selected = null;
505 counts.Clear();
506 list.callbacks = new UIList.Callback<Recipe, ButtonGrid>
507 {
508 onClick = delegate(Recipe a, ButtonGrid b)
509 {
510 SE.Click();
511 EMono.ui.hud.hint.Refresh();
512 EMono.player.pref.lastBuildRecipe = a.source.id;
513 if (a.UseStock && (a.ingredients[0].uid == 0 || a.ingredients[0].thing == null))
514 {
515 Debug.LogError("expection: invalid ingredient:" + a.ingredients[0].uid);
516 }
517 if (info1.recipe != a && !a.UseStock)
518 {
519 foreach (Recipe.Ingredient ingredient in a.ingredients)
520 {
521 ingredient.SetThing();
522 }
523 }
524 if (a.UseStock && (a.ingredients[0].uid == 0 || a.ingredients[0].thing == null))
525 {
526 Debug.LogError("expection: invalid ingredient:" + a.ingredients[0].uid);
527 }
528 info1.SetRecipe(a);
529 if (a.UseStock && (a.ingredients[0].uid == 0 || a.ingredients[0].thing == null))
530 {
531 Debug.LogError("expection: invalid ingredient:" + a.ingredients[0].uid);
532 }
534 ActionMode.Build.StartBuild(a, () => list.GetComp<ButtonGrid>(a));
535 info1.SetRecipe(a);
536 list.Select(a);
537 if (a.UseStock && (a.ingredients[0].uid == 0 || a.ingredients[0].thing == null))
538 {
539 Debug.LogError("expection: invalid ingredient:" + a.ingredients[0].uid);
540 }
541 },
542 onRedraw = delegate(Recipe a, ButtonGrid b, int i)
543 {
544 b.SetActive(a != null);
545 if (a != null)
546 {
547 b.SetRecipe(a);
548 if (info1.recipe != null && a.id == info1.recipe.id)
549 {
550 selected = a;
551 }
553 }
554 },
555 onList = delegate
556 {
557 string[] array = categories;
558 foreach (string key in array)
559 {
560 counts[key] = 0;
561 }
562 if (inputSearch.text != "")
563 {
564 foreach (Recipe searchRecipe in searchRecipes)
565 {
566 if (searchRecipe.UseStock)
567 {
568 Thing thing = searchRecipe.ingredients[0].thing;
569 if (thing == null || thing.isDestroyed || thing.ExistsOnMap || (thing.parentCard != null && thing.parentCard.c_lockLv > 0))
570 {
571 continue;
572 }
573 }
574 list.Add(searchRecipe);
575 }
576 return;
577 }
579 {
580 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"))))
581 {
582 counts[item.recipeCat]++;
583 if (!(item.recipeCat != cat))
584 {
585 for (int k = 0; k < ((item.row.skins != null) ? item.row.skins.Length : 0) + 1; k++)
586 {
587 Recipe recipe = Recipe.Create(item);
588 recipe.idSkin = k;
589 list.Add(recipe);
590 }
591 }
592 }
593 }
595 {
596 foreach (Thing thing2 in EMono._map.Stocked.Things)
597 {
599 {
600 counts[thing2.trait.RecipeCat]++;
601 if (thing2.trait.RecipeCat == cat)
602 {
603 Card rootCard = thing2.GetRootCard();
604 if (rootCard != null && rootCard.c_lockLv == 0)
605 {
607 }
608 }
609 }
610 }
611 EMono.pc.things.Foreach(delegate(Thing t)
612 {
614 {
616 if (t.trait.RecipeCat == cat && t.invY != 1)
617 {
619 }
620 }
621 });
622 }
623 if (cat == "other")
624 {
625 list.objects.Sort((object a, object b) => string.Compare((a as Recipe).id, (b as Recipe).id));
626 }
627 else if (cat == "wall" || cat == "floor" || cat == "foundation" || cat == "obj")
628 {
629 list.objects.Sort((object a, object b) => (a as Recipe).renderRow.sort - (b as Recipe).renderRow.sort);
630 }
631 else
632 {
633 list.objects.Sort(delegate(object a, object b)
634 {
635 Recipe recipe2 = a as Recipe;
636 Recipe recipe3 = b as Recipe;
637 int num = recipe2.renderRow.sort - recipe3.renderRow.sort;
638 if (num == 0)
639 {
640 RecipeCard recipeCard = recipe2 as RecipeCard;
641 RecipeCard recipeCard2 = recipe3 as RecipeCard;
642 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)));
643 if (num == 0)
644 {
645 num = (recipe2.IngAsProduct ? recipe2.ingredients[0].uid : 0) - (recipe3.IngAsProduct ? recipe3.ingredients[0].uid : 0);
646 }
647 }
648 return num;
649 });
650 }
651 array = categories;
652 foreach (string text in array)
653 {
654 if (!(text == "area") && !(text == ""))
655 {
656 if (counts[text] == 0)
657 {
658 tabs[text].subText.text = "";
659 }
660 else
661 {
662 tabs[text].subText.text = counts[text].ToString() ?? "";
663 }
664 }
665 }
666 }
667 };
668 list.List();
669 if (lastCat != currentCat)
670 {
671 list.Scroll();
672 }
673 groupTab.Select(catDic[cat]);
674 if (selected != null)
675 {
676 list.Select(selected);
677 }
679 list.RebuildLayoutTo<BuildMenu>();
680 }
681
682 public void OnClickPicker()
683 {
685 }
686}
bool Compare(float lhs)
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:318
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:406
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:416
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:338
Vector2 posOption
Definition: BuildMenu.cs:39
Dictionary< string, int > counts
Definition: BuildMenu.cs:69
static void Show()
Definition: BuildMenu.cs:330
void ClearSearch()
Definition: BuildMenu.cs:313
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:346
ButtonRecipe lastButtonRecipe
Definition: BuildMenu.cs:67
Vector2 orgPosOption
Definition: BuildMenu.cs:75
UIButton buttonUndo
Definition: BuildMenu.cs:79
void RefreshCategoryArea()
Definition: BuildMenu.cs:454
void Init()
Definition: BuildMenu.cs:187
void Refresh()
Definition: BuildMenu.cs:359
void Unselect()
Definition: BuildMenu.cs:448
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:498
UIDynamicList listArea
Definition: BuildMenu.cs:23
Vector2 posInfo2
Definition: BuildMenu.cs:35
HashSet< Recipe > searchRecipes
Definition: BuildMenu.cs:87
void OnClickPicker()
Definition: BuildMenu.cs:682
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:78
string id
Definition: Card.cs:36
string NameOne
Definition: Card.cs:2195
int c_lockLv
Definition: Card.cs:991
int invY
Definition: Card.cs:2007
string Name
Definition: Card.cs:2191
bool ExistsOnMap
Definition: Card.cs:2137
Trait trait
Definition: Card.cs:54
bool c_isImportant
Definition: Card.cs:1051
ThingContainer things
Definition: Card.cs:39
Card GetRootCard()
Definition: Card.cs:3604
Card parentCard
Definition: Card.cs:106
FactionBranch homeBranch
Definition: Chara.cs:1113
Thing GetDebugContainer()
Definition: CoreDebug.cs:802
bool enable
Definition: CoreDebug.cs:301
bool godBuild
Definition: CoreDebug.cs:319
void EnableDebugResource()
Definition: CoreDebug.cs:814
bool hidePCItemsInBuild
Definition: CoreDebug.cs:224
Definition: Core.cs:14
static float delta
Definition: Core.cs:17
Definition: EInput.cs:8
static void Consume(int _skipFrame)
Definition: EInput.cs:667
static int skipFrame
Definition: EInput.cs:298
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:268
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:918
string lastBuildCategory
Definition: Player.cs:26
RecipeManager recipes
Definition: Player.cs:1164
Pref pref
Definition: Player.cs:1080
HotbarManager hotbars
Definition: Player.cs:1152
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
bool IsKnown(string id)
Dictionary< string, int > knownRecipes
Definition: Recipe.cs:7
string id
Definition: Recipe.cs:178
virtual RenderRow renderRow
Definition: Recipe.cs:210
RecipeSource source
Definition: Recipe.cs:204
List< Ingredient > ingredients
Definition: Recipe.cs:181
static Recipe Create(RecipeSource _source, int idMat=-1, Thing ing=null)
Definition: Recipe.cs:325
virtual void OnChangeIngredient()
Definition: Recipe.cs:562
bool UseStock
Definition: Recipe.cs:184
int idSkin
Definition: Recipe.cs:198
virtual void BuildIngredientList()
Definition: Recipe.cs:539
bool IngAsProduct
Definition: Recipe.cs:187
int sort
Definition: RenderRow.cs:18
ActionMode actionMode
Definition: Scene.cs:79
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
bool isEquipped
Definition: Thing.cs:17
virtual Recipe GetBuildModeRecipe()
Definition: Trait.cs:926
virtual string RecipeCat
Definition: Trait.cs:377
virtual bool CanBeDropped
Definition: Trait.cs:313
virtual bool CanOnlyCarry
Definition: Trait.cs:305
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:163
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:3233
ElementContainerZone elements
Definition: Zone.cs:43