Backpacks Beta 3.7.0

Backpacks 3.7.0 includes some internal design changes which may have bugs and may conflict with other plugins, so I'm releasing it as a beta to reduce the impact of potential issues. Thank you for participating!

Download: https://umod.org/plugins/Backpacks.cs?version=3.7.0&branch=beta

General Improvements

  • Paintable entities, photos, cassettes, pagers, and mobile phones placed in backpacks will now work as expected throughout a given wipe. After a wipe, those items' associated data will be lost, including sign content, photo content, cassette content, pager frequency, etc.
  • Slightly increased the delay when opening the backpack while looting another container (from 0.05 to 0.10 seconds) to further mitigate issues where the loot panel doesn't resize.
  • Hook conflicts with other plugins over the CanLootPlayer hook are no longer possible.

Performance improvements

The following performance improvements are expected to significantly reduce the overall hook time used by the plugin.

  • Backpacks data files are no longer written to unless the backpack's contents have changed.
  • Removed the noisy CanAcceptItem hook in favor of a different item filtering mechanism that resides directly on the backpack container.
  • The noisy OnEntityLootEnd hook is now subscribed only while backpacks are open.
  • The GUI button is now only generated once per plugin load, instead of being generated every time it's sent to a player.

Behind the scenes

  • Backpacks now use actual container entities, specifically coffins. If you have any plugins that relate to or alter coffins, they might interfere with backpacks.
  • Each backpacks now uses a separate network group, to allow players viewing the backpack to see data about associated entities such as sign content, photo content, pager frequency, and more. If you have any custom networking plugins, they might interfere with the ability to open backpacks or view the previously mentioned entity data.

For developers

  • Added API_GetBackpackOwnerId(ItemContainer) method which other plugins can use to determine whether a given container is a backpack, as well as the owner of that backpack.

Working with no problems so far. dont anticipate any difficulties and will notify if something comes up.

I've released a second version of the beta (version number has not changed) which includes some additional API methods. If you already using the beta, there's no need to download latest as you likely don't need those API methods.

Here's an addendum to the patch notes (some of this I just forgot to mention before). Complete patch notes can also be seen on the updates page.

General Improvements
  • Dropped backpacks will no longer collide with any corpses. Previously, each dropped backpack would only have its collision disabled with the corpse that it dropped for, so other nearby corpses could still push the backpack below the ground.
  • All item cleaner plugins should now be compatible, meaning they will no longer break guns that were placed in backpacks.
For Developers
  • Added ItemContainer API_GetBackpackContainer(ulong backpackOwnerID) method which other plugins can use to obtain a reference to the current underlying container of a player's backpack.
  • Added int API_GetBackpackItemAmount(ulong backpackOwnerID, int itemId) method which other plugins can use count the quantity of a given item in a player's backpack.
Locked