HUSS
Pull Request Prelude
- [x] I have followed proper Hercules code styling.
- [x] I have read and understood the contribution guidelines before making this PR.
- [x] I am aware that this PR may be closed if the above-mentioned criteria are not fulfilled.
Changes Proposed
Design
Implementation of the Hercules Ultimate Storage System Storages can now be created through a configuration file that describes their attributes. Example storage configuration:
{
Id: (int) (required|unique) Unique Identifier
Name: (string) (required) Name of the storage sent to the client.
Capacity: (int) (required) Maximum capacity of the storage.
}
Additional storages are handled with dynamic arrays that will save a tonne of memory when created, as opposed to a design in which they were implemented using fixed length arrays. In simple terms, a storage of 600 items would approximately cost the same amount of memory as 600 storages with 1 item each. They are saved in the same storage database (SQL) as the original separating them by a storage identifier. An infinite number of storages can be created, there are no limits. The current design implementation only allow saving/loading of approximately 1600 items per storage due to packet size limits.
PS. Make sure you apply SQL upgrades for this patch!
Access Modes
Storage access modes can be set through the openstorage builtin command.
STORAGE_ACCESS_VIEW // View storage only
STORAGE_ACCESS_GET // Allow getting items from storage.
STORAGE_ACCESS_PUT // Allow putting items to storage.
STORAGE_ACCESS_ALL // Allow all actions.
Default storage mode : STORAGE_ACCESS_ALL
Script Commands
Changed: openstorage(<storage_id>{, <storage_mode>})
Credits still to: @sagunkho and @dastgirp Just updated and tested with latest repository version Issues addressed:
[x] #1763 [x] #2724
Still waiting for this to get implemented officially.
In 5 years maybe this will be implemented
In 5 years maybe this will be implemented
Hahahahahahaha, Well i have this on my emulator already. Its just i want to make this one officially implemented. Im using it for like 2 years now.
Closing this in favor of the updated version #3330