[Mod] Shared chests with bag support [chesttools]

Post Reply
Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

[Mod] Shared chests with bag support [chesttools]

by Sokomine » Post

New as of 06.01.21: Use shift + click to move entire stacks between the chest and your inventory (or bags or craft grid) as known from default chests

It is sometimes desirable to build something huge together with other players. For that purpose, sharing chest space helps. My locks mod was created for that purpose. And it works. However, it is tiresome to manually grant access to each user, and to have to always carry a keychain is a further disadvantage.

The Landrush mod contains a shared chest that is far easier to use: Instead of having to enter names manually, it just checks who's allowed to build in that area and grants permission to use the chest based on that information. The Landrush chest is limited to the Landrush protection system.

This chest here works similar to the Landrush chest, except that it's designed to work along all modern protection systems (those which use minetest.is_protected). So, now, who can take something out of the chest or put something in? Answer: Everyone who could dig or build at that position - provided the area is protected at all. Else it acts like a normal locked chest.

First, craft the chest:
Image

After placing and opening the chest, you'll see the following:
Image

Clicking on "Craft" lets you acces your craft grid directly. Just imagine coming back from an extensive mining tour, where your craft grid had to help out as storage space for additional ores, cobble or anything else. Now you don't have to transfer that stuff back to your inventory first. You can also take materials out of the chest, craft them in the grid, and place the result back into the chest without having to go through your main inventory.
Image

Clicking on one of the bags buttons works only if you have unified_inventory installed. In that case, you can access your bags directly - same as with the craft grid above.
Image

"DA" stands for "drop all". It will try to move all items from your selected inventory (either the main one, craft grid or a bag) to the chest. Doing so with the above setup leads to this:
Image

"TA" is "take all" and tries to take everything from the chest and stuff it into your inventory:
Image

"SA" means "swap all". It swaps both inventories as far as that's possible. Positions are kept. First, let's apply that command to the main inventory from above:
Image
Now we switch to the bag shown before:
Image
..and swap inventories. As the bag is smaller than the chest's inventory, only as much as is possible get swapped:
Image

The last button, "FA", means "filter all". This may be less intuitive than the options above. The purpose of this button is to speed up dropping of gathered items into chests that are already sorted. You may have organized your chests in such a way that one contains only cobble, while another one might contain ores and ingots, another one wood etc. If you click on "FA", only items where there's at least one of them already in the chest will be transfered into the chest. It's like "drop all", except that what's already in the chest acts like a filter. In our above case, the shared chests, tree, wooden roof and glass are present in both inventories and thus get all transfered into the chest:
Image

This blue shared chest can also be used as a tool to upgrade other chests. Wield the chest and punch another normal, locked or shared chest:
Image
Clicking on the "shared" version costs you 2 steel ingots and upgrades the normal chest to the shared version introduced here. The chest's inventory is kept!
Image
You can also downgrade chests. If you, for some reason, want to go back from the shared chest to a normal locked one, you'll get one steel ingot back:
Image

Download: https://github.com/Sokomine/chesttools/archive/master.zip
Browse code: https://github.com/Sokomine/chesttools
Version: 0.1
Licence: GPLv3
License for textures: only contains re-colored textures from the default locked chest
Depends on: default
Supports: unified_inventory
Last edited by Sokomine on Thu Apr 08, 2021 17:46, edited 3 times in total.
A list of my mods can be found here.

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [Mod] Shared chests with bag support [chesttools]

by Napiophelios » Post

I use Modmenu (with Bags mod by cornernote installed)
and this mod works well with it too,
not just unified inventory :)

User avatar
Achilles
Member
Posts: 247
Joined: Sun Dec 15, 2013 11:55
In-game: Achilles
Location: Excuse Me???? -_-

Re: [Mod] Shared chests with bag support [chesttools]

by Achilles » Post

Nice, This seems to beat the default chest by quite a bit :)

Yet to try it out tho...
The Ironic Thing About Common Sense Is That It Isn't Very Common

User avatar
Topywo
Member
Posts: 1721
Joined: Fri May 18, 2012 20:27

