Linden
e0f6f47cc7
refactor(client/vehicleProperties): check for tutorial session
2024-07-14 16:35:27 +10:00
Linden
c45aa0d893
feat(vehicleProperties): add statebag handler and server setter
2024-07-13 00:25:30 +10:00
Linden
d51a1167fd
fix(client/requestModel): use IsModelInnCdimage to validate model
...
Resolves #596 .
If it breaks something, maybe try using both.
2024-07-01 12:21:26 +10:00
Linden
45b9560a44
fix(init/cache): allow setting false cached value
...
Resolves #605 .
2024-07-01 12:17:50 +10:00
Linden
6368c2c6fd
fix(client/zones): remove thread when setting initial debug state
...
Resolves #605 .
2024-07-01 12:16:31 +10:00
Linden
54b7701c36
refactor(class): disable experimental warning for internal modules
...
This warning is only important for 3rd party users.
2024-06-01 21:45:17 +10:00
Linden
c59b675efa
Revert "fix(imports/logger): loki indexing for varargs ( #583 )"
...
This reverts commit 7e67b57e2d .
2024-05-30 22:54:50 +10:00
Linden
2909cb5db6
refactor(callback): warn if callback function is nil/false
...
Between the headache of people misusing callbacks
and people complaining about third-party resources
that misused them, I would rather just shut them up.
I'll just deprecate this crap at some point anyway.
2024-05-23 09:41:24 +10:00
Linden
f0009f0bc8
refactor(callback): assertions
...
Both client and server callbacks will check if "cb" is a function, to
reduce the number of people using callbacks as a replacement for
events.
Server->client callbacks will now check if the target playerId exists,
as people apparently use it for unintended values (i.e. -1).
2024-05-22 16:36:22 +10:00
Linden
a40be54a9e
refactor(callback): increase default timeout
2024-05-21 05:50:06 +10:00
Linden
c2efb22e38
refactor(class): mark mixins.new as protected
2024-05-19 15:33:16 +10:00
Linden
9a2a911b2a
fix(streamingRequest): remove @package annotation
...
Annoying warnings.
2024-05-19 14:37:31 +10:00
Linden
8b0359071b
fix(math): torgba types and alpha value
2024-05-14 19:21:47 +10:00
Linden
0b13a56071
fix(package/locale): sync behaviour with Lua
2024-05-14 18:19:26 +10:00
Linden
7ada4c253a
chore(fxmanifest): remove comments
2024-05-08 08:40:53 +10:00
Linden
ae005e73eb
fix(math): math.interp return type should be T
2024-05-08 05:47:40 +10:00
Linden
858a94e7ec
feat(math): expose interpolate function as math.interp
2024-05-08 05:46:57 +10:00
Linden
43905bdd62
feat(interface/alert): support dialog timeout
...
closeAlertDialog will now error if a reason is passed.
Added timeout param to alertDialog.
Resolves #522 .
2024-05-08 05:23:27 +10:00
Linden
b1cb2142f0
feat(raycast): add fromCoords method
2024-05-08 05:00:33 +10:00
Linden
2166b076da
feat(callback): add timeout to callback events
...
Should help when people await broken or unregistered events.
Defaults to 60 seconds, adjusted with convar ox:callbackTimeout.
2024-05-03 15:49:33 +10:00
Linden
55d9ed1709
refactor(settings): safeGetKvp
...
If the kvp has an unexpected type for whatever reason, clear it.
2024-04-22 14:46:02 +10:00
Linden
196440250b
fix(settings): swapped variable order
...
Locale was moved.
2024-04-21 01:54:40 +10:00
Linden
b9452f9248
refactor(client/vehicleProperties): return true if client owns entity
...
Technically closer to the previous behaviour.
2024-04-20 10:28:21 +10:00
Linden
3df183653d
feat(settings): ox:userLocales convar
2024-04-20 07:07:11 +10:00
Linden
3959f76aae
refactor(timer): adjust module return and types
2024-04-20 06:55:56 +10:00
Linden
b6632ad789
refactor(locale): merge locales with english definitions
...
Also sync some recent changes in the TS module.
2024-04-20 06:42:28 +10:00
Linden
58021e70fd
refactor(client/vehicleProperties): remove entity owner check
...
May revert - let's see what happens.
2024-04-20 05:58:32 +10:00
Linden
18f8e89cb4
feat(array): isArray method
2024-04-19 03:09:39 +10:00
Linden
dcdfe6e442
fix(class): private access in method calls
...
Maybe there's better ways, but if it works..?
2024-04-18 23:19:09 +10:00
Linden
56267448ce
feat(imports/client): playAnim
2024-04-18 02:13:22 +10:00
Linden
fb5bd87dc2
refactor(streaming): bump default timeout
...
There's no point trying to argue with people who rely on
faulty behaviour and race conditions.
2024-04-18 01:28:11 +10:00
Linden
3fc84398f6
refactor(settings): reset saved locales
2024-04-17 21:12:20 +10:00
Linden
97365df94f
refactor(streamingRequest): mention unreleased assets
...
Since 90% of FiveM developers do not release unused assets,
many people are starting to complain when streaming fails.
2024-04-16 14:25:50 +10:00
Linden
b2008ed804
feat(array): reduce method
2024-04-16 14:15:25 +10:00
Linden
01770187bc
refactor(locale): set default locale in settings
2024-04-16 05:33:35 +10:00
Linden
6de82c3d6e
feat(array): array class
2024-04-13 11:15:30 +10:00
Linden
774da8f755
fix(class): use rawset during instantiation
...
If classes use a __newindex method it may lead to unexpected behaviour.
2024-04-13 11:15:30 +10:00
Linden
468a4d820f
feat(settings): notification position
2024-04-12 09:45:49 +10:00
Linden
3e66dccb4b
fix(init): prevent loading multiple instances of ox_lib
...
Resolves #545 .
2024-04-11 15:03:41 +10:00
Linden
e0e2bcfd45
fix(fxmanifest): don't load require as shared_script
...
This will get loaded internally.
2024-04-11 14:55:51 +10:00
Linden
fffdcd9999
fix(require/loadJson): correct path for json files
2024-04-09 20:02:35 +10:00
Linden
e476736761
feat(server): triggerClientEvent with multi-target support
...
Since that once fivem PR is forever pending review.
2024-04-06 20:00:33 +11:00
Linden
1dd9bd3e86
chore: add gitignore to forcibly keep cache directories
...
Since people (or terrible GSPs) keep blocking any directory
named cache no matter where it exists by default.
2024-04-06 16:58:59 +11:00
Linden
1ff845a451
refactor(require): cleanup and improve debug info
2024-04-06 15:59:26 +11:00
Linden
56b99a7657
refactor(require): improve module resolution and debugging info
...
- Improved error messages.
- Include checked file paths on failed module resolution.
- Moved repeated code into separate functions.
- Workaround for incorrect "circular-dependency" error.
- Added additional package.path "./?/init.lua".
- Added support for package.searchers.
2024-04-05 21:53:48 +11:00
Linden
77c34b8699
feat(settings): toggle notification audio
2024-04-03 14:58:35 +11:00
Linden
dbbb4b6563
refactor(notify): minor cleanup for notification audio
2024-04-03 14:56:08 +11:00
Linden
1922c8a8ec
refactor(requestAudioBank): return string
2024-04-03 14:55:10 +11:00
Linden
1e30dd4c89
fix(streamingRequest): missing return value
2024-04-03 14:48:18 +11:00
Linden
1ab6d3dd00
fix(streamingRequest): missing asset name in error message
2024-04-02 17:02:46 +11:00
Linden
44b41973b8
fix(locale): trigger setLocale in locale module
2024-04-02 17:00:59 +11:00
Linden
2d4e56d828
feat(settings): add ox_lib command and user-selected locales
...
Resolves #435 .
2024-04-01 19:19:59 +11:00
Linden
1e3b2cb567
feat(locale): locale hotloading
2024-04-01 19:16:53 +11:00
Linden
09ca963f26
refactor(resource): load extra modules
2024-04-01 19:15:04 +11:00
Linden
989462da7d
feat(imports/server): getFilesInDirectory
2024-04-01 19:13:51 +11:00
Linden
0f0c7a6591
refactor(streamingRequest): internal method for request functions
...
- TS package type inference for request functions.
- Type fix for Lua's waitFor callback.
- Lua request functions cannot return nil.
2024-03-31 16:15:44 +11:00
Linden
5868649d18
fix(package/streaming): return promise from streamingRequest
2024-03-27 14:27:33 +11:00
Linden
1456f4493e
refactor(class): remove support for class.init
2024-03-25 20:48:09 +11:00
Linden
e031f19bea
refactor(class): improve types
2024-03-25 20:14:49 +11:00
Linden
2190cd32f4
refactor(waitFor): use GetGameTimer to timeout callbacks
...
Corrected error message output to ms.
Resolves #518 .
2024-03-18 18:48:57 +11:00
Linden
50d957c1d1
refactor(package/interface): import CSSProperties from csstype
2024-03-16 04:30:02 +11:00
Linden
356f46d7ef
fix(class): only show warning if constructor is undefined
2024-03-13 00:01:17 +11:00
Linden
d105ebe7fe
refactor(class): improve types
2024-03-12 19:54:33 +11:00
Linden
8180feaa8c
fix(class): disallow calling constructor from objects
2024-03-12 19:54:11 +11:00
Linden
0d1140a54e
feat(class): true private fields
2024-03-12 17:37:18 +11:00
Linden
6f4f11ddb5
feat(class): deprecate init in favour of constructor
2024-03-12 16:10:57 +11:00
Linden
3135058310
refactor(class): stricter type-checking
2024-03-12 16:09:28 +11:00
Linden
105d265792
feat(class): add temporary super method during class init
2024-03-11 14:58:54 +11:00
Linden
92dc3688f8
feat(class): recursive instanceOf and isClass method
2024-03-11 11:21:07 +11:00
Linden
de49dff9b0
feat(class): add instanceOf method
2024-03-11 09:06:58 +11:00
Linden
d806668c65
refactor(class): use mixins for default class methods
2024-03-11 09:06:36 +11:00
Linden
3ecb419759
refactor(package): move and export VehicleProperties interface
2024-02-18 15:45:16 +11:00
Linden
82dfb8d882
fix(waitFor): type corrections
2024-02-02 13:45:01 +11:00
Linden
0e816ecfc0
fix(waitFor): allow timeout to be disabled
2024-01-20 17:29:36 +11:00
Linden
0be5fce030
fix(package/streaming): somehow valid path is invalid?
2024-01-17 19:55:35 +11:00
Linden
4bf5bb9430
feat(package): random string/int utility functions
2024-01-17 17:43:08 +11:00
Linden
c0832cbe72
feat(package): add waitFor and sleep functions
2024-01-17 17:39:16 +11:00
Linden
0f7d1c165f
refactor(imports/streaming): remove default timeout
2024-01-17 17:38:34 +11:00
Linden
6817ae6649
fix(imports/waitFor): normalise timeout
2024-01-17 17:37:44 +11:00
Linden
4ed709df9a
chore: update server dependency to 7290
2024-01-17 16:43:38 +11:00
Linden
fd112ca03c
fix(addCommand): catch errors in command handler
...
+ additional minor changes.
Use DoesPlayerExist native.
Mark addCommand cb as async.
2024-01-17 16:42:26 +11:00
Linden
2aa21e7478
fix(package/addCommand): argument validation
...
Get the first index of raw.split for the command name.
Check if value is defined (as 0 is falsey).
Don't subscribe to 0-index propaganda (argument index+1).
2024-01-15 18:52:28 +11:00
Linden
c383e42602
fix(package/addCommand): allow typed arguments
2024-01-15 17:52:59 +11:00
Linden
2ad3503985
feat(package/locale): update for parity with lua
...
Support for nested locales (flattening) and getLocale function.
2024-01-14 12:34:13 +11:00
Linden
6da661bef3
fix(package/locale): types
2024-01-14 10:05:53 +11:00
Linden
e94035551c
refactor(package): set entry point to shared
2024-01-14 10:05:24 +11:00
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