The_Great_Sephiroth Posted August 5, 2023 Share Posted August 5, 2023 I'm looking to create a block that will slowly repair blocks around it. Creating a custom block is easy, but is it possible to create a buff that can "heal" blocks? I do not see an existing buff that does this, so I am not sure that it is possible. Link to comment Share on other sites More sharing options...
Sqeegie Posted August 8, 2023 Share Posted August 8, 2023 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: Build and maintain an affected blocklist (mimic a landclaim block?) Schedule repair updates (mimic a growing plant block?) Repair affected blocks (mimic ItemActionRepair?) Link to comment Share on other sites More sharing options...
The_Great_Sephiroth Posted August 9, 2023 Author Share Posted August 9, 2023 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 More sharing options...
FramFramson Posted August 15, 2023 Share Posted August 15, 2023 (edited) 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 August 15, 2023 by FramFramson (see edit history) 1 Link to comment Share on other sites More sharing options...
The_Great_Sephiroth Posted August 17, 2023 Author Share Posted August 17, 2023 That was my thought. Add functionality to the claim block that allows it to repair stuff, SLOWLY. I'll check it out. Thanks so much! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now