Admin Battery Charge v1.3.0
New Features
Battery Charging Storage Box
Added support for automatically charging rechargeable battery items when they are placed inside specially skinned storage containers.
Supported Battery Types
- Small Rechargeable Battery
- Medium Rechargeable Battery
- Large Rechargeable Battery
Supported Charging Box Skins
The plugin now checks the skin ID of the storage container and will only charge batteries placed inside approved charging boxes.
Default supported skin:
Additional skin IDs can be added through the configuration file.
Automatic Charging
When a rechargeable battery item is moved into a supported charging box:
- The plugin detects the battery item.
- The plugin verifies the box skin ID.
- The battery charge value is set to its configured maximum capacity.
- The item is updated immediately.
Configured capacities:
| Battery Type | Charge Amount |
|---|
| Small Rechargeable Battery | 400 |
| Medium Rechargeable Battery | 9000 |
| Large Rechargeable Battery | 24000 |
Existing Features
Command Recharge
Players with permission:
adminbatterycharge.use
can recharge deployed batteries by looking at them and using:
/chargebattery
Hammer Recharge
Players with permission:
adminbatterycharge.hammer
can instantly recharge deployed batteries by hitting them with a hammer.
Debug Logging
Optional debug messages can be enabled through the configuration file.
When enabled the plugin logs:
- Box skin detected
- Battery type detected
- Charge amount applied
Example:
Charged battery item inside skinned box. BoxSkin=3733398168, Item=electric.battery.rechargable.large, Charge=24000
How It Works
Deployed Batteries
Deployed batteries are charged using Rust's native battery system:
battery.rustWattSeconds = battery.maxCapactiySeconds
This is used by:
- /chargebattery
- Hammer charging
Battery Items
Battery items stored in containers use item instance data rather than battery entity data.
When placed into a supported charging box the plugin:
- Detects the battery item.
- Identifies its type.
- Applies the configured charge value.
- Updates the item immediately.
This allows charging batteries before they are deployed.