Skip to content
This repository was archived by the owner on May 4, 2024. It is now read-only.

Commit 7c5bb8b

Browse files
committed
Merged Helkhiana Fixes into project
1 parent 0370447 commit 7c5bb8b

File tree

13 files changed

+1617
-0
lines changed

13 files changed

+1617
-0
lines changed

Layout/TraderMenu.layout

Lines changed: 254 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,254 @@
1+
FrameWidgetClass TraderMenu {
2+
visible 0
3+
color 0 0 0 0
4+
position 0 0
5+
size 1300 990
6+
halign center_ref
7+
valign center_ref
8+
hexactpos 0
9+
vexactpos 0
10+
hexactsize 1
11+
vexactsize 1
12+
{
13+
PanelWidgetClass Background {
14+
visible 1
15+
color 0 0 0 0.65
16+
position 0 0
17+
size 1300 990
18+
hexactpos 1
19+
vexactpos 1
20+
hexactsize 0
21+
vexactsize 1
22+
style rover_sim_colorable
23+
}
24+
PanelWidgetClass title_wrapper {
25+
visible 1
26+
color 0 0 0 0.7843
27+
position 0 0
28+
size 1 50
29+
hexactpos 1
30+
vexactpos 1
31+
hexactsize 0
32+
vexactsize 1
33+
style rover_sim_colorable
34+
{
35+
TextWidgetClass title_text {
36+
position 0 0
37+
size 1 1
38+
halign center_ref
39+
valign center_ref
40+
hexactpos 0
41+
vexactpos 0
42+
hexactsize 0
43+
vexactsize 0
44+
style Normal
45+
text "Weapon Trader"
46+
font "gui/fonts/Metron48"
47+
"text offset" 30 0
48+
}
49+
CheckBoxWidgetClass SellablesCheckBox {
50+
position 0.13515 0.02576
51+
size 0.22 1
52+
halign center_ref
53+
valign center_ref
54+
hexactpos 0
55+
vexactpos 0
56+
hexactsize 0
57+
vexactsize 0
58+
text "Show Sellables Only"
59+
font "gui/fonts/Metron28"
60+
}
61+
}
62+
}
63+
XComboBoxWidgetClass xcombobox_categorys {
64+
position 5 55
65+
size 600 40
66+
halign left_ref
67+
valign top_ref
68+
hexactpos 1
69+
vexactpos 1
70+
hexactsize 1
71+
vexactsize 1
72+
font "gui/fonts/Metron28"
73+
items "Melee;Sidearms;Shotguns;Assault Rifles;Light Machine Guns;Sub-Machine Guns;Sniper Rifles"
74+
}
75+
TextWidgetClass text_saldo {
76+
position 1001.78003 60
77+
size 108.22399 40
78+
halign left_ref
79+
valign top_ref
80+
hexactpos 1
81+
vexactpos 1
82+
hexactsize 1
83+
vexactsize 1
84+
text "Money: "
85+
font "gui/fonts/Metron28"
86+
"exact text" 1
87+
"text halign" right
88+
}
89+
TextWidgetClass text_saldoValue {
90+
position 1110 60
91+
size 300 40
92+
halign left_ref
93+
valign top_ref
94+
hexactpos 1
95+
vexactpos 1
96+
hexactsize 1
97+
vexactsize 1
98+
text "1234567890"
99+
font "gui/fonts/Metron28"
100+
"exact text" 1
101+
"text halign" left
102+
}
103+
TextListboxWidgetClass txtlist_items {
104+
clipchildren 0
105+
color 1 1 1 0.5843
106+
position 5 110
107+
size 1290 575
108+
halign left_ref
109+
valign top_ref
110+
hexactpos 1
111+
vexactpos 1
112+
hexactsize 1
113+
vexactsize 1
114+
style Default
115+
"title visible" 1
116+
colums "#tm_item;70;#tm_price_buy;15;#tm_price_sell;15"
117+
lines 1
118+
"highlight row" 1
119+
font "gui/fonts/Metron22"
120+
}
121+
TextWidgetClass ItemWeight {
122+
position 55 695.28003
123+
size 290 40
124+
halign left_ref
125+
valign top_ref
126+
hexactpos 1
127+
vexactpos 1
128+
hexactsize 1
129+
vexactsize 1
130+
text "1234567890"
131+
font "gui/fonts/sdf_MetronLight24"
132+
"exact text" 1
133+
"text halign" left
134+
"text valign" center
135+
}
136+
MultilineTextWidgetClass ItemDescWidget {
137+
clipchildren 0
138+
position 55 747.32001
139+
size 735.23999 178.92
140+
hexactpos 1
141+
vexactpos 1
142+
hexactsize 1
143+
vexactsize 1
144+
text "A box of large kitchen matches. Contains 250 matches. Store in dry place and keep away from children."
145+
font "gui/fonts/sdf_MetronLight24"
146+
"exact text" 1
147+
"exact text size" 24
148+
"size to text h" 0
149+
"size to text v" 0
150+
wrap 1
151+
"condense whitespace" 1
152+
}
153+
ItemPreviewWidgetClass ItemFrameWidget {
154+
visible 1
155+
color 0 0 0 0.8
156+
position 805.67999 685
157+
size 470.28 256.87997
158+
halign left_ref
159+
valign top_ref
160+
hexactpos 1
161+
vexactpos 1
162+
hexactsize 1
163+
vexactsize 1
164+
}
165+
ButtonWidgetClass btn_cancel {
166+
position 5 5
167+
size 160 40
168+
halign left_ref
169+
valign bottom_ref
170+
hexactpos 1
171+
vexactpos 1
172+
hexactsize 1
173+
vexactsize 1
174+
text "#tm_cancel"
175+
}
176+
ButtonWidgetClass btn_buy {
177+
position 170 5
178+
size 160 40
179+
halign right_ref
180+
valign bottom_ref
181+
hexactpos 1
182+
vexactpos 1
183+
hexactsize 1
184+
vexactsize 1
185+
text "#tm_buy"
186+
}
187+
ButtonWidgetClass btn_sell {
188+
position 5 5
189+
size 160 40
190+
halign right_ref
191+
valign bottom_ref
192+
hexactpos 1
193+
vexactpos 1
194+
hexactsize 1
195+
vexactsize 1
196+
text "#tm_sell"
197+
}
198+
TextWidgetClass ItemQuantity {
199+
visible 1
200+
position 522.82001 695.29602
201+
size 267.59 40
202+
halign left_ref
203+
valign top_ref
204+
hexactpos 1
205+
vexactpos 1
206+
hexactsize 1
207+
vexactsize 1
208+
text "Quantity: 123456789"
209+
font "gui/fonts/sdf_MetronLight24"
210+
"text offset" 10 0
211+
"exact text" 1
212+
"text valign" center
213+
}
214+
PanelWidgetClass SearchPanelWidget {
215+
ignorepointer 1
216+
color 0 0 0 0.5843
217+
position 683.92004 55.792
218+
size 283.17999 39.52
219+
hexactpos 1
220+
vexactpos 1
221+
hexactsize 1
222+
vexactsize 1
223+
style editor_quad
224+
{
225+
EditBoxWidgetClass SearchBox {
226+
size 0.98 0.9
227+
halign center_ref
228+
valign center_ref
229+
hexactpos 0
230+
vexactpos 0
231+
hexactsize 0
232+
vexactsize 0
233+
font "gui/fonts/sdf_metronlight24"
234+
}
235+
}
236+
}
237+
ImageWidgetClass ImageWidget0 {
238+
inheritalpha 0
239+
ignorepointer 1
240+
position 636.73999 53.7
241+
size 40 40
242+
hexactpos 1
243+
vexactpos 1
244+
hexactsize 1
245+
vexactsize 1
246+
imageTexture "{AD4618E43F128FE1}TM/Trader/imagesets/search.edds"
247+
mode blend
248+
"src alpha" 1
249+
"no wrap" 0
250+
stretch 1
251+
Mask "{AD4618E43F128FE1}TM/Trader/imagesets/search.edds"
252+
}
253+
}
254+
}

