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

Commit

Permalink
Merged Helkhiana Fixes into project
Browse files Browse the repository at this point in the history
  • Loading branch information
napswastaken committed Dec 6, 2022
1 parent 0370447 commit 7c5bb8b
Show file tree
Hide file tree
Showing 13 changed files with 1,617 additions and 0 deletions.
254 changes: 254 additions & 0 deletions Layout/TraderMenu.layout
Original file line number Diff line number Diff line change
@@ -0,0 +1,254 @@
FrameWidgetClass TraderMenu {
visible 0
color 0 0 0 0
position 0 0
size 1300 990
halign center_ref
valign center_ref
hexactpos 0
vexactpos 0
hexactsize 1
vexactsize 1
{
PanelWidgetClass Background {
visible 1
color 0 0 0 0.65
position 0 0
size 1300 990
hexactpos 1
vexactpos 1
hexactsize 0
vexactsize 1
style rover_sim_colorable
}
PanelWidgetClass title_wrapper {
visible 1
color 0 0 0 0.7843
position 0 0
size 1 50
hexactpos 1
vexactpos 1
hexactsize 0
vexactsize 1
style rover_sim_colorable
{
TextWidgetClass title_text {
position 0 0
size 1 1
halign center_ref
valign center_ref
hexactpos 0
vexactpos 0
hexactsize 0
vexactsize 0
style Normal
text "Weapon Trader"
font "gui/fonts/Metron48"
"text offset" 30 0
}
CheckBoxWidgetClass SellablesCheckBox {
position 0.13515 0.02576
size 0.22 1
halign center_ref
valign center_ref
hexactpos 0
vexactpos 0
hexactsize 0
vexactsize 0
text "Show Sellables Only"
font "gui/fonts/Metron28"
}
}
}
XComboBoxWidgetClass xcombobox_categorys {
position 5 55
size 600 40
halign left_ref
valign top_ref
hexactpos 1
vexactpos 1
hexactsize 1
vexactsize 1
font "gui/fonts/Metron28"
items "Melee;Sidearms;Shotguns;Assault Rifles;Light Machine Guns;Sub-Machine Guns;Sniper Rifles"
}
TextWidgetClass text_saldo {
position 1001.78003 60
size 108.22399 40
halign left_ref
valign top_ref
hexactpos 1
vexactpos 1
hexactsize 1
vexactsize 1
text "Money: "
font "gui/fonts/Metron28"
"exact text" 1
"text halign" right
}
TextWidgetClass text_saldoValue {
position 1110 60
size 300 40
halign left_ref
valign top_ref
hexactpos 1
vexactpos 1
hexactsize 1
vexactsize 1
text "1234567890"
font "gui/fonts/Metron28"
"exact text" 1
"text halign" left
}
TextListboxWidgetClass txtlist_items {
clipchildren 0
color 1 1 1 0.5843
position 5 110
size 1290 575
halign left_ref
valign top_ref
hexactpos 1
vexactpos 1
hexactsize 1
vexactsize 1
style Default
"title visible" 1
colums "#tm_item;70;#tm_price_buy;15;#tm_price_sell;15"
lines 1
"highlight row" 1
font "gui/fonts/Metron22"
}
TextWidgetClass ItemWeight {
position 55 695.28003
size 290 40
halign left_ref
valign top_ref
hexactpos 1
vexactpos 1
hexactsize 1
vexactsize 1
text "1234567890"
font "gui/fonts/sdf_MetronLight24"
"exact text" 1
"text halign" left
"text valign" center
}
MultilineTextWidgetClass ItemDescWidget {
clipchildren 0
position 55 747.32001
size 735.23999 178.92
hexactpos 1
vexactpos 1
hexactsize 1
vexactsize 1
text "A box of large kitchen matches. Contains 250 matches. Store in dry place and keep away from children."
font "gui/fonts/sdf_MetronLight24"
"exact text" 1
"exact text size" 24
"size to text h" 0
"size to text v" 0
wrap 1
"condense whitespace" 1
}
ItemPreviewWidgetClass ItemFrameWidget {
visible 1
color 0 0 0 0.8
position 805.67999 685
size 470.28 256.87997
halign left_ref
valign top_ref
hexactpos 1
vexactpos 1
hexactsize 1
vexactsize 1
}
ButtonWidgetClass btn_cancel {
position 5 5
size 160 40
halign left_ref
valign bottom_ref
hexactpos 1
vexactpos 1
hexactsize 1
vexactsize 1
text "#tm_cancel"
}
ButtonWidgetClass btn_buy {
position 170 5
size 160 40
halign right_ref
valign bottom_ref
hexactpos 1
vexactpos 1
hexactsize 1
vexactsize 1
text "#tm_buy"
}
ButtonWidgetClass btn_sell {
position 5 5
size 160 40
halign right_ref
valign bottom_ref
hexactpos 1
vexactpos 1
hexactsize 1
vexactsize 1
text "#tm_sell"
}
TextWidgetClass ItemQuantity {
visible 1
position 522.82001 695.29602
size 267.59 40
halign left_ref
valign top_ref
hexactpos 1
vexactpos 1
hexactsize 1
vexactsize 1
text "Quantity: 123456789"
font "gui/fonts/sdf_MetronLight24"
"text offset" 10 0
"exact text" 1
"text valign" center
}
PanelWidgetClass SearchPanelWidget {
ignorepointer 1
color 0 0 0 0.5843
position 683.92004 55.792
size 283.17999 39.52
hexactpos 1
vexactpos 1
hexactsize 1
vexactsize 1
style editor_quad
{
EditBoxWidgetClass SearchBox {
size 0.98 0.9
halign center_ref
valign center_ref
hexactpos 0
vexactpos 0
hexactsize 0
vexactsize 0
font "gui/fonts/sdf_metronlight24"
}
}
}
ImageWidgetClass ImageWidget0 {
inheritalpha 0
ignorepointer 1
position 636.73999 53.7
size 40 40
hexactpos 1
vexactpos 1
hexactsize 1
vexactsize 1
imageTexture "{AD4618E43F128FE1}TM/Trader/imagesets/search.edds"
mode blend
"src alpha" 1
"no wrap" 0
stretch 1
Mask "{AD4618E43F128FE1}TM/Trader/imagesets/search.edds"
}
}
}
53 changes: 53 additions & 0 deletions Layout/TraderNotification.layout
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
FrameWidgetClass TraderNotification {
visible 1
disabled 0
clipchildren 0
inheritalpha 0
ignorepointer 1
keepsafezone 0
color 0 0 0 1
size 0.14 0
halign right_ref
hexactpos 0
vexactpos 1
hexactsize 0
vexactsize 1
{
PanelWidgetClass Background {
visible 1
ignorepointer 1
color 0 0 0 0.65
position 0 0
size 1 1
hexactpos 0
vexactpos 0
hexactsize 0
vexactsize 0
style rover_sim_colorable
}
RichTextWidgetClass text_message {
disabled 0
clipchildren 1
inheritalpha 0
ignorepointer 1
keepsafezone 0
size 0.9 1080
halign center_ref
valign center_ref
hexactpos 0
vexactpos 1
hexactsize 0
vexactsize 1
style DayZNormal
font "gui/fonts/sdf_MetronLight72"
"exact text" 1
"exact text size" 15
"size to text h" 0
"size to text v" 1
"text halign" center
"text valign" center
wrap 1
"strip newlines" 0
}
}
}
Binary file added imagesets/search.edds
Binary file not shown.
16 changes: 16 additions & 0 deletions imagesets/search.edds.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
MetaFileClass {
Name "{0F788D1DB9A77F25}TM/Trader/imagesets/search.edds"
Author "desktop-c8ct5up"
ChangeDate -555063115
Configurations {
TGAResourceClass PC {
SourceFile "search.tga"
}
TGAResourceClass XBOX_ONE : PC {
}
TGAResourceClass PS4 : PC {
}
TGAResourceClass LINUX : PC {
}
}
}
36 changes: 36 additions & 0 deletions scripts/3_Game/TraderFix/Globals.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#ifdef TRADER
bool TR_ItemHasQuantity(string itemClassname)
{
return TR_GetItemMaxQuantity(itemClassname) > 0;
};

