DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
Armband_ColorBase.c
См. документацию.
2{
3 override bool CanPutInCargo( EntityAI parent )
4 {
5 if( !super.CanPutInCargo(parent) ) {return false;}
6 if ( GetNumberOfItems() == 0 || !parent || parent.IsMan() )
7 {
8 return true;
9 }
10 return false;
11 }
12
13 override bool CanPutAsAttachment( EntityAI parent )
14 {
15 if(!super.CanPutAsAttachment(parent)) {return false;}
16 if ( GetQuantity() <= 1 )
17 {
18 return true;
19 }
20 return false;
21 }
22
23 override void SetActions()
24 {
25 super.SetActions();
27 }
28
29 override void SwitchItemSelectionTextureEx(EItemManipulationContext context, Param par = null)
30 {
31 super.SwitchItemSelectionTextureEx(context, par);
32
33 if (context == EItemManipulationContext.ATTACHING || context == EItemManipulationContext.UPDATE)
34 {
35 Param1<PlayerBase> data = Param1<PlayerBase>.Cast(par);
36 if (!data)
37 {
38 return;
39 }
40
41 PlayerBase player = data.param1;
42
43 int selection_idx = -1;
44 string texture;
45
46 array<string> show_selections = new array<string>;
47 array<string> hide_selections = new array<string>;
48
49 //has top
50 if (player.FindAttachmentBySlotName("Body"))
51 {
52 show_selections.Insert("camoMale_big_a");
53 show_selections.Insert("camoMale_big_b");
54 show_selections.Insert("camoFemale_big_a");
55 show_selections.Insert("camoFemale_big_b");
56
57 hide_selections.Insert("camoMale_small_a");
58 hide_selections.Insert("camoMale_small_b");
59 hide_selections.Insert("camoFemale_small_a");
60 hide_selections.Insert("camoFemale_small_b");
61 }
62 //has no top
63 else
64 {
65 hide_selections.Insert("camoMale_big_a");
66 hide_selections.Insert("camoMale_big_b");
67 hide_selections.Insert("camoFemale_big_a");
68 hide_selections.Insert("camoFemale_big_b");
69
70 show_selections.Insert("camoMale_small_a");
71 show_selections.Insert("camoMale_small_b");
72 show_selections.Insert("camoFemale_small_a");
73 show_selections.Insert("camoFemale_small_b");
74 }
75
76 int i;
77 for (i = 0; i < show_selections.Count(); i++)
78 {
79 selection_idx = GetHiddenSelectionIndex(show_selections[i]);
80 texture = GetHiddenSelectionsData().GetHiddenSelectionsTextures()[selection_idx];
81 SetObjectTexture( selection_idx, texture );
82 }
83
84 for (i = 0; i < hide_selections.Count(); i++)
85 {
86 selection_idx = GetHiddenSelectionIndex(hide_selections[i]);
87 SetObjectTexture( selection_idx, "" );
88 }
89 }
90 }
91};
92
93class Armband_Dyed extends Armband_ColorBase {};
94class Armband_White extends Armband_ColorBase {};
95class Armband_Yellow extends Armband_ColorBase {};
96class Armband_Orange extends Armband_ColorBase {};
97class Armband_Red extends Armband_ColorBase {};
98class Armband_Green extends Armband_ColorBase {};
99class Armband_Pink extends Armband_ColorBase {};
100class Armband_Blue extends Armband_ColorBase {};
101class Armband_Rex extends Armband_ColorBase {};
102class Armband_Zagorky extends Armband_ColorBase {};
103class Armband_Crook extends Armband_ColorBase {};
104class Armband_Black extends Armband_ColorBase {};
void AddAction(typename actionName)
Определения AdvancedCommunication.c:220
int GetNumberOfItems()
Returns the number of items in cargo, otherwise returns 0(non-cargo objects). Recursive.
Определения ItemBase.c:8218
override float GetQuantity()
Определения ItemBase.c:8154
override bool CanPutAsAttachment(EntityAI parent)
Определения Armband_ColorBase.c:13
override void SetActions()
Определения Armband_ColorBase.c:23
override void SwitchItemSelectionTextureEx(EItemManipulationContext context, Param par=null)
Определения Armband_ColorBase.c:29
override bool CanPutInCargo(EntityAI parent)
Определения Armband_ColorBase.c:3
Определения Armband_ColorBase.c:2
override bool IsMan()
Определения Man.c:44
Определения Building.c:6
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Определения param.c:12
Определения PlayerBaseClient.c:2
Result for an object found in CGame.IsBoxCollidingGeometryProxy.