ClanGenOfficial / clangen

Warrior Cats fan game
https://clangen.io
Other
229 stars 398 forks source link

[CODE] Review how we store clan affiliation #2530

Open j-gynn opened 3 days ago

j-gynn commented 3 days ago

Description Current behaviour dictates that all cats - living, dead and undecided - who belong to the Clan must be in the clan_cats list. On the face of it, this makes a lot of sense, but it's also really quite annoying. Cats who are dead are stored in two places - in their respective dead clan (StarClan/Dark Forest) and also in clan_cats. There is no equivalent "living clan" for living cats, so extracting them from the list takes a comprehension every time and it's just a bit messy.

Possible solutions?

  1. Remove dead cats from clan_cats. This means we will have difficulty tracking who is and who isn't a former clan cat, which is obviously not ideal.
  2. Add a new list that only stores alive clan cats. This is just doubling our data but More, which is... fine.
  3. Create a lookup table for clan cats within the clan/sc/df that stores their values only once. This then means we have to have a separate version of starclan/darkforest for outsiders, which I'm also not the biggest fan of.