Layout/TraderNotification.layout

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
FrameWidgetClass TraderNotification {
2+
visible 1
3+
disabled 0
4+
clipchildren 0
5+
inheritalpha 0
6+
ignorepointer 1
7+
keepsafezone 0
8+
color 0 0 0 1
9+
size 0.14 0
10+
halign right_ref
11+
hexactpos 0
12+
vexactpos 1
13+
hexactsize 0
14+
vexactsize 1
15+
{
16+
PanelWidgetClass Background {
17+
visible 1
18+
ignorepointer 1
19+
color 0 0 0 0.65
20+
position 0 0
21+
size 1 1
22+
hexactpos 0
23+
vexactpos 0
24+
hexactsize 0
25+
vexactsize 0
26+
style rover_sim_colorable
27+
}
28+
RichTextWidgetClass text_message {
29+
disabled 0
30+
clipchildren 1
31+
inheritalpha 0
32+
ignorepointer 1
33+
keepsafezone 0
34+
size 0.9 1080
35+
halign center_ref
36+
valign center_ref
37+
hexactpos 0
38+
vexactpos 1
39+
hexactsize 0
40+
vexactsize 1
41+
style DayZNormal
42+
font "gui/fonts/sdf_MetronLight72"
43+
"exact text" 1
44+
"exact text size" 15
45+
"size to text h" 0
46+
"size to text v" 1
47+
"text halign" center
48+
"text valign" center
49+
wrap 1
50+
"strip newlines" 0
51+
}
52+
}
53+
}

