Commit Graph
100 Commits
Author SHA1 Message Date
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
Linden c57b1a9215 fix(imports/locale): prevent error from invalid locales
People with poorly formatted json files would not get a locales table,
leading to an error when trying to iterate.
Contains some other inconsequential changes, and warnings.
2023-02-23 18:54:49 +11:00
Linden 639faa214d refactor(init): minor tweaks
Remove dead table (lib.exports) and annotate server-side lib.notify.
2023-02-22 10:08:43 +11:00
Linden 7ab2aac9be feat(imports/require): custom require for script files 2023-02-22 09:53:58 +11:00
Linden 47b8a72527 refactor(server/addCommand): add suggestion on command creation
Delayed commands should trigger the suggestion.
2023-02-22 01:30:52 +11:00
Linden b47ae9d4fa refactor(server/addCommand): use single command handler for aliases 2023-02-22 01:27:03 +11:00
Linden 4dd9b03ba3 refactor(web/radial): add stroke to center circle 2023-02-21 23:54:02 +11:00
Linden 4d15b38d02 feat(imports/addCommand)!: update syntax and support param help text
BREAKING CHANGE: First parameter now holds command name(s).
Second parameter is properties, containing (optional) values for help,
restricted, and params.

See #224 for more info.
2023-02-21 19:52:12 +11:00
Linden 3801faf976 fix(client/radial): don't hide radial when opening submenu
fix(fix): fix
2023-02-19 05:48:28 +11:00
Linden b79273c0d7 refactor(client/radial): change keybind to toggle 2023-02-18 21:56:39 +11:00
Linden 9df936ab16 fix(client/radial): handle submenu transition
Resolve #225.
2023-02-18 21:26:58 +11:00
Linden 828ca36c1c refactor(web/radial): disable transition when swapping to submenu 2023-02-18 21:25:22 +11:00
Linden 43197b492b chore(client/radial): typings 2023-02-17 01:50:26 +11:00
Linden 6fe8f5257f refactor(client/radial): use lib.addKeybind and tweak exports
Merge lib.hideRadial with closeRadial, trigger onReleased.
Trigger radial submenu after onSelect.
Keep showRadial as a local method.
2023-02-08 00:50:05 +11:00
Linden 62d441ddb1 refactor(fxmanifest): load addKeybind 2023-02-08 00:44:42 +11:00
Linden 560b19c34a refactor(client/radial): clear items on resource stop 2023-02-08 00:26:08 +11:00
Linden a30c8c1384 refactor(client/radial): minor tweaks and formatting
Increment menuSize during lib.addRadialItem (micro-optimisation).
Don't open radial menu if no items are registered.
2023-02-08 00:19:51 +11:00
Linden 250cd56896 fix(callback): return types 2023-02-06 13:22:19 +11:00
Linden 97d5bd6ac0 fix(client/progress): anim task/scenario check
Correct behaviour from pull request #208.
Include some refactoring to reduce repetitive  table indexing.
2023-02-03 13:25:30 +11:00
Linden 1565187860 refactor(init): change notify netevent name
Other name was too generic and may conflict with user-code.
2023-02-03 13:04:48 +11:00
Linden a8b9f8cde5 fix(locale/shared): phrase-construction for strings without placeholders
string.gsub returns two variables, the updated string and the pattern occurrences.
The outer string.gsub would replace n occurrences, or nothing if the string did not
contain '%'.
2023-02-01 03:20:04 +11:00
Linden f9a6d8ca8b refactor(client/progress): allow all progress bars to be cancelled
canCancel should really only apply to user-input.
2023-01-27 21:42:13 +11:00
Linden 74628a5167 refactor: remove deprecated code
getCore and player modules were deprecated long ago and only used once.
2023-01-25 15:39:35 +11:00
Linden 6fbdd49702 fix(shared/locale): only construct phrases for strings 2023-01-16 18:18:51 +11:00
Linden fd5bd066ab feat(shared/locale): locale phrases 2023-01-08 15:24:36 +11:00
Linden 012b68a3be fix(client/zones): remove all zone references
Should resolve #191.
2022-12-30 21:07:32 +11:00
Linden 6a704c40fe refactor(client/zones): re-order zones and call onExit before onEnter
insideZones will be stored as a map rather than an array for simplicity.
Store zones the player is entering and exiting, then sort based on distance;
always triggering onExit for all zones before onEnter.
See #179.
2022-12-24 16:08:21 +11:00
Linden b688b98bba fix(client/raycast): missing table
This was broken with 26538b8
2022-12-20 17:54:59 +11:00
Linden 0ea5725b86 refactor(imports/getCore): add removal notice
Was deprecated ~3 months ago, will be removed in the next large update.
2022-12-20 08:22:14 +11:00
Linden 511241e03c refactor(client/points): ensure coords are a vector 2022-12-20 08:09:35 +11:00
Linden 08a725105b fix(client/zones): disable marker rotation 2022-12-17 06:21:22 +11:00
Linden ccad59fcf6 fix(server/logger): validate response on failed http request
One person is receiving a CURL error rather than a response from
datadog, leading to a nil index.
We'll also use the newly supported "warn" function.
2022-12-15 11:24:08 +11:00
Linden b50c0b7df8 fix(client/context): reset focus
Should resolve #170 but ceebs testing
2022-12-13 08:37:56 +11:00
Linden 8abc416dad feat(package): TS callback events 2022-12-13 08:26:43 +11:00
Linden 124a5f15ba refactor(imports/callback): response varargs
Trying to have scrt compatible responses gets weird when using
msgpack.
2022-12-13 08:26:43 +11:00
Linden d9511231b1 refactor(client/progress): move controls outside of function 2022-12-06 13:33:04 +11:00
Linden ca38dd61ca fix(resource): set cache.game
Property was only set for imported modules.
2022-12-06 13:30:24 +11:00
Linden ed7c04ac9c refactor(client/raycast): change los flags 2022-11-26 02:02:02 +11:00
Linden f96cb13ff4 refactor(client/addKeybind): save control hash 2022-11-24 17:31:03 +11:00
Linden ba635b91e7 fix(client/addKeybind): get control button when indexing currentKey
Changing the key binding for a command invalidates the previous result from
GetControlInstructionalButton. Use an index metamethod for backwards
compatibility and add the getCurrentKey method.
2022-11-24 17:16:57 +11:00
Linden 289fa0ac69 chore(.gitignore): merge files 2022-11-24 17:02:03 +11:00
Linden 3d90d91552 Merge pull request #160 from D4isDAVID/update-locales
feat(locales): update Russian & add Hebrew
2022-11-23 21:53:22 +11:00
Linden 00c2086072 refactor(streaming): convert to modules
Import methods rather than call via exports.
2022-11-21 21:39:05 +11:00
Linden 6825103dd5 fix(resource): don't export internally loaded modules
i.e. exports.ox_lib:callback is invalid
2022-11-21 21:39:05 +11:00
Linden d2799075ad fix: types and nil-checks 2022-11-21 21:39:05 +11:00
Linden ce5697f3b2 feat(zones): add basic zone support to the server
Quick and dirty with many features stripped (onEnter/onExit/inside).
2022-11-16 23:07:53 +11:00
Linden 9b7eef2880 fix(client/zones): convert vector4 to vector3
Sometimes people send the incorrect types, and it's apparently on us (???)
to allow them to do the wrong thing and catch their mistakes for them.
2022-11-09 16:04:03 +11:00
Linden e840bbb50f refactor(init): report ox_lib error when loading imports
People like to cry about resources not working because they
failed to install ox_lib and don't know how to read, missing the
fat error and stack trace on resource start.

Now we can remind these people they need to actually install
a release.
2022-10-28 18:46:56 +11:00
Linden 97c18f0c6b refactor(resource): export load error 2022-10-28 18:45:47 +11:00