From 88592d1d429543c2e6e562eecb3bc8b30a3ed840 Mon Sep 17 00:00:00 2001 From: Molicheu <64894726+Molicheu@users.noreply.github.com> Date: Wed, 20 Dec 2023 20:58:06 -0500 Subject: [PATCH 1/3] convert zones to ox_lib --- client/fleeca.lua | 63 +++++++------- client/pacific.lua | 183 ++++++++++++++++++++-------------------- client/paleto.lua | 120 +++++++++++++------------- client/powerstation.lua | 27 +++--- fxmanifest.lua | 4 - 5 files changed, 200 insertions(+), 197 deletions(-) diff --git a/client/fleeca.lua b/client/fleeca.lua index ab76d36..5c31f31 100644 --- a/client/fleeca.lua +++ b/client/fleeca.lua @@ -451,55 +451,56 @@ end) CreateThread(function() for i = 1, #sharedConfig.smallBanks do - local bankZone = BoxZone:Create(sharedConfig.smallBanks[i].coords, 1.0, 1.0, { + local bankZone = lib.zones.box({ name = 'fleeca_'..i..'_coords_electronickit', - heading = sharedConfig.smallBanks[i].coords.closed, - minZ = sharedConfig.smallBanks[i].coords.z - 1, - maxZ = sharedConfig.smallBanks[i].coords.z + 1, - debugPoly = false + coords = sharedConfig.smallBanks[i].coords, + size = vec3(1, 1, 2), + rotation = sharedConfig.smallBanks[i].coords.closed, + debug = false }) for k in pairs(sharedConfig.smallBanks[i].lockers) do if config.useTarget then - exports['qb-target']:AddBoxZone('fleeca_'..i..'_coords_locker_'..k, sharedConfig.smallBanks[i].lockers[k].coords, 1.0, 1.0, { - name = 'fleeca_'..i..'_coords_locker_'..k, - heading = sharedConfig.smallBanks[i].heading.closed, - minZ = sharedConfig.smallBanks[i].lockers[k].coords.z - 1, - maxZ = sharedConfig.smallBanks[i].lockers[k].coords.z + 1, - debugPoly = false - }, { + exports.ox_target:addBoxZone({ + coords = sharedConfig.smallBanks[i].lockers[k].coords, + size = vec3(1, 1, 2), + rotation = sharedConfig.smallBanks[i].heading.closed, + debug = false, + drawSprite = true, options = { { - action = function() - openLocker(closestBank, k) - end, + label = Lang:t('general.break_safe_open_option_target'), + name = 'fleeca_'..i..'_coords_locker_'..k, + icon = 'fa-solid fa-vault', + distance = 1.5, canInteract = function() return closestBank ~= 0 and not isDrilling and sharedConfig.smallBanks[i].isOpened and not sharedConfig.smallBanks[i].lockers[k].isOpened and not sharedConfig.smallBanks[i].lockers[k].isBusy end, - icon = 'fa-solid fa-vault', - label = Lang:t('general.break_safe_open_option_target'), + onSelect = function() + openLocker(closestBank, k) + end, }, }, - distance = 1.5 }) else - local lockerZone = BoxZone:Create(sharedConfig.smallBanks[i].lockers[k].coords, 1.0, 1.0, { + local lockerZone = lib.zones.box({ name = 'fleeca_'..i..'_coords_locker_'..k, - heading = sharedConfig.smallBanks[i].heading.closed, - minZ = sharedConfig.smallBanks[i].lockers[k].coords.z - 1, - maxZ = sharedConfig.smallBanks[i].lockers[k].coords.z + 1, - debugPoly = false - }) - lockerZone:onPlayerInOut(function(inside) - if inside and closestBank ~= 0 and not isDrilling and sharedConfig.smallBanks[i].isOpened and not sharedConfig.smallBanks[i].lockers[k].isOpened and not sharedConfig.smallBanks[i].lockers[k].isBusy then - lib.showTextUI(Lang:t('general.break_safe_open_option_drawtext'), {position = 'left-center'}) - currentLocker = k - else + coords = sharedConfig.smallBanks[i].lockers[k].coords, + size = vec3(1, 1, 2), + rotation = sharedConfig.smallBanks[i].heading.closed, + debug = false, + onEnter = function() + if closestBank ~= 0 and not isDrilling and sharedConfig.smallBanks[i].isOpened and not sharedConfig.smallBanks[i].lockers[k].isOpened and not sharedConfig.smallBanks[i].lockers[k].isBusy then + lib.showTextUI(Lang:t('general.break_safe_open_option_drawtext'), {position = 'right-center'}) + currentLocker = k + end + end, + onExit = function() if currentLocker == k then currentLocker = 0 lib.hideTextUI() end - end - end) + end, + }) end end end diff --git a/client/pacific.lua b/client/pacific.lua index 4d89b52..0dc5b4b 100644 --- a/client/pacific.lua +++ b/client/pacific.lua @@ -119,132 +119,135 @@ end) -- Threads CreateThread(function() - local bankCardBZone = BoxZone:Create(pacificConfig.coords[1], 1.0, 1.0, { + local bankCardBZone = lib.zones.box({ name = 'pacific_coords_bankcardb', - heading = pacificConfig.heading.closed, - minZ = pacificConfig.coords[1].z - 1, - maxZ = pacificConfig.coords[1].z + 1, - debugPoly = false - }) - bankCardBZone:onPlayerInOut(function(inside) - inBankCardBZone = inside - if inside and not pacificConfig.isOpened then - -- Config.ShowRequiredItems({ - -- [1] = {name = exports.ox_inventory:Items().security_card_02.name, image = exports.ox_inventory:Items().security_card_02.image} - -- }, true) - else + coords = pacificConfig.coords[1], + size = vec3(1, 1, 2), + rotation = pacificConfig.heading.closed, + debug = false, + onEnter = function() + if not pacificConfig.isOpened then + -- Config.ShowRequiredItems({ + -- [1] = {name = exports.ox_inventory:Items().security_card_02.name, image = exports.ox_inventory:Items().security_card_02.image} + -- }, true) + end + end, + onExit = function() -- Config.ShowRequiredItems({ -- [1] = {name = exports.ox_inventory:Items().security_card_02.name, image = exports.ox_inventory:Items().security_card_02.image} -- }, false) - end - end) - local electronickitZone = BoxZone:Create(pacificConfig.coords[2], 1.0, 1.0, { - name = 'pacific_coords_electronickit', - heading = pacificConfig.heading.closed, - minZ = pacificConfig.coords[2].z - 1, - maxZ = pacificConfig.coords[2].z + 1, - debugPoly = false + end, }) - electronickitZone:onPlayerInOut(function(inside) - inElectronickitZone = inside - if inside and not pacificConfig.isOpened then - -- Config.ShowRequiredItems({ - -- [1] = {name = exports.ox_inventory:Items().electronickit.name, image = exports.ox_inventory:Items().electronickit.image}, - -- [2] = {name = exports.ox_inventory:Items().trojan_usb.name, image = exports.ox_inventory:Items().trojan_usb.image} - -- }, true) - else + local electronickitZone = lib.zones.box({ + name = 'pacific_coords_electronickit', + coords = pacificConfig.coords[2], + size = vec3(1, 1, 2), + rotation = pacificConfig.heading.closed, + debug = false, + onEnter = function() + if not pacificConfig.isOpened then + -- Config.ShowRequiredItems({ + -- [1] = {name = exports.ox_inventory:Items().electronickit.name, image = exports.ox_inventory:Items().electronickit.image}, + -- [2] = {name = exports.ox_inventory:Items().trojan_usb.name, image = exports.ox_inventory:Items().trojan_usb.image} + -- }, true) + end + end, + onExit = function() -- Config.ShowRequiredItems({ -- [1] = {name = exports.ox_inventory:Items().electronickit.name, image = exports.ox_inventory:Items().electronickit.image}, -- [2] = {name = exports.ox_inventory:Items().trojan_usb.name, image = exports.ox_inventory:Items().trojan_usb.image} -- }, false) - end - end) - local thermite1Zone = BoxZone:Create(pacificConfig.thermite[1].coords, 1.0, 1.0, { - name = 'pacific_coords_thermite_1', - heading = pacificConfig.heading.closed, - minZ = pacificConfig.thermite[1].coords.z - 1, - maxZ = pacificConfig.thermite[1].coords.z + 1, - debugPoly = false + end, }) - thermite1Zone:onPlayerInOut(function(inside) - if inside and not pacificConfig.thermite[1].isOpened then - currentThermiteGate = pacificConfig.thermite[1].doorId - -- Config.ShowRequiredItems({ - -- [1] = {name = exports.ox_inventory:Items().thermite.name, image = exports.ox_inventory:Items().thermite.image}, - -- }, true) - else + local thermite1Zone = lib.zones.box({ + name = 'pacific_coords_thermite_1', + coords = pacificConfig.thermite[1].coords, + size = vec3(1, 1, 2), + rotation = pacificConfig.heading.closed, + debug = false, + onEnter = function() + if not pacificConfig.thermite[1].isOpened then + currentThermiteGate = pacificConfig.thermite[1].doorId + -- Config.ShowRequiredItems({ + -- [1] = {name = exports.ox_inventory:Items().thermite.name, image = exports.ox_inventory:Items().thermite.image}, + -- }, true) + end + end, + onExit = function() if currentThermiteGate == pacificConfig.thermite[1].doorId then currentThermiteGate = 0 -- Config.ShowRequiredItems({ -- [1] = {name = exports.ox_inventory:Items().thermite.name, image = exports.ox_inventory:Items().thermite.image}, -- }, false) end - end - end) - local thermite2Zone = BoxZone:Create(pacificConfig.thermite[2].coords, 1.0, 1.0, { - name = 'pacific_coords_thermite_2', - heading = pacificConfig.heading.closed, - minZ = pacificConfig.thermite[2].coords.z - 1, - maxZ = pacificConfig.thermite[2].coords.z + 1, - debugPoly = false + end, }) - thermite2Zone:onPlayerInOut(function(inside) - if inside and not pacificConfig.thermite[2].isOpened then - currentThermiteGate = pacificConfig.thermite[2].doorId - -- Config.ShowRequiredItems({ - -- [1] = {name = exports.ox_inventory:Items().thermite.name, image = exports.ox_inventory:Items().thermite.image}, - -- }, true) - else + local thermite2Zone = lib.zones.box({ + name = 'pacific_coords_thermite_2', + coords = pacificConfig.thermite[2].coords, + size = vec3(1, 1, 2), + rotation = pacificConfig.heading.closed, + debug = false, + onEnter = function() + if not pacificConfig.thermite[2].isOpened then + currentThermiteGate = pacificConfig.thermite[2].doorId + -- Config.ShowRequiredItems({ + -- [1] = {name = exports.ox_inventory:Items().thermite.name, image = exports.ox_inventory:Items().thermite.image}, + -- }, true) + end + end, + onExit = function() if currentThermiteGate == pacificConfig.thermite[2].doorId then currentThermiteGate = 0 -- Config.ShowRequiredItems({ -- [1] = {name = exports.ox_inventory:Items().thermite.name, image = exports.ox_inventory:Items().thermite.image}, -- }, false) end - end - end) + end, + }) for k in pairs(pacificConfig.lockers) do if config.useTarget then - exports['qb-target']:AddBoxZone('pacific_coords_locker_'..k, pacificConfig.lockers[k].coords, 1.0, 1.0, { - name = 'pacific_coords_locker_'..k, - heading = pacificConfig.heading.closed, - minZ = pacificConfig.lockers[k].coords.z - 1, - maxZ = pacificConfig.lockers[k].coords.z + 1, - debugPoly = false - }, { + exports.ox_target:addBoxZone({ + coords = pacificConfig.lockers[k].coords, + size = vec3(1, 1, 2), + rotation = pacificConfig.heading.closed, + debug = false, + drawSprite = true, options = { { - action = function() - openLocker('pacific', k) - end, + label = Lang:t('general.break_safe_open_option_target'), + name = 'pacific_coords_locker_'..k, + icon = 'fa-solid fa-vault', + distance = 1.5, canInteract = function() return not isDrilling and pacificConfig.isOpened and not pacificConfig.lockers[k].isBusy and not pacificConfig.lockers[k].isOpened end, - icon = 'fa-solid fa-vault', - label = Lang:t('general.break_safe_open_option_target'), + onSelect = function() + openLocker('pacific', k) + end, }, }, - distance = 1.5 }) else - local lockerZone = BoxZone:Create(pacificConfig.lockers[k].coords, 1.0, 1.0, { + local lockerZone = lib.zones.box({ name = 'pacific_coords_locker_'..k, - heading = pacificConfig.heading.closed, - minZ = pacificConfig.lockers[k].coords.z - 1, - maxZ = pacificConfig.lockers[k].coords.z + 1, - debugPoly = false - }) - lockerZone:onPlayerInOut(function(inside) - if inside and not isDrilling and pacificConfig.isOpened and not pacificConfig.lockers[k].isBusy and not pacificConfig.lockers[k].isOpened then - exports['qbx-core']:DrawText(Lang:t('general.break_safe_open_option_drawtext'), 'right') - currentLocker = k - else + coords = pacificConfig.lockers[k].coords, + size = vec3(1, 1, 2), + rotation = pacificConfig.heading.closed, + debug = false, + onEnter = function() + if not isDrilling and pacificConfig.isOpened and not pacificConfig.lockers[k].isBusy and not pacificConfig.lockers[k].isOpened then + lib.showTextUI(Lang:t('general.break_safe_open_option_drawtext'), {position = 'right-center'}) + currentLocker = k + end + end, + onExit = function() if currentLocker == k then currentLocker = 0 - exports['qbx-core']:HideText() + lib.hideTextUI() end - end - end) + end, + }) end end if not config.useTarget then @@ -254,9 +257,9 @@ CreateThread(function() if currentLocker ~= 0 and not isDrilling and pacificConfig.isOpened and not pacificConfig.lockers[currentLocker].isBusy and not pacificConfig.lockers[currentLocker].isOpened then sleep = 0 if IsControlJustPressed(0, 38) then - exports['qbx-core']:KeyPressed() + exports.qbx_core:KeyPressed() Wait(500) - exports['qbx-core']:HideText() + lib.hideTextUI() if CurrentCops >= config.minPacificPolice then openLocker('pacific', currentLocker) else diff --git a/client/paleto.lua b/client/paleto.lua index baf30bc..83bf517 100644 --- a/client/paleto.lua +++ b/client/paleto.lua @@ -54,89 +54,91 @@ end) -- Threads CreateThread(function() - local bankCardAZone = BoxZone:Create(paletoConfig.coords, 1.0, 1.0, { + local bankCardAZone = lib.zones.box({ name = 'paleto_coords_bankcarda', - heading = paletoConfig.heading.closed, - minZ = paletoConfig.coords.z - 1, - maxZ = paletoConfig.coords.z + 1, - debugPoly = false - }) - bankCardAZone:onPlayerInOut(function(inside) - inBankCardAZone = inside - if inside and not paletoConfig.isOpened then - -- Config.ShowRequiredItems({ - -- [1] = {name = exports.ox_inventory:Items().security_card_01.name, image = exports.ox_inventory:Items().security_card_01.image} - -- }, true) - else + coords = paletoConfig.coords, + size = vec3(1, 1, 2), + rotation = paletoConfig.heading.closed, + debug = false, + onEnter = function() + if not paletoConfig.isOpened then + -- Config.ShowRequiredItems({ + -- [1] = {name = exports.ox_inventory:Items().security_card_01.name, image = exports.ox_inventory:Items().security_card_01.image} + -- }, true) + end + end, + onExit = function() -- Config.ShowRequiredItems({ -- [1] = {name = exports.ox_inventory:Items().security_card_01.name, image = exports.ox_inventory:Items().security_card_01.image} -- }, false) - end - end) - local thermite1Zone = BoxZone:Create(paletoConfig.thermite[1].coords, 1.0, 1.0, { - name = 'paleto_coords_thermite_1', - heading = paletoConfig.heading.closed, - minZ = paletoConfig.thermite[1].coords.z - 1, - maxZ = paletoConfig.thermite[1].coords.z + 1, - debugPoly = false + end, }) - thermite1Zone:onPlayerInOut(function(inside) - if inside and not paletoConfig.thermite[1].isOpened then - currentThermiteGate = paletoConfig.thermite[1].doorId - -- Config.ShowRequiredItems({ - -- [1] = {name = exports.ox_inventory:Items().thermite.name, image = exports.ox_inventory:Items().thermite.image}, - -- }, true) - else + local thermite1Zone = lib.zones.box({ + name = 'paleto_coords_thermite_1', + coords = paletoConfig.thermite[1].coords, + size = vec3(1, 1, 2), + rotation = paletoConfig.heading.closed, + debug = false, + onEnter = function() + if not paletoConfig.thermite[1].isOpened then + currentThermiteGate = paletoConfig.thermite[1].doorId + -- Config.ShowRequiredItems({ + -- [1] = {name = exports.ox_inventory:Items().thermite.name, image = exports.ox_inventory:Items().thermite.image}, + -- }, true) + end + end, + onExit = function() if currentThermiteGate == paletoConfig.thermite[1].doorId then currentThermiteGate = 0 -- Config.ShowRequiredItems({ -- [1] = {name = exports.ox_inventory:Items().thermite.name, image = exports.ox_inventory:Items().thermite.image}, -- }, false) end - end - end) + end, + }) for k in pairs(paletoConfig.lockers) do if config.useTarget then - exports['qb-target']:AddBoxZone('paleto_coords_locker_'..k, paletoConfig.lockers[k].coords, 1.0, 1.0, { - name = 'paleto_coords_locker_'..k, - heading = paletoConfig.heading.closed, - minZ = paletoConfig.lockers[k].coords.z - 1, - maxZ = paletoConfig.lockers[k].coords.z + 1, - debugPoly = false - }, { + exports.ox_target:addBoxZone({ + coords = paletoConfig.lockers[k].coords, + size = vec3(1, 1, 2), + rotationg = paletoConfig.heading.closed, + debug = false, + drawSprite = true, options = { { - action = function() - openLocker('paleto', k) - end, + label = Lang:t('general.break_safe_open_option_target'), + name = 'paleto_coords_locker_'..k, + icon = 'fa-solid fa-vault', + distance = 1.5, canInteract = function() return not isDrilling and paletoConfig.isOpened and not paletoConfig.lockers[k].isBusy and not paletoConfig.lockers[k].isopened end, - icon = 'fa-solid fa-vault', - label = Lang:t('general.break_safe_open_option_target'), + onSlect = function() + openLocker('paleto', k) + end, }, }, - distance = 1.5 }) else - local lockerZone = BoxZone:Create(paletoConfig.lockers[k].coords, 1.0, 1.0, { + local lockerZone = lib.zones.box({ name = 'paleto_coords_locker_'..k, - heading = paletoConfig.heading.closed, - minZ = paletoConfig.lockers[k].coords.z - 1, - maxZ = paletoConfig.lockers[k].coords.z + 1, - debugPoly = false - }) - lockerZone:onPlayerInOut(function(inside) - if inside and not isDrilling and paletoConfig.isOpened and not paletoConfig.lockers[k].isBusy and not paletoConfig.lockers[k].isopened then - exports['qbx-core']:DrawText(Lang:t('general.break_safe_open_option_drawtext'), 'right') - currentLocker = k - else + coords = paletoConfig.lockers[k].coords, + size = vec3(1, 1, 2), + rotation = paletoConfig.heading.closed, + debug = false, + onEnter = function() + if not isDrilling and paletoConfig.isOpened and not paletoConfig.lockers[k].isBusy and not paletoConfig.lockers[k].isopened then + lib.showTextUI(Lang:t('general.break_safe_open_option_drawtext'), {position = 'right-center'}) + currentLocker = k + end + end, + onExit = function() if currentLocker == k then currentLocker = 0 - exports['qbx-core']:HideText() + lib.hideTextUI() end - end - end) + end, + }) end end if not config.useTarget then @@ -146,9 +148,9 @@ CreateThread(function() if currentLocker ~= 0 and not isDrilling and paletoConfig.isOpened and not paletoConfig.lockers[currentLocker].isBusy and not paletoConfig.lockers[currentLocker].isOpened then sleep = 0 if IsControlJustPressed(0, 38) then - exports['qbx-core']:KeyPressed() + exports.qbx_core:KeyPressed() Wait(500) - exports['qbx-core']:HideText() + lib.hideTextUI() if CurrentCops >= config.minPaletoPolice then openLocker('paleto', currentLocker) else diff --git a/client/powerstation.lua b/client/powerstation.lua index a63619e..2046142 100644 --- a/client/powerstation.lua +++ b/client/powerstation.lua @@ -133,23 +133,24 @@ end) CreateThread(function() for k = 1, #powerStationConfig do - local stationZone = BoxZone:Create(powerStationConfig[k].coords, 1.0, 1.0, { + local stationZone = lib.zones.box({ name = 'powerstation_coords_'..k, - heading = 90.0, - minZ = powerStationConfig[k].coords.z - 1, - maxZ = powerStationConfig[k].coords.z + 1, - debugPoly = false - }) - stationZone:onPlayerInOut(function(inside) - if inside and not powerStationConfig[k].hit then - closestStation = k - -- Config.ShowRequiredItems(requiredItems, true) - else + coords = powerStationConfig[k].coords, + size = vec3(1, 1, 2), + rotation = 75.0, + debug = false, + onEnter = function() + if not powerStationConfig[k].hit then + closestStation = k + -- Config.ShowRequiredItems(requiredItems, true) + end + end, + onExit = function() if closestStation == k then closestStation = 0 -- Config.ShowRequiredItems(requiredItems, false) end - end - end) + end, + }) end end) diff --git a/fxmanifest.lua b/fxmanifest.lua index e5fcffc..4e78b04 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -17,8 +17,6 @@ shared_scripts { client_scripts { '@qbx_core/modules/playerdata.lua', - '@PolyZone/client.lua', - '@PolyZone/BoxZone.lua', 'client/fleeca.lua', 'client/pacific.lua', 'client/powerstation.lua', @@ -36,7 +34,5 @@ files { 'html/*', } -dependency 'PolyZone' - lua54 'yes' use_experimental_fxv2_oal 'yes' From 557ae2da39bc0621cdc0db5c0941caedf59cb784 Mon Sep 17 00:00:00 2001 From: Molicheu <64894726+Molicheu@users.noreply.github.com> Date: Wed, 20 Dec 2023 21:09:54 -0500 Subject: [PATCH 2/3] Fixed linting issues --- client/fleeca.lua | 4 ++-- client/pacific.lua | 10 +++++----- client/paleto.lua | 6 +++--- client/powerstation.lua | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/client/fleeca.lua b/client/fleeca.lua index 5c31f31..c43e174 100644 --- a/client/fleeca.lua +++ b/client/fleeca.lua @@ -451,7 +451,7 @@ end) CreateThread(function() for i = 1, #sharedConfig.smallBanks do - local bankZone = lib.zones.box({ + lib.zones.box({ name = 'fleeca_'..i..'_coords_electronickit', coords = sharedConfig.smallBanks[i].coords, size = vec3(1, 1, 2), @@ -482,7 +482,7 @@ CreateThread(function() }, }) else - local lockerZone = lib.zones.box({ + lib.zones.box({ name = 'fleeca_'..i..'_coords_locker_'..k, coords = sharedConfig.smallBanks[i].lockers[k].coords, size = vec3(1, 1, 2), diff --git a/client/pacific.lua b/client/pacific.lua index 0dc5b4b..0e505f6 100644 --- a/client/pacific.lua +++ b/client/pacific.lua @@ -119,7 +119,7 @@ end) -- Threads CreateThread(function() - local bankCardBZone = lib.zones.box({ + lib.zones.box({ name = 'pacific_coords_bankcardb', coords = pacificConfig.coords[1], size = vec3(1, 1, 2), @@ -138,7 +138,7 @@ CreateThread(function() -- }, false) end, }) - local electronickitZone = lib.zones.box({ + lib.zones.box({ name = 'pacific_coords_electronickit', coords = pacificConfig.coords[2], size = vec3(1, 1, 2), @@ -159,7 +159,7 @@ CreateThread(function() -- }, false) end, }) - local thermite1Zone = lib.zones.box({ + lib.zones.box({ name = 'pacific_coords_thermite_1', coords = pacificConfig.thermite[1].coords, size = vec3(1, 1, 2), @@ -182,7 +182,7 @@ CreateThread(function() end end, }) - local thermite2Zone = lib.zones.box({ + lib.zones.box({ name = 'pacific_coords_thermite_2', coords = pacificConfig.thermite[2].coords, size = vec3(1, 1, 2), @@ -229,7 +229,7 @@ CreateThread(function() }, }) else - local lockerZone = lib.zones.box({ + lib.zones.box({ name = 'pacific_coords_locker_'..k, coords = pacificConfig.lockers[k].coords, size = vec3(1, 1, 2), diff --git a/client/paleto.lua b/client/paleto.lua index 83bf517..2726ed9 100644 --- a/client/paleto.lua +++ b/client/paleto.lua @@ -54,7 +54,7 @@ end) -- Threads CreateThread(function() - local bankCardAZone = lib.zones.box({ + lib.zones.box({ name = 'paleto_coords_bankcarda', coords = paletoConfig.coords, size = vec3(1, 1, 2), @@ -73,7 +73,7 @@ CreateThread(function() -- }, false) end, }) - local thermite1Zone = lib.zones.box({ + lib.zones.box({ name = 'paleto_coords_thermite_1', coords = paletoConfig.thermite[1].coords, size = vec3(1, 1, 2), @@ -120,7 +120,7 @@ CreateThread(function() }, }) else - local lockerZone = lib.zones.box({ + lib.zones.box({ name = 'paleto_coords_locker_'..k, coords = paletoConfig.lockers[k].coords, size = vec3(1, 1, 2), diff --git a/client/powerstation.lua b/client/powerstation.lua index 2046142..6a2664f 100644 --- a/client/powerstation.lua +++ b/client/powerstation.lua @@ -133,7 +133,7 @@ end) CreateThread(function() for k = 1, #powerStationConfig do - local stationZone = lib.zones.box({ + lib.zones.box({ name = 'powerstation_coords_'..k, coords = powerStationConfig[k].coords, size = vec3(1, 1, 2), From da391dcfb3f0a78a9d63b19c3d2a9cfb8288c61a Mon Sep 17 00:00:00 2001 From: Molicheu <64894726+Molicheu@users.noreply.github.com> Date: Wed, 20 Dec 2023 21:12:30 -0500 Subject: [PATCH 3/3] Fixed remaining lint errors --- client/pacific.lua | 26 -------------------------- client/paleto.lua | 12 ------------ 2 files changed, 38 deletions(-) diff --git a/client/pacific.lua b/client/pacific.lua index 0e505f6..86c3978 100644 --- a/client/pacific.lua +++ b/client/pacific.lua @@ -125,18 +125,6 @@ CreateThread(function() size = vec3(1, 1, 2), rotation = pacificConfig.heading.closed, debug = false, - onEnter = function() - if not pacificConfig.isOpened then - -- Config.ShowRequiredItems({ - -- [1] = {name = exports.ox_inventory:Items().security_card_02.name, image = exports.ox_inventory:Items().security_card_02.image} - -- }, true) - end - end, - onExit = function() - -- Config.ShowRequiredItems({ - -- [1] = {name = exports.ox_inventory:Items().security_card_02.name, image = exports.ox_inventory:Items().security_card_02.image} - -- }, false) - end, }) lib.zones.box({ name = 'pacific_coords_electronickit', @@ -144,20 +132,6 @@ CreateThread(function() size = vec3(1, 1, 2), rotation = pacificConfig.heading.closed, debug = false, - onEnter = function() - if not pacificConfig.isOpened then - -- Config.ShowRequiredItems({ - -- [1] = {name = exports.ox_inventory:Items().electronickit.name, image = exports.ox_inventory:Items().electronickit.image}, - -- [2] = {name = exports.ox_inventory:Items().trojan_usb.name, image = exports.ox_inventory:Items().trojan_usb.image} - -- }, true) - end - end, - onExit = function() - -- Config.ShowRequiredItems({ - -- [1] = {name = exports.ox_inventory:Items().electronickit.name, image = exports.ox_inventory:Items().electronickit.image}, - -- [2] = {name = exports.ox_inventory:Items().trojan_usb.name, image = exports.ox_inventory:Items().trojan_usb.image} - -- }, false) - end, }) lib.zones.box({ name = 'pacific_coords_thermite_1', diff --git a/client/paleto.lua b/client/paleto.lua index 2726ed9..d556cf2 100644 --- a/client/paleto.lua +++ b/client/paleto.lua @@ -60,18 +60,6 @@ CreateThread(function() size = vec3(1, 1, 2), rotation = paletoConfig.heading.closed, debug = false, - onEnter = function() - if not paletoConfig.isOpened then - -- Config.ShowRequiredItems({ - -- [1] = {name = exports.ox_inventory:Items().security_card_01.name, image = exports.ox_inventory:Items().security_card_01.image} - -- }, true) - end - end, - onExit = function() - -- Config.ShowRequiredItems({ - -- [1] = {name = exports.ox_inventory:Items().security_card_01.name, image = exports.ox_inventory:Items().security_card_01.image} - -- }, false) - end, }) lib.zones.box({ name = 'paleto_coords_thermite_1',