Skip to content

Fix lower case cargo as target - #6468

Merged
sturnclaw merged 1 commit into
pioneerspacesim:masterfrom
zonkmachine:fix_lower_case_cargo
Nov 28, 2026
Merged

sturnclaw merged 1 commit into
pioneerspacesim:masterfrom
zonkmachine:fix_lower_case_cargo

Conversation

@zonkmachine

Copy link
Copy Markdown
Member
capitalize2

Fixes #6464

Another option to this fix could be to capitalize all targets and skip the test for IsCargoContainer(). I don't know if there even is a case where the target could be lower case.

@sturnclaw

Copy link
Copy Markdown
Member

The fix for the issue is that CargoBody.cpp needs to be changed to call GetProperName instead of GetName on the passed-in commodity type object. What's generating the lower-case names is that the default "GetName" method was changed to return the lowercase mid-sentence variant of the name, instead of a new "GetNoun" or "GetLowercaseName" method being added (in hindsight, would probably have lead to less visible bugs...)

@zonkmachine

Copy link
Copy Markdown
Member Author

The fix for the issue is that CargoBody.cpp needs to be changed to call GetProperName instead of GetName on the passed-in commodity type object.

Right, fixed!

What's generating the lower-case names is that the default "GetName" method was changed to return the lowercase mid-sentence variant of the name, instead of a new "GetNoun" or "GetLowercaseName" method being added (in hindsight, would probably have lead to less visible bugs...)

Yes. I've been hindsighting quite a bit over this.

@sturnclaw
sturnclaw merged commit 29b603b into pioneerspacesim:master Nov 28, 2026
4 checks passed
@zonkmachine
zonkmachine deleted the fix_lower_case_cargo branch November 28, 2026 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Capitalized cargo in debris field

2 participants