Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide disabled ammo from research #3604

Open
wants to merge 2 commits into
base: Development
Choose a base branch
from
Open

Conversation

Safairette
Copy link
Contributor

Additions

  • Disabled ammo now no longer shows up in research

Reasoning

  • Cleans up the research screen

Alternatives

  • Answer more questions about the Tomahawk Missile

Testing

Check tests you have performed:

  • Compiles without warnings
  • Game runs without errors
  • It works with generic mode

@Safairette Safairette requested review from a team as code owners December 21, 2024 18:28
Copy link

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-12447513714.zip

@github-actions github-actions bot added the Download in Comments This PR has a zipfile download available. label Dec 21, 2024
Copy link

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-12448948333.zip

Copy link
Contributor

@AluminumAlman AluminumAlman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as intended: mortar research only shows 81mm shells when only the 81mm mortar is available, and advanced munitions hides ammo that isn't used by any gun.

{
pair.second.RemoveWhere(x => x is AmmoDef ammoDef && ammoDef.menuHidden);
}
input.RemoveWhere(x => x.second.NullOrEmpty());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's exactly the point of removing empty research unlock headers? So that if research ends up unlocking nothing, that it wouldn't have the text "Unlock:" with nothing after?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
yeah, pretty much, the heavy weapons research unlocks the 105mm shells, which were disabled, but the header still shows up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Download in Comments This PR has a zipfile download available.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants