cyberrumor / ammo

Almost Manual Mod Organizer - Linux MO for Bethesda Games
GNU General Public License v2.0
33 stars 6 forks source link

Decouple operator from flags dict #54

Closed cyberrumor closed 7 months ago

cyberrumor commented 7 months ago

In the fomod_controller, there's a dictionary that tracks what flags are configured based on the user's selections. Right now, that dictionary also stores something that's not a flag, but the dependency operator, which is usually "and" or "or".

I haven't encountered it, but if a ModuleConfig.xml has a flag named "operator", that's probably going to cause a crash. Even if it doesn't, it's not compatible.

Just move 'operator' and the dict into a dataclass so 'operator' lives somewhere outside of the dict.