Skip to content

v3.42.0

Latest

Choose a tag to compare

@github-actions github-actions released this 01 Nov 10:56
· 2 commits to main since this release

Docs will be coming for new features at some point, but I'm not in the mood to work on that right now. Some snippets and explanations below.

Firstly, cfxlua-require was updated to resolve a bug that affected FiveM Enhanced -- some other minor changes were made too. v1.0.2 is now the minimum requirement to run ox_lib, enforced using the new SemVer module. See fxmanifest.lua for how that's configured.

I finally went ahead and made the new logger module that's been mentioned off-and-on for years now. Basically just making the API less of a nightmare and standardising how providers are added. For now only supports Fivemanage; feel free to PR more providers if I don't get around to it myself. I assume VictoriaLogs will be available soon, and both DataDog and Loki are of course planned.

I've converted the GameEntity classes over from the imports system and made minor changes to the API which will need to be reflected in the docs soon. Aside from that, I went ahead and added a helper method for listening to statebag changes for Players.

-- client.lua
local Player = require 'Ox.Game.Player'

Player.on('test', function(player, key, value, old)
    print('triggered player state change handler', key, value, old)
    print(json.encode(player:keys()))
end)

-- server.lua
local Player = require 'Ox.Game.Player'
local player = Player:new(-1) -- gets the first available player
player:setr('test', math.random())

Features

  • SemVer: semantic versioning module (Linden)
  • resource dependency version constraints (Linden)
  • GameEntity: migrate to modules (Linden)
  • logger: implement new logger module (Linden)
  • logger: log levels and helper functions (Linden)
  • logger: attach player data to logs (Linden)
  • logger: ts package (Linden)
  • Player: add static method to handle state changes (Linden)

Bug Fixes

  • callback: ensure key cleanup on timeout (Linden)
  • web: explicit type configuration (Linden)
  • resource/init: invalid assignment (Linden)
  • init: load require after cache assignment (Linden)
  • re-add require as standard dependency (Linden)
  • types: make input dialog options optional (#823) #823 (Breeze)
  • types: preserve radial icon strictness (#824) #824 (Breeze)

Code Refactoring

  • require: simplify pattern matching (Linden)
  • resource/init: minor tidy-up to hasLoaded handling (Linden)
  • init: default loadStatus message (Linden)
  • dependencies: include resource url in error message (Linden)
  • logger: tweaks to provider spec and error handling (Linden)
  • logger: types (Linden)

Continuous Integration

  • release: exclude .git from cfxlua-require package (Linden)

Chores

  • disable diagnostics on deprecated imports (Linden)