Skip to content

Country should be split into constant data and miz state #314

Description

@DanAlbert

The Country class does a handful of things:

  1. Exposes that DCS database of country names, IDs, available callsigns and units, etc
  2. Tracks what groups have been added to the miz that belong to the country
  3. Tracks callsign assignment state

For most of the other DCS data these are not all done by the same class. PlaneType has the database and Plane has the miz state. Mixing these two makes it impossible for applications to use Country as their country ID (the alternative is using either the int ID or the shortname and doing lookups whenever the other data is needed, then discarding most of the data that was just constructed) when multiple missions will be generated because each successive mission will continue adding groups to the existing country.

At a glance this might be hard to untangle, especially since our type annotations are incomplete.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions