Scale build plan (construct block) with construct and deconstruct progress#11584
Draft
EggleEgg wants to merge 1 commit intoAnuken:masterfrom
Draft
Scale build plan (construct block) with construct and deconstruct progress#11584EggleEgg wants to merge 1 commit intoAnuken:masterfrom
EggleEgg wants to merge 1 commit intoAnuken:masterfrom
Conversation
way-zer
reviewed
Jan 20, 2026
| return progress; | ||
| } | ||
|
|
||
| public void scaleHealth(float progress){ |
Contributor
There was a problem hiding this comment.
The PR looks good, and I think it can be applied to all buildings.
However, this function seems to need some optimization:
- Why use
tile.buildinstead ofthis? previousHealthanddamagedare not persisted or synchronized.
Contributor
There was a problem hiding this comment.
Perhaps we could implement like this:
- old = health / maxHealth
- maxHealth = xxxx
- health = old * maxHealth
Contributor
|
I implemented this back in v6 for Ranked server, just would like to point out for thorough testing on building, then deconstructing building mid-build, then building it a bit up again until built, etc. Especially when mid-built the ConstructBlock got some damage (then, again, it started to de/re-construct by the player). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No more spending 2 minutes building a very expensive block or core just for a flare to destroy it instantly because it has 10 hp
Max buildplant health is 10 by default as before, but with an optional variable to set plan max health to a % of the block s health (constructHealthMultiplier).
Example: if a block has 5.8k hp and the multiplier is 0.5, the buildplan s health will increase with progress (0-1) up to its 2.9k maxhealth. If the multiplier is <=0 (default) it will only increase up to 10
Blocks with constructHealthMultiplier:
2026-01-1918-24-58-ezgif.com-gif-maker.mp4
2026-01-19.20-32-33.mp4
.
And a release https://github.com/EggleEgg/Mindustry/releases/tag/34trre
If your pull request is not translation or serverlist-related, read the list of requirements below and check each box: