110 Commits
Author SHA1 Message Date
jim gordon 84918c19c2 Remove debug print in GetItemBySlot
Remove debug print statement from GetItemBySlot function.
2026-08-10 02:13:07 +01:00
MrNewb e8ba8e1837 Support optional requiredCount in HasItem
Add an optional requiredCount parameter to Inventory.HasItem and default it to 1 when not provided. The function now forwards the count to tgiann:HasItem, allowing callers to check for multiple item quantities; updated the LuaDoc param annotation accordingly.
2026-06-06 22:36:44 -04:00
MrNewb a4d984b951 update core_inventory bridging to the current docs
I dont have a copy of this, im banned from his discord and im doing this blindly based on the docs with no explanation of whats in these returned tables. If you are the creator and want me to tweak this please send a copy to my keymaster. TheRealMrNewb
2026-05-30 12:42:28 -04:00
MrNewb 5c9a97c1c0 Plug 2026-05-30 12:08:31 -04:00
MrNewb c78acfd8af Add one_inventory integration (client/server)
Introduce a new one_inventory adapter under modules/inventory/one_inventory, providing client and server bridges to the one_inventory resource. Implements common Inventory functions (GetResourceName, GetItemInfo, Items, HasItem, GetItemCount, GetImagePath, GetPlayerInventory) on the client. On the server adds AddItem, RemoveItem (with client update events), GetItemBySlot, SetMetadata, OpenStash, AddStashItems, AddTrunkItems, ClearStash, CanCarryItem, UpdatePlate, OpenShop, RegisterShop (stub error), and OpenPlayerInventory. Both files early-return if one_inventory is missing and resolve item image paths. This connects community_bridge inventory operations to one_inventory APIs and handles stash/trunk/glovebox ID mapping and metadata handling.
2026-05-30 12:05:21 -04:00
MrNewb e0c6d2f8c7 fix for jg-mechanic is missing
Replace earlier GetResourceState checks in multiple inventory modules so they only return early when the 'jg-mechanic' resource state is 'missing'. This standardizes behavior across modules (jpr, origen, ox, ps, qb, qs, tgiann) and fixes an inverted check in ox_inventory so the exports['jg-mechanic']:vehiclePlateUpdated call runs unless the resource is actually missing.
2026-03-13 12:35:30 -04:00
Mustache Dom ba6886b4a8 - fix
- `issue`
   - function getInventoryNewVersion() does not have a return if you are 2.0 or higher. resulting in auto setting to false

- `how i fixed`
  - added a return
2026-01-25 03:21:15 -07:00
MrNewb 343af95794 Remove example scripts and update core logic
Deleted all files in the examples directory to clean up unused or test scripts. Updated fxmanifest.lua to enable ox_lib initialization. Improved error handling and entity tracking in utility functions, added prop removal, and made minor localization and code style adjustments throughout the codebase. Significant reword of inventory module, notification module, and framework module. Added support for wasabi_uikit, added support for keep-progressbars,
2025-12-14 16:22:35 -05:00
MrNewb c73faa43db Add checks for alternative inventory resources
Added resource state checks for 'codem-inventory' and 'origen_inventory' in both client and server scripts to ensure compatibility and prevent conflicts when those resources are present.
2025-10-12 21:53:27 -04:00
MrNewb 582ce9e640 Refactor item info retrieval in inventory modules
Updated Inventory.GetItemInfo to use the full items table for lookups instead of fetching individual items. Added Inventory.Items function to both client and server for consistent access to the items table. Improved handling of missing data and streamlined code for better maintainability.
2025-09-13 18:04:05 -04:00
MrNewb 90c65dc55e Add GetResourceName function to all modules
Introduces a standardized GetResourceName function to banking, clothing, dispatch, doorlock, framework, fuel, helptext, housing, and other modules. This function returns the name of the in-use resource, improving resource identification and interoperability across the codebase.
2025-09-10 12:27:12 -04:00
MrNewb 9c61f7967d Update callback module import paths
Changed all references from 'lib/utility/shared/callbacks.lua' to 'lib/callback/shared/callback.lua' in client and server files for framework, inventory, and phone modules to reflect new file structure or module location.

Commit#f900bc5 did not adjust these, correcting.
2025-09-01 17:05:34 -04:00
MrNewb a435a4a75c Restore stash registration return values
Reverts stash registration to return a boolean and id, undoing a breaking change from commit #e06e04a. This restores compatibility with multiple resources and inventories that rely on the previous behavior. Also returning a success status on registration has many uses.
2025-08-29 23:53:44 -04:00
MrNewb 9062e5b2a8 Restore shop opening logic to pre-e06e04a behavior
Reverts breaking changes from commit #e06e04a by restoring the previous shop opening logic. This fixes compatibility issues with multiple resources that were affected by the change.
2025-08-29 23:49:59 -04:00
MrNewb ac9f0ae777 Restore legacy shop logic
Reverts shop registration to pre-commit #e06e04a behavior, removing the CreateShop function and restoring RegisterShop. This fixes breaking changes affecting multiple resources and inventories without any deprecation path.
2025-08-29 23:47:52 -04:00
Mr.Crowley e06e04a2c6 hope this works 2025-08-27 05:47:44 -05:00
MrNewb e30dceb540 CanCarryItem checks on additem 2025-08-12 18:08:49 -04:00
MrNewb af33909794 qs inv image path tweak 2025-08-11 00:46:26 -04:00
MrNewb 5abebe13c6 image pathing fixed on tgiann
this -- "nui://inventory_images/html/images/%s.png"
Is not the path, it its instead
nui://inventory_images/images/%s.png"

