Remove cache and batch event libraries, update locales
Deleted the cache and batch event libraries from the codebase, including all related client, server, and shared files. Removed server-side particle library and associated client event handlers. Updated utility and clothing modules to remove cache dependencies. Improved utility logging and deprecated point functions with notices. Updated all locales to use a consistent 'PurchasedItem' message format and added Bulgarian (bg) translation. Bumped version to 0.13.1 in fxmanifest.
This commit is contained in:
1 parent
5fd0744ca5
commit
48f8122197
76 files changed
+488
-875
No files matched your search
@@ -92,32 +92,6 @@ function Particle.Stop(particle)
|
||||
Particles[tostring(particle)] = nil
|
||||
end
|
||||
|
||||
RegisterNetEvent("community_bridge:Client:Particle", function(data)
|
||||
if not data then return end
|
||||
Particle.Create(data)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("community_bridge:Client:ParticleBulk", function(datas)
|
||||
if not datas then return end
|
||||
for _, data in pairs(datas) do
|
||||
Particle.Create(data)
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent("community_bridge:Client:ParticleRemove", function(id)
|
||||
local particle = Particles[id]
|
||||
if not particle then return end
|
||||
Particle.Stop(id)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("community_bridge:Client:ParticleRemoveBulk", function(ids)
|
||||
for _, id in pairs(ids) do
|
||||
Particle.Stop(id)
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
|
||||
function Particle.CreateOnEntity(dict, ptfx, entity, offset, rot, scale, color, looped, loopLength)
|
||||
LoadPtfxAsset(dict)
|
||||
UseParticleFxAssetNextCall(dict)
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
---@diagnostic disable: duplicate-set-field
|
||||
|
||||
Particles = {}
|
||||
Particle = Particles or {}
|
||||
|
||||
function Particle.New(data)
|
||||
assert(data, "Particle data is nil")
|
||||
assert(data.dict, "Invalid particle data. Must contain string dict.")
|
||||
assert(data.ptfx, "Invalid particle data. Must contain string ptfx.")
|
||||
|
||||
local _id = data.id or Bridge.Ids.CreateUniqueId(Particles)
|
||||
data = {
|
||||
id = _id,
|
||||
dict = data.dict,
|
||||
ptfx = data.ptfx,
|
||||
position = data.position or vector3(0.0, 0.0, 0.0),
|
||||
rotation = data.rotation or vector3(0, 0, 0),
|
||||
size = data.size or 1.0,
|
||||
color = data.color or vector3(255, 255, 255),
|
||||
looped = data.looped or false,
|
||||
loopLength = data.loopLength or nil,
|
||||
}
|
||||
Particles[_id] = data
|
||||
return data
|
||||
end
|
||||
|
||||
function Particle.Destroy(id)
|
||||
if not id or not Particles[id] then return end
|
||||
Particles[id] = nil
|
||||
return true
|
||||
end
|
||||
|
||||
function Particle.Create(data)
|
||||
local particleData = Particle.New(data)
|
||||
if not particleData then return end
|
||||
TriggerClientEvent("community_bridge:Client:Particle", -1, particleData)
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
function Particle.Remove(id)
|
||||
if not Particle.Destroy(id) then return end
|
||||
TriggerClientEvent("community_bridge:Client:ParticleRemove", -1, id)
|
||||
end
|
||||
|
||||
function Particle.CreateBulk(datas)
|
||||
if not datas then return end
|
||||
local toClient = {}
|
||||
for k, v in pairs(datas) do
|
||||
local data = Particle.New(v)
|
||||
table.insert(toClient, data)
|
||||
end
|
||||
TriggerClientEvent("community_bridge:Client:ParticleBulk", -1, toClient)
|
||||
return toClient
|
||||
end
|
||||
|
||||
function Particle.RemoveBulk(ids)
|
||||
if not ids then return end
|
||||
local toClient = {}
|
||||
for k, v in pairs(ids) do
|
||||
local id = v
|
||||
if type(v) == "table" then
|
||||
id = v.id
|
||||
end
|
||||
Particle.Destroy(id)
|
||||
table.insert(toClient, id)
|
||||
end
|
||||
TriggerClientEvent("community_bridge:Client:ParticleRemoveBulk", -1, toClient)
|
||||
return ids
|
||||
end
|
||||
|
||||
return Particle
|
||||
Reference in new issue
Block a user