From e3b13e9e8017842d7cc47fc3db87553fc4f80fed Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 6 Apr 2023 12:54:55 +0200 Subject: [PATCH] comments --- cheat.py | 1 + main.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) 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}...")