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:
MrNewb committed 2025-12-23 19:27:27 -05:00
1 parent 5fd0744ca5
commit 48f8122197
76 files changed
+488 -875

No files matched your search

+8 -12
View File
@@ -1,11 +1,8 @@
--[[This module is incomplete]]--
Dialogue = {}
local promises = {}
local activeDialogue = nil
local pendingCameraDestroy = false
Dialogue = {}
local cam = nil
local npc = nil
@@ -25,7 +22,7 @@ function Dialogue.Close(name)
Wait(200) -- Small delay to allow new dialogue to open
if pendingCameraDestroy and not activeDialogue then
-- No new dialogue opened, safe to destroy camera
RenderScriptCams(false, 1, 1000, 1, 0)
RenderScriptCams(false, true, 1000, true, false)
SetCamActive(cam, false)
DestroyCam(cam, false)
cam = nil
@@ -38,7 +35,10 @@ end
--- Open a dialogue with the player
---@param name string
---@param dialogue string
---@param options table example = {{ id = string, label = string}}
---@param characterOptions number|table entity or entity and offset/rotationOffset
---@param dialogueOptions table
---@param onSelected function
---@return any
function Dialogue.Open( name, dialogue, characterOptions, dialogueOptions, onSelected)
assert(name, "Name is required")
assert(dialogue, "Dialogue is required")
@@ -53,14 +53,12 @@ function Dialogue.Open( name, dialogue, characterOptions, dialogueOptions, onSel
pendingCameraDestroy = false
activeDialogue = name
-- camera magic!
if entity then
Wait(500)
local endLocation = GetOffsetFromEntityInWorldCoords(entity, offset.x, offset.y + 2.0, offset.z)
local pedHeading = GetEntityHeading(entity)
-- Get position in front of ped based on their heading
local pedHeading = GetEntityHeading(entity) -- Get position in front of ped based on their heading
if not cam then cam = CreateCam("DEFAULT_SCRIPTED_CAMERA", 1) end
if not cam then cam = CreateCam("DEFAULT_SCRIPTED_CAMERA", true) end
local camAngle = (pedHeading + 180.0) % 360.0
SetCamRot(cam, rotationOffset.x, rotationOffset.y, camAngle + rotationOffset.z, 2)
SetCamCoord(cam, endLocation.x, endLocation.y, endLocation.z)
@@ -75,7 +73,6 @@ function Dialogue.Open( name, dialogue, characterOptions, dialogueOptions, onSel
})
SetNuiFocus(true, true)
local prom = promise.new()
local wrappedFunction = function(selected)
SetNuiFocus(false, false)
@@ -87,7 +84,6 @@ function Dialogue.Open( name, dialogue, characterOptions, dialogueOptions, onSel
return Citizen.Await(prom)
end
RegisterNuiCallback("dialogue:SelectOption", function(data)
local promis = promises[data.name]
if not promis then return end