1using System.Collections.Generic;
34 public List<RecipeSource>
newRecipes =
new List<RecipeSource>();
140 Dictionary<Thing, int> dictionary =
new Dictionary<Thing, int>();
143 if (ingredient.thing !=
null)
145 if (!dictionary.ContainsKey(ingredient.thing))
147 dictionary.Add(ingredient.thing, 0);
149 dictionary[ingredient.thing] += ingredient.req *
inputNum.
Num;
152 foreach (KeyValuePair<Thing, int>
item in dictionary)
167 if (traitCrafter ==
null)
187 crafter = traitCrafter,
193 base.gameObject.SetActive(value:
false);
198 List<Thing>
list =
new List<Thing>();
201 if (!ingredient.optional || (ingredient.thing !=
null && !ingredient.thing.isDestroyed))
221 CancelInvoke(
"WaitUntilIdle");
222 EInput.haltInput =
true;
225 EInput.haltInput =
false;
226 base.gameObject.SetActive(value:
true);
249 float axis = Input.GetAxis(
"Mouse ScrollWheel");
250 if (Input.GetMouseButton(0))
271 if ((
bool)buttonGrid && buttonGrid.recipe ==
null)
275 if (!(buttonGrid ==
lastB))
283 Dictionary<string, int> cats =
new Dictionary<string, int>();
294 SE.Play(
"click_recipe");
309 b.
Attach(
"recipe_new", rightAttach:
false);
313 b.
Attach(
"recipe_firstTime", rightAttach:
false).GetComponent<Image>().SetAlpha((a.
idSkin == 0) ? 1f : 0.5f);
321 if (cat ==
"all" ||
item.row.Category.IsChildOf(cat))
325 if (
item.row.skins !=
null &&
item.row.skins.Length != 0)
327 for (
int j = 0; j <
item.row.skins.Length; j++)
336 if (row.
id !=
"lightsource" && row.
IsChildOf(
"armor"))
340 if (!cats.ContainsKey(row.
id))
362 foreach (KeyValuePair<string, int> c
in cats)
386 if ((@
object as
Recipe).id == text)
415 if (
info1.
recipe !=
recipe || (!ingredient.optional && (ingredient.thing ==
null || ingredient.thing.isDestroyed)))
417 ingredient.SetThing();
448 inputNum.onValueChanged = delegate
458 ELayer.screen.tileSelector.summary.countValid =
inputNum.
Num;
459 ELayer.screen.tileSelector.summary.factory =
factory;
464 buttonAutoRefuel.mainText.text = (factory.autoRefuel ?
"On" :
"Off");
468 List<Thing>
list =
new List<Thing>();
471 if (ingredient.thing !=
null)
void SetTurbo(int mtp=-1)
ElementContainerCard elements
bool IsEquipmentOrRangedOrAmmo
static SourceManager sources
Dictionary< int, Element > dict
UIText textQualityInvalid
void OnChangeIngredient()
static LayerCraft Instance
override void OnEndCraft()
void RefreshRecipe(bool first)
UIButton buttonAutoRefuel
void RefreshTrackButton()
Image imageQualityCurrent
override void ClearButtons()
override void OnAfterInit()
override string GetTextHeader(Window window)
List< RecipeSource > newRecipes
override void RefreshCurrentGrid()
override List< Thing > GetTargets()
void RefreshCategory(string cat, bool first=false)
override int GetReqIngredient(int index)
static LayerDragGrid Create(InvOwnerDraglet owner, bool refuelFromLayerDragGrid=false)
Layer SetOnKill(Action action)
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Dictionary< string, string > lastRecipes
List< RecipeSource > ListSources(Thing factory, List< RecipeSource > newRecipes=null)
HashSet< string > hoveredRecipes
void SaveLastIngredients()
List< Ingredient > ingredients
QuestTrackCraft GetQuestTrack()
static Recipe Create(RecipeSource _source, int idMat=-1, Thing ing=null)
void ToggleTrack(QuestTrackCraft quest)
virtual void OnChangeIngredient()
virtual Thing Craft(BlessedState blessed, bool sound=false, List< Thing > ings=null, TraitCrafter crafter=null, bool model=false)
virtual void BuildIngredientList()
bool IsChildOf(string id)
SourceCategory categories
override void WriteNote(UINote n, Action< UINote > onWriteNote=null, IInspect.NoteMode mode=IInspect.NoteMode.Default, Recipe recipe=null)
static TraitSelfFactory SelfFactory
static void Play(string idStep)
override void Add(object o)
bool Select(object o, bool invoke=false)
void SetMinMax(int _min, int _max)
UISelectableGroup groupTab
void SetInteractable(bool enable, float alpha=0.5f)
void BuildTabs(int index=-1)
Setting.Tab AddTab(string idLang, UIContent content=null, Action action=null, Sprite sprite=null, string langTooltip=null)