|
7 | 7 | -- * Provide a copy of or a link to the original license (GPL-3.0 or later); see LICENSE.md or <https://www.gnu.org/licenses/>. |
8 | 8 |
|
9 | 9 |
|
10 | | -local Mastermind = require("SSV2.includes.features.Mastermind"):init() |
| 10 | +local Mastermind = require("includes.features.Mastermind"):init() |
11 | 11 | local SGSL = require("includes.services.SGSL") |
12 | 12 | local secondary_targets = { "Cash", "Weed", "Coke", "Gold" } |
13 | 13 | local cayo_secondary_target_i, cayo_secondary_target_c |
14 | 14 |
|
15 | 15 | local heistNames <const> = { -- https://github.com/root-cause/v-labels/blob/master/labels.json |
16 | | - CluckinBellFarmRaid = "AWT_1026", |
17 | | - KnoWayOut = "DLCC_AVIM", |
18 | | - DontFuckWithDre = "AWT_973", |
| 16 | + CluckinBellFarmRaid = "AWT_1026", |
| 17 | + KnoWayOut = "DLCC_AVIM", |
| 18 | + DontFuckWithDre = "AWT_973", |
19 | 19 | OscarGuzmanFliesAgain = "HACK24_MFM_STR", |
20 | | - FleecaJob = "HTITLE_TUT", |
21 | | - PrisonBreak = "HTITLE_PRISON", |
22 | | - HumaneLabsRaid = "HTITLE_HUMANE", |
23 | | - SeriesAFunding = "HTITLE_NARC", |
24 | | - PacificStandardJob = "HTITLE_ORNATE", |
25 | | - DataBreaches = "HPSTRAND_IAAb", |
26 | | - BogdanProblem = "HPSTRAND_SUBb", |
27 | | - DoomsdayScenario = "HPSTRAND_MSILb", |
| 20 | + FleecaJob = "HTITLE_TUT", |
| 21 | + PrisonBreak = "HTITLE_PRISON", |
| 22 | + HumaneLabsRaid = "HTITLE_HUMANE", |
| 23 | + SeriesAFunding = "HTITLE_NARC", |
| 24 | + PacificStandardJob = "HTITLE_ORNATE", |
| 25 | + DataBreaches = "HPSTRAND_IAAb", |
| 26 | + BogdanProblem = "HPSTRAND_SUBb", |
| 27 | + DoomsdayScenario = "HPSTRAND_MSILb", |
28 | 28 | } |
29 | 29 | local tabNames <const> = { -- |
30 | 30 | "YH_BASIC_TAB", -- Basic |
@@ -152,8 +152,8 @@ local function drawCayoTab() |
152 | 152 | end |
153 | 153 |
|
154 | 154 | local request_kosatka = SGSL:Get(SGSL.data.request_services_global):AsGlobal():At(613) |
155 | | - local sub_requested = request_kosatka:ReadInt() == 1 |
156 | | - local sub_spawned = not sub.coords:is_zero() |
| 155 | + local sub_requested = request_kosatka:ReadInt() == 1 |
| 156 | + local sub_spawned = not sub.coords:is_zero() |
157 | 157 |
|
158 | 158 | ImGui.BeginDisabled(not sub_spawned) |
159 | 159 | if (GUI:Button(_T("GENERIC_TELEPORT"))) then |
@@ -191,7 +191,6 @@ local function drawCayoTab() |
191 | 191 | local cayo_heist_weapons = stats.get_int("MPX_H4CNF_WEAPONS") |
192 | 192 | local cayo_cooldown = stats.get_int("MPX_H4_COOLDOWN") |
193 | 193 | local cayo_cooldown_hard = stats.get_int("MPX_H4_COOLDOWN_HARD") |
194 | | - |
195 | 194 | local posix_now = Time.Epoch() |
196 | 195 | local cooldown_seconds_left = cayo_cooldown - posix_now |
197 | 196 | local cooldown_hard_seconds_left = cayo_cooldown_hard - posix_now |
@@ -330,7 +329,6 @@ local function drawDDayTab() |
330 | 329 |
|
331 | 330 | local dday_status = stats.get_int("MPX_GANGOPS_HEIST_STATUS") |
332 | 331 | local dday_cooldown = stats.get_int("MPX_GANGOPS_LAUNCH_TIME") |
333 | | - |
334 | 332 | local posix_now = Time.Epoch() |
335 | 333 | local cooldown_seconds_left = dday_cooldown - posix_now |
336 | 334 | local on_cooldown = cooldown_seconds_left > 0 |
@@ -401,25 +399,26 @@ local tabCallbacks <const> = { |
401 | 399 | } |
402 | 400 |
|
403 | 401 | local function HeistUI() |
404 | | - if (not Game.IsOnline() or not Backend:IsUpToDate()) then |
| 402 | + if (not Game.IsOnline()) then |
405 | 403 | ImGui.Text(_T("GENERIC_UNAVAILABLE_SP")) |
406 | 404 | return |
407 | 405 | end |
408 | 406 |
|
409 | | - cayo_secondary_target_i, cayo_secondary_target_c = Mastermind:GetCayoSecTargets() |
| 407 | + if (not Backend:IsUpToDate()) then |
| 408 | + ImGui.Text(_T("GENERIC_OUTDATED")) |
| 409 | + return |
| 410 | + end |
410 | 411 |
|
411 | | - if (ImGui.BeginTabBar("##funkBar")) then |
412 | | - ImGui.PushStyleVar(ImGuiStyleVar.ItemSpacing, 10, 10) |
| 412 | + cayo_secondary_target_i, cayo_secondary_target_c = Mastermind:GetCayoSecTargets() |
413 | 413 |
|
| 414 | + if (ImGui.BeginTabBar("##mastermind")) then |
414 | 415 | for i = 1, #tabNames do |
415 | 416 | local name = tabNames[i] |
416 | 417 | if ImGui.BeginTabItem(name) then |
417 | 418 | tabCallbacks[i]() |
418 | 419 | ImGui.EndTabItem() |
419 | 420 | end |
420 | 421 | end |
421 | | - |
422 | | - ImGui.PopStyleVar() |
423 | 422 | ImGui.EndTabBar() |
424 | 423 | end |
425 | 424 | end |
|
0 commit comments