Craft From All Storage
This is a mod for Raft based on the Craft From Storage mod by Azzmurr and was Originaly created by Thmsn but is now maintained by Aidanamite (The github repo is of 1.5.1 and likely will not be updated)
This mods allows you to craft items with resources from both your inventory and other storages.
Resources are taken in the following priority
- your inventory
- Currently open storage
- All other storages
Features
- It can take partial resources from each inventory.
- It should not count resources in inventories opened by other players
- You can toggle the inclusion / exclusion of a chest by toggling it with R while looking at the chest
- Can put planks into cooking,smelter,purifier from storage
- Remote storages being used now render with an open and close visual, this works in MP for other people with the mod installed.
Multiplayer
- For multiplayer features to work, you will need to also install ModUtils
- Crafting should sync used resources to other players the same way as if a player had pulled resources from the storage.
- Containers opened by other players will be skipped when checking for amount of resources.
- When players join, the exclusion / inclusion status is synced
- When exclusion / inclusion is toggled, it is synced to other players
- Renders chests as opening / closing when used for remote crafting.
Supported mods
Auto Recipe Redux
link to mod
- Fuel will be pulled from storage (planks)
- The red marking for missing ingredients will look in storage
- items will be removed from storage
Inventory Caching
link to mod
- Might give an FPS boost, I personally don't use it myself.
Troubleshooting
This mod is released as is and may contain bugs
In case of problems, feel free to let me know on the Raft Modding discord.
Harmony Patches
[HarmonyPatch(typeof(CostMultiple), "HasEnoughInInventory")]
[HarmonyPatch(typeof(BuildingUI_CostBox), "SetAmountInInventory")]
[HarmonyPatch(typeof(PlayerInventory), "RemoveCostMultiple")]
[HarmonyPatch(typeof(Inventory), "GetItemCount", typeof(Item_Base))]
[HarmonyPatch(typeof(Inventory), "RemoveItem", typeof(string), typeof(int))]
[HarmonyPatch(typeof(CookingTable_Slot), "InsertItem")]