Re: [Mod] Shared chests with bag support [chesttools]

by Topywo » Post

This is a very useful mod!

User avatar
Kilarin
Member
Posts: 894
Joined: Mon Mar 10, 2014 00:36
GitHub: Kilarin

Re: [Mod] Shared chests with bag support [chesttools]

by Kilarin » Post

This looks WONDERFUL!

MykieDoesStuff
Member
Posts: 136
Joined: Sat Aug 16, 2014 02:44

Re: [Mod] Shared chests with bag support [chesttools]

by MykieDoesStuff » Post

Whoa, this looks like an extremely useful mod.
For fast response... send me a PM

User avatar
Achilles
Member
Posts: 247
Joined: Sun Dec 15, 2013 11:55
In-game: Achilles
Location: Excuse Me???? -_-

Re: [Mod] Shared chests with bag support [chesttools]

by Achilles » Post

iDevMe wrote:Whoa, this looks like an extremely useful mod.
It does seem to beat the default chests by quite a bit....

User avatar
Chinchow
Member
Posts: 684
Joined: Tue Sep 18, 2012 21:37

Re: [Mod] Shared chests with bag support [chesttools]

by Chinchow » Post

Bravo. I love chest mods, and this is up with 0gb.us' chest mod in my book.

User avatar
Fixer
Member
Posts: 904
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer
Location: Ukraine

Re: [Mod] Shared chests with bag support [chesttools]

by Fixer » Post

Images are broken here.

User avatar
Lord_Vlad
Member
Posts: 112
Joined: Thu Jul 20, 2017 07:58

Re: [Mod] Shared chests with bag support [chesttools]

by Lord_Vlad » Post

Once the chest has been affected by this mod, shift clicking on an item does nothing more than a normal click. That's the only problem with this mod so far.

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] Shared chests with bag support [chesttools]

by Sokomine » Post

Fixed some bugs with recent versions of MT/MTG where the formspec was not shown properly and a click on "Abort" in the upgrade process led to an unwanted downgrade.

Added a description.txt that lists the features.
Fixer wrote: Images are broken here.
It is very time consuming to add all those images again and again :-( Even github kind of fell (was bought up by MS) after I used it to host some images :/
Lord_Vlad wrote: Once the chest has been affected by this mod, shift clicking on an item does nothing more than a normal click. That's the only problem with this mod so far.
I've never consciously used those strange list rings and find them rather irritating. Thus it's a bit complicated for me to support them. If there's really need for it I can try to include it but may not be able to test.
A list of my mods can be found here.

User avatar
Stix
Member
Posts: 1385
Joined: Fri Aug 04, 2017 14:19
IRC: nil
In-game: Stix [+alts]
Location: USA

Re: [Mod] Shared chests with bag support [chesttools]

by Stix » Post

Try hosting your images on Pasteboard.co
Hey, what can i say? I'm the bad guy.

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] Shared chests with bag support [chesttools]

by Sokomine » Post

Added support for the chests from my locks mod. They can now be up- and downgraded as well. Same with technic chests. I recommend using chesttools chests instead of locks chests as the chesttools ones here in this mod allow shared access for all who can build in the area (without the need for a key), can have a description set and allow quick access to bags and crafting area.

In order to change a chest, wield a chesttools chest and punch the chest you want to change. If you want to update to a technic chest you need to have one in your inventory. The advantage of this process is that the inventory of the chest will remain the same. Should the new chest have a smaller inventory, the mod will try to stuff the surplus inventory into free slots in the chest. If that fails, it'll try to put it into the player's inventory. If that fails as well, surplus items are placed above the (now smaller) chest.
Image

Bags work again with newer versions of MT and unified_inventory:
Image
Attachments
chesttools_bags.jpg
chesttools_bags.jpg (41.06 KiB) Viewed 2837 times
chesttools_technic.jpg
chesttools_technic.jpg (113.42 KiB) Viewed 2837 times
A list of my mods can be found here.

errant
Member
Posts: 31
Joined: Sun Jan 03, 2021 18:19

