Linden
8bcae1937b
tweak(init): store service and name in lib
...
lib.name for 'ox_lib', and service or 'client' or 'server'.
2022-05-01 22:47:34 +10:00
Linden
f6216af1ae
refactor: rename lualib variable and move clipboard export
2022-04-29 03:02:06 +10:00
Linden
1ac844f20a
tweak(init): store serverId
2022-04-11 04:59:01 +00:00
Linden
62e4fea5ad
refactor(init): set cache[key] after triggering onCache
...
Allow for comparison of new and old values by checking cache[key]
against the value sent as an argument.
2022-03-15 10:34:22 +00:00
Linden
13c8c29811
refactor: change event names from lualib to ox_lib
2022-03-13 03:21:01 +00:00
Linden
3c7cd3dc6b
refactor(init): throw an error if ox_lib is not started
2022-03-10 15:54:13 +11:00
Linden
6b8b7990c8
fix(init): incorrect server check
2022-03-01 14:20:14 +00:00
Linden
5a30dd7ad1
fix(init): initial cache index returns full table
2022-03-01 13:58:08 +00:00
Linden
a37a897b10
feat(init): callback hook when updating cache
2022-03-01 13:42:39 +00:00
Linden
58faab6217
feat(init): implement cache
2022-03-01 13:23:47 +00:00
Linden
aeccbece09
refactor: rename imports
...
BREAKING!
Since the folder name determines the import name (i.e. lib.callbacks), use better names and lowerCamelCase.
2022-02-28 16:30:58 +11:00
Linden
e83aa653cc
refactor(init): call imports and exports via lib
...
Deprecate import (now just references lib); when calling or indexing
lib for the first time, attempt to load a module else call an export.
2022-02-28 02:40:25 +00:00
Linden
d3ef7d5018
refactor: rename resource
2022-02-28 00:48:36 +00:00
Linden
40b7fe2a77
refactor(init): don't cache function refs
2022-02-28 08:35:32 +11:00
Linden
d0c5f722db
refactor(init): export cache and update intervals
...
BREAKING CHANGE: lib will store cached export functions and no longer uses the : syntax to call functions.
Allow SetInterval to return arguments to the callback function.
2021-12-27 12:19:37 +11:00
Linden
ec1a98b83a
feat(keys): implement a DisableControlAction wrapper
2021-12-06 09:54:45 +11:00
Linden
d25cac3be4
Revert "feat(init): add custom packing for metatables"
...
This reverts commit 1ad137b8c5 .
Prefer native solutions, this is too niche.
2021-12-05 04:58:48 +11:00
Linden
4d51879afd
refactor(init): metatables and micro-optimise
...
import now stores all imported modules and uses call and index methods to load modules.
Defining an import as before (local ServerCallbacks = import 'callbacks') works as before, or you can use ServerCallbacks = import.callbacks
You could also use a lazy loading method by never defining ServerCallbacks, i.e. import.callbacks.Register(...) will work without explicitly importing the module previously.
2021-11-28 18:04:09 +11:00
Linden
1ad137b8c5
feat(init): add custom packing for metatables
...
Adds lib.unpack and lib.pack functions to the global lib table.
2021-11-25 01:00:12 +11:00
Linden
9adbccd2f8
feat(init): implement interval
...
This is different from the one implemented in Ox ESX.
2021-11-25 00:56:07 +11:00
Linden
78fdee1132
chore: update readme and license
2021-11-16 11:15:59 +11:00
Linden
52a3623e0e
feat: add lib table for exports
...
Anything assigned to the table will be exported; it's just a hacky way to provide support for Lua Language Server.
2021-11-16 11:15:34 +11:00
Linden
9a60f3bd1d
chore(callbacks): update annotations
2021-11-11 07:56:15 +11:00
Linden
ab4807fee0
refactor: remove modules system and fix indentation
...
Setting a "standard" module and resource structure is too limiting, so stick to import only.
2021-11-11 07:52:38 +11:00
Linden
bc5c7ad209
Add files via upload
2021-10-30 15:58:25 +11:00