diff --git a/cheat.py b/cheat.py index d866e54..69c8560 100644 --- a/cheat.py +++ b/cheat.py @@ -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] diff --git a/main.py b/main.py index f63de4d..b37c99e 100644 --- a/main.py +++ b/main.py @@ -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}...")