DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
PrepareAnimal.c
См. документацию.
1class PrepareAnimal extends RecipeBase
2{
3 override void Init()
4 {
5 m_Name = "#skin";
6 m_IsInstaRecipe = false; // should this recipe be performed instantly without animation
7 m_AnimationLength = 1.5; // animation length in relative time units
8 m_RecipeUID = DayZPlayerConstants.CMD_ACTIONFB_ANIMALSKINNING;
9
10 //----------------------------------------------------------------------------------------------------------------------
11 //conditions
12 m_MinDamageIngredient[0] = -1; // -1 = disable check
13 m_MaxDamageIngredient[0] = 3; // -1 = disable check
14 m_MinQuantityIngredient[0] = -1; // -1 = disable check
15 m_MaxQuantityIngredient[0] = -1; // -1 = disable check
16
21
22 //----------------------------------------------------------------------------------------------------------------------
23 //INGREDIENTS
24 //ingredient 1
25 InsertIngredient(1,"Sickle"); //you can insert multiple ingredients this way
26 InsertIngredient(1,"KukriKnife");
27 InsertIngredient(1,"FangeKnife");
28 InsertIngredient(1,"Hacksaw");
29 InsertIngredient(1,"HandSaw");
30 InsertIngredient(1,"KitchenKnife");
31 InsertIngredient(1,"SteakKnife");
32 InsertIngredient(1,"StoneKnife");
33 InsertIngredient(1,"Cleaver");
34 InsertIngredient(1,"CombatKnife");
35 InsertIngredient(1,"HuntingKnife");
36 InsertIngredient(1,"Machete");
37 InsertIngredient(1,"CrudeMachete");
38 InsertIngredient(1,"OrientalMachete");
39 InsertIngredient(1,"WoodAxe");
40 InsertIngredient(1,"Hatchet");
41 InsertIngredient(1,"FirefighterAxe");
42 InsertIngredient(1,"Sword");
43 InsertIngredient(1,"AK_Bayonet");
44 InsertIngredient(1,"M9A1_Bayonet");
45 InsertIngredient(1,"SKS_Bayonet");
46 InsertIngredient(1,"BoneKnife");
47 InsertIngredient(1,"Screwdriver");
48 InsertIngredient(1,"Iceaxe");
49
50 m_IngredientAddHealth[1] = -6; // 0 = do nothing
51 m_IngredientSetHealth[1] = -1; // -1 = do nothing
52 m_IngredientAddQuantity[1] = 0; // 0 = do nothing
53 m_IngredientDestroy[1] = false; // false = do nothing
54 }
55
56 //final check for recipe's validity
57 override bool CanDo(ItemBase ingredients[], PlayerBase player)
58 {
59 return !ingredients[0].GetIsFrozen();
60 }
61
62 //gets called upon recipe's completion
63 override void Do(ItemBase ingredients[], PlayerBase player, array<ItemBase> results, float specialty_weight)
64 {
65 ItemBase ingredient = ingredients[0];
66
67 for (int i=0; i < results.Count(); ++i)
68 {
69 //Transfer current food state
70 MiscGameplayFunctions.TransferItemProperties(ingredient, results[i]);
71 results[i].SetQuantityNormalized(ingredient.GetQuantityNormalized());
72 }
73
74 SetBloodyHands(ingredients, player);
75 }
76
77 protected void SetBloodyHands(ItemBase ingredients[], PlayerBase player)
78 {
79 ItemBase ingredient = ingredients[0];
80
82 lifespan.UpdateBloodyHandsVisibility(player, true);
83 player.SetBloodyHandsPenaltyChancePerAgent(eAgents.SALMONELLA, ingredient.GetSkinningBloodInfectionChance(eAgents.SALMONELLA));
84 }
85}
eAgents
Определения EAgents.c:3
void PluginLifespan()
Определения PluginLifespan.c:45
void SetBloodyHands(PlayerBase player, bool show)
Определения PluginLifespan.c:449
PluginBase GetPlugin(typename plugin_type)
Определения PluginManager.c:316
Определения InventoryItem.c:731
Определения PlayerBaseClient.c:2
Определения PrepareChicken.c:2
bool m_IngredientDestroy[MAX_NUMBER_OF_INGREDIENTS]
Определения RecipeBase.c:36
override bool CanDo(ItemBase ingredients[], PlayerBase player)
Определения PrepareAnimal.c:57
string m_Name
Определения RecipeBase.c:17
bool m_IsInstaRecipe
Определения RecipeBase.c:24
override void Do(ItemBase ingredients[], PlayerBase player, array< ItemBase > results, float specialty_weight)
Определения PrepareAnimal.c:63
int m_RecipeUID
Определения RecipeBase.c:21
void SetBloodyHands(ItemBase ingredients[], PlayerBase player)
Определения PrepareAnimal.c:77
float m_IngredientAddHealth[MAX_NUMBER_OF_INGREDIENTS]
Определения RecipeBase.c:33
float m_IngredientSetHealth[MAX_NUMBER_OF_INGREDIENTS]
Определения RecipeBase.c:35
float m_MinQuantityIngredient[MAX_NUMBER_OF_INGREDIENTS]
Определения RecipeBase.c:27
float m_AnimationLength
Определения RecipeBase.c:22
override void Init()
Определения PrepareAnimal.c:3
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
float m_MaxDamageIngredient[MAX_NUMBER_OF_INGREDIENTS]
Определения RecipeBase.c:30
void InsertIngredient(int index, string ingredient, DayZPlayerConstants uid=DayZPlayerConstants.CMD_ACTIONFB_CRAFTING)
Определения RecipeBase.c:143
Определения RecipeBase.c:6
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602