ResourcePull
Pulls resources into TC to stop your base decaying
# ResourcePull
Automatically pulls required resources from nearby storage containers into a Tool Cupboard (TC) when the TC is unable to afford its upkeep payment.
ResourcePull makes upkeep management easier by automatically gathering matching resources from nearby containers before the decay payment is processed.
Features
* Automatically pulls missing upkeep resources into the TC
* Scans storage containers within a configurable radius
* Only pulls the exact resources required for the current upkeep payment
* Stops pulling once the TC has enough of each required resource
* Optional authorization check to only pull from containers belonging to players authorized on the TC
* Optional locked-container protection
* Configurable resource exclusions
* Optional permission requirement
* Optional visual effect when resources are pulled
* Debug logging for troubleshooting
* Uses a single container scan per upkeep check for improved efficiency
How It Works
When a TC cannot afford its upkeep, ResourcePull scans nearby storage containers and searches for the resources required to complete the upkeep payment.
Matching resources are moved directly into the TC inventory. The upkeep payment is then checked again, allowing the current decay cycle to proceed if enough resources were successfully collected.
Permission
ResourcePull.Allow
The permission can optionally be required for TC owners.
Configuration
{
"Show Console Debug Messages": false,
"Max Distance To Scan For Item Containers (Radius Around TC, 1 Foundation = 3)": 8.0,
"Don't Pull Resources From Locked Boxes (Codelocks and Keylocks Block Taking Items)": false,
"Only Pull Resources From Containers Of Authed Players (Player Must Be Authed On TC)": true,
"TC Owner Requires ResourcePull.Allow Permission (False = Allows For Everyone)": false,
"Show Graphics Effect On Resource Pull": false,
"Item Shortnames To Never Pull Into TC (e.g. Wood)": [
"wood"
]
}
Pull Distance
Controls how far ResourcePull searches around the TC for storage containers.
1 foundation = approximately 3 meters.
Locked Containers
When enabled, containers with an active code lock or key lock will not be searched for resources.
Authorization
When enabled, resources are only pulled from containers whose owner is authorized on the TC.
Excluded Items
Add item shortnames that should never be automatically pulled into the TC.
Example:
"Item Shortnames To Never Pull Into TC": [
"wood",
"stones"
]
Visual Effect
Optionally displays an effect at the TC whenever resources are successfully pulled.
Installation
1. Download ResourcePull.cs
2. Place it in your server's oxide/plugins folder.
3. The configuration will automatically be created in oxide/config.
4. Adjust the configuration as required.
Notes
ResourcePull only activates when the TC's normal upkeep check determines that additional resources are required. It does not continuously move resources into the TC unnecessarily.
