Inventory enhancements #897: 2, 5, 9, 11, 12 (#931)

* implement a bit

* change shift to ctrl

* add enhancement #2

* add ctrl-interaction with content access

* fix libinventory.move bug (none checking)

* fix p.5

* move shareinv logic into inventory_utils

* add inventory utils

* small refactor

* fix iframe.src = ""

---------

Co-authored-by: MihailRis <mexaruc@gmail.com>
This commit is contained in:
Neveix 2026-08-14 23:25:42 +05:00 • committed by GitHub
parent f8e4e2759b
commit 3b3bf8e878
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 84 additions and 37 deletions

View file

@ -48,6 +48,14 @@ void ItemStack::setCount(itemcount_t count) {
}
}
void ItemStack::maximizeCount(const ContentIndices& indices) {
auto& def = indices.items.require(getItemId());
this->count = def.stackSize;
if (count == 0) {
clear();
}
}
void ItemStack::setField(std::string_view name, dv::value value) {
if (fields == nullptr) {
if (value == nullptr) {