This commit is contained in:
Mylloon 2023-04-06 12:54:55 +02:00
parent e6c4585d8e
commit e3b13e9e80
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
2 changed files with 4 additions and 1 deletions

View file

@ -33,5 +33,6 @@ class Cheat(*[child for child in Hack.__subclasses__()]): # type: ignore
for cheat, incompatible_cheat_list in self.incompatible.items():
for incompatible_cheat in incompatible_cheat_list:
if not cheat in self.incompatible[incompatible_cheat]:
# Propagate implicit cheat incompatibilities
self.incompatible[incompatible_cheat] = self.incompatible[incompatible_cheat] + [
cheat]

View file

@ -60,10 +60,12 @@ if __name__ == "__main__":
c_id = []
print("Invalid ID.")
# Instanciate and run threads, removing incompatibilites
# Instanciate and run threads
running = []
for fn in [c.cheats_list[i] for i in c_id]:
# Set of incompatible cheat with fn
incompatible = set(c.incompatible[fn]).intersection(running)
if not len(incompatible):
running.append(fn)
print(f"Running {fn}...")