Drop unit level lines the game never reads - #8685
Open
burnhamrobertp wants to merge 1 commit into
Open
Conversation
Contributor
burnhamrobertp
force-pushed
the
bug/dead-unitdef-keys
branch
from
August 7, 2026 20:32
f5442f7 to
03e8e46
Compare
burnhamrobertp
force-pushed
the
bug/dead-unitdef-keys
branch
from
August 8, 2026 03:16
03e8e46 to
d1136a9
Compare
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.
Nine lines the game never reads, all weapondef tags or dead spellings sitting at unit level.
The four antinuke ships set energypershot at unit level as well as inside their antinuke weapondef, both at 7500 - the engine's unitdef has no such field and the weapon already comes out with energyCost 7500, so the stockpile cost these look like they are setting is handled a level down either way. scavempspawner does the same with craterboost, cratermult and impulsefactor, and there the unit level impulsefactor reads 0 while the weapon that actually applies says 0.123. critter_gull has collide = false and collision = false on consecutive lines, the second being the dead spelling.
legfloat is a slightly different case. Its description = "Floating Tank" is a real tag, but it only feeds the engine tooltip, and the interface goes through units.json, so what players see is "Heavy Convertible Tank/Boat" and always has. Removing the line leaves that as the only description, which is the one we want anyway - "floating tank" suggests something slower in the water than this thing is.
No behaviour change, nothing displayed or simulated comes from any of these.
Found by the def invariant checks in #8630.