From acc885bb6f310631a50484a5b93021452fdbceac Mon Sep 17 00:00:00 2001 From: Solareon <769465+solareon@users.noreply.github.com> Date: Mon, 19 Aug 2024 12:04:22 +0200 Subject: [PATCH] refactor!: move shared to data --- bridge/qb/server/main.lua | 2 +- client/groups.lua | 4 ++-- {shared => data}/gangs.lua | 0 {shared => data}/items.lua | 0 {shared => data}/jobs.lua | 0 {shared => data}/locations.lua | 0 {shared => data}/vehicles.lua | 0 {shared => data}/weapons.lua | 0 fxmanifest.lua | 7 +------ server/groups.lua | 4 ++-- shared/main.lua | 6 +++--- 11 files changed, 9 insertions(+), 14 deletions(-) rename {shared => data}/gangs.lua (100%) rename {shared => data}/items.lua (100%) rename {shared => data}/jobs.lua (100%) rename {shared => data}/locations.lua (100%) rename {shared => data}/vehicles.lua (100%) rename {shared => data}/weapons.lua (100%) diff --git a/bridge/qb/server/main.lua b/bridge/qb/server/main.lua index 667221d9c..fa2153288 100644 --- a/bridge/qb/server/main.lua +++ b/bridge/qb/server/main.lua @@ -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 = {} diff --git a/client/groups.lua b/client/groups.lua index 47f83630f..718d4d60e 100644 --- a/client/groups.lua +++ b/client/groups.lua @@ -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 function GetJobs() diff --git a/shared/gangs.lua b/data/gangs.lua similarity index 100% rename from shared/gangs.lua rename to data/gangs.lua diff --git a/shared/items.lua b/data/items.lua similarity index 100% rename from shared/items.lua rename to data/items.lua diff --git a/shared/jobs.lua b/data/jobs.lua similarity index 100% rename from shared/jobs.lua rename to data/jobs.lua diff --git a/shared/locations.lua b/data/locations.lua similarity index 100% rename from shared/locations.lua rename to data/locations.lua diff --git a/shared/vehicles.lua b/data/vehicles.lua similarity index 100% rename from shared/vehicles.lua rename to data/vehicles.lua diff --git a/shared/weapons.lua b/data/weapons.lua similarity index 100% rename from shared/weapons.lua rename to data/weapons.lua diff --git a/fxmanifest.lua b/fxmanifest.lua index 0c22261e4..f9f0daa53 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -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', diff --git a/server/groups.lua b/server/groups.lua index dd7c1a3d6..25f6f7f47 100644 --- a/server/groups.lua +++ b/server/groups.lua @@ -5,10 +5,10 @@ GroupType = { } ---@type table -local jobs = require 'shared.jobs' +local jobs = require 'data.jobs' ---@type table -local gangs = require 'shared.gangs' +local gangs = require 'data.gangs' ---Adds or overwrites jobs in shared/jobs.lua ---@param newJobs table diff --git a/shared/main.lua b/shared/main.lua index 36ab01198..b3195195f 100644 --- a/shared/main.lua +++ b/shared/main.lua @@ -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 qbShared.VehicleHashes = {}