This was crowleys commit and work - Refactor entity behaviors and improve particle handling

Refactored entity behavior triggers to simplify argument passing and added OnSet handler for particle behaviors. Improved particle effect management and event handling, updated locale and lib initialization in several modules, and fixed skill metadata access. Also streamlined point zone logic and menu/zone system initialization for better reliability.
This commit is contained in:
MrNewb committed 2025-10-26 16:20:27 -04:00
1 parent 179c3bad85
commit 444040dd39
13 files changed
+71 -64

No files matched your search

+4 -7
View File
@@ -1,9 +1,8 @@
Particles = {}
Particle = {}
---@diagnostic disable: duplicate-set-field
Ids = Ids or Require("lib/utility/shared/ids.lua")
local point = Require("lib/points/client/points.lua")
---Loads a ptfx asset into memory.
---@param dict string
---@return boolean
@@ -26,7 +25,7 @@ end
--- @param scale number
--- @param color vector3
--- @param looped boolean
--- @param loopLength number|nil
--- @param removeAfter number|nil
--- @return number|nil ptfxHandle -- The handle of the particle effect, or nil if it failed to create.
function Particle.Play(dict, ptfx, pos, rot, scale, color, looped, removeAfter)
LoadPtfxAsset(dict)
@@ -93,8 +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)
@@ -110,12 +107,12 @@ end)
RegisterNetEvent("community_bridge:Client:ParticleRemove", function(id)
local particle = Particles[id]
if not particle then return end
Particle.Remove(Drawing[id])
Particle.Stop(id)
end)
RegisterNetEvent("community_bridge:Client:ParticleRemoveBulk", function(ids)
for _, id in pairs(ids) do
Particle.Remove(id)
Particle.Stop(id)
end
end)