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