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);
278 newRecipes.Add(recipe2);
293 newRecipes.Add(recipe3);
314 inputSearch.text =
"";
355 if ((
bool)buttonGrid && buttonGrid.recipe ==
null && buttonGrid.area ==
null)
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)
372 info1.hideMode = flag;
378 if ((
bool)buttonGrid && !flag)
380 info2.transform.position = buttonGrid.transform.position;
382 if (buttonGrid.
area !=
null)
390 info2.SetActive(enable:
true);
394 info2.SetActive(enable:
false);
418 if (r.source == recipe.
source && (r.thing ==
null || r.thing.idSkin == recipe.
idSkin))
423 list.
dsv.scrollByItemIndex(index);
430 foreach (
ButtonGrid buttonGrid
in componentsInChildren)
435 buttonGrid.onClick.Invoke();
450 List<Area>
list =
new List<Area>();
454 area.data.name =
null;
457 uIDynamicList.
Clear();
458 object selected =
null;
485 uIDynamicList.Add(
item);
488 uIDynamicList.List();
494 EMono.player.pref.lastBuildCategory = cat;
497 object selected =
null;
505 EMono.player.pref.lastBuildRecipe = a.
source.
id;
514 ingredient.SetThing();
537 b.SetActive(a !=
null);
551 foreach (
string key
in array)
576 if (!(
item.recipeCat != cat))
578 for (
int k = 0; k < ((item.row.skins !=
null) ?
item.row.skins.Length : 0) + 1; k++)
597 if (rootCard !=
null && rootCard.
c_lockLv == 0)
620 else if (cat ==
"wall" || cat ==
"floor" || cat ==
"foundation" || cat ==
"obj")
645 foreach (
string text
in array)
647 if (!(text ==
"area") && !(text ==
""))
651 tabs[text].subText.text =
"";
655 tabs[text].subText.text =
counts[text].ToString() ??
"";
667 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