Electric Workstations — run forges and campfires on power instead of fuel (by this site's author)
Wire an adapter next to a workstation and it stops consuming fuel. Written by this site's author, so the implementation is explained in detail.
Details
> **This mod was written by this site's author (toshi dev).** It is presented on the same terms as any other mod, with the difference that the implementation can be explained from the inside.
The problem
Vanilla 7DTD keeps **workstations and the power grid in two separate systems** with nothing bridging them. However many solar panels you own, a forge still burns wood. This mod adds that bridge as a single block.
Place an `Electric Workstation Adapter` next to a forge, campfire or chemistry station and power it, and **that workstation stops consuming fuel while the adapter has power**.
How it works
The adapter is an ordinary powered block; it only has to sit adjacent and be receiving power. The mod **keeps topping up the workstation's burn timer**, so vanilla code sees "there is fuel" and runs normally.
**Crafting itself is not reimplemented.** Completion, quality, XP and output are all left to vanilla, which is why this does not conflict with overhaul mods.
Settling away-time
This was the awkward part. `TileEntityWorkstation.UpdateTick` hands the whole elapsed time to the first tick after a chunk loads, but **caps it at the fuel it can actually see**.
```
elapsed = (GameTimer.ticks - lastTickTime) / 20
capped = Min(elapsed, BurnTotalTimeLeft) <- the cap
```
An electrified workstation has an empty fuel slot, so `BurnTotalTimeLeft` is only what the mod last topped up (30 seconds by default). Without help, **a powered forge advances 30 seconds no matter how long you were gone.**
So the mod grants burn time before vanilla computes that cap, widening it, and lets vanilla do the settling. The default ceiling is **six hours**, so a forge left for a week does not finish everything in one tick, and the leftover is taken back afterwards — **nothing persists that would keep burning if you uninstall**.
Workstations that are not electrified are passed straight through; vanilla settles those correctly already.
Requirements
| | |
|---|---|
| Game version | **V3** (built and tested against V3.1.0 b14) |
| EAC | must be **off** — this is a Harmony code mod |
| Harmony | uses `0_TFP_Harmony`, bundled with V3 |
| Unlock | **Electrician 25** |
| Configuration | via `config.xml`, no rebuild |
**On dedicated servers, install it on the server only; clients need nothing.** A client writing workstation state would fight the server's sync and make the fire flicker, so the mod refuses to run anywhere that is not the host (`ConnectionManager.IsServer` is true in singleplayer and on a listen host, so those work unchanged).
Optional add-on
`ElectricAppliances` is a separate download: **pure XML, no DLL, no assets, nothing on clients.** It adds two electric stoves, a wall oven, a microwave and a coffee maker, cooking the vanilla campfire recipes in **about 30% of the time**.
Installation
Extract into the server (or host) `Mods` folder. **Clients need nothing.** It uses a DLL, so **disable EAC**. Settings live in `config.xml`. For the kitchen appliances, add `ElectricAppliances` separately (XML only).