Skip to content

Commit cb5a402

Browse files
committed
add other shops in nomenu buying feature
1 parent 40174cf commit cb5a402

File tree

6 files changed

+314
-10
lines changed

6 files changed

+314
-10
lines changed

Modules/BindingsModule/BindingsCommon.as

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ string[] page_texts =
1616
Names::knightnmb,
1717
Names::archernmb,
1818
Names::buildernmb,
19-
Names::quartersnmb
19+
Names::quartersnmb,
20+
Names::vehiclenmb,
21+
Names::boatnmb
2022
};
2123

2224
string[][] button_texts =
@@ -104,6 +106,18 @@ string[][] button_texts =
104106
Names::burgernmb,
105107
Names::pearnmb,
106108
Names::sleepnmb
109+
},
110+
{ // VEHICLE SHOP
111+
Names::catapultnmb,
112+
Names::ballistanmb,
113+
Names::outpostnmb,
114+
Names::boltsnmb,
115+
Names::shellsnmb
116+
},
117+
{ // BOAT SHOP
118+
Names::dinghynmb,
119+
Names::longboatnmb,
120+
Names::warboatnmb
107121
}
108122
};
109123

@@ -194,6 +208,18 @@ string[][] button_file_names =
194208
"kfc_burger",
195209
"kfc_pear",
196210
"kfc_sleep"
211+
},
212+
{
213+
"vehicle_catapult",
214+
"vehicle_ballista",
215+
"vehicle_outpost",
216+
"vehicle_bolts",
217+
"vehicle_shells",
218+
},
219+
{
220+
"boat_dinghy",
221+
"boat_longboat",
222+
"boat_warboat"
197223
}
198224
};
199225

@@ -1753,7 +1779,7 @@ class ClickableButtonGUI
17531779
GUI::SetFont("menu");
17541780

17551781
Vec2f start_offset = Vec2f(50, 600);
1756-
Vec2f start_offset_p = Vec2f(60, 550);
1782+
Vec2f start_offset_p = Vec2f(70, 550);
17571783

17581784
closebutton.Render(m_clickable_origin + Vec2f(1000 - 40, 0), Vec2f(40, 40));
17591785

@@ -1776,7 +1802,7 @@ class ClickableButtonGUI
17761802

17771803
if (i == 5)
17781804
{
1779-
start_offset_p = Vec2f(205, 600);
1805+
start_offset_p = Vec2f(70, 600);
17801806
}
17811807
}
17821808

@@ -1824,7 +1850,7 @@ class ClickableButtonGUI
18241850
u8 scale = screen_height / 720.0;
18251851

18261852
Vec2f start_offset = Vec2f(50, 600);
1827-
Vec2f start_offset_p = Vec2f(60, 550);
1853+
Vec2f start_offset_p = Vec2f(70, 550);
18281854

18291855
closebutton.Update(m_clickable_origin + Vec2f(1000 - 40, 0), Vec2f(40, 40));
18301856

@@ -1847,7 +1873,7 @@ class ClickableButtonGUI
18471873

18481874
if (i == 5)
18491875
{
1850-
start_offset_p = Vec2f(205, 600);
1876+
start_offset_p = Vec2f(70, 600);
18511877
}
18521878
}
18531879

Modules/BindingsModule/BindingsSystem.as

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ void onInit(CRules@ this)
4444
if (!file.exists("k_drill$2")) file.add_s32("k_drill$2", -1);
4545
if (!file.exists("k_satchel$1")) file.add_s32("k_satchel$1", 54);
4646
if (!file.exists("k_satchel$2")) file.add_s32("k_satchel$2", -1);
47+
4748
// builder shop
4849
if (!file.exists("b_drill$1")) file.add_s32("b_drill$1", 49);
4950
if (!file.exists("b_drill$2")) file.add_s32("b_drill$2", -1);
@@ -65,6 +66,7 @@ void onInit(CRules@ this)
6566
if (!file.exists("b_crate_wood$1")) file.add_s32("b_crate_wood$2", -1);
6667
if (!file.exists("b_crate_coins$1")) file.add_s32("b_crate_coins$1", 48);
6768
if (!file.exists("b_crate_coins$1")) file.add_s32("b_crate_coins$2", -1);
69+
6870
// archer shop
6971
if (!file.exists("a_arrows$1")) file.add_s32("a_arrows$1", 49);
7072
if (!file.exists("a_arrows$2")) file.add_s32("a_arrows$2", -1);
@@ -76,6 +78,7 @@ void onInit(CRules@ this)
7678
if (!file.exists("a_bombarrows$2")) file.add_s32("a_bombarrows$2", -1);
7779
if (!file.exists("a_blockarrows$1")) file.add_s32("a_blockarrows$1", 53);
7880
if (!file.exists("a_blockarrows$2")) file.add_s32("a_blockarrows$2", -1);
81+
7982
// kfc
8083
if (!file.exists("kfc_beer$1")) file.add_s32("kfc_beer$1", 49);
8184
if (!file.exists("kfc_beer$2")) file.add_s32("kfc_beer$2", -1);
@@ -90,6 +93,26 @@ void onInit(CRules@ this)
9093
if (!file.exists("kfc_sleep$1")) file.add_s32("kfc_sleep$1", 54);
9194
if (!file.exists("kfc_sleep$2")) file.add_s32("kfc_sleep$2", -1);
9295

96+
// vehicle shop
97+
if (!file.exists("vehicle_catapult$1")) file.add_s32("vehicle_catapult$1", 49);
98+
if (!file.exists("vehicle_catapult$2")) file.add_s32("vehicle_catapult$2", -1);
99+
if (!file.exists("vehicle_ballista$1")) file.add_s32("vehicle_ballista$1", 50);
100+
if (!file.exists("vehicle_ballista$2")) file.add_s32("vehicle_ballista$2", -1);
101+
if (!file.exists("vehicle_outpost$1")) file.add_s32("vehicle_outpost$1", 51);
102+
if (!file.exists("vehicle_outpost$2")) file.add_s32("vehicle_outpost$2", -1);
103+
if (!file.exists("vehicle_bolts$1")) file.add_s32("vehicle_bolts$1", 52);
104+
if (!file.exists("vehicle_bolts$2")) file.add_s32("vehicle_bolts$2", -1);
105+
if (!file.exists("vehicle_shells$1")) file.add_s32("vehicle_shells$1", 53);
106+
if (!file.exists("vehicle_shells$2")) file.add_s32("vehicle_shells$2", -1);
107+
108+
// boat shop
109+
if (!file.exists("boat_dinghy$1")) file.add_s32("boat_dinghy$1", 49);
110+
if (!file.exists("boat_dinghy$2")) file.add_s32("boat_dinghy$2", -1);
111+
if (!file.exists("boat_longboat$1")) file.add_s32("boat_longboat$1", 50);
112+
if (!file.exists("boat_longboat$2")) file.add_s32("boat_longboat$2", -1);
113+
if (!file.exists("boat_warboat$1")) file.add_s32("boat_warboat$1", 51);
114+
if (!file.exists("boat_warboat$2")) file.add_s32("boat_warboat$2", -1);
115+
93116
if(!file.saveFile(BINDINGSFILE + ".cfg"))
94117
{
95118
print("Failed to save GRUHSHA_playerbindings.cfg");

0 commit comments

Comments
 (0)