bool TR_GetItemMaxQuantity(string itemClassname)
{
string path = CFG_VEHICLESPATH + " " + itemClassname + " varQuantityMax";
if (GetGame().ConfigIsExisting(path))
return GetGame().ConfigGetInt(path);
return -1;
};

bool TR_ItemHasCount(string itemClassname)
{
return TR_GetItemCount(itemClassname) > 0;
};

bool TR_GetItemCount(string itemClassname)
{
string path = CFG_MAGAZINESPATH + " " + itemClassname + " count";
if (GetGame().ConfigIsExisting(path))
return GetGame().ConfigGetInt(path);
return -1;
};

bool TR_HasQuantityBar(string itemClassname)
{
string path = CFG_VEHICLESPATH + " " + itemClassname + " quantityBar";
if (GetGame().ConfigIsExisting(path))
return GetGame().ConfigGetInt(path) == 1;

return false;
};
#endif
18 changes: 18 additions & 0 deletions scripts/3_Game/TraderFix/KitsToIgnore.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#ifdef TRADER
ref TStringArray KitIgnoreArray =
{
"BloodTestKit",
"StartKitIV",
"FirstAidKit",
"MSFC_FirstAidKit",
"WG_ITS_Medkit"
"WG_AI2_Medkit",
"SewingKit",
"LeatherSewingKit",
"WeaponCleaningKit",
"KitchenKnife",
"ElectronicRepairKit",
"gunwall_kit_mung",
"gunwall_metal_kit_mung"
};
#endif
Loading

0 comments on commit 7c5bb8b

Please sign in to comment.