imagesets/search.edds

115 KB
Binary file not shown.

imagesets/search.edds.meta

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
MetaFileClass {
2+
Name "{0F788D1DB9A77F25}TM/Trader/imagesets/search.edds"
3+
Author "desktop-c8ct5up"
4+
ChangeDate -555063115
5+
Configurations {
6+
TGAResourceClass PC {
7+
SourceFile "search.tga"
8+
}
9+
TGAResourceClass XBOX_ONE : PC {
10+
}
11+
TGAResourceClass PS4 : PC {
12+
}
13+
TGAResourceClass LINUX : PC {
14+
}
15+
}
16+
}

scripts/3_Game/TraderFix/Globals.c

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#ifdef TRADER
2+
bool TR_ItemHasQuantity(string itemClassname)
3+
{
4+
return TR_GetItemMaxQuantity(itemClassname) > 0;
5+
};
6+
7+
bool TR_GetItemMaxQuantity(string itemClassname)
8+
{
9+
string path = CFG_VEHICLESPATH + " " + itemClassname + " varQuantityMax";
10+
if (GetGame().ConfigIsExisting(path))
11+
return GetGame().ConfigGetInt(path);
12+
return -1;
13+
};
14+
15+
bool TR_ItemHasCount(string itemClassname)
16+
{
17+
return TR_GetItemCount(itemClassname) > 0;
18+
};
19+
20+
bool TR_GetItemCount(string itemClassname)
21+
{
22+
string path = CFG_MAGAZINESPATH + " " + itemClassname + " count";
23+
if (GetGame().ConfigIsExisting(path))
24+
return GetGame().ConfigGetInt(path);
25+
return -1;
26+
};
27+
28+
bool TR_HasQuantityBar(string itemClassname)
29+
{
30+
string path = CFG_VEHICLESPATH + " " + itemClassname + " quantityBar";
31+
if (GetGame().ConfigIsExisting(path))
32+
return GetGame().ConfigGetInt(path) == 1;
33+
34+
return false;
35+
};
36+
#endif
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#ifdef TRADER
2+
ref TStringArray KitIgnoreArray =
3+
{
4+
"BloodTestKit",
5+
"StartKitIV",
6+
"FirstAidKit",
7+
"MSFC_FirstAidKit",
8+
"WG_ITS_Medkit"
9+
"WG_AI2_Medkit",
10+
"SewingKit",
11+
"LeatherSewingKit",
12+
"WeaponCleaningKit",
13+
"KitchenKnife",
14+
"ElectronicRepairKit",
15+
"gunwall_kit_mung",
16+
"gunwall_metal_kit_mung"
17+
};
18+
#endif

0 commit comments

Comments
 (0)