Skip to content

Releases: overextended/ox_inventory

v2.28.2

29 Apr 23:18
Compare
Choose a tag to compare

Bug Fixes

  • server: more sync corrections (Linden)
  • client: only enable weapon wheel if ped is using vehicle weapon (Linden)

Code Refactoring

  • server: send weight as a number for syncSlotsWithPlayer (Linden)

v2.28.1

29 Apr 16:07
Compare
Choose a tag to compare

Bug Fixes

  • client: updateInventory iterator fails on nil inventory property (Linden)
  • client: crafting bench distance when using points (Linden)

Commits

v2.28.0

29 Apr 00:56
Compare
Choose a tag to compare

Marked as a pre-release since I can't be certain about bugs or exploits.

This update is primarily about "inventory sync" or "multi-accessible inventories".

Multiple players should now be able to access the same inventory at the same time, and any changes made will be synced between all players using the inventory (and the owner, if it's a player). You still cannot access another player's inventory if they are using it.

  • The UI has been updated to prevent a visual error / desync between server and UI states.
  • Use in production at your own peril, it needs testing for desync issues, exploits, etc.

Features

  • web: display items for which the grade isn't met as disabled (LukeWasTaken)
  • client: nested custom context buttons (#1266) #1266 (Alexander)
  • server: initial multi-access inventory tweaks (Linden)
  • server/inventory: sync inventory state between players (Linden)
  • server: sync slot updates with all players using inventory (Linden)
  • server/inventory: GetSlotForItem (Linden)
  • client: add event for "forceOpenInventory" (Linden)
  • server: add forceOpenInventory export (Linden)
  • server/inventory: export GetSlotForItem and GetEmptySlot (Linden)
  • client: allow notification suppression in updateInventory (Linden)

Bug Fixes

  • server/inventory: check inventory id ref before attempting to load (Linden)
  • web: live update inventory weight when using SetMaxWeight (LukeWasTaken)
  • client: check weapon specialAmmo is a string (Linden)
  • server/items: nil metadata (#1246) #1246 (Maciej Ratyński)
  • server/inventory: require utils module (Linden)
  • server: check inv.open isn't equal to source (Linden)
  • server/shops: remove guard clause (Linden)
  • server/hooks: nil fromInventory when using shop (#1248) #1248 (FjamZoo)
  • client/esx: update Weapons module ref (Linden)
  • server/items: handle missing item.name for qb items (Linden)
  • client: check if weapon is melee before incrementing value (Linden)
  • client: don't override durability when updating currentWeapon (Linden)
  • server/inventory: set correct container weight on failed swap slots (Linden)
  • client: crafting distance check (#1272) #1272 (Martijn)
  • client: always reset invBusy after item use (Linden)
  • server: prevent opening other player inventory when it is open (Linden)
  • client: refresh correct inventory/slots during updateSlots (Linden)
  • server/inventory: swapslots sync with owner (Linden)
  • server/inventory: remove itemNotify from swapSlots (Linden)
  • web: rely on server updates to the slots when in game (LukeWasTaken)
  • server/inventory: newdrop return data (Linden)
  • client: buying, confiscating inv, and returning inv items data (Linden)
  • server: don't close inventory when opening a drop or container (Linden)
  • server/inventory: clear containerSlot on inventory close (Linden)
  • client: update inventory when buying items (Linden)
  • server/inventory: stack items with AddItem (Linden)
  • server/inventory: sync swapItems with owner (Linden)
  • server/inventory: ignore sync slots for owner if they triggered it (Linden)
  • client/qb: prevent inventory access while in last stand state (#1284) #1284 (Manason)
  • client/qb: qb last stand checking (#1285) #1285 (Manason)

Code Refactoring

  • server/items: remove non-string specialAmmo from weapons (Linden)
  • server: type safety and minor tweak to inv.open (Linden)
  • server/shops: more type safety (Linden)
  • client: invBusy tweaks when using item (Linden)
  • client: item notifications (Linden)
  • server/inventory: lock inventory-slots during swap event (Linden)
  • syncSlots tweak (Linden)
  • server/inventory: match swapItems response to sync event (Linden)
  • client: combine updateInventory iterators (Linden)
  • server/inventory: cancel swap if another swap is active (Linden)
  • client: only refresh shop slots on buyItem (Linden)
  • server/inventory: allow giving items to open inventories (Linden)
  • update ox_lib dependency (Linden)
  • server/inventory: reduce nesting in swapItems event (Linden)
  • server/inventory: prevent giveItem when slots are in-use (Linden)
  • client/weapon: revert weapon object ([Linde...
Read more

v2.27.1

05 Apr 03:50
Compare
Choose a tag to compare

Bug Fixes

  • web: use correct item image while dragging (Linden)
  • server/shops: match proper store pattern (Linden)

Performance Improvements

  • web: memoize drag preview image (Luke)

v2.27.0

02 Apr 22:45
Compare
Choose a tag to compare

Features

Bug Fixes

  • bridge/qb: negative stress value (#1214) #1214 (Tristan)
  • server/shops: license check ignored if using item count (#1218) #1218 (Tristan)
  • client: blur screen when using /viewinv (Linden)
  • shared/items: respect client.image on weapons, components, and ammo (Linden)
  • client: trigger autoreload in new thread (Linden)
  • client: possible ammo/durability desync (Linden)
  • init: allow script files to load when people fuck their load order (Linden)
  • server/utils: load module (#1235) #1235 (FjamZoo)
  • server/shops: correctly split shoptype and id (#1236) #1236 (Mahan Moulaei)

Code Refactoring

  • server/inventory: reduce nesting in AddItem (Linden)
  • web/ItemNotifications: use SlotData for label and image (Linden)
  • update ItemNotify input (Linden)
  • server/inventory: reduce time to remove inventories (Linden)
  • server: update responses for failed commands (Linden)
  • client: allow inventory to open when other script has focus (Linden)

Chores

Commits

v2.26.3

17 Mar 22:58
Compare
Choose a tag to compare

Bug Fixes

  • init: config iterators (Linden)
  • init: ignoreweapons (Linden)

v2.26.2

17 Mar 22:11
Compare
Choose a tag to compare

Bug Fixes

  • client: disable rolling while reloading (#1201) #1201 (hyprell)
  • init: get weapon hash for ignoreweapons convar (Linden)
  • client: use metadata.label when crafting item (Linden)
  • server/shops: adjust slot weight for metadata (Linden)

Code Refactoring

  • server/items: improve item conversion formatting (Linden)
  • init: prevent errors from bad configuration (Linden)
  • server/inventory: add ignoreCount param to SlotWeight (Linden)
  • init: move ignoreweapons to client (Linden)

v2.26.1

10 Mar 19:08
Compare
Choose a tag to compare

Bug Fixes

  • server/items: remove trailing commas from item conversion (Linden)
  • server/qb: save item image as a string (Linden)

Chores

v2.26.0

10 Mar 04:25
Compare
Choose a tag to compare

Note on updating/merging changes

I'm starting to move the inventory back to using 'require', similar to older versions (pre-release even); see 397ef18.
This will see more changes in the future, such as breaking larger modules down into smaller parts.

-- previously
local Utils = client.utils

-- now becomes
local Utils = require 'modules.utils.client'

As mentioned above, I'm planning to break larger modules into smaller parts; and I have already done so with "item containers" 1610b8a.

If you previously had your own entries in "Items.containers", you have two options.

-- (Preferred) Use the function to define the containers properties
setContainerProperties('paperbag', {
	slots = 5,
	maxWeight = 1000,
	blacklist = { 'testburger' }
})

-- (Lazy) Simply set the "containers" table as your old table; the format is the same.
-- This will likely be broken in a future update (v3)
local containers = {
	['paperbag'] = {
		size = {5, 1000},
		blacklist = {
			['testburger'] = true -- No burgers!
		}
	},
	['pizzabox'] = {
		size = {1, 1000},
		whitelist = {
			['pizza'] = true -- Pizza box for pizza only
		}
	}
}

Features

  • qb: hunger/thirst/stress item compatibility (#1178) #1178 (Manason)
  • qb: handle qb-inventory:HasItem (Linden)
  • web: fetch undefined itemData on setup (Linden)
  • client/items: support item image paths (Linden)
  • init: TypeError (Linden)
  • qb: compat for item.image (#1186) #1186 (Manason)
  • web: sort crafting ingredients based on amount (Luke)
  • client: support crafting a recipe n times (Linden)

Bug Fixes

  • client: ignore weapon checks when wheel is enabled (Linden)
  • client: disable aimedfiring for petrolcan weapon group (Linden)
  • fxmanifest: weird dumb race condition (Linden)
  • client: compare currentInventory.entity while accessing trunk (Linden)
  • client: handle r*'s nonsense ammo clip sizes (Linden)
  • client: prevent inventory locking up when people are weird (Linden)
  • shared/items: update table ref for item exports (#1192) #1192 (varkosqc)
  • server/crafting: return crafting success value (Linden)
  • server: set inventory as changed on durability consumption (Linden)
  • client: remove drop points when changing instance (Linden)

Code Refactoring

  • get newdrop coords from client (Linden)
  • client: add ignoreweapons convar to prevent mismatch/disarming (Linden)
  • client/inventory: tweak dumpster access (Linden)
  • client: glovebox and trunk access (Linden)
  • client: set currentInventory.entity for glovebox (Linden)
  • require modules (Linden)
  • client/weapon: store weapon group (Linden)
  • init: load ox_core in a thread (Linden)
  • qb: remove server-side status handling (Linden)
  • server/items: ignore nil values when parsing items (Linden)
  • web: getItemUrl helper (Linden)
  • server/items: create containers submodule (Linden)
  • shared/items: reduce default durability drain (Linden)
  • client: don't hard-set extinguisher and petrol can durability loss (Linden)
  • server/qb: "SetInventory" message (Linden)
  • server/inventory: use convar for save interval (#1185) #1185 (Nathan)
  • server/inventory: set inv.changed for more functions (Linden)
  • client/utils: deprecate DeleteObject (Linden)
  • client: remove keys from disabled actions when busy (Linden)
  • server/qb: prevent some nonsense error during item conversion (Linden)

Chores

v2.25.0

27 Feb 05:40
Compare
Choose a tag to compare

Features

Bug Fixes

  • data/weapons: marksman rifle mk2 label #1159 (DokaDoka)
  • data/weapons: rail/mounted sights are in fact holo sights #1159 (DokaDoka)
  • data/weapons: attachment types #1159 (DokaDoka)
  • client: don't search for special ammo when reloading standard ammo #1159 (Linden)
  • missing and invalid types (Linden)
  • server/inventory: added fromSlot to swapItems hook (#1165) #1165 (Alessandro Alterno)
  • server: /clearinv invId (Linden)
  • server/inventory: set ammo type when unloading from weapon (Linden)
  • client: use correct progressbar label when using item (Linden)
  • server: missing durability-consumption check (Linden)
  • server: check for slot during inventory setup (Linden)

Code Refactoring

  • server: update commands #1160 (Linden)
  • server: check isPlayerBoss for clearevidence #1160 (Linden)
  • server/shops: move currency check and removal to functions (Linden)
  • server/shops: clean up shop items setup (Linden)
  • server/shops: lazy shop loading (Linden)
  • server: use proper slot label for item use (Linden)
  • client: add durability-consumption check to useSlot (Linden)
  • server/items: remove esx compatibility warning (Linden)

Chores

  • data/weapons: remove railcover component #1159 (DokaDoka)
  • web/images: missing weapon images #1159 (Linden)
  • web/images: improved weapon images #1159 (Linden)
  • init: update ox_lib version dependency (Linden)

Commits