Re: [Mod] Shared chests with bag support [chesttools]

by errant » Post

What's the status of this mod? I was hoping it would offer shared technic chests (with the same logic with permissions), but it's not the case. It's still useful however.

Also peeved that shift clicking doesn't pop the entire stack into the chest anymore.

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] Shared chests with bag support [chesttools]

by Sokomine » Post

I've finally understood what these strange "listrings" are good for. You can now (well, if you download the latest version or install it from the content database) move stacks by shift-clicking from one inventory to another.

Also note that it's very easy to swap the inventory of your bags with the content of the chests. So you can keep diffrent inventory sets for diffrent purposes (i.e. building diffrent projects, mining, exploring) by easily storing them in diffrent chests.
errant wrote: What's the status of this mod? I was hoping it would offer shared technic chests (with the same logic with permissions), but it's not the case.
Can you be more specific what you have in mind? If it's that button in technic locked chests that allows other players who can build there access to the technic chest's inventory: that's something these chests have always enabled (unless the area they're standing in is not protected).
A list of my mods can be found here.

errant
Member
Posts: 31
Joined: Sun Jan 03, 2021 18:19

Re: [Mod] Shared chests with bag support [chesttools]

by errant » Post

A while back I got frustrated with managing the different categories of chests (because I'm building a base with friends).

regular chest = can be accessed by anyone

locked chest = can be accessed by holding the key and punching the chest

This means for each locked chest, I have to make a key and give it to my friends. The key's name will not correspond to the chest. Therefore, even if I named a chest "Gardening Supplies", the key will have a generic name like "Key to errant's Locked Silver Chest".

shared locked chest = can be accessed by password or by a whitelist

This is a little better. But this means for each shared locked chest, I have to add my friends' name to the whitelist (or give them a password they'll have to remember). It's a lot better than having to make and give keys.

protected chest = can be accessed by the protector block's whitelist

This is perfect. This means I only have to update the list in one entity per 10 nodes.

Technic chests have greater capacity than the standard chests like Copper, Silver, Gold, etc. But there are only locked variants of the chests. So if I want to update permissions, I'm stuck making keys for each chest (which easily becomes infeasible once anyone forgets what key opens which chest).

The only buttons I see in technic chests are (auto)sorting, splitting stacks, and renaming.

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] Shared chests with bag support [chesttools]

by Sokomine » Post

errant wrote: protected chest = can be accessed by the protector block's whitelist

This is perfect. This means I only have to update the list in one entity per 10 nodes.
Yes. That method turned out to be the most practical, so I've implemented it in these chests. My own locks mod used whitelists and a (general) keychain. That was too much effort most of the time.
errant wrote: Technic chests have greater capacity than the standard chests like Copper, Silver, Gold, etc.
So what you wish for are mostly larger chests? That could be done...but then technic locked chests would loose their advantage..
A list of my mods can be found here.

jackofthebean000
New member
Posts: 2
Joined: Fri Aug 19, 2022 21:36
In-game: jackofthebean000

Re: [Mod] Shared chests with bag support [chesttools]

by jackofthebean000 » Post

...edges lighter/interior darker' black and white for hardware coloring

Image
Image
Image
Image

Wood Outline newdir
Image
Image
Image


Image
Image
Image

Proposed 16x16 buttons to replace those letters
Drop All
Image
Filter All
Image
Swap All
Image
Take All
Image
Last edited by jackofthebean000 on Wed Sep 07, 2022 02:39, edited 2 times in total.

jackofthebean000
New member
Posts: 2
Joined: Fri Aug 19, 2022 21:36
In-game: jackofthebean000

Re: [Mod] Shared chests with bag support [chesttools]

by jackofthebean000 » Post

So for non traditional chest inspiration' heres something i originally made up for another sandbox game. These crates are made of composite graphite based materials for intergalactic transport systems. Generally 1 meter square. Bump locks are ones you need to press in to release a handle which can be turned. In this example they are also tiny rollers which help move the crate. Several different types of crates are presented here.
Image

Image
Image
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests