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

Add Shield Information to UI #3355

Merged

Conversation

ViralReaction
Copy link
Contributor

@ViralReaction ViralReaction commented Aug 17, 2024

Additions

Describe new functionality added by your code, e.g.

  • Shows what the shield protects in the information tab.
  • Shows what the shield protects in the Gear ITab when hovered over

Changes

Describe adjustments to existing features made in this merge, e.g.

  • Armor values in GearTab properly calculate shield armor
  • Removes Covers information from the ThingDef.detailedDescription for shields due to limited space in UI

Reasoning

Why did you choose to implement things this way, e.g.

  • Adding information via Apparel_Shield prevents any harmony overhead
  • Transpiler prevents any additional overhead from using a PostFix
  • Lack of information could be confusing to players

Alternatives

Describe alternative implementations you have considered, e.g.

  • Leave it be
  • Remove Covers from Information tab for shields
  • Add Covers back to descriptionDetailed

Testing

Check tests you have performed:

  • Compiles without warnings
  • Game runs without errors
  • Playtested a colony (Checked a couple shields and apparel)

* Shows what the shield protects in the information tab
* Shows what the shield protects in the Gear ITab when hovered over
* Armor values in GearTab  properly calculate shield armor
@ViralReaction ViralReaction requested review from a team as code owners August 17, 2024 18:26
Copy link

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

@github-actions github-actions bot added the Download in Comments This PR has a zipfile download available. label Aug 17, 2024
@ViralReaction ViralReaction changed the title Adds information for shields to UI Add Shield Information to UI Aug 17, 2024
Copy link

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

Copy link

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

Copy link

github-actions bot commented Sep 6, 2024

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

N7Huntsman
N7Huntsman previously approved these changes Sep 6, 2024
Copy link
Contributor

@N7Huntsman N7Huntsman left a comment

Choose a reason for hiding this comment

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

Works in my testing.

* Adds null checks for the ITab Inventory when it comes to shield mod extension
@ViralReaction
Copy link
Contributor Author

Added null checks to prevent Gear Tab from breaking for a shield that is missing the normal modExtensions.

Copy link

github-actions bot commented Sep 8, 2024

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

Copy link
Contributor

@N7Huntsman N7Huntsman left a comment

Choose a reason for hiding this comment

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

Confirmed the exception is now handled correctly in the event the shield lacks the associated mod extension.

@N7Huntsman N7Huntsman merged commit b7547c1 into CombatExtended-Continued:Development Sep 10, 2024
3 checks passed
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.

4 participants