Also strip webp function added. And indexing itemdata was required.
2025-08-03 16:23:19 -04:00
MrNewb fa9ea6e6eb image path tweaks 2025-08-03 15:22:33 -04:00
Mr.Crowley 466e86bfdb targets and inventory update
Targets:

sphearzone should not take a heading, removed

optional debug at the end for individual debugging

Inventory:

Added OpenPlayerInventory for all inventories.
2 (aka codem and qs) did not have clear documentation. Probably doesnt work
2025-07-28 00:10:51 -05:00
MrNewb 2cb847c8cd this is bad but just trying to prevent anything they might run into. 2025-07-09 22:10:19 -04:00
MrNewb 33a9b6ba69 Framework.ItemList for esx and a catchall for qbox 2025-07-09 22:08:44 -04:00
Quin Schurman aefcf8eee2 feat(inventory): add item list function 2025-07-09 17:26:16 -04:00
MrNewb 5dc2321d67 Remove all uses of ox_lib callbacks in favor of internal option
This seems fine, Crowley created the callback system in bridge so will need review
2025-06-28 16:52:01 -04:00
MrNewb 0de3a048be prevent imposters
multiple inventories provide as ox but dont support many of the exports, because of this we have to do solutions like this.
2025-06-18 09:55:22 -04:00
MrNewb 60676d8493 Shops all register/open server side
This allows for fallback system to take over
2025-06-16 21:40:51 -04:00
MrNewb 02e47991db correct second fallback 2025-06-11 22:29:26 -04:00
MrNewb 5e8e2e40db fix fallback 2025-06-11 22:28:27 -04:00
MrNewb 0a4795430d Update server.lua 2025-06-10 01:30:57 -04:00
MrNewb 4c16e432ef wrong key -- oops 2025-06-09 20:34:09 -04:00
MrNewb 93ae1411e8 touch up 2025-06-09 17:13:30 -04:00
MrNewb 6c6b4e9e86 GetPlayerInventory client side patch
amount instead of count is listed, should be good now
2025-06-09 15:53:30 -04:00
MrNewb 6ae273544d origin inventory patch
the getinventory export returns a table of nested values, inside there is a inventory table. This gets us by on the compatibility. It appears that many of the exports have changed, I have tested this on the latest version with a resource that makes use of these items. Also they use amount, I "think" they used to use count but im 100% they use metadata & info tables.
2025-06-09 15:47:25 -04:00
MrNewb 63c644d277 AddTrunkItems + testing across all bridged inventories 2025-06-08 04:36:53 -04:00
MrNewb c71a261115 chore(intellisense): improve parameter annotations and add missing comments
Touched up incorrect or missing Intellisense parameter annotations across several functions. Added some missing descriptions to improve editor support. Still more to do, but this is a small step forward for overall developer workflow. Also small fix in picklexp
2025-06-07 22:50:13 -04:00
MrNewb 866283162b touchup 2025-06-07 21:59:03 -04:00
MrNewb baf1c3b2a9 cleaned up intelisense, finsihed adding type to openstash, registration tweaks 2025-06-07 21:55:14 -04:00
gononono64 fcf0bec75a fixing le stashes 2025-06-07 20:33:11 -05:00
MrNewb 2f1134f268 Update server.lua 2025-06-07 21:13:43 -04:00
MrNewb 294fa7a959 tweak tgiann-inventory
Inventory.OpenStash = function(src, id, label, slots, weight, owner, groups, coords)

sub from id
2025-06-07 21:00:12 -04:00
MrNewb 0abb127503 patch for ps-inventory
Export isnt available
2025-06-07 20:58:49 -04:00
MrNewb 586a263fb6 fix manifest warning 2025-06-07 20:22:08 -04:00
MrNewb b5dd8c018c Update server.lua 2025-06-04 15:42:40 -04:00
MrNewb 05c80d9d10 feat(additemstotrunk & clearstash)
This is very wip, also a good bit of inventories dont support it at all. I have tested this in ox_inventory but not the others. uploading into repo as it does not break anything and may encourage collab
2025-06-04 15:25:20 -04:00
MrNewb 5efcc8ba23 Update server.lua 2025-06-04 14:42:36 -04:00
gononono64 ba111f1b52 Changed createshop to registershop
dont forget to update

usibg cache system for clothing
2025-05-24 22:10:39 -05:00
MrNewb 564aba63e1 remove change as qs reverted new name 2025-05-24 21:39:10 -04:00
gononono64 b9f5a3ed64 Small fix for client entities and qb stashes and shops
Shops: aligned format with others and removed the instant open (on create)

Stashes: Updated for new version of qb (exports)

Entities: returning point object
2025-05-24 15:36:05 -05:00
MrNewb 34f6756e3f This is gross and shameful, but resolves a bug with this inventory 2025-05-20 13:29:26 -04:00