Commit Graph
100 Commits
Author SHA1 Message Date
Linden 51646698e1 fix(package/locale): initialise by default 2024-01-14 00:14:04 +11:00
Linden c9bc66e75b chore(package): ignore .ts from distribution 2024-01-14 00:13:42 +11:00
Linden 989b164d0e fix(package): maybe resolve some bundling issues 2024-01-09 14:41:42 +11:00
Linden 1d449d407d chore(class): remove sample code 2023-12-24 16:12:59 +11:00
Linden be55ef8d85 feat(string): string module
See ignored review from PR #469.
2023-12-20 08:26:33 +11:00
Linden dc0720a39e refactor(class): syntax and method changes
Remove .new field when creating a new class.
Remove setMetamethod.
Support super inheritance.
2023-12-19 14:32:36 +11:00
Linden 0c2f0ec68e fix(require): chunk name and error path for load/loadjson 2023-12-19 09:04:29 +11:00
Linden 8a5232c056 refactor(class): type checking 2023-12-18 11:21:28 +11:00
Linden 955acabd3c feat(class): basic class implementation
wip, feedback appreciated.
2023-12-18 00:15:17 +11:00
Linden 5657b5f924 feat(math): math.hextorgb
Resolves #467.
2023-12-11 07:43:32 +11:00
Linden fdbf0ac114 refactor(cron): refresh currentDate after 1s
May help with rare task failure on startup (#457).
2023-12-10 10:09:21 +11:00
Linden 80a2a7c39d feat(locale): add lib.getLocale for sharing locales between resources 2023-12-09 19:28:01 +11:00
Linden 048edfa86f feat(require): add load/loadjson functions 2023-12-07 18:24:14 +11:00
Linden aebe248e39 refactor: localise globals to prevent shadowing
See #456.
2023-12-07 08:36:40 +11:00
Linden 167a068d85 feat(server/cron): getTimeAsString 2023-10-23 16:50:57 +11:00
Linden 2a1d6aa2ae refactor(server/cron): run jobs in a new thread
Better for error handling.
2023-10-23 16:50:29 +11:00
Linden 699884aa17 feat(require): external module support for require (#422) 2023-09-19 20:25:17 +10:00
Linden 02d935237d fix(client/callback): mark delay as optional 2023-09-16 22:11:23 +10:00
Linden abfacee33c refactor(client/vehicleProperties): disable SetVehicleAutoRepairDisabled
People can just call this themselves.
Sick of complaints about extras.
2023-09-13 00:13:05 +10:00
Linden 3e527ac517 refactor(init): disallow loading ox_lib's import IN ox_lib
Seriously, why?
2023-08-20 10:37:45 +10:00
Linden 1bd6d7c5ff chore: .gitkeep cache directory
People like to use a global .gitignore.
2023-08-15 04:31:03 +10:00
Linden a29ede22af Revert "refactor(server/cron): reduce wait to reschedule task"
This reverts commit d12f4845f2.
2023-08-13 09:28:40 +10:00
Linden d1b8d0ec6c fix(init): set correct chunk name
Used in debugging and errors.
2023-08-13 09:22:37 +10:00
Linden 9df29d9d3a fix(init): check if ox_lib is started 2023-08-13 08:57:02 +10:00
Linden 594fa73bfd refactor(require): use error from Lua_require on failed load 2023-08-13 08:55:54 +10:00
Linden d268168dc7 fix(server/cron): invalid step return for indivisible values
Was reliant on some previously removed hacky-logic in scheduleTask.
Return value + max and rely on getNextTime/os.time to handle overflow.
2023-08-07 18:08:53 +10:00
Linden 8c9cdb1a13 refactor(server/cron): extra debug info 2023-08-06 17:36:40 +10:00
Linden d12f4845f2 refactor(server/cron): reduce wait to reschedule task
Was a hacky solution to an obsolete issue.
2023-08-06 17:27:41 +10:00
Linden becc29bcea fix(server/cron): getTimeUnit early return and +1 to minute 2023-08-06 17:14:32 +10:00
Linden 43e521e65b chore(zones): rename CZone field __type 2023-08-03 04:45:26 +10:00
Linden 1a74263949 fix(server/cron): stop all tasks with negative sleep values
Changes in 4536201 and other cron tweaks have improved the accuracy
of getNextTime. Negative values should now always be expired.
2023-08-03 00:53:39 +10:00
Linden b014e43e14 feat(init): importing modules with resource metadata
Allow loading modules through fxmanifest (i.e. ox_lib 'locale' or ox_libs { 'locale' }).
Useful in some cases where the module needs to be loaded (lib.locale()) first.
2023-08-02 16:16:37 +10:00
Linden b68da917be feat(init): cache.__call metamethod for caching function results
See #385.
Included formatting changes (tabs->spaces).
2023-08-02 15:17:14 +10:00
Linden 05c9d335e8 refactor(client/cache): send oldValue to cache event 2023-08-02 14:19:23 +10:00
Linden 45362017c6 fix(server/cron): more scheduling woes
Schedule next-day tasks.
Some logic improvements and breaking changes from 8488dec.
2023-08-01 17:39:37 +10:00
Linden 9d98b9aada chore: types
mostly types anyway.
2023-07-31 16:29:27 +10:00
Linden f11668b95c feat(imports): lib.waitFor 2023-07-31 16:17:50 +10:00
Linden c6742eeae9 refactor(client/vehicleProperties): driftTyres and window tweaks
+ some notes about setting props from server.
2023-07-31 16:17:50 +10:00
Linden 4babb3fd46 refactor(resource/init): dynamic module loading 2023-07-31 16:17:50 +10:00
Linden 497bee836f chore: update readme 2023-07-29 07:52:49 +10:00
Linden d2c5be8ea8 fix(client/zones): setDebug early return 2023-07-27 00:38:36 +10:00
Linden 89b9016586 fix(init): enable ignore_invalid for msgpack
Needed to prevent errors when packing glm polygons and such.
2023-07-26 12:47:07 +10:00
Linden fe0f28921f fix(client/zones): race condition when setting debug function 2023-07-25 14:13:09 +10:00
Linden b06ba2d024 chore: type fixes 2023-07-25 01:59:39 +10:00
Linden 84b7f97a1c fix(server/logger): missing ) 2023-07-23 13:41:20 +10:00
Linden 9c90b5be5f fix(server/cron): prevent scheduling tasks for new days
From 8488de.
2023-07-17 23:35:53 +10:00
Linden 149213032b fix(server/cron): getTimeUnit corrections
Consistency between range and lists.
Use different time comparisons for minute units.
2023-07-17 22:48:33 +10:00
Linden 8488dec3d3 refactor(server/cron): allow getNextTime minute and hour "overflow"
Per the Lua manual,
"if sec is -10, it means 10 seconds before the time specified by the other fields".
i.e. { min = 61, hour = 0 } is equal to { min = 1, hour = 1 }

Should improve scheduling and help with #368.
2023-07-17 20:07:30 +10:00
Linden 9e2076f5a5 refactor(server/cron): types and formatting, simplify getMaxDaysInMonth 2023-07-17 19:57:35 +10:00
Linden 6ab719654f fix(server/cron): list expression should use >=
Resolves #366.
2023-07-10 08:50:26 +10:00
Linden 8a0f5e946d fix(client/zones): prevent malformed polyzone deadlock with debug
Temp workaround.
2023-06-20 09:19:27 +10:00
Linden 310b9720bc fix(client/zoneCreator): require input confirmation 2023-06-17 16:11:08 +10:00
Linden 1f76590b53 fix(version): report unknown versions during checkDependency
Rather than throwing potentially fatal and confusing errors we should
just report the current version as 'unknown'.
2023-06-13 00:36:17 +10:00
Linden 8ec19cf263 feat(imports/table): readonly tables 2023-05-28 15:14:52 +10:00
Linden 6cf53ddd68 fix(client/vehicleProperties): mods not applying 2023-05-28 15:02:54 +10:00
Linden a8ab102bae refactor(imports/streaming): use coroutine.isyieldable 2023-05-25 14:56:56 +10:00
Linden 1ba5787ffd feat(imports): extended math lib 2023-05-22 06:47:57 +10:00
Linden 4e4b5bd570 fix(client/vehicleProperties): tonumber for extras and tyres
Sparse arrays sometimes json.decode with string keys, i.e.
`{[5] = 1, [10] = 1}` becomes `[null,null,null,null,1,null,null,null,null,1]`
`{[10] = 1, [11] = 1}` becomes `{"10":1,"11":1}`
2023-05-22 05:08:31 +10:00
Linden b4edc5bac6 feat(client/vehicleProperties): support extra props
Add modKit and bulletProofTyres.
2023-05-22 03:38:36 +10:00
Linden 3bc9c3206d fix(client/vehicleProperties): missing tyres 2023-05-22 03:34:21 +10:00
Linden c0ee1ae2f8 fix(client/vehicleProperties): SetVehicleExtra takes bool 2023-05-22 03:27:47 +10:00
Linden dbfb0227aa refactor(cleint/textui): cancel showTextUI if text is unchanged
Because people continue to excessively call it in a loop.
2023-05-19 21:41:58 +10:00
Linden ebd97f08ea feat(client/imports): getClosestPed 2023-05-18 21:10:20 +10:00
Linden 991be22de5 fix(client/radial): disable pause menu while open 2023-05-18 21:02:27 +10:00
Linden 71f751c2ff chore: readme 2023-05-18 18:44:23 +10:00
Linden 16875ca7e3 fix: type corrections 2023-05-18 15:38:53 +10:00
Linden 361ce6cca6 chore(imports/table): some types and annotations 2023-05-09 09:04:45 +10:00
Linden 89c0668985 refactor(client/progress): reduce Wait in progress queue 2023-05-05 14:55:03 +10:00
Linden 878763867a refactor(client/progress): don't clear progress on cancel
Sending "progressCancel" to NUI will cause a transition and then
trigger "progressComplete" with a slight delay (~100ms).

Should look better when people queue up progress bars.
2023-05-05 14:51:52 +10:00
Linden 9ce8f963b4 fix(client/context): hide before triggering select actions 2023-04-21 12:31:33 +10:00
Linden 28aaa9c5d9 fix(server/cron): only print on task stop when debug is enabled 2023-04-21 01:46:27 +10:00
Linden 62a0a2fe0b feat(client/points): add new getter functions 2023-04-20 15:55:06 +10:00
Linden 51da742138 feat(zones): add new getter functions 2023-04-20 15:52:55 +10:00
Linden d093805ef4 feat(imports): cron scheduling (#293) 2023-04-17 16:52:31 +10:00
Linden d683d50d5e Merge pull request #294 from TheiLLeniumStudios/loki-protocol 2023-04-17 16:51:37 +10:00
Linden 5cf2417f4f refactor(streaming): requestWeaponAsset params 2023-04-17 15:15:30 +10:00
Linden 0af4b42586 feat(client/radial): keepOpen 2023-04-17 15:15:30 +10:00
Linden 4a7cf75b7f fix(client/radial): reset nui focus on hide 2023-04-01 14:24:42 +11:00
Linden 389ed5263d fix(server/addCommand): nil command name on error 2023-04-01 11:25:57 +11:00
Linden c4b87a0d91 refactor(client/interface): nui focus consistency 2023-03-23 05:55:16 +11:00
Linden 367bedd38e fix(fxmanifest): disable unused script paths
Yet to be used; recent fxserver change shows warnings for these.
2023-03-11 05:45:38 +11:00
Linden 280ece8b2d fix(package/radial): missing param 2023-03-07 02:16:03 +11:00
Linden 1c66f3b920 fix(package/radial): missing disableRadial 2023-03-06 17:03:15 +11:00
Linden ad2c50cd1d feat(client/radial): add lib.disableRadial to prevent radial access 2023-03-01 07:32:40 +11:00
Linden 3dd996c38b refactor(client/interface): nui focus tweaks
Add helper functions to set nui focus and restore previous input state.
Ensure focus is reset before triggering responses (promises/callbacks).
2023-03-01 07:25:28 +11:00
Linden 284b563483 fix(client/radial): reset NuiFocusKeepInput 2023-03-01 07:04:51 +11:00
Linden 8848f6d6bc fix(client/radial): onSelect export handler
currentRadial is cleared before triggering the export.
2023-03-01 06:48:13 +11:00
Linden 36d11444fa fix(web/dialog): delay fetch until promise is resolved
Resolves #246; probably needs a better look at.
2023-02-26 12:31:08 +11:00
Linden 79e91ee452 refactor(client/radial): allow onSelect as string to call an export
e.g. onSelect = 'menuHandler'
exports('menuHandler', function(menu, item) end)
2023-02-26 03:58:05 +11:00
Linden 29022e1a48 feat(client/radial): return currentMenu and itemIndex onSelect 2023-02-26 01:59:01 +11:00
Linden b3b49b1cbd fix: missing and invalid types and parameters 2023-02-25 18:20:14 +11:00
Linden b779ea7c3b refactor(client/radial): don't refresh submenu if parent updated
Possibly works as intended, even.
2023-02-24 14:39:17 +11:00
Linden f130a27680 fix(client/radial): don't refresh submenu if unrelated option updates 2023-02-24 14:31:42 +11:00
Linden 386fc60afd fix(client/radial): refresh current submenu if path is still valid
Resolves #424, hopefully without weird side effects.
2023-02-24 04:24:51 +11:00
Linden 7f538f6a5b fix(client/radial): refresh when current submenu updates
Resolves #241.
2023-02-24 04:04:25 +11:00
Linden 21739ac6cf refactor(client/radial): refresh to last available menu
When re-registering or removing an option linking to the current
submenu, restore the last available sub menu.
2023-02-24 03:55:19 +11:00
Linden e2650b7e05 feat(client/radial): refresh menu when parent is re-registered 2023-02-24 02:50:54 +11:00
Linden 5f1678131c feat(client/radial): support refreshing menus 2023-02-24 00:26:17 +11:00
Linden 5428d1c768 feat(client/radial): refresh menu when current menu is removed
Possibly weird.
2023-02-23 23:35:20 +11:00
Linden bce10d0980 feat(client/radial): radial menu history and radial id getter
Store an array containing the history of opened menus, and restore
the previous menu when closing out of nested menus.
Added lib.getCurrentRadialId and improved types.
2023-02-23 22:46:22 +11:00