
AreaRepair
Repair every damaged piece around you with one hammer swing, and optionally remove an area of your own pieces. Client-side only.Area Repair
Part of FlyingHose's Modpack. Needs only BepInEx.
In the base game the hammer repairs one piece at a time, the one you point at. This mod makes a repair also fix every other damaged piece within a radius of you. It can also remove an area of your own pieces at once. Area remove is off until you turn it on.
Repair
Open the hammer's build menu, pick the repair tool, and repair a piece as usual. Every other damaged piece within Repair.Radius meters is repaired too, 8 meters by default. The radius is centered on you, not on the piece you point at, so you can stand in the middle of a damaged build and repair as much of it as your stamina pays for with one click. You do not have to point at a damaged piece for the area to be repaired.
Each piece costs what the base game charges for one repair: the stamina, any eitr the tool uses, and the hammer's durability. Pieces are repaired nearest first. When you cannot pay for the next piece, the repair stops there, so a big repair on low stamina fixes the pieces closest to you and leaves the rest. Durability stops at zero and never goes below it, and a broken hammer repairs nothing around you. The swing animation plays once per click.
A message in the top left says how many extra pieces were repaired, and adds out of stamina, out of eitr, or the hammer is broken when the repair stopped early. The pieces play their build effect, up to Repair.MaxEffects of them, so a big repair does not flood the screen. 0 plays none.
Only pieces that can take damage are repaired. Pieces without wear, such as some decorations, are skipped.
Remove
Area remove is off by default. Set Remove.Enabled to true to use it.
With it on, hold the modifier key (Left Alt by default) while you remove a piece with the hammer. The pieces within Remove.Radius meters of the piece you removed are removed too, nearest first, up to Remove.MaxPieces pieces.
A message in the center of the screen says Removed N pieces, counting the extra pieces.
By default only pieces you built are taken (Remove.OnlyMyPieces). Set it to false and area remove follows the game's own rules, the same as removing each piece by hand: outside a ward anyone may remove any piece, and a piece inside a ward you do not have access to stays. Pieces the base game would not let you remove, such as a private chest with items in it, stay as well. Pieces without wear are skipped.
Removed pieces drop their materials as usual, the same as if you had removed each one by hand. Removal cannot be undone, so check the radius before you use it in a crowded build.
Wards and workbenches
Every piece is checked on its own, with the same rules the base game applies when you repair or remove it by hand. Area repair and area remove respect wards. A piece inside a ward you do not have access to is skipped. Pieces that need a workbench are skipped when you are not standing within range of one, the same as in the base game. No message is shown for skipped pieces.
Client-side only
This mod works on any server, and the other players do not need it. It sends nothing of its own over the network and does not check versions. It uses the base game's repair and remove for each piece, which already reach whoever owns the piece.
Do not combine with
Other mods that change what the hammer's repair or remove does. They change the same game code, so run one or the other.
Config
File: BepInEx/config/com.yesucs.yesubuildkit.arearepair.cfg
| Key | Default | What it does |
|---|---|---|
General.Enabled |
true |
Master switch. Off means no patches. Needs a restart. |
General.DebugLogging |
false |
Detailed log lines. |
Repair.Enabled |
true |
Repair also fixes the damaged pieces around you. |
Repair.Radius |
8 |
Meters from you. From 1 to 50. |
Repair.MaxEffects |
15 |
The most pieces that play their build effect in one repair. 0 or more; 0 plays none. |
Remove.Enabled |
false |
Turn on area remove. |
Remove.Radius |
3 |
Meters from the piece you removed. From 1 to 20. |
Remove.ModifierKey |
LeftAlt |
Hold while removing to remove the area. Any key. |
Remove.OnlyMyPieces |
true |
Only remove pieces you built. Off follows the game's rules and wards. |
Remove.MaxPieces |
50 |
The most extra pieces one removal takes. From 1 to 500. |
All of these are yours alone. They change only what your own hammer does, under the game's own costs and rules.