2using System.Collections.Generic;
25 public Dictionary<string, int>
catDic =
new Dictionary<string, int>();
41 public CanvasGroup
cg;
62 "wall",
"floor",
"foundation",
"door",
"furniture",
"storage",
"spot",
"mount",
"facility",
"tool",
63 "deco",
"mech",
"light",
"junk",
"ext",
"goods",
"food",
"obj",
"other",
"area"
69 public Dictionary<string, int>
counts =
new Dictionary<string, int>();
71 public Dictionary<string, UIButton>
tabs =
new Dictionary<string, UIButton>();
130 EMono.screen.focusPos =
null;
149 cg.GetComponentInChildren<
UIScrollView>()?.RebuildLayout(recursive:
true);
177 UnityEngine.Object.DestroyImmediate(
Instance.gameObject);
191 info2.transform.position =
info1.transform.position;
202 for (
int j = 0; j < categories.Length - 1; j++)
206 uIButton.onClick.AddListener(delegate
215 uIButton.
mainText.SetActive(enable:
false);
216 uIButton.interactable =
false;
244 HashSet<Recipe> newRecipes =
new HashSet<Recipe>();
253 for (
int i = 0; i < ((item.row.skins ==
null) ? 1 : (
item.row.skins.Length + 1)); i++)
263 newRecipes.Add(recipe);
282 newRecipes.Add(recipe2);
299 newRecipes.Add(recipe3);
321 inputSearch.text =
"";
362 if ((
bool)buttonGrid && buttonGrid.recipe ==
null && buttonGrid.area ==
null)
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)
379 info1.hideMode = flag;
385 if ((
bool)buttonGrid && !flag)
387 info2.transform.position = buttonGrid.transform.position;
389 if (buttonGrid.
area !=
null)
397 info2.SetActive(enable:
true);
401 info2.SetActive(enable:
false);
425 if (r.source == recipe.
source && (r.thing ==
null || r.thing.idSkin == recipe.
idSkin))
430 list.
dsv.scrollByItemIndex(index);
437 foreach (
ButtonGrid buttonGrid
in componentsInChildren)
442 buttonGrid.onClick.Invoke();
457 List<Area>
list =
new List<Area>();
461 area.data.name =
null;
464 uIDynamicList.
Clear();
465 object selected =
null;
492 uIDynamicList.Add(
item);
495 uIDynamicList.List();
501 EMono.player.pref.lastBuildCategory = cat;
504 object selected =
null;
512 EMono.player.pref.lastBuildRecipe = a.
source.
id;
521 ingredient.SetThing();
544 b.SetActive(a !=
null);
558 foreach (
string key
in array)
583 if (!(
item.recipeCat != cat))
585 for (
int k = 0; k < ((item.row.skins !=
null) ?
item.row.skins.Length : 0) + 1; k++)
604 if (rootCard !=
null && rootCard.
c_lockLv == 0)
627 else if (cat ==
"wall" || cat ==
"floor" || cat ==
"foundation" || cat ==
"obj")
652 foreach (
string text
in array)
654 if (!(text ==
"area") && !(text ==
""))
658 tabs[text].subText.text =
"";
662 tabs[text].subText.text =
counts[text].ToString() ??
"";
674 if (selected !=
null)
void StartBuild(Recipe r, Func< ButtonGrid > _button)
static AM_Inspect Inspect
static AM_EditArea EditArea
void Activate(bool toggle=true, bool forceActivate=false)
virtual BuildMenu.Mode buildMenuMode
static AM_Terrain Terrain
static ActionMode LastBuildMode
static AM_CreateArea CreateArea
static Area Create(string id)
Thing GetDebugContainer()
void EnableDebugResource()
static BaseGameScreen screen
static SoundManager Sound
static FactionBranch Branch
static SourceManager sources
ElementContainerZone elements
void RevealAll(bool reveal=true)
bool ShouldListAsResource(Thing t)
static List< RecipeSource > list
Dictionary< string, int > knownRecipes
virtual RenderRow renderRow
List< Ingredient > ingredients
static Recipe Create(RecipeSource _source, int idMat=-1, Thing ing=null)
virtual void OnChangeIngredient()
virtual void BuildIngredientList()
void Foreach(Action< Thing > action, bool onlyAccessible=true)
virtual Recipe GetBuildModeRecipe()
virtual bool CanBeDropped
virtual bool CanOnlyCarry
override void Add(object o)
bool Select(object o, bool invoke=false)
bool RefreshHighlight(bool invoke=false)
Dictionary< string, int > lastMats
void Select(UIButton button, bool check=true)
virtual void Init(int index=0, UnityAction< int > action=null, bool directChildren=false)
ElementContainerZone elements