DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
RecipeBase.c
См. документацию.
2const int MAXIMUM_RESULTS = 10;
3const float DEFAULT_SPAWN_DISTANCE = 0.6;
4
6{
10 protected ref array<int> m_AnimationUIDs = new array<int>(); // used for overriding animation based on ingredient
11
13
14 ItemBase m_IngredientsSorted[MAX_NUMBER_OF_INGREDIENTS]; //if the recipe is valid, this array will contain all ingredients sorted against the recipe ingredients
15
17 string m_Name;
18
19 int m_ID;
22 float m_AnimationLength = 1;//animation length in relative time units
23 float m_Specialty = 0;// value > 0 for roughness, value < 0 for precision
24 bool m_IsInstaRecipe;//should this recipe be performed instantly without animation
25 bool m_AnywhereInInventory;//is this recipe valid even when neither of the items is in hands
26
31
37
38
48
49
50
52 {
53 for (int i = 0; i < MAX_NUMBER_OF_INGREDIENTS; i++)
54 {
57 m_IngredientsSorted[i] = NULL;
58 }
59
60 for (i = 0; i < MAXIMUM_RESULTS; i++)
61 {
63 }
64
66
67 m_Name = "RecipeBase default name";
68 m_RecipeUID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING;
69 Init();
70 }
71
72 void Init();
73
74 protected void SetAnimation (DayZPlayerConstants uid)
75 {
76 m_RecipeUID = uid;
77 }
78
83
85 {
86 return m_Specialty;
87 }
88
90 {
92 }
93
95 {
96 return false;
97 }
98
100 {
101 if (item1 == NULL || item2 == NULL) return false;
102
103 m_Items[0] = item1;
104 m_Items[1] = item2;
105
106 bool found = false;
107 for (int i = 0; i < MAX_NUMBER_OF_INGREDIENTS; i++)//all ingredients
108 {
109 found = false;
110 array<string> tempArray = m_Ingredients[i];
111 for (int x = 0; x < tempArray.Count(); x++)//particular ingredient array
112 {
113 for (int z = 0; z < MAX_NUMBER_OF_INGREDIENTS; z++)
114 {
115 if (m_Items[z] != NULL)
116 {
117 ItemBase item = m_Items[z];
118 if (tempArray.Get(x) == item.GetType() || GetGame().IsKindOf(item.GetType(),tempArray.Get(x)))
119 {
120 found = true;//we found a match
121 //m_IngredientsSorted.Insert(item);
122 m_IngredientsSorted[i] = item;
123 m_Items[z] = NULL;
124 }
125 }
126 if (found) break;//we found a match, no need to check the remaining ingredients
127 }
128 if (found) break;//we found a match, no need to check this m_Ingredient array
129 }
130 if (!found) return false;// no match within an m_Ingredient array, no reason to continue the search, recipe is invalid
131 }
132
133 if (found)
134 {
135 return true;
136 }
137 else
138 {
139 return false;
140 }
141 }
142
143 void InsertIngredient(int index, string ingredient, DayZPlayerConstants uid = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING)
144 {
145 InsertIngredientEx(index, ingredient, "", uid);
146 }
147
148 void InsertIngredientEx(int index, string ingredient, string soundCategory, DayZPlayerConstants uid = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING)
149 {
150 array<string> ptr = m_Ingredients[index];
151 ptr.Insert(ingredient);
152 m_SoundCategories[index].Insert(soundCategory);
153 if(index == 0)
154 {
155 m_AnimationUIDs.Insert(uid);
156 }
157 }
158
159 void RemoveIngredient(int index, string ingredient)
160 {
161 array<string> ptr = m_Ingredients[index];
162 for (int i = 0; i < ptr.Count(); i++)
163 {
164 if (ptr[i] == ingredient)
165 {
166 ptr.Remove(i);
167 m_SoundCategories[index].Remove(i);
168 return;
169 }
170 }
171 }
172
173
174 void AddResult(string item)
175 {
178 }
179
180 string GetName()
181 {
182 return m_Name;
183 }
184
186 {
187 return m_IsInstaRecipe;
188 }
189
190 //spawns results in the world
191 void SpawnItems(ItemBase ingredients[], PlayerBase player, array<ItemBase> spawned_objects)
192 {
193 spawned_objects.Clear();//just to make sure
194 EntityAI object = NULL;
195
196 for (int i = 0; i < m_NumberOfResults; i++)
197 {
198 string item_to_spawn = m_ItemsToCreate[i];
199
200 if (m_ResultInheritsColor[i] != -1)
201 {
202 ItemBase item = ingredients[m_ResultInheritsColor[i]];
203 string color = item.ConfigGetString("color");
204 string new_class_name = m_ItemsToCreate[i] + color;
205 item_to_spawn = new_class_name;
206 }
207
208 if (m_ResultToInventory[i] == -1)
209 {
210 Debug.Log(" = "+m_ResultToInventory[i].ToString(),"recipes");
211 /*
212 InventoryLocation inv_loc = new InventoryLocation;
213 if (player.GetInventory().FindFirstFreeLocationForNewEntity(item_to_spawn, FindInventoryLocationType.ANY, inv_loc))
214 {
215 object = SpawnItemOnLocation(item_to_spawn, inv_loc, false);
216 }
217 */
218 object = player.GetInventory().CreateInInventory(item_to_spawn);
219 }
220 else if (m_ResultToInventory[i] >= 0)
221 {
222 /*
223 object = player.SpawnEntityOnGroundOnCursorDir(item_to_spawn, 0.5);
224
225 ItemBase item_swap_with = ingredients[m_ResultToInventory[i]];
226 player.SwapEntities(true, item_swap_with, EntityAI.Cast(object));
227 */
228 }
229
230 //spawning in inventory failed, spawning on the ground instead.....
231 if (!object)
232 {
233 object = player.SpawnEntityOnGroundRaycastDispersed(item_to_spawn,m_ResultSpawnDistance[i]);
234
235 if (!object)
236 Error("failed to spawn entity "+item_to_spawn+" , make sure the classname exists and item can be spawned");
237 }
238 spawned_objects.Insert(ItemBase.Cast(object));
239 object = null;
240 }
241 }
242
243 //applies final modifications to results
245 {
246 float all_ingredients_health = 0;//this is used later in results
247 float all_ingredients_health01 = 0;//combined damage % of ingredients
248 int value_delta;
249 for (int i = 0; i < MAX_NUMBER_OF_INGREDIENTS; i++)
250 {
251 ItemBase ingrd = ItemBase.Cast(sorted[i]);
252 all_ingredients_health += ingrd.GetHealth("", "");//accumulate health of all ingredients, used in results
253 all_ingredients_health01 += ingrd.GetHealth01("", "");
254 }
255 //------------------- results ----------------------
256 for (i = 0; i < m_NumberOfResults; i++)
257 {
258 ItemBase res = results.Get(i);
259 if (!res)
260 {
261 continue;
262 }
263
264 if (res.IsItemBase())
265 {
266 value_delta = m_ResultSetQuantity[i];
267
268 ItemBase resIb = ItemBase.Cast(res);
269
270 if (!resIb.IsMagazine())//is not a magazine
271 {
272 if (m_ResultSetFullQuantity[i] == 1)//<------m_ResultSetFullQuantity
273 {
274 resIb.SetQuantityMax();
275 }
276 else if (value_delta != -1)//<------m_ResultSetQuantity
277 {
278 resIb.SetQuantity(value_delta);
279 }
280 }
281 else//is magazine
282 {
283 Magazine mgzn = Magazine.Cast(resIb);
284 if (m_ResultSetFullQuantity[i] == 1)//<------m_ResultSetFullQuantity
285 {
286 mgzn.ServerSetAmmoMax();
287 }
288 else if (value_delta != -1)//<------m_ResultSetQuantity
289 {
290 mgzn.ServerSetAmmoCount(value_delta);
291 }
292 }
293 }
294 if (m_ResultSetHealth[i] != -1)//<------m_ResultSetHealth
295 {
296 value_delta = m_ResultSetHealth[i];
297 res.SetHealth("","",value_delta);
298 }
299 if (m_ResultInheritsHealth[i] != -1)//<------m_ResultInheritsHealth
300 {
301 if (m_ResultInheritsHealth[i] >= 0)
302 {
303 int ing_number = m_ResultInheritsHealth[i];
304 ItemBase ing = sorted[ing_number];
305
306 if (ing)
307 {
308 float ing_health01 = ing.GetHealth01("","");
309 res.SetHealth("", "", ing_health01 * res.GetMaxHealth("",""));
310 Debug.Log("Inheriting health from ingredient:"+m_ResultInheritsHealth[i].ToString(),"recipes");
311 }
312 }
313 else if (m_ResultInheritsHealth[i] == -2)
314 {
315 float average_health01 = all_ingredients_health01 / MAX_NUMBER_OF_INGREDIENTS;
316 res.SetHealth("", "", average_health01 * res.GetMaxHealth("",""));
317 }
318 }
319
320 if (m_ResultReplacesIngredient[i] != -1)//<------ResultReplacesIngredient
321 {
322 if (m_ResultReplacesIngredient[i] > -1)
323 {
324 int ing_num = m_ResultReplacesIngredient[i];
325 ItemBase ingr = sorted[ing_num];
326
327 if (ingr)
328 {
329 MiscGameplayFunctions.TransferItemProperties(ingr, res);
330 MiscGameplayFunctions.TransferInventory(ingr, res, player);
331 }
332 }
333 }
334 }
335 }
336
337
339 {
340 for (int i = 0; i < m_IngredientsToBeDeleted.Count(); i++)
341 {
342 ItemBase ingredient = m_IngredientsToBeDeleted.Get(i);
343 ingredient.Delete();
344 }
346 }
347
348 //applies final modifications to ingredients
350 {
351 //---------------------- ingredients ----------------------
352 for (int i = 0; i < MAX_NUMBER_OF_INGREDIENTS; i++)
353 {
354 ItemBase ingredient = sorted[i];
355
356 if (m_IngredientDestroy[i] == 1)//<------m_IngredientDestroy
357 {
358 if (ingredient) m_IngredientsToBeDeleted.Insert(ingredient);
359 }
360 else
361 {
362 if (m_IngredientAddHealth[i] != 0)//<------m_IngredientAddHealth
363 {
364 float health_delta = m_IngredientAddHealth[i];
365 ingredient.AddHealth("","",health_delta);
366 }
367 else if (m_IngredientSetHealth[i] != -1)//<------m_IngredientSetHealth
368 {
369 float new_health = m_IngredientSetHealth[i];
370 ingredient.SetHealth("","",new_health);
371 }
372 if (m_IngredientAddQuantity[i] != 0)//<------m_IngredientAddQuantity
373 {
374 float quantity_delta = m_IngredientAddQuantity[i];
375
376 if (!ingredient.IsMagazine())
377 {
378 ItemBase obj = ingredient;
379 bool isDestroyed = obj.AddQuantity(quantity_delta, true);
380 if (isDestroyed)
381 {
382 continue;
383 }
384 }
385 else
386 {
387 Magazine mag = Magazine.Cast(ingredient);
388 int newQuantity = mag.GetAmmoCount() + quantity_delta;
389 if (newQuantity <= 0)
390 {
391 if (mag) m_IngredientsToBeDeleted.Insert(mag);
392 continue;
393 }
394 else
395 {
396 mag.ServerSetAmmoCount(newQuantity);
397 }
398 }
399 }
400 }
401 }
402 }
403
404 //checks the recipe conditions
406 {
407 for (int i = 0; i < MAX_NUMBER_OF_INGREDIENTS; i++)
408 {
409 ItemBase ingredient = sorted[i];
410 if (!ingredient.IsMagazine())
411 {
412 if (ingredient.GetQuantityMax() !=0 && m_MinQuantityIngredient[i] >= 0 && ingredient.GetQuantity() < m_MinQuantityIngredient[i])
413 {
414 //Debug.Log("Recipe condition check failing1: m_MinQuantityIngredient","recipes");
415 return false;
416 }
417 if (m_MaxQuantityIngredient[i] >= 0 && ingredient.GetQuantity() > m_MaxQuantityIngredient[i])
418 {
419 //Debug.Log("Recipe condition check failing1: m_MaxQuantityIngredient","recipes");
420 return false;
421 }
422 }
423 else
424 {
425 Magazine mag1 = Magazine.Cast(ingredient);
426 if (m_MinQuantityIngredient[i] >= 0 && mag1.GetAmmoCount() < m_MinQuantityIngredient[i])
427 {
428 //Debug.Log("Recipe condition check failing1: m_MinQuantityIngredient[0]","recipes");
429 return false;
430 }
431 if (m_MaxQuantityIngredient[i] >= 0 && mag1.GetAmmoCount() > m_MaxQuantityIngredient[i])
432 {
433 //Debug.Log("Recipe condition check failing1: m_MaxQuantityIngredient[0]","recipes");
434 return false;
435 }
436 }
437 int dmg3 = ingredient.GetHealthLevel();
438 if (m_MinDamageIngredient[i] >= 0 && ingredient.GetHealthLevel() < m_MinDamageIngredient[i])
439 {
440 int dmg = ingredient.GetHealthLevel();
441 //Debug.Log("Recipe condition check failing1: m_MinDamageIngredient[0]","recipes");
442 return false;
443 }
444 if (m_MaxDamageIngredient[i] >= 0 && ingredient.GetHealthLevel() > m_MaxDamageIngredient[i])
445 {
446 int dmg2 = ingredient.GetHealthLevel();
447 //Debug.Log("Recipe condition check failing1: m_MaxDamageIngredient[0]","recipes");
448 return false;
449 }
450 }
451 return true;
452 }
453
454 //checks overall validity of this recipe
455 bool CheckRecipe(ItemBase item1, ItemBase item2, PlayerBase player)
456 {
457 if (item1 == NULL || item2 == NULL)
458 {
459 Error("recipe invalid, at least one of the ingredients is NULL");
460 return false;
461 }
462
463 ItemBase item_in_hand = player.GetItemInHands();
464
465 if (!IsRecipeAnywhere() && (item1 != item_in_hand && item2 != item_in_hand))
466 {
467 return false;
468 }
469
470 m_IngredientsSorted[0] = item1;
471 m_IngredientsSorted[1] = item2;
472
474 {
475 return true;
476 }
477 return false;
478 }
479
481 {
482 array<string> tempArray = m_Ingredients[0];
483 for ( int i; i < m_AnimationUIDs.Count(); i++ )
484 {
485 if (m_IngredientsSorted[0].ClassName() == tempArray[i] || m_IngredientsSorted[1].ClassName() == tempArray[i])
487 }
488 }
489
490 void OnSelectedRecipe(ItemBase item1, ItemBase item2, PlayerBase player)
491 {
492 if (item1 == NULL || item2 == NULL)
493 {
494 Error("CheckRecipe: recipe invalid, at least one of the ingredients is NULL");
495 //Debug.Log("recipe invalid, at least one of the ingredients is NULL","recipes");
496 return;
497 }
498 OnSelected(item1,item2,player);
499 }
500
501 void OnSelected(ItemBase item1, ItemBase item2, PlayerBase player)
502 {
503
504 }
505
506 //performs this recipe
507 void PerformRecipe(ItemBase item1, ItemBase item2, PlayerBase player)
508 {
509 if (item1 == NULL || item2 == NULL)
510 {
511 Error("PerformRecipe: recipe invalid, at least one of the ingredients is NULL");
512 Debug.Log("PerformRecipe: at least one of the ingredients is NULL","recipes");
513 }
514
515 if (CheckRecipe(item1,item2,player))
516 {
517 array<ItemBase> spawned_objects = new array<ItemBase>;
518 SpawnItems(m_IngredientsSorted, player,spawned_objects);
519
520 ApplyModificationsResults(m_IngredientsSorted, spawned_objects, NULL, player);
522
523 Do(m_IngredientsSorted, player, spawned_objects, m_Specialty);
524
526 }
527 else
528 {
529 Debug.Log("CheckRecipe failed on server","recipes");
530 }
531 }
532
534 {
535 }
536
537 bool CanDo(ItemBase ingredients[], PlayerBase player)
538 {
539 //Debug.Log("Called Can Do on a recipe id:" + m_ID.ToString(),"recipes");
540 for (int i = 0; i < MAX_NUMBER_OF_INGREDIENTS; i++)
541 {
542 if (ingredients[i].GetInventory() && ingredients[i].GetInventory().AttachmentCount() > 0)
543 return false;
544 }
545
546 return true;
547 }
548
549 void Do(ItemBase ingredients[], PlayerBase player, array<ItemBase> results, float specialty_weight)
550 {
551 //Debug.Log("Called Do on a recipe id:" + m_ID.ToString(),"recipes");
552 }
553
554 int GetID()
555 {
556 return m_ID;
557 }
558
559
560 void SetID(int id)
561 {
562 m_ID = id;
563 }
564
566 {
567 for (int i = 0; i < MAX_NUMBER_OF_INGREDIENTS; i++)
568 {
570
571 for (int x = 0; x < ptr.Count(); x++)
572 {
573 items.Insert(ptr.Get(x));
574 }
575 }
576 }
577
578 string GetSoundCategory(int ingredientIndex, ItemBase item)
579 {
580 string itemType = item.GetType();
581 array<string> ptr = m_Ingredients[ingredientIndex];
582
583 for (int x = 0; x < ptr.Count(); x++)
584 {
585 if (GetGame().IsKindOf(itemType, ptr.Get(x)))
586 {
587 return m_SoundCategories[ingredientIndex].Get(x);
588 }
589 }
590 return "";
591 }
592
593 bool IsItemInRecipe(string item)
594 {
595 for (int i = 0; i < MAX_NUMBER_OF_INGREDIENTS; i++)
596 {
598
599 for (int x = 0; x < ptr.Count(); x++)
600 {
601 if (ptr.Get(x) == item) return true;
602 }
603 }
604 return false;
605 }
606
609 {
610 int mask = 0;
611
612 for (int i = 0; i < MAX_NUMBER_OF_INGREDIENTS; i++)
613 {
615
616 for (int x = 0; x < ptr.Count(); x++)
617 {
618 if (ptr.Get(x) == item)
619 {
620 mask = ((int)Math.Pow(2, i)) | mask;
621 }
622 }
623 }
624 return mask;
625 }
626
628 {
629 if (m_AnimationUIDs.Count() > 0)
631
632 return m_RecipeUID;
633 }
634}
Param3 int
proto string ToString()
Icon x
const float DEFAULT_SPAWN_DISTANCE
Определения RecipeBase.c:3
const int MAXIMUM_RESULTS
Определения RecipeBase.c:2
const int MAX_NUMBER_OF_INGREDIENTS
Определения RecipeBase.c:1
ScriptConsoleEnfScriptTab ScriptConsoleTabBase OnSelected()
Определения ScriptConsoleEnfScriptTab.c:265
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
Определения Debug.c:122
Определения Debug.c:2
Определения Building.c:6
override bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)
Определения PileOfWoodenPlanks.c:88
Определения InventoryItem.c:731
Определения EnMath.c:7
Определения PlayerBaseClient.c:2
int GetID()
Определения RecipeBase.c:554
void SetID(int id)
Определения RecipeBase.c:560
string m_ItemsToCreate[MAXIMUM_RESULTS]
Определения RecipeBase.c:7
void InsertIngredientEx(int index, string ingredient, string soundCategory, DayZPlayerConstants uid=DayZPlayerConstants.CMD_ACTIONFB_CRAFTING)
Определения RecipeBase.c:148
bool m_IngredientDestroy[MAX_NUMBER_OF_INGREDIENTS]
Определения RecipeBase.c:36
float GetSpecialty()
Определения RecipeBase.c:84
bool IsInstaRecipe()
Определения RecipeBase.c:185
bool IsRecipeAnywhere()
Определения RecipeBase.c:89
void SpawnItems(ItemBase ingredients[], PlayerBase player, array< ItemBase > spawned_objects)
Определения RecipeBase.c:191
int m_ResultToInventory[MAXIMUM_RESULTS]
Определения RecipeBase.c:43
void SetAnimation(DayZPlayerConstants uid)
Определения RecipeBase.c:74
float GetLengthInSecs()
Определения RecipeBase.c:79
bool CheckIngredientMatch(ItemBase item1, ItemBase item2)
Определения RecipeBase.c:99
bool m_IngredientUseSoftSkills[MAX_NUMBER_OF_INGREDIENTS]
Определения RecipeBase.c:32
string m_Name
Определения RecipeBase.c:17
float m_ResultSetHealth[MAXIMUM_RESULTS]
Определения RecipeBase.c:41
void DeleleIngredientsPass()
Определения RecipeBase.c:338
float m_ResultSetQuantity[MAXIMUM_RESULTS]
Определения RecipeBase.c:40
int GetAnimationCommandUID()
Определения RecipeBase.c:627
bool IsRepeatable()
Определения RecipeBase.c:94
void Do(ItemBase ingredients[], PlayerBase player, array< ItemBase > results, float specialty_weight)
Определения RecipeBase.c:549
bool m_ResultSetFullQuantity[MAXIMUM_RESULTS]
Определения RecipeBase.c:39
bool CanDo(ItemBase ingredients[], PlayerBase player)
Определения RecipeBase.c:537
bool IsItemInRecipe(string item)
Определения RecipeBase.c:593
ref array< string > m_SoundCategories[MAX_NUMBER_OF_INGREDIENTS]
Определения RecipeBase.c:9
void Init()
void OnSelected(ItemBase item1, ItemBase item2, PlayerBase player)
Определения RecipeBase.c:501
bool m_IsInstaRecipe
Определения RecipeBase.c:24
string GetSoundCategory(int ingredientIndex, ItemBase item)
Определения RecipeBase.c:578
ref array< int > m_AnimationUIDs
Определения RecipeBase.c:10
ref array< string > m_Ingredients[MAX_NUMBER_OF_INGREDIENTS]
Определения RecipeBase.c:8
void RecipeBase()
Определения RecipeBase.c:51
int GetIngredientMaskForItem(string item)
returns a mask which marks ingredient positions for a given item in this recipe(for example mask of v...
Определения RecipeBase.c:608
int m_RecipeUID
Определения RecipeBase.c:21
float m_ResultSpawnDistance[MAXIMUM_RESULTS]
Определения RecipeBase.c:42
void AddResult(string item)
Определения RecipeBase.c:174
bool m_ResultUseSoftSkills[MAXIMUM_RESULTS]
Определения RecipeBase.c:47
ItemBase m_Items[MAX_NUMBER_OF_INGREDIENTS]
Определения RecipeBase.c:12
ItemBase m_IngredientsSorted[MAX_NUMBER_OF_INGREDIENTS]
Определения RecipeBase.c:14
void ApplyModificationsIngredients(ItemBase sorted[], PlayerBase player)
Определения RecipeBase.c:349
int m_ResultReplacesIngredient[MAXIMUM_RESULTS]
Определения RecipeBase.c:46
void ApplySoftSkillsSpecialty(PlayerBase player)
Определения RecipeBase.c:533
void OnSelectedRecipe(ItemBase item1, ItemBase item2, PlayerBase player)
Определения RecipeBase.c:490
float m_IngredientAddHealth[MAX_NUMBER_OF_INGREDIENTS]
Определения RecipeBase.c:33
bool CheckConditions(ItemBase sorted[])
Определения RecipeBase.c:405
float m_Specialty
Определения RecipeBase.c:23
float m_IngredientSetHealth[MAX_NUMBER_OF_INGREDIENTS]
Определения RecipeBase.c:35
int m_ResultInheritsHealth[MAXIMUM_RESULTS]
Определения RecipeBase.c:44
void PerformRecipe(ItemBase item1, ItemBase item2, PlayerBase player)
Определения RecipeBase.c:507
float m_MinQuantityIngredient[MAX_NUMBER_OF_INGREDIENTS]
Определения RecipeBase.c:27
float m_AnimationLength
Определения RecipeBase.c:22
void ApplyModificationsResults(ItemBase sorted[], array< ItemBase > results, ItemBase result, PlayerBase player)
Определения RecipeBase.c:244
int m_ID
Определения RecipeBase.c:19
int m_ResultInheritsColor[MAXIMUM_RESULTS]
Определения RecipeBase.c:45
float m_MaxQuantityIngredient[MAX_NUMBER_OF_INGREDIENTS]
Определения RecipeBase.c:28
float m_IngredientAddQuantity[MAX_NUMBER_OF_INGREDIENTS]
Определения RecipeBase.c:34
float m_MinDamageIngredient[MAX_NUMBER_OF_INGREDIENTS]
Определения RecipeBase.c:29
string GetName()
Определения RecipeBase.c:180
void RemoveIngredient(int index, string ingredient)
Определения RecipeBase.c:159
void GetAllItems(array< string > items)
Определения RecipeBase.c:565
float m_MaxDamageIngredient[MAX_NUMBER_OF_INGREDIENTS]
Определения RecipeBase.c:30
void CheckIngredientAnimOverride()
Определения RecipeBase.c:480
bool m_AnywhereInInventory
Определения RecipeBase.c:25
int m_NumberOfResults
Определения RecipeBase.c:20
void InsertIngredient(int index, string ingredient, DayZPlayerConstants uid=DayZPlayerConstants.CMD_ACTIONFB_CRAFTING)
Определения RecipeBase.c:143
bool CheckRecipe(ItemBase item1, ItemBase item2, PlayerBase player)
Определения RecipeBase.c:455
ref array< ItemBase > m_IngredientsToBeDeleted
Определения RecipeBase.c:16
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602
proto native CGame GetGame()
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90
const float CRAFTING_TIME_UNIT_SIZE
Определения constants.c:636
static proto float Pow(float v, float power)
Return power of v ^ power.