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

+6 -19
View File
@@ -1,5 +1,4 @@
local GRIDE_SIZE_X = 8968.83
local GRIDE_SIZE_X = 8968.83
local GRIDE_SIZE_Y = 126200.40
local CELL_SIZE = 500
@@ -48,23 +47,11 @@ function Point.StartLoop()
local coords = GetEntityCoords(playerPed)
local cell = Grid.GetCellByCoords(coords)
for _, point in pairs(cell or {}) do
if point.isEntity then
local entity = point.target
if DoesEntityExist(entity) then
local entityCoords = GetEntityCoords(entity)
local distance = #(coords - entityCoords)
if distance < point.distance then
if not point.inside then
point.inside = true
point.args = point?.onEnter(point, point.args) or point.args
end
elseif point.inside then
point.inside = false
point.args = point?.onExit(point, point.args) or point.args
end
end
else
local distance = #(vector3(coords.x, coords.y, coords.z) - vector3(point.coords.x, point.coords.y, point.coords.z))
local entity = point.target
local targetCoords = point.isEntity and DoesEntityExist(entity) and GetEntityCoords(entity) or point.coords
if not point.disable and targetCoords then
targetCoords = vector3(targetCoords.x, targetCoords.y, targetCoords.z)
local distance = #(coords - targetCoords)
if distance < point.distance then
if not point.inside then
point.inside = true