DayZ
1.29
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
PrepareAnimal.c
См. документацию.
1
class
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
17
m_MinDamageIngredient
[1] = -1;
18
m_MaxDamageIngredient
[1] = 3;
19
m_MinQuantityIngredient
[1] = -1;
20
m_MaxQuantityIngredient
[1] = -1;
21
22
//----------------------------------------------------------------------------------------------------------------------
23
//INGREDIENTS
24
//ingredient 1
25
InsertIngredient
(1,
"Sickle"
,
DayZPlayerConstants
.CMD_ACTIONFB_ANIMALSKINNING,
true
);
//you can insert multiple ingredients this way
26
InsertIngredient
(1,
"KukriKnife"
,
DayZPlayerConstants
.CMD_ACTIONFB_ANIMALSKINNING,
true
);
27
InsertIngredient
(1,
"FangeKnife"
,
DayZPlayerConstants
.CMD_ACTIONFB_ANIMALSKINNING,
true
);
28
InsertIngredient
(1,
"Hacksaw"
,
DayZPlayerConstants
.CMD_ACTIONFB_ANIMALSKINNING,
true
);
29
InsertIngredient
(1,
"HandSaw"
,
DayZPlayerConstants
.CMD_ACTIONFB_ANIMALSKINNING,
true
);
30
InsertIngredient
(1,
"KitchenKnife"
,
DayZPlayerConstants
.CMD_ACTIONFB_ANIMALSKINNING,
true
);
31
InsertIngredient
(1,
"SteakKnife"
,
DayZPlayerConstants
.CMD_ACTIONFB_ANIMALSKINNING,
true
);
32
InsertIngredient
(1,
"StoneKnife"
,
DayZPlayerConstants
.CMD_ACTIONFB_ANIMALSKINNING,
true
);
33
InsertIngredient
(1,
"Cleaver"
,
DayZPlayerConstants
.CMD_ACTIONFB_ANIMALSKINNING,
true
);
34
InsertIngredient
(1,
"CombatKnife"
,
DayZPlayerConstants
.CMD_ACTIONFB_ANIMALSKINNING,
true
);
35
InsertIngredient
(1,
"HuntingKnife"
,
DayZPlayerConstants
.CMD_ACTIONFB_ANIMALSKINNING,
true
);
36
InsertIngredient
(1,
"Machete"
,
DayZPlayerConstants
.CMD_ACTIONFB_ANIMALSKINNING,
true
);
37
InsertIngredient
(1,
"CrudeMachete"
,
DayZPlayerConstants
.CMD_ACTIONFB_ANIMALSKINNING,
true
);
38
InsertIngredient
(1,
"OrientalMachete"
,
DayZPlayerConstants
.CMD_ACTIONFB_ANIMALSKINNING,
true
);
39
InsertIngredient
(1,
"WoodAxe"
,
DayZPlayerConstants
.CMD_ACTIONFB_ANIMALSKINNING,
true
);
40
InsertIngredient
(1,
"Hatchet"
,
DayZPlayerConstants
.CMD_ACTIONFB_ANIMALSKINNING,
true
);
41
InsertIngredient
(1,
"FirefighterAxe"
,
DayZPlayerConstants
.CMD_ACTIONFB_ANIMALSKINNING,
true
);
42
InsertIngredient
(1,
"Sword"
,
DayZPlayerConstants
.CMD_ACTIONFB_ANIMALSKINNING,
true
);
43
InsertIngredient
(1,
"AK_Bayonet"
,
DayZPlayerConstants
.CMD_ACTIONFB_ANIMALSKINNING,
true
);
44
InsertIngredient
(1,
"M9A1_Bayonet"
,
DayZPlayerConstants
.CMD_ACTIONFB_ANIMALSKINNING,
true
);
45
InsertIngredient
(1,
"SKS_Bayonet"
,
DayZPlayerConstants
.CMD_ACTIONFB_ANIMALSKINNING,
true
);
46
InsertIngredient
(1,
"BoneKnife"
,
DayZPlayerConstants
.CMD_ACTIONFB_ANIMALSKINNING,
true
);
47
InsertIngredient
(1,
"Screwdriver"
,
DayZPlayerConstants
.CMD_ACTIONFB_ANIMALSKINNING,
true
);
48
InsertIngredient
(1,
"Iceaxe"
,
DayZPlayerConstants
.CMD_ACTIONFB_ANIMALSKINNING,
true
);
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
81
PluginLifespan
lifespan =
PluginLifespan
.Cast(
GetPlugin
(
PluginLifespan
));
82
lifespan.UpdateBloodyHandsVisibility(player,
true
);
83
player.SetBloodyHandsPenaltyChancePerAgent(
eAgents
.SALMONELLA, ingredient.GetSkinningBloodInfectionChance(
eAgents
.SALMONELLA));
84
}
85
}
m_Name
string m_Name
Определения
3_Game/DayZ/InventoryItemType.c:34
eAgents
eAgents
Определения
EAgents.c:3
PluginLifespan
void PluginLifespan()
Определения
PluginLifespan.c:45
SetBloodyHands
void SetBloodyHands(PlayerBase player, bool show)
Определения
PluginLifespan.c:449
GetPlugin
PluginBase GetPlugin(typename plugin_type)
Определения
PluginManager.c:325
m_IngredientAddHealth
float m_IngredientAddHealth[MAX_NUMBER_OF_INGREDIENTS]
Определения
RecipeBase.c:49
m_IsInstaRecipe
bool m_IsInstaRecipe
Определения
RecipeBase.c:40
m_IngredientSetHealth
float m_IngredientSetHealth[MAX_NUMBER_OF_INGREDIENTS]
Определения
RecipeBase.c:51
m_MinDamageIngredient
float m_MinDamageIngredient[MAX_NUMBER_OF_INGREDIENTS]
Определения
RecipeBase.c:45
m_MaxQuantityIngredient
float m_MaxQuantityIngredient[MAX_NUMBER_OF_INGREDIENTS]
Определения
RecipeBase.c:44
InsertIngredient
void InsertIngredient(int index, string ingredient, DayZPlayerConstants uid=BASE_CRAFT_ANIMATION_ID, bool showItem=false)
Определения
RecipeBase.c:159
m_AnimationLength
float m_AnimationLength
Определения
RecipeBase.c:38
m_MaxDamageIngredient
float m_MaxDamageIngredient[MAX_NUMBER_OF_INGREDIENTS]
Определения
RecipeBase.c:46
m_RecipeUID
int m_RecipeUID
Определения
RecipeBase.c:37
m_IngredientAddQuantity
float m_IngredientAddQuantity[MAX_NUMBER_OF_INGREDIENTS]
Определения
RecipeBase.c:50
m_MinQuantityIngredient
float m_MinQuantityIngredient[MAX_NUMBER_OF_INGREDIENTS]
Определения
RecipeBase.c:43
m_IngredientDestroy
bool m_IngredientDestroy[MAX_NUMBER_OF_INGREDIENTS]
Определения
RecipeBase.c:52
ItemBase
Определения
4_World/DayZ/Entities/Core/Inherited/InventoryItem.c:742
PlayerBase
Определения
PlayerBaseClient.c:2
PrepareAnimal
Определения
PrepareChicken.c:2
RecipeBase::CanDo
override bool CanDo(ItemBase ingredients[], PlayerBase player)
Определения
PrepareAnimal.c:57
RecipeBase::Do
override void Do(ItemBase ingredients[], PlayerBase player, array< ItemBase > results, float specialty_weight)
Определения
PrepareAnimal.c:63
RecipeBase::SetBloodyHands
void SetBloodyHands(ItemBase ingredients[], PlayerBase player)
Определения
PrepareAnimal.c:77
RecipeBase::Init
override void Init()
Определения
PrepareAnimal.c:3
RecipeBase
Определения
AttachHolster.c:2
array
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Определения
IsBoxCollidingGeometryProxyClasses.c:28
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Определения
dayzplayer.c:602
Ishodniki
scripts
4_World
DayZ
Classes
Recipes
Recipes
PrepareAnimal.c
Создано системой
1.13.2