Skip to content

Create UI for choosing what system is being targeted. #709

@alexanderson1993

Description

@alexanderson1993

The UI should go on the Targeting card. Probably below the target identification block, though that might require moving the torpedo launcher controls around.

Image

In Thorium Classic, there are static options for which system you can target. Thorium Nova should only show options for the systems that are on the target. Ideally, those options wouldn't even be available until sensors scanned the target for ship systems.

Image

This will be a little bit involved:

  • Add properties to the targeted contact API call to return the damageable systems (not all systems, just the ones that can be damaged)
    • Ideally, that data comes from the player ship's sensors database, not from the target itself.
    • Also, just classes of systems, not individual systems. We don't care about targeting individual reactors or individual shields.
  • Create the UI. Maybe radio buttons, maybe a dropdown. Include "General" as the default. Rearrange the Targeting UI components as necessary.
  • Include the targeted system in the API send/mutation for firing phasers and firing torpedos.
    • Add a property to the isTorpedo component indicating the targeted system. Make sure the torpedo firing API send/mutation updates that property.
  • If you're feeling ambitious, update the applyDamage and handleTorpedoDamage functions to accept the targeted system and prioritize applying damage to that system first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureHelp WantedItems that are good for folks that are new to the project.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions