Skip to content

Commit f51503b

Browse files
authored
Merge pull request YimMenu-Lua#108 from acidlabsdev/main
fix(require): fix verbose require paths
2 parents fd40fe3 + 227ad71 commit f51503b

4 files changed

Lines changed: 55 additions & 52 deletions

File tree

SSV2/includes/frontend/casino_ui.lua

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,30 +23,30 @@ local function drawGamblingTab()
2323
end
2424

2525
GUI:HeaderText(_T("CP_COOLDOWN_BYPASS"), { separator = true, spacing = true })
26-
GVars.features.dunk.bypass_casino_bans, _ = GUI:CustomToggle(_T "CP_COOLDOWN_BYPASS_ENABLE",
26+
GVars.features.dunk.bypass_casino_bans, _ = GUI:CustomToggle(_T("CP_COOLDOWN_BYPASS_ENABLE"),
2727
GVars.features.dunk.bypass_casino_bans, {
2828
tooltip = _T("CP_COOLDOWN_BYPASS_TOOLTIP"),
2929
color = Color("#AA0000")
3030
})
3131

32-
ImGui.BulletText(_T "CP_COOLDOWN_BYPASS_STATUS")
32+
ImGui.BulletText(_T("CP_COOLDOWN_BYPASS_STATUS"))
3333
ImGui.SameLine()
3434
ImGui.Text(CasinoPacino:GetCooldownString())
3535

3636
GUI:HeaderText(_T("CP_POKER_SETTINGS"), { separator = true, spacing = true })
37-
GVars.features.dunk.force_poker_cards, _ = GUI:CustomToggle(_T "CP_POKER_FORCE_ROYAL_FLUSH",
37+
GVars.features.dunk.force_poker_cards, _ = GUI:CustomToggle(_T("CP_POKER_FORCE_ROYAL_FLUSH"),
3838
GVars.features.dunk.force_poker_cards
3939
)
4040

41-
GVars.features.dunk.set_dealers_poker_cards, _ = GUI:CustomToggle(_T "CP_POKER_FORCE_BAD_BEAT",
41+
GVars.features.dunk.set_dealers_poker_cards, _ = GUI:CustomToggle(_T("CP_POKER_FORCE_BAD_BEAT"),
4242
GVars.features.dunk.set_dealers_poker_cards
4343
)
4444

4545
GUI:HeaderText(_T("CP_BLACKJACK_SETTINGS"), { separator = true, spacing = true })
46-
ImGui.BulletText(_T "CP_BLACKJACK_DEALER_FACE_DOWN_CARD")
46+
ImGui.BulletText(_T("CP_BLACKJACK_DEALER_FACE_DOWN_CARD"))
4747
ImGui.SameLine()
4848
ImGui.Text(CasinoPacino:GetBJDealerCard())
49-
if GUI:Button(_T "CP_BLACKJACK_FORCE_DEALER_BUST") then
49+
if GUI:Button(_T("CP_BLACKJACK_FORCE_DEALER_BUST")) then
5050
CasinoPacino:ForceDealerBust()
5151
end
5252

@@ -164,7 +164,7 @@ local function drawHeistTab()
164164
GUI:HeaderText(_T("CP_HEIST_SETUP"), { separator = true, spacing = true })
165165
ImGui.PushItemWidth(200)
166166

167-
local new_approach, approach_clicked = ImGui.Combo(_T "CP_HEIST_APPROACH",
167+
local new_approach, approach_clicked = ImGui.Combo(_T("CP_HEIST_APPROACH"),
168168
casino_heist_approach,
169169
{ "Unselected", "Silent & Sneaky", "The Big Con", "Aggressive" },
170170
4
@@ -175,7 +175,7 @@ local function drawHeistTab()
175175
end
176176

177177
local new_last_approach, last_approach_clicked = ImGui.Combo(
178-
_T "CP_HEIST_LAST_APPROACH",
178+
_T("CP_HEIST_LAST_APPROACH"),
179179
casino_heist_last_approach,
180180
{ "Unselected", "Silent & Sneaky", "The Big Con", "Aggressive" },
181181
4
@@ -186,7 +186,7 @@ local function drawHeistTab()
186186
end
187187

188188
local new_hard_approach, hard_approach_clicked = ImGui.Combo(
189-
_T "CP_HEIST_HARD_APPROACH",
189+
_T("CP_HEIST_HARD_APPROACH"),
190190
casino_heist_hard,
191191
{ "Unselected", "Silent & Sneaky", "The Big Con", "Aggressive" },
192192
4
@@ -197,7 +197,7 @@ local function drawHeistTab()
197197
end
198198

199199
local new_target, target_clicked = ImGui.Combo(
200-
_T "CP_HEIST_TARGET",
200+
_T("CP_HEIST_TARGET"),
201201
casino_heist_target,
202202
{ "Money", "Gold", "Art", "Diamonds" },
203203
4
@@ -208,7 +208,7 @@ local function drawHeistTab()
208208
end
209209

210210
local new_gunman, gunman_clicked = ImGui.Combo(
211-
_T "CP_HEIST_GUNMAN",
211+
_T("CP_HEIST_GUNMAN"),
212212
casino_heist_gunman,
213213
{ "Unselected", "Karl Abolaji", "Gustavo Mota", "Charlie Reed", "Chester McCoy", "Patrick McReary" },
214214
6
@@ -254,7 +254,7 @@ local function drawHeistTab()
254254
}
255255

256256
local new_weapons, weapons_clicked = ImGui.Combo(
257-
_T "CP_HEIST_WEAPONS",
257+
_T("CP_HEIST_WEAPONS"),
258258
casino_heist_weapons,
259259
gunList[new_gunman][casino_heist_approach + 1],
260260
2
@@ -265,7 +265,7 @@ local function drawHeistTab()
265265
end
266266

267267
local new_driver, driver_clicked = ImGui.Combo(
268-
_T "CP_HEIST_DRIVER",
268+
_T("CP_HEIST_DRIVER"),
269269
casino_heist_driver,
270270
{
271271
"Unselected",
@@ -300,7 +300,7 @@ local function drawHeistTab()
300300
},
301301
}
302302
local new_car, car_clicked = ImGui.Combo(
303-
_T "CP_HEIST_GETAWAY_VEHS",
303+
_T("CP_HEIST_GETAWAY_VEHS"),
304304
casino_heist_cars,
305305
carList[new_driver],
306306
4
@@ -311,7 +311,7 @@ local function drawHeistTab()
311311
end
312312

313313
local new_hacker, hacker_clicked = ImGui.Combo(
314-
_T "CP_HEIST_HACKER",
314+
_T("CP_HEIST_HACKER"),
315315
casino_heist_hacker,
316316
{ "Unselected", "Rickie Lukens", "Christian Feltz", "Yohan Blair", "Avi Schwartzman", "Page Harris" },
317317
6
@@ -321,7 +321,7 @@ local function drawHeistTab()
321321
end
322322

323323
local new_masks, masks_clicked = ImGui.Combo(
324-
_T "CP_HEIST_MASKS",
324+
_T("CP_HEIST_MASKS"),
325325
casino_heist_masks,
326326
{
327327
"Unselected",
@@ -367,7 +367,7 @@ local function drawHeistTab()
367367
stats.set_packed_stat_bool(26969, true) --Unlock High Roller
368368
end
369369

370-
if (GUI:Button(_T "CP_HEIST_ZERO_AI_CUTS")) then
370+
if (GUI:Button(_T("CP_HEIST_ZERO_AI_CUTS"))) then
371371
tunables.set_int("CH_LESTER_CUT", 0)
372372
tunables.set_int("HEIST3_PREPBOARD_GUNMEN_KARL_CUT", 0)
373373
tunables.set_int("HEIST3_PREPBOARD_GUNMEN_GUSTAVO_CUT", 0)

SSV2/includes/frontend/yhv1_ui.lua

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
local YHV1 = require("includes.features.YimHeistsV1"):init()
1111
local SGSL = require("includes.services.SGSL")
12-
local setTranslations = require("SSV2.includes.frontend.helpers.set_translations")
12+
local setTranslations = require("includes.frontend.helpers.set_translations")
1313
local heistNames <const> = {
1414
"AWT_1026", -- The Cluckin' Bell Farm Raid
1515
"AWT_1109", -- No Way KnoWay
@@ -172,11 +172,14 @@ local function drawCayoTab()
172172
ImGui.SameLine()
173173
ImGui.BeginDisabled(sub_requested or sub_spawned)
174174
if (GUI:Button(btn_label)) then
175-
if (not LocalPlayer:IsOutside()) then
176-
Notifier:ShowError("YHV1", _T("GENERIC_TP_INTERIOR_ERR"))
177-
else
175+
ThreadManager:Run(function()
176+
if (not LocalPlayer:IsOutside()) then
177+
Notifier:ShowError("YHV1", _T("GENERIC_TP_INTERIOR_ERR"))
178+
return
179+
end
180+
178181
request_kosatka:WriteInt(1)
179-
end
182+
end)
180183
end
181184
ImGui.EndDisabled()
182185

@@ -198,12 +201,12 @@ local function drawCayoTab()
198201
GUI:HeaderText(_F(_T("CP_COOLDOWN_BYPASS_STATUS_FORMAT"), minutes_left),
199202
{ separator = false, spacing = true, color = Color("#AA0000") })
200203
end
201-
ImGui.BeginDisabled(on_cooldown)
202204

205+
ImGui.BeginDisabled(on_cooldown)
203206
GUI:HeaderText(_T("CP_HEIST_SETUP"), { separator = true, spacing = true })
204207

205208
local new_primary_target, primary_target_clicked = ImGui.Combo(
206-
_T "YH_CAYO_TARGET_PRIMARY",
209+
_T("YH_CAYO_TARGET_PRIMARY"),
207210
cayo_heist_primary,
208211
{ "Tequila", "Ruby", "Bearer Bonds", "Pink Diamond", "Madrazo Files", "Panther Statue" },
209212
6
@@ -217,7 +220,7 @@ local function drawCayoTab()
217220

218221
local secondary_targets = { "Cash", "Weed", "Coke", "Gold" }
219222
local new_secondary_target_i, secondary_target_i_click = ImGui.Combo(
220-
_T "YH_CAYO_TARGET_SECONDARY_I",
223+
_T("YH_CAYO_TARGET_SECONDARY_I"),
221224
cayo_secondary_target_i,
222225
secondary_targets,
223226
4
@@ -229,7 +232,7 @@ local function drawCayoTab()
229232
end
230233

231234
local new_secondary_target_c, secondary_target_c_click = ImGui.Combo(
232-
_T "YH_CAYO_TARGET_SECONDARY_C",
235+
_T("YH_CAYO_TARGET_SECONDARY_C"),
233236
cayo_secondary_target_c,
234237
secondary_targets,
235238
4
@@ -243,7 +246,7 @@ local function drawCayoTab()
243246
ImGui.Spacing()
244247

245248
local new_weapons, weapons_clicked = ImGui.Combo(
246-
_T "YH_CAYO_WEAPONS",
249+
_T("YH_CAYO_WEAPONS"),
247250
cayo_heist_weapons,
248251
{ "Unselected", "Aggressor", "Conspirator", "Crackshot", "Saboteur", "Marksman" },
249252
6
@@ -253,7 +256,7 @@ local function drawCayoTab()
253256
stats.set_int("MPX_H4CNF_WEAPONS", new_weapons)
254257
end
255258

256-
GUI:HeaderText(_T "GENERIC_OPTIONS_LABEL", { separator = true, spacing = true })
259+
GUI:HeaderText(_T("GENERIC_OPTIONS_LABEL"), { separator = true, spacing = true })
257260

258261
-- I'll also need to find which bits actually correspond to hard mode instead of just hard coding values and this stupid check; Bits 4, 8, 13 is the difference
259262
local new_difficulty, difficulty_toggled = GUI:CustomToggle(_T("YH_CAYO_DIFFICULTY"),
@@ -269,7 +272,7 @@ local function drawCayoTab()
269272
end
270273

271274
-- https://www.unknowncheats.me/forum/3058973-post602.html
272-
if GUI:Button(_T "CP_HEIST_UNLOCK_ALL") then
275+
if GUI:Button(_T("CP_HEIST_UNLOCK_ALL")) then
273276
stats.set_int("MPX_H4CNF_WEP_DISRP", 3)
274277
stats.set_int("MPX_H4CNF_ARM_DISRP", 3)
275278
stats.set_int("MPX_H4CNF_HEL_DISRP", 3)
@@ -292,7 +295,7 @@ local function drawCayoTab()
292295

293296
if (GVars.backend.debug_mode) then
294297
-- This button should only be used if something is severely wrong
295-
if GUI:Button(_T "YH_CAYO_RESET_ALL") then
298+
if GUI:Button(_T("YH_CAYO_RESET_ALL")) then
296299
stats.set_int("MPX_H4_MISSIONS", 0)
297300
stats.set_int("MPX_H4_PROGRESS", 0)
298301
stats.set_int("MPX_H4_PLAYTHROUGH_STATUS", 0)

SSV2/includes/frontend/yrv3/yrv3_ui.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
local selectedTabID = 1
1111
local colMoneyGreen = Color("#85BB65")
12-
local setTranslations = require("SSV2.includes.frontend.helpers.set_translations")
12+
local setTranslations = require("includes.frontend.helpers.set_translations")
1313
local tabNames <const> = {
1414
"GB_BOSSC",
1515
"CELL_HANGAR",

SSV2/includes/modules/businesses/Warehouse.lua

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,48 +15,48 @@ local function GetCEOCratesValue(crates)
1515
return 0
1616
end
1717

18-
local val
18+
local v = 1
1919
if crates <= 3 then
20-
val = tostring(crates)
20+
v = crates
2121
elseif crates <= 5 then
22-
val = "4"
22+
v = 4
2323
elseif crates <= 7 then
24-
val = "5"
24+
v = 5
2525
elseif crates <= 9 then
26-
val = "6"
26+
v = 6
2727
elseif crates <= 14 then
28-
val = "7"
28+
v = 7
2929
elseif crates <= 19 then
30-
val = "8"
30+
v = 8
3131
elseif crates <= 24 then
32-
val = "9"
32+
v = 9
3333
elseif crates <= 29 then
34-
val = "10"
34+
v = 10
3535
elseif crates <= 34 then
36-
val = "11"
36+
v = 11
3737
elseif crates <= 39 then
38-
val = "12"
38+
v = 12
3939
elseif crates <= 44 then
40-
val = "13"
40+
v = 13
4141
elseif crates <= 49 then
42-
val = "14"
42+
v = 14
4343
elseif crates <= 59 then
44-
val = "15"
44+
v = 15
4545
elseif crates <= 69 then
46-
val = "16"
46+
v = 16
4747
elseif crates <= 79 then
48-
val = "17"
48+
v = 17
4949
elseif crates <= 89 then
50-
val = "18"
50+
v = 18
5151
elseif crates <= 99 then
52-
val = "19"
52+
v = 19
5353
elseif crates <= 110 then
54-
val = "20"
54+
v = 20
5555
elseif crates == 111 then
56-
val = "21"
56+
v = 21
5757
end
5858

59-
return val and (tunables.get_int("EXEC_CONTRABAND_SALE_VALUE_THRESHOLD" .. val) * crates) or 0
59+
return tunables.get_int(_F("EXEC_CONTRABAND_SALE_VALUE_THRESHOLD%d", v)) * crates
6060
end
6161

6262
---@enum eWarehouseType

0 commit comments

Comments
 (0)