Remove eager loading of factions.

Eager loading meant that users would need to restart Liberation to pick
up changes to faction files. That's annoying for modders, slows down
start up, and uselessly sits in RAM when it's not needed after game
creation.

Also removes the __getitem__ and __iter__ methods in favor of named
methods, since the dunder methods are more or less impenetrable for IDEs
and grep.
This commit is contained in:
Dan Albert
2023-04-17 21:47:34 -07:00
parent f3d2952579
commit 42e9a6294b
5 changed files with 62 additions and 71 deletions

View File

@@ -1,4 +1 @@
from .faction import Faction
from .factionloader import FactionLoader
FACTIONS = FactionLoader()