Jump to content

Buff that repairs blocks in a certain radius?


Recommended Posts

You would likely need to create a custom block functionality via a C# mod and hook your custom-defined block into it. I would look at SphereII's SCore or a similar mod for examples of how to implement blocks with custom functionality.

 

For the actual repair code, I would probably do something like:

  1. Build and maintain an affected blocklist (mimic a landclaim block?)
  2. Schedule repair updates (mimic a growing plant block?)
  3. Repair affected blocks (mimic ItemActionRepair?)
Link to comment
Share on other sites

My plan was to modify the LCB to do a periodic tick to repair blocks in the claim over time. When you have a large base it begins to become impossible to repair things between hordes. The other idea is a way to SEE damaged blocks. A piece of eyewear that highlights any block with less than full health in red so I can repair them and get on with life.

Link to comment
Share on other sites

There's an old A19/20 mod, "Claim Auto-Repair Block" that has very similar functionality:  https://7daystodiemods.com/claim-auto-repair-block/

Not sure if it still works in A21 (would depend on if the existing code can recognize the new blocks or not, I guess), but even if it's broken there may be some ideas in there so that you don't have to reinvent the wheel.

 

EDIT: According to the relevant forum topic on here, the dev has quietly updated the mod for A21.

 

Edited by FramFramson (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...