

This storage container who looks a lot like the vanilla Cupboard furniture, has the effect to automatically sorts equipment items that you store in.
The Smart Cupboard can be acquired by spending 20 credits in the store.
Compatible with v81 of Lethal Company.
This mod requires DawnLib installed to avoid some item placement issues. However it is completely possible to not have it installed and instead rely on LethalLib and Matty_Fixes if wanted. GeneralImprovements can also be installed to improve item rotations. For more info, check the compatibility notes below.
On the side of this special Cupboard, you can find a storage box where players can dump their tools like flashlights, walkie-talkies, shovels, spray paints and even scrap items.
The storage will then sort these tools and put them on display in specific sections. Then all items will be organized and ready for players to grab and go!

For those who wants more space!
Press it to delete everything stored... and reset the Cupboard's memory (with an optional host only config).
Some decorative lights for the storage! (with a button!)
List every stored items on a GeneralImprovements screen (cycles through all shelves, refreshes every 10s).

Show the quantity of the item stack on the cursortip UI when hovering a stored item.
Show the quantity of the item stack on a small "card" under the item position !
Item Saving config set to false (so the system is enabled) then you are good to go and you don't need anything else.OutOfBounds.Enabled config enabled (which is enabled by default).FixItemsFallingThrough in GeneralImprovements OR disable OutOfBounds.Enabled in Matty_Fixes, because these mods do the same thing.FixItemsLoadingSameRotation AND FixItemsFallingThrough configs enabled ; this is needed for items to face the correct direction when stored and when loaded (this is NOT needed if DawnLib is also installed).ShipPlaceablesCollide config also needs to be enabled to avoid items vanishing when stored (this is needed all the time).For items developers! By default, every items are allowed in the storage but if you want to add a custom "condition" to your scraps and tools, so the Smart Cupboard will not accept them, you can do so easily by adding this mod as a soft dependency and then write this code :
public static void AddValidation()
{
SelfSortingStorage.Cupboard.SmartCupboard.AddTriggerValidation(MyCustomValidation, "[Your custom message]");
// the custom message is displayed when a player tries to store something checked by your condition
}
private static bool MyCustomValidation(PlayerControllerB player)
{
var item = player.currentlyHeldObjectServer;
if (item is MyCustomItem) // check your item
return false; // don't store the item
return true; // allow the item to be stored
}
If you want to suggest new features or contact me please go to the mod release page in the modding discord or as a github issue.
Thanks Xu Xiaolan for helping with some parts of the code, and also for suggesting good things!
Thanks A Glitched Npc for the initial mod idea and for testing!
Thanks Matty for helping with Matty_Fixes compatibility and other general suggestions.
Thanks ScienceBird for the help concerning furnitures parenting!
Some parts ot the code is based on the ShipInventory implementation by WarperSan, such as the items data structure which has been modified to better fit the SelfSortingStorage mod.
Cupboard asset is ripped and edited from Lethal Company.
"vent_chute" by jazz-the-giraffe is a free 3D model licensed under Creative Commons Attribution.