DayZ 1.24
Loading...
Searching...
No Matches
Armband_ColorBase.c
Go to the documentation of this file.
2{
3 override bool CanPutInCargo(EntityAI parent)
4 {
5 if (!super.CanPutInCargo(parent)) return false;
6 if (GetNumberOfItems() == 0 || !parent || parent.IsMan())
7 return true;
8 return false;
9 }
10
11 override bool CanPutAsAttachment(EntityAI parent)
12 {
13 if (!super.CanPutAsAttachment(parent)) return false;
14 if (GetQuantity() <= 1)
15 return true;
16 return false;
17 }
18
19 override void SetActions()
20 {
21 super.SetActions();
23 }
24
26 {
27 super.SwitchItemSelectionTextureEx(context, par);
28
30 {
32 if (!data)
33 return;
34
35 PlayerBase player = data.param1;
36
37 int selection_idx = -1;
38 string texture;
39
42
43 //has top
44 if (player.FindAttachmentBySlotName("Body"))
45 {
46 show_selections.Insert("camoMale_big_a");
47 show_selections.Insert("camoMale_big_b");
48 show_selections.Insert("camoFemale_big_a");
49 show_selections.Insert("camoFemale_big_b");
50
51 hide_selections.Insert("camoMale_small_a");
52 hide_selections.Insert("camoMale_small_b");
53 hide_selections.Insert("camoFemale_small_a");
54 hide_selections.Insert("camoFemale_small_b");
55 }
56 //has no top
57 else
58 {
59 hide_selections.Insert("camoMale_big_a");
60 hide_selections.Insert("camoMale_big_b");
61 hide_selections.Insert("camoFemale_big_a");
62 hide_selections.Insert("camoFemale_big_b");
63
64 show_selections.Insert("camoMale_small_a");
65 show_selections.Insert("camoMale_small_b");
66 show_selections.Insert("camoFemale_small_a");
67 show_selections.Insert("camoFemale_small_b");
68 }
69
70 int i;
71 for (i = 0; i < show_selections.Count(); i++)
72 {
73 selection_idx = GetHiddenSelectionIndex(show_selections[i]);
74 texture = GetHiddenSelectionsData().GetHiddenSelectionsTextures()[selection_idx];
75 SetObjectTexture(selection_idx, texture);
76 }
77
78 for (i = 0; i < hide_selections.Count(); i++)
79 {
80 selection_idx = GetHiddenSelectionIndex(hide_selections[i]);
81 SetObjectTexture(selection_idx, "");
82 }
83 }
84 }
85};
86
88class Armband_White extends Armband_ColorBase {};
89class Armband_Yellow extends Armband_ColorBase {};
90class Armband_Orange extends Armband_ColorBase {};
91class Armband_Red extends Armband_ColorBase {};
92class Armband_Green extends Armband_ColorBase {};
93class Armband_Pink extends Armband_ColorBase {};
94class Armband_Blue extends Armband_ColorBase {};
95class Armband_Rex extends Armband_ColorBase {};
96class Armband_Zagorky extends Armband_ColorBase {};
97class Armband_Crook extends Armband_ColorBase {};
98class Armband_Black extends Armband_ColorBase {};
void AddAction(typename actionName)
int GetNumberOfItems()
Returns the number of items in cargo, otherwise returns 0(non-cargo objects). Recursive.
Definition ItemBase.c:8059
override float GetQuantity()
Definition ItemBase.c:7995
override bool CanPutAsAttachment(EntityAI parent)
override void SetActions()
override void SwitchItemSelectionTextureEx(EItemManipulationContext context, Param par=null)
override bool CanPutInCargo(EntityAI parent)
override bool IsMan()
Definition Man.c:33
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition param.c:12