Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
RecipeSource Class Reference
Inheritance diagram for RecipeSource:
EClass

Public Member Functions

string GetDetail ()
 
Element GetReqSkill ()
 
List< Recipe.IngredientGetIngredients ()
 
string GetIDIngredient ()
 
int GetSPCost (Card factory)
 

Public Attributes

RenderRow row
 
string type
 
string id
 
int colorIng
 
bool isBridge
 
bool isBridgePillar
 
bool isChara
 
bool noListing
 
bool isRandom
 
bool alwaysKnown
 

Static Public Attributes

static List< Recipe.IngredientDefaultIngredients
 
- Static Public Attributes inherited from EClass
static Core core
 

Properties

string recipeCat [get]
 
string Name [get]
 
bool IsQuickCraft [get]
 
bool NeedFactory [get]
 
string NameFactory [get]
 
string idFactory [get]
 
- Properties inherited from EClass
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Faction Wilds [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static SoundManager Sound [get]
 
static CoreDebug debug [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from EClass
static int rnd (int a)
 
static int curve (int a, int start, int step, int rate=75)
 
static int rndHalf (int a)
 
static float rndf (float a)
 
static int rndSqrt (int a)
 
static void Wait (float a, Card c)
 
static void Wait (float a, Point p)
 
static int Bigger (int a, int b)
 
static int Smaller (int a, int b)
 

Detailed Description

Definition at line 3 of file RecipeSource.cs.

Member Function Documentation

◆ GetDetail()

string RecipeSource.GetDetail ( )
inline

Definition at line 104 of file RecipeSource.cs.

105 {
106 return row.GetDetail();
107 }
RenderRow row
Definition: RecipeSource.cs:5
string GetDetail()
Definition: SourceData.cs:543

References SourceData< T, T2 >.BaseRow.GetDetail(), and row.

Referenced by Recipe.GetDetail(), and UICardInfo.SetRecipe().

◆ GetIDIngredient()

string RecipeSource.GetIDIngredient ( )
inline

Definition at line 184 of file RecipeSource.cs.

185 {
186 string[] components = row.components;
187 if (!components.IsEmpty() && components[0] != "-")
188 {
189 int num = 0;
190 if (num < components.Length)
191 {
192 string[] array = components[num].Split('/')[0].Split('@');
193 char c = array[0][0];
194 if (c == '#' || c == '$' || c == '+')
195 {
196 array[0] = array[0].Remove(0, 1);
197 }
198 return array[0];
199 }
200 }
201 return null;
202 }
string[] components
Definition: RenderRow.cs:52

References RenderRow.components, and row.

Referenced by Map.DropBlockComponent().

◆ GetIngredients()

List< Recipe.Ingredient > RecipeSource.GetIngredients ( )
inline

Definition at line 114 of file RecipeSource.cs.

115 {
116 if (!row.factory.IsEmpty() && row.factory[0] == "x")
117 {
118 noListing = true;
119 }
120 if (row.components.Length == 0)
121 {
122 return DefaultIngredients;
123 }
124 if (row.components[0] == "-")
125 {
126 return DefaultIngredients;
127 }
128 if (row.recipeKey.Length != 0 && row.recipeKey[0] == "*")
129 {
130 alwaysKnown = true;
131 }
132 string[] components = row.components;
133 List<Recipe.Ingredient> list = new List<Recipe.Ingredient>();
134 if (!components.IsEmpty() && components[0] != "-")
135 {
136 for (int i = 0; i < components.Length; i++)
137 {
138 string[] array = components[i].Split('|');
139 string[] array2 = array[0].Split('/');
140 string[] array3 = array2[0].Split('@');
141 bool optional = false;
142 bool useCat = false;
143 while (true)
144 {
145 switch (array3[0][0])
146 {
147 case '$':
148 colorIng = i;
149 array3[0] = array3[0].Remove(0, 1);
150 break;
151 case '#':
152 useCat = true;
153 array3[0] = array3[0].Remove(0, 1);
154 break;
155 case '+':
156 goto IL_0142;
157 }
158 break;
159 IL_0142:
160 optional = true;
161 array3[0] = array3[0].Remove(0, 1);
162 }
163 Recipe.Ingredient ingredient = new Recipe.Ingredient
164 {
165 id = array3[0],
166 tag = ((array3.Length > 1) ? array3[1] : null),
167 req = ((array2.Length <= 1) ? 1 : int.Parse(array2[1])),
168 optional = optional,
169 useCat = useCat
170 };
171 if (array.Length > 1)
172 {
173 for (int j = 1; j < array.Length; j++)
174 {
175 ingredient.idOther.Add(array[j]);
176 }
177 }
178 list.Add(ingredient);
179 }
180 }
181 return list;
182 }
bool alwaysKnown
Definition: RecipeSource.cs:23
static List< Recipe.Ingredient > DefaultIngredients
Definition: RecipeSource.cs:25
List< string > idOther
Definition: Recipe.cs:35
Definition: Recipe.cs:7
string[] factory
Definition: RenderRow.cs:54
string[] recipeKey
Definition: RenderRow.cs:56

References alwaysKnown, colorIng, RenderRow.components, DefaultIngredients, RenderRow.factory, Recipe.Ingredient.idOther, noListing, RenderRow.recipeKey, and row.

Referenced by Recipe.BuildIngredientList(), QuestTrackCraft.GetDetail(), CraftUtil.MakeDish(), and Dialog.Recipe().

◆ GetReqSkill()

◆ GetSPCost()

int RecipeSource.GetSPCost ( Card  factory)
inline

Definition at line 204 of file RecipeSource.cs.

205 {
206 Element reqSkill = GetReqSkill();
207 int num = row.Category.costSP + reqSkill.Value / 10;
208 int num2 = EClass.pc.Evalue(reqSkill.id);
209 if (num2 < reqSkill.Value)
210 {
211 num += (reqSkill.Value - num2) * 2 / 3;
212 }
213 return num;
214 }
int Evalue(int ele)
Definition: Card.cs:2431
static Chara pc
Definition: EClass.cs:14
int id
Definition: ELEMENT.cs:240
int Value
Definition: ELEMENT.cs:282
Element GetReqSkill()

References Card.Evalue(), GetReqSkill(), Element.id, EClass.pc, and Element.Value.

Referenced by TraitFactory.GetCostSp(), and UIRecipeInfo.RefreshBalance().

Member Data Documentation

◆ alwaysKnown

bool RecipeSource.alwaysKnown

Definition at line 23 of file RecipeSource.cs.

Referenced by GetIngredients(), and WidgetCodex.Search().

◆ colorIng

int RecipeSource.colorIng

◆ DefaultIngredients

List<Recipe.Ingredient> RecipeSource.DefaultIngredients
static
Initial value:
= new List<Recipe.Ingredient>
{
{
id = "log",
req = 1
}
}

Definition at line 25 of file RecipeSource.cs.

Referenced by GetIngredients().

◆ id

◆ isBridge

bool RecipeSource.isBridge

Definition at line 13 of file RecipeSource.cs.

Referenced by Recipe.Craft().

◆ isBridgePillar

bool RecipeSource.isBridgePillar

Definition at line 15 of file RecipeSource.cs.

Referenced by RecipeManager.Add().

◆ isChara

bool RecipeSource.isChara

Definition at line 17 of file RecipeSource.cs.

Referenced by WidgetCodex.Search().

◆ isRandom

bool RecipeSource.isRandom

Definition at line 21 of file RecipeSource.cs.

◆ noListing

bool RecipeSource.noListing

Definition at line 19 of file RecipeSource.cs.

Referenced by GetIngredients(), and WidgetCodex.Search().

◆ row

◆ type

string RecipeSource.type

Definition at line 7 of file RecipeSource.cs.

Referenced by Recipe.Build(), Recipe.Craft(), and Recipe.Create().

Property Documentation

◆ idFactory

string RecipeSource.idFactory
get

Definition at line 84 of file RecipeSource.cs.

85 {
86 get
87 {
88 if (!row.factory.IsEmpty())
89 {
90 if (!isBridge)
91 {
92 if (!isBridgePillar)
93 {
94 return row.factory[0];
95 }
96 return "tool_carving";
97 }
98 return "factory_platform";
99 }
100 return null;
101 }
102 }
bool isBridgePillar
Definition: RecipeSource.cs:15

Referenced by TraitBBQ.Contains(), TraitCauldron.Contains(), GetReqSkill(), Recipe.IsStaticLV(), UIRecipeInfo.Refresh(), UIRecipeInfo.RefreshList(), and HitSummary.SetRecipe().

◆ IsQuickCraft

bool RecipeSource.IsQuickCraft
get

Definition at line 48 of file RecipeSource.cs.

49 {
50 get
51 {
52 if (!row.factory.IsEmpty())
53 {
54 return row.factory[0] == "self";
55 }
56 return false;
57 }
58 }

Referenced by RecipeManager.CanCeomUpWithRecipe(), RecipeManager.ComeUpWithRecipe(), and RecipeManager.GetLearnedRecipe().

◆ Name

string RecipeSource.Name
get

◆ NameFactory

string RecipeSource.NameFactory
get

Definition at line 72 of file RecipeSource.cs.

73 {
74 get
75 {
76 if (!NeedFactory)
77 {
78 return EClass.sources.elements.map[6012].GetName();
79 }
80 return EClass.sources.cards.map[idFactory].GetName();
81 }
82 }
Dictionary< string, CardRow > map
Definition: SourceCard.cs:8
SourceElement elements

Referenced by RecipeManager.Add(), QuestTrackCraft.GetTitle(), UIRecipeInfo.Refresh(), TraitRecipe.WriteNote(), and Recipe.WriteReqFactory().

◆ NeedFactory

bool RecipeSource.NeedFactory
get

◆ recipeCat

string RecipeSource.recipeCat
get

Definition at line 34 of file RecipeSource.cs.

35 {
36 get
37 {
38 if (!isBridge && !isBridgePillar)
39 {
40 return row.Category.recipeCat;
41 }
42 return "foundation";
43 }
44 }
SourceCategory.Row Category
Definition: RenderRow.cs:119

The documentation for this class was generated from the following file: