Other user's assetsAll the assets in this file belong to the author, or are from free-to-use modder's resources
Upload permissionYou can upload this file to other sites but you must credit me as the creator of the file
Modification permissionYou are allowed to modify my files and release bug fixes or improve on the features without permission from or credit to me
Conversion permissionYou can convert this file to work with other games as long as you credit me as the creator of the file
Asset use permissionYou are allowed to use the assets in this file without permission or crediting me
Asset use permission in mods/files that are being soldYou are not allowed to use assets from this file in any mods/files that are being sold, for money, on Steam Workshop or other platforms
Asset use permission in mods/files that earn donation pointsYou are allowed to earn Donation Points for your mods if they use my assets
Author notes
This author has not provided any additional notes regarding file permissions
File credits
This author has not credited anyone else in this file
Donation Points system
This mod is opted-in to receive Donation Points
Changelogs
Version 2.1.3
Fix for holding PullItemsKey
Version 2.1.2
Prevent null exception
Version 2.1.1
Save container after changing inventory
Version 2.1.0
Fixed wards
Version 2.0.8
Log config option
Better container selection
Version 2.0.7
Removed load call when getting list of containers
Version 2.0.6
Fix for not recognizing some new containers
Version 2.0.5
Fixed not taking from new containers
Version 2.0.4
Fixed not showing amount in containers
Version 2.0.3
Maybe fix for multiple people opening containers
Version 2.0.2
Fix for exception, conflicts
Version 2.0.0
Fix for custom containers
Version 1.9.0
Allow pull all with key even when mod requires activation key
Version 1.8.1
Switched prevent modifier key name due to naming confusing
Version 1.8.0
Should prevent pulling from containers in use by other players
Version 1.7.4
Fixed pulling all on normal pull
Version 1.7.2
Fix for not pulling ore
Version 1.7.1
Fixed exception on add all fuel, added hover text to fuel
Version 1.7.0
Added pulling until full for ore and fuel
Fixed broken allow build
Version 1.6.1
Fix for compatibility with crafting station requirement mod
Version 1.6.0
fixed pulling to inventory even if you have enough
Version 1.5.0
Added lines showing connections when building containers, thanks to bakaspaceman!
Version 1.4.4
Fixed containers not accessible, debug message
Version 1.4.2
Reenabled new collider method of getting nearby chests
Fixed containers not accessible
Version 1.4.1
Fixed fps drop
Version 1.4.0
Better nearby container check
Version 1.3.2
Nexus id
Version 1.3.0
Added oreDisallowTypes
Version 1.2.0
Fixed cart inventory pulling
Version 1.1.2
Changed default prevent key to left alt
Version 1.1.0
Added list of forbidden fuel
Version 1.0.0
Added access check
Version 0.11.2
Fixed pulling instead of crafting
Version 0.11.1
Remove non-container chests from list
Version 0.11.0
Added modifier key to pull resources into player inventory rather than crafting/building
Version 0.10.0
Added second flash color config entry to stop flashing
Version 0.9.0
Added refueling fires, cooking
Version 0.8.0
Added available amounts to resource requirement display
Version 0.7.0
Switch warning text flashing from red to yellow (customizable)
Version 0.6.1
Fixed refueling smelters
Version 0.6.0
Added working with smelters, kilns, etc.
Version 0.5.1
Fix for remote issues
Version 0.5.0
Experimental attempt at updating containers open by others
Version 0.4.0
Prevent taking from containers that are in use
Version 0.3.4
Fix for error on creating container
Version 0.3.3
Fix exception on player logging in
Version 0.3.2
Removed ownership requirement
Version 0.3.1
Fix for crafting chest
Version 0.3.0
Added ability to build from containers
Version 0.2.0
Fixed taking from inventory
Version 0.1.1
Set default range to 10 vaguely understood units of measurement
This mod allows you to pull resources from all containers in range when:
crafting an item
upgrading an item
building a construction piece
adding fuel or ore to a smelter
adding wood to a kiln
adding fuel to a fire, standing torch, or sconce,
cooking food in a cooking station
doing whatever it is you do with windmills
It also provides several modifier keys for advanced behaviour
a modifier key (left shift by default) that, when held, pulls until full for ore and fuel.
a modifier key (left ctrl by default) that, when held, pulls the resources into the player inventory instead of building/crafting.
a modifier key to turn off the mod's behaviour entirely (left alt by default) when held down. This behaviour can also be reversed in the config to only allow this mod to perform its function when the key is held down by setting SwitchPrevent to true.
Features
Crafting stations and build menu will show an item's creatability based on resources available in all nearby containers rather than just player inventory.
Resource requirement numbers will now also show the total amount available in nearby chests. You can customize this in the config file.
Resources that the player's inventory doesn't have enough of will flash yellow (customizable) instead of red.
When building a container, there will now be particle effect lines between the container and crafting stations in range, thanks to bakaspaceman who wrote this code!
Prevent Lists
There are two prevent lists in the config:
FuelDisallowTypes - specifies types of consumables like wood and coal that are disallowed (does not apply to kilns, as kilns considered wood an ore)
OreDisallowTypes - specifies types of ore (anything that is transformed into something else) that are disallowed.
Both lists should be comma separated with no spaces, e.g. RoundLog,FineWood.
A config file BepInEx/config/aedenthorn.CraftFromContainers.cfg is created after running the game once with this mod).
You can adjust the config values by editing this file using a text editor or in-game using the Config Manager.
Notes
This mod replaces the Player.ConsumeResources method, so may conflict with anything that tries to patch that.
If you want to see what's happening behind the scenes, the log will spew out mildly informative information about where the resources are coming from (see screenshot).
Technical
To install this mod, the easiest way is to just use Vortex, the Nexus Mods mod manager. It should take care of all dependencies.
To install manually, place the dll file in the BepInEx/plugins folder. You will need BepInEx.