Skip to content

Commit

Permalink
refactor!: move shared to data
Browse files Browse the repository at this point in the history
  • Loading branch information
solareon committed Aug 19, 2024
1 parent 81390de commit acc885b
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion bridge/qb/server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require 'bridge.qb.server.debug'
require 'bridge.qb.server.events'

local convertItems = require 'bridge.qb.shared.compat'.convertItems
convertItems(require '@ox_inventory.data.items', require 'shared.items')
convertItems(require '@ox_inventory.data.items', require 'data.items')

qbCoreCompat = {}

Expand Down
4 changes: 2 additions & 2 deletions client/groups.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
local jobs = require 'shared.jobs'
local gangs = require 'shared.gangs'
local jobs = require 'data.jobs'
local gangs = require 'data.gangs'

---@return table<string, Job>
function GetJobs()
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 1 addition & 6 deletions fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,8 @@ server_scripts {

files {
'modules/*.lua',
'shared/gangs.lua',
'shared/items.lua',
'shared/jobs.lua',
'shared/locations.lua',
'data/*.lua',
'shared/main.lua',
'shared/vehicles.lua',
'shared/weapons.lua',
'bridge/qb/client/functions.lua',
'bridge/qb/client/drawtext.lua',
'bridge/qb/client/events.lua',
Expand Down
4 changes: 2 additions & 2 deletions server/groups.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ GroupType = {
}

---@type table<string, Job>
local jobs = require 'shared.jobs'
local jobs = require 'data.jobs'

---@type table<string, Gang>
local gangs = require 'shared.gangs'
local gangs = require 'data.gangs'

---Adds or overwrites jobs in shared/jobs.lua
---@param newJobs table<string, Job>
Expand Down
6 changes: 3 additions & 3 deletions shared/main.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
local qbShared = {}
qbShared.ForceJobDefaultDutyAtLogin = true -- true: Force duty state to jobdefaultDuty | false: set duty state from database last saved
qbShared.Locations = require 'shared.locations'
qbShared.Vehicles = require 'shared.vehicles'
qbShared.Weapons = require 'shared.weapons'
qbShared.Locations = require 'data.locations'
qbShared.Vehicles = require 'data.vehicles'
qbShared.Weapons = require 'data.weapons'

---@type table<number, Vehicle>
qbShared.VehicleHashes = {}
Expand Down

0 comments on commit acc885b

Please sign in to comment.