Commit Graph
183 Commits
Author SHA1 Message Date
Linden 671be5e7a2 refactor(locale): simplify
BREAKING CHANGE (kind of)
Remove user-selection for locales. Adds mostly unnecessary complexity,
and most people don't want to bother with it anyway.

Locale is always based on the convar "ox:locale" instead.
2022-10-18 21:17:26 +11:00
Linden 5b2c74afa0 refactor(addKeybind): improve types 2022-10-16 12:49:47 +11:00
Dominic 63b8afa9ed refactor(addKeybind): consistency with defaultKey (#128) 2022-10-16 12:41:49 +11:00
Róbert Nagy a4d553cbb1 fix(logger): Fix bad argument #2 to strsplit (#125)
Only Loki logging was affected. When no tags were given and the source is console the convertDDTagsToKVP break because of the nil value.
2022-10-15 13:04:14 +11:00
Dominic 4f71595122 refactor(keybinds): rename module, tweaks (#127) 2022-10-15 10:08:20 +11:00
Linden 01b4c53a9d fix(keybinds): typo 2022-10-14 11:46:06 +11:00
Linden 7355d9ef25 refactor(keybinds): formatting and tweaks 2022-10-14 11:01:57 +11:00
Dominic de23afa7f8 feat(imports): add keybinds manager (#124) 2022-10-14 10:58:45 +11:00
Linden 2c7e812eaf refactor(logger/server): cleanup
DRY
2022-10-11 00:40:40 +11:00
Idris Dev c35b70f597 feat(logger): support grafana loki (#115) 2022-10-10 18:03:54 +11:00
Linden 79dd3f5934 fix: no-op 2022-10-10 16:56:05 +11:00
Linden 988836dcb7 feat(server/logger): add player data to tags 2022-10-09 01:57:02 +11:00
Linden f5d0deeb21 refactor(server/logger): batch log submissions
Create a temporary table and submit logs in a single batch after 500ms.
Includes some micro-optimisation and a new convar to set logging service.
2022-10-09 00:24:49 +11:00
Linden b05594e77f fix(callback): pack nil values
See #117
2022-10-08 22:20:46 +11:00
Linden 0e9ad23fb3 fix: types 2022-10-02 20:19:35 +11:00
DokaDoka 0014dfbe1f fix(client/zones): expand vectors
for oal enjoyers
2022-09-21 14:45:22 +10:00
Linden 025a8eb168 tweak(client/points): set point.isClosest 2022-09-21 01:51:17 +10:00
DokaDoka ad219b2508 feat(client/zones): debug walls
brings the debug display more in line with the creator
2022-09-20 23:52:56 +10:00
Linden f1671f14bc fix(imports/player): return function 2022-09-18 22:41:25 +10:00
Linden cd8e4bbd4d fix(client/zones): yet another debug fix
Because a zone vanishing upon entry is of no use.
2022-09-17 18:21:38 +10:00
Linden 863ac03ca3 refactor(imports): more type fixes 2022-09-14 16:12:43 +10:00
Linden 032e0e2db1 fix(client/zones): CZone.contains return type 2022-09-14 08:12:12 +10:00
Linden 62d56fa885 refactor(client/zones): add types and change indentation 2022-09-14 08:08:00 +10:00
Linden 9a17b9bac5 perf(client/points): apply optimisations used in zones
"SphereZones" are really just points with some extra overhead, but the module
had some overall improvements to improve performance.
Includes type definitions for sumneko.
2022-09-14 07:45:03 +10:00
Linden 32e2da2d8f refactor(init): type-fixes and minor adjustments 2022-09-14 01:42:14 +10:00
Linden 26538b8148 refactor(imports): assign modules directly to lib namespace
Mostly a change for improved intellisense with sumneko lua.
Includes some type fixes and deprecation notices.
2022-09-14 01:20:50 +10:00
Linden ed7bf536e8 feat(resource): load callbacks
Load lib.callback for internal use.
2022-09-14 00:52:10 +10:00
Linden 0ccdf5675c fix(client/zones): scuffed ternary
Since Lua "ternary" expressions run until they have a truthy value,
boxzone and polyzone will try compare distance to radius.
2022-09-11 12:27:23 +10:00
Linden 57187c8c30 perf(client/zones): reduce overhead
In a naive test with 10k sphere zones vs points, zones ran 0.02~0.04ms higher.
Overhead is roughly halved with these tweaks.
2022-09-11 12:06:30 +10:00
Linden be8b740937 feat(client/points): set cache.coords
See last commit description.
2022-09-11 11:08:26 +10:00
Linden 77ff8e977b feat(client/zones): set cache.coords
People keep asking for coords to be added to cache, but it be problematic
to spam the events system every tick with that information.
If zones is loaded, we can set cache locally without relying on events.
2022-09-11 11:06:38 +10:00
Linden 99b146d7b9 fix(client/zones): zone triggers twice when inside and debug is enabled
Zones would be added to the temporary array twice, so callback functions
and the zone draw would trigger twice.
2022-09-11 11:02:04 +10:00
Linden 5d71c4efdf fix(client/zones): debug erroneously triggers zone:inside
Should only trigger when the player is, in fact, inside the zone.
2022-09-02 22:23:24 +10:00
Linden 3a97a0c569 fix(client/zones): convert tables to vectors
Ensure tables (either array or map) set as points, coords, or size are
converted into vectors.
Includes complementary reformatting.
2022-08-30 02:58:41 +10:00
Linden 2a1815c460 tweak(callback): error handling
Errors during callbacks will never respond, so we'll use a protected call
and format the error message with a normal print to keep the thread
alive.
2022-08-25 18:49:07 +10:00
Linden 8c8da4b119 refactor(raycast/client)!: use new native (GetWorldCoordFromScreenCoord)
This native got merged days after I pushed the raycast function. This will break
scripts relying on this function (doubt there's many, if any).
2022-08-18 01:58:54 +10:00
Jag 99cab6d072 feat(imports): getClosestVehicle and getNearbyVehicles (#71) 2022-08-16 17:34:49 +10:00
Linden 46a525e057 fix(zones/client): debug DrawPoly and DrawLine
Debug for boxes broke with the oal fixes, since vectors don't unpack.
Also fixes flicker when entering a debug zone.
2022-08-13 17:08:39 +10:00
Linden 231ca90b8f fix(zones/client): do not overwrite zone.distance with contains
Manually calling the contains method would overwrite zone distance.
Also move Wait to the end of the thread to prevent race conditions.
2022-08-10 23:45:48 +10:00
Linden 245af3df41 refactor(callback): types 2022-08-08 17:16:57 +10:00
Linden f122c6e3ea feat(imports): getNearbyPlayers 2022-08-05 00:45:10 +10:00
Linden a45584ac78 Revert "feat(imports): loadAnimDict"
This reverts commit 77fb9cf637.
2022-08-03 21:57:03 +10:00
Linden 77fb9cf637 feat(imports): loadAnimDict 2022-08-03 17:27:58 +10:00
Linden 68a6352be4 feat(imports): getClosestPlayer 2022-08-03 17:26:51 +10:00
Linden ee12035a50 feat(imports): raycast module
Just lib.raycast.cam for now.
2022-08-03 17:22:45 +10:00
Jag 3c82b654ff feat(addCommand): Allow multiple groups (#57) 2022-07-12 18:50:01 +10:00
Linden d33df54f0e tweak(zones): store distance to zone center
Should make sphere "zones" nearly 1:1 with the points api.
Distance added for polygons too for consistency and some use-cases,
but generally only worthwhile for smaller zones.
2022-06-26 12:30:25 +10:00
Linden 6c83adfda8 fix(locale): always assign a table to dict
Prevent indexing nil when no locales exist for a resource.
2022-06-24 09:10:37 +10:00
Linden e95ae858df fix(callback): handle external resource events
Calling registered callback events in another resource should respond to
the invoking resource.
2022-06-19 13:08:28 +10:00
Linden 76fcc007c4 feat(callback): client callback
Allow the client to listen for and respond to server requests.
Basically just copy-paste and swap the two.
2022-06-09 05:18:05 +10:00