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

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

Open
DanAlbert opened this issue May 16, 2023 · 0 comments
Open

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

DanAlbert opened this issue May 16, 2023 · 0 comments

Comments

@DanAlbert
Copy link
Collaborator

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.

DanAlbert added a commit to DanAlbert/dcs_liberation that referenced this issue May 16, 2023
This reverts commit bd2ec12.

Country is both the data (name, ID, etc) and the container for groups
added to the miz, so it can't be used across multiple mission
generations. See pydcs/dcs#314 for potential
follow up work that would let us do this.

Fixes dcs-liberation#2864.
DanAlbert added a commit to dcs-liberation/dcs_liberation that referenced this issue May 16, 2023
This reverts commit bd2ec12.

Country is both the data (name, ID, etc) and the container for groups
added to the miz, so it can't be used across multiple mission
generations. See pydcs/dcs#314 for potential
follow up work that would let us do this.

Fixes #2864.
Lordeath19 pushed a commit to Lordeath19/dcs_liberation that referenced this issue Jun 2, 2023
This reverts commit bd2ec12.

Country is both the data (name, ID, etc) and the container for groups
added to the miz, so it can't be used across multiple mission
generations. See pydcs/dcs#314 for potential
follow up work that would let us do this.

Fixes dcs-liberation#2864.
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

No branches or pull requests

1 participant