Commit Graph

136 Commits

Author SHA1 Message Date
DokaDoka
eef6e049e8 feat(resource/zoneCreator): target output format 2022-09-15 00:01:29 +10:00
DokaDoka
6fb18c740a feat(resource/zoneCreator): change output format in dialog 2022-09-15 00:00:53 +10:00
Linden
3084265bbb refactor(server/zoneCreator): output format and path, security fix
Don't allow players to trigger ox_lib:saveZone without ace permissions.
Write created_zones to root.
Use explicit vectors and set name as a string.
2022-09-14 15:19:01 +10:00
Linden
c95fd8ecf4 refactor(client/zoneCreator): create temporary thread
Move the on-tick thread into the startCreator function, and kill it once
creatorActive is set to false.
2022-09-14 15:15:36 +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
107d812dc3 refactor(client/zoneCreator): restrict command access
Includes fix for zone name.
2022-09-14 00:56:56 +10:00
Linden
bac9eb576d feat(client/resource): RegisterCommand wrapper
All these tweaks so we can check ACL for client commands.
2022-09-14 00:54:44 +10:00
Linden
9d8584ff9e feat(server/acl): add ox_lib:checkPlayerAce as callback 2022-09-14 00:53:50 +10:00
Linden
ed7bf536e8 feat(resource): load callbacks
Load lib.callback for internal use.
2022-09-14 00:52:10 +10:00
DokaDoka
0ecb968202 feat(resource): zone creator 2022-09-14 00:05:08 +10:00
Tony Stark
ff7a0b6dea fix(client/interface): fix openMenu getting defined nil (#86)
openMenu gets defined nil even when the options has passed close = false which result in error
2022-09-08 13:17:05 +02:00
Luke
336a16baed feat(web): add ability to not be able to close menu 2022-09-08 10:26:35 +02:00
Luke
adf0994b3f feat(web): ability to not be able to close the context menu 2022-09-08 10:05:44 +02:00
Luke
d494b70506 feat(interface/menu): improve error handling for invalid option override 2022-08-30 21:26:23 +02:00
Linden
bdb88e74c5 fix(version): properly compare minor/patch semver
Comparing "2.7.4" to "2.10.1" would compare each number, i.e.
2 = 2,
7 < 10,
4 > 1
Instead compare the major (2 v 2), then minor.patch (7.4 v 10.1).
where doka to do my math
2022-08-23 19:29:45 +10:00
Linden
1ea4b16c8b fix(client/interface): set openMenu to nil before triggering callbacks
Callbacks may open another menu, which then gets set to nil after
the callback has returned.
2022-08-23 19:12:50 +10:00
Linden
4578d54c5e fix(client/interface): progressbar props not deleted
Somehow, calling DetachEntity before DeleteEntity results in the
entity not being deleted (when oal is enabled).
Fortunately we don't need to detach it before deleting.
2022-08-23 04:30:58 +10:00
Linden
f5c5597277 fix(version): compare semver numbers
Values were being compared as whole strings.
2022-08-22 20:53:55 +10:00
Linden
a0bea87dfa fix(client/vehicleProperties): store neons as an array
People normally complain about the most nonsensical non-issues; yet
this one was completely left alone; or more specifically, one person
attributed the issue to ox_lib but didn't bother to report the issue or
provide a fix, instead just
complaining that "ox_lib is constantly updating".
2022-08-20 12:55:07 +10:00
Luke
6cf29ac0eb fix(client/interface): cache alert promise
Same as input
2022-08-17 23:47:31 +02:00
Luke
82d052a1bb fix(client/interface): cache input promise
Caching the promise into a variable allows us to set input to nil and resolve the promise after, which fixes an issue with opening 2 input dialogs back to back
2022-08-17 23:42:36 +02:00
Luke
0e7bd1a177 feat(web): onSelect function for options 2022-08-17 21:41:05 +02:00
Jag
c6250b6d5a feat(client/progress): add interrupt options (#70)
Add the ability to specify if an action can be interrupted. Options that I've thought of off the bat are ped going ragdoll or ped being handcuffed.

Co-authored-by: Linden <65407488+thelindat@users.noreply.github.com>
2022-08-16 17:22:05 +10:00
Luke
953673690c fix(web): clear nui focus from input before resolving the promise 2022-08-15 14:50:00 +02:00
Linden
c3726ed924 tweak(interface/menu): SetNuiFocusKeepInput
Default to allow input; disable with "disableInput = true" during registration.
2022-08-09 07:42:20 +10:00
Linden
2e77817c41 refactor(interface/menu): set openMenu to reference menu data, not id
No need to index registeredMenus[openMenu] repeatedly.
2022-08-08 17:54:50 +10:00
Linden
101d94392b refactor(client/interface): micro-optimise menu callbacks
Remove short-lived objects and set local refs to the openMenu to reduce table-lookups.
2022-08-05 00:58:19 +10:00
Luke
ff81bbb434 chore(client/interface): remove debug command 2022-08-04 15:04:49 +02:00
Luke
32a698c043 feat(menu): lib.hideMenu 2022-08-04 15:04:49 +02:00
Luke
cf2c45687a refactor(menu): split side and vertical scroll change handlers
Resolves an issue where changing to the next button while scrolling a horizontal list would not trigger the onChange function for the previous button
2022-08-04 15:04:49 +02:00
Linden
c662368cd4 fix(client/interface): changeSelected args 2022-08-04 15:04:49 +02:00
Luke
37c10f570b feat(client/interface): menu close arg on button 2022-08-04 15:04:49 +02:00
Luke
853cec6049 feat(client/interface): allow replacing specific index in menu options 2022-08-04 15:04:49 +02:00
Luke
a4b25bddf0 feat(web/menu): allow passing default index for horizontal lists 2022-08-04 15:04:49 +02:00
Luke
873b531da7 fix(client/interface): fix indexing registered menu options with table 2022-08-04 15:04:49 +02:00
Luke
ee6baafc0c feat(client/interface): allow separately setting list menu options 2022-08-04 15:04:49 +02:00
Luke
ac7a87cc5b feat(client/interface): list menu error catching 2022-08-04 15:04:49 +02:00
Luke
dde7daddb7 fix(client/interface): allow reregistering list menus 2022-08-04 15:04:49 +02:00
Luke
33bd3ebc77 feat(web/menu): send args in callback function 2022-08-04 15:04:49 +02:00
Luke
7b147b04fc feat(web/menu): tooltip description support 2022-08-04 15:04:49 +02:00
Luke
4236dd2bfd feat(web/menu): exit listener and onClose function 2022-08-04 15:04:49 +02:00
Luke
6ef17e83f5 feat(web/menu): visibility handling 2022-08-04 15:04:49 +02:00
Luke
bde843f803 feat(web/menu): enter callback function 2022-08-04 15:04:49 +02:00
Luke
d48ca25c7b feat(web/menu): initial list menu Lua api 2022-08-04 15:04:49 +02:00
Linden
28003c942d fix(client/streaming): invalid print argument 2022-08-04 02:05:09 +10:00
Linden
93fc595030 fix(client/streaming): timeout 2022-08-04 01:32:54 +10:00
Linden
1b05f87c8e tweak(client/streaming): rewrite
Was going to split into separate imports, then
remembered why I didn't in the first place.
Improved annotations.
Changed timeout into a for loop, and increase default to 500 ticks.
Less variable reassignments.
Allow functions to be called outside threads, but will not check if the
request was successful (has loaded).
2022-08-03 22:58:50 +10:00
Linden
1679510ac9 refactor(resource/cache): remove getVehicle method
Keep it in the thread for simplicity.
2022-07-29 01:12:11 +10:00
Linden
39d5bbae3d refactor(resource/cache): new cache event
Rather than sending a bulk update of cache, trigger different events for
each key.
2022-07-28 23:09:23 +10:00
Linden
ef6f780028 tweak(resource/version): currentVersion validation
Check currentVersion is valid before performing HttpRequest, and
print a message when failing.
2022-07-28 22:05:16 +10:00