1using System.Collections.Generic;
34 public bool isDish => sourceCard._origin ==
"dish";
53 Mold.ignoreStackHeight = Input.GetKey(KeyCode.LeftControl);
71 base.BuildIngredientList();
76 bool flag = ingredients.Count < 3;
79 if (ingredient.
id ==
"seasoning")
101 if (base.source.colorIng != 0)
152 int num4 = renderRow.LV + num3;
153 bool flag = num3 < 0;
158 foreach (
Thing ing
in ings)
170 else if (cardRow !=
null && cardRow.
tag.Contains(
"no_fail"))
193 key =
new string[6] {
"dagger",
"sword",
"axe_hand",
"blunt_club",
"spear",
"staff_long" }.RandomItem();
197 key =
new string[6] {
"dagger",
"sword",
"axe_hand",
"blunt_club",
"spear",
"staff_long" }.RandomItem();
198 num = ings[1].material.id;
223 rarity = (flag ? Rarity.Crude :
Rarity.Normal)
233 foreach (
Thing ing2
in ings)
246 thing.isCrafted =
true;
249 if (base.source.colorIng != 0)
279 thing.decay = thing.MaxDecay + 1;
283 if (thing.
IsAmmo && num2 < 0)
300 Msg.
Say(
"crafted", thing);
310 EClass.player.flags.canComupWithFoodRecipe =
false;
312 if (flag && crafter !=
null && crafter.CanTriggerFire &&
EClass.
rnd(4) == 0)
327 List<Thing> list =
new List<Thing>();
330 list.Add(ingredient.
thing);
336 t.elements.SetBase(757, 1);
344 List<Thing> list =
new List<Thing>();
347 list.Add(ingredient.
thing);
355 return sourceCard.category
switch
357 "meal_meat" =>
"fail_meat",
358 "meal_fish" =>
"fail_fish",
359 "meal_vegi" =>
"fail_vegi",
360 "meal_fruit" =>
"fail_fruit",
361 "meal_cake" =>
"fail_dough_cake",
362 "meal_bread" =>
"fail_dough_bread",
363 "meal_noodle" =>
"fail_noodle",
364 "meal_egg" =>
"fail_egg",
365 "meal_rice" =>
"fail_rice",
366 "meal_soup" =>
"fail_drink",
408 if (base.source.colorIng != 0)
412 if (
card.IsContainer)
428 public override void Build(
Chara chara,
Card t,
Point pos,
int mat,
int dir,
int altitude,
int bridgeHeight)
443 t.altitude = altitude;
444 t.isPlayerCreation =
true;
447 t.isSubsetCard =
true;
449 t.ignoreStackHeight = Input.GetKey(KeyCode.LeftControl);
470 void CheckBlock(
Point _pos)
476 chara.
Kick(
item, ignoreSelf:
false, karmaLoss:
false);
516 recipeCard._mold =
_mold;
TraitHouseBoard houseBoard
void Add(Act a, string s="")
virtual bool IsRoofEditMode(Card c=null)
static void Set(CardBlueprint _bp)
SocketData AddRune(Card rune)
void SetPlaceState(PlaceState newState, bool byPlayer=false)
ElementContainerCard elements
bool HasElement(int ele, int req=1)
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Card ChangeMaterial(int idNew, bool ignoreFixedMaterial=false)
virtual void SetDir(int d)
void ForeachPoint(Action< Point, bool > action)
virtual void SetBlessedState(BlessedState s)
void RenderMarker(Point point, bool active, HitResult result, bool main, int dir, bool useCurrentPosition=false)
virtual void Rotate(bool reverse=false)
void SetFreePos(Point point)
void PlaySoundDrop(bool spatial=true)
bool TryStackTo(Thing to)
SourceCategory.Row category
static Chara Create(string id, int lv=-1)
void HoldCard(Card t, int num=-1)
void Kick(Point p, bool ignoreSelf=false)
static void MakeDish(Thing food, int lv, Chara crafter=null)
static Thing MixIngredients(string idProduct, List< Thing > ings, MixType type, int idMat=0, Chara crafter=null)
int GetRaw(int offsetHours=0)
static SourceManager sources
void AddNote(UINote n, Func< Element, bool > isValid=null, Action onAdd=null, NoteMode mode=NoteMode.Default, bool addRaceFeat=false, Func< Element, string, string > funcText=null, Action< UINote, Element > onAddNote=null)
Element SetBase(string alias, int v, int potential=0)
void ModFire(int x, int z, int amount)
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
bool canComupWithFoodRecipe
List< Chara > ListCharas()
static void SetSeed(int a=-1)
override void WriteNote(UINote n)
void MixIngredients(Thing t)
override void BuildIngredientList()
override TileType tileType
override void OnChangeAltitude(int a)
override void Build(TaskBuild task)
override void OnRenderMarker(Point point, bool active, HitResult result, bool main, int dir, int bridgeHeight)
override void Build(Chara chara, Card t, Point pos, int mat, int dir, int altitude, int bridgeHeight)
override string GetIdThing()
override Thing Craft(BlessedState blessed, bool sound=false, List< Thing > ings=null, TraitCrafter crafter=null, bool model=false)
override Recipe Duplicate()
override string GetDetail()
override RenderRow renderRow
override void OnSelected()
override void OnChangeIngredient()
override void SetDir(int d)
override IRenderer GetRenderer()
void ComeUpWithRandomRecipe(string idCat=null, int lvBonus=0)
List< Ingredient > ingredients
virtual SourceMaterial.Row GetMainMaterial()
virtual SourceMaterial.Row GetColorMaterial()
Dictionary< string, CardRow > map
static Thing Create(string id, int idMat=-1, int lv=-1)
Thing Identify(bool show=true, IDTSource idtSource=IDTSource.Identify)
virtual bool CanRotate(bool buildMode)
virtual void OnCrafted(Recipe recipe)
virtual void OnRenderTile(Point point, HitResult result, int dir)
virtual TileType tileType
Card AddCard(Card t, Point point)