DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
CloseGunCase.c
См. документацию.
1class CloseGunCase extends RecipeBase
2{
3
5
7 {
9 m_AllowedCombines.Insert("GunCase_Black", "GunCaseKeys_Blue");
10 m_AllowedCombines.Insert("GunCase_Orange", "GunCaseKeys_Orange");
11 m_AllowedCombines.Insert("GunCase_White", "GunCaseKeys_Red");
12 }
13
14 override void Init()
15 {
16 m_Name = "#lock";
17 m_IsInstaRecipe = false;//should this recipe be performed instantly without animation
18 m_AnimationLength = 1;//animation length in relative time units
19 m_Specialty = 0.03;// value > 0 for roughness, value < 0 for precision
20
21 //----------------------------------------------------------------------------------------------------------------------
22
23 //INGREDIENTS
24 //ingredient 1
25 InsertIngredient(0,"GunCase_ColorBase");//you can insert multiple ingredients this way
26
27 m_IngredientAddHealth[0] = 0;// 0 = do nothing
28 m_IngredientSetHealth[0] = -1; // -1 = do nothing
29 m_IngredientAddQuantity[0] = 0;// 0 = do nothing
30 m_IngredientDestroy[0] = false;//true = destroy, false = do nothing
31 m_IngredientUseSoftSkills[0] = false;// set 'true' to allow modification of the values by softskills on this ingredient
33
34 //ingredient 2
35 InsertIngredient(1,"GunCaseKeys_Colorbase");//you can insert multiple ingredients this way
36
37 m_IngredientAddHealth[1] = -0.5;// 0 = do nothing
38 m_IngredientSetHealth[1] = -1; // -1 = do nothing
39 m_IngredientAddQuantity[1] = 0;// 0 = do nothing
40 m_IngredientDestroy[1] = false;// false = do nothing
41 m_IngredientUseSoftSkills[1] = false;// set 'true' to allow modification of the values by softskills on this ingredient
43
44 //----------------------------------------------------------------------------------------------------------------------
45 }
46
47 override bool CanDo(ItemBase ingredients[], PlayerBase player)
48 {
49 GunCase_ColorBase gncs = GunCase_ColorBase.Cast(ingredients[0]);
50 GunCaseKeys_Colorbase key = GunCaseKeys_Colorbase.Cast(ingredients[1]);
51 foreach (string caseName, string keyName: m_AllowedCombines)
52 {
53 if (caseName == gncs.GetType() && keyName == key.GetType())
54 return gncs.IsOpen();
55 }
56
57 return false;
58 }
59
60 override void Do(ItemBase ingredients[], PlayerBase player,array<ItemBase> results, float specialty_weight)
61 {
62 GunCase_ColorBase gncs = GunCase_ColorBase.Cast(ingredients[0]);
63 gncs.Close();
64 }
65};
string m_Name
Определения 3_Game/DayZ/InventoryItemType.c:34
bool m_IngredientUseSoftSkills[MAX_NUMBER_OF_INGREDIENTS]
Определения RecipeBase.c:48
float m_IngredientAddHealth[MAX_NUMBER_OF_INGREDIENTS]
Определения RecipeBase.c:49
bool m_IsInstaRecipe
Определения RecipeBase.c:40
float m_IngredientSetHealth[MAX_NUMBER_OF_INGREDIENTS]
Определения RecipeBase.c:51
float m_Specialty
Определения RecipeBase.c:39
void InsertIngredient(int index, string ingredient, DayZPlayerConstants uid=BASE_CRAFT_ANIMATION_ID, bool showItem=false)
Определения RecipeBase.c:159
float m_AnimationLength
Определения RecipeBase.c:38
float m_MaxDamageIngredient[MAX_NUMBER_OF_INGREDIENTS]
Определения RecipeBase.c:46
float m_IngredientAddQuantity[MAX_NUMBER_OF_INGREDIENTS]
Определения RecipeBase.c:50
bool m_IngredientDestroy[MAX_NUMBER_OF_INGREDIENTS]
Определения RecipeBase.c:52
override bool IsOpen()
Определения GunCase.c:59
override void Close()
Определения GunCase.c:70
Определения GunCase.c:2
Определения PlayerBaseClient.c:2
override bool CanDo(ItemBase ingredients[], PlayerBase player)
Определения CloseGunCase.c:47
void CloseGunCase()
Определения CloseGunCase.c:6
override void Do(ItemBase ingredients[], PlayerBase player, array< ItemBase > results, float specialty_weight)
Определения CloseGunCase.c:60
ref map< string, string > m_AllowedCombines
Определения CloseGunCase.c:4
override void Init()
Определения CloseGunCase.c:14
Определения AttachHolster.c:2
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Определения Transport.c:70