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
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
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 }