From 2c870377a64b0cc2b1b3b23367dc9132ed4b075c Mon Sep 17 00:00:00 2001 From: david-ajax Date: Wed, 30 Jul 2025 01:32:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20ElectronUnion=20=E5=AF=B9?= =?UTF-8?q?=E8=B1=A1=E5=88=9D=E5=A7=8B=E5=8C=96=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.toml | 2 +- particles.py | 5 ++++- reactor.py | 5 ++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/config.toml b/config.toml index 6d7a27e..e64f846 100644 --- a/config.toml +++ b/config.toml @@ -1,7 +1,7 @@ # [调试] 将更改保存到文件 save = 1 # [调试] 覆写时间 -time_override = 12 +time_override = 11 # 对于每个项目的新记忆核子数量 tasked_number = 12 # 竖屏适配 diff --git a/particles.py b/particles.py index 0e3ff5e..7e2843f 100644 --- a/particles.py +++ b/particles.py @@ -144,6 +144,9 @@ class Nucleon: def __len__(self): return len(self.metadata) + def __hash__(self): + return hash(self.content) + @staticmethod def placeholder(): return Nucleon("核子对象样例内容", {}) @@ -197,7 +200,7 @@ class ElectronUnion(): for i in all.keys(): lst.append(Electron(i, all[i])) self.electrons = lst - self.electrons_dict = {i.content: i.metadata for i in lst} + self.electrons_dict = {i.content: i for i in lst} def sync(self): """同步 electrons_dict 中新增对到 electrons 中""" diff --git a/reactor.py b/reactor.py index 20c0b12..8d70574 100644 --- a/reactor.py +++ b/reactor.py @@ -38,7 +38,7 @@ class Reactor(): self.atoms_new.append(atom) counter -= 1 else: - if atom[0]["next_date"] <= aux.get_daystamp(): + if int(atom[0]["next_date"]) <= aux.get_daystamp(): atom[0]["last_date"] = aux.get_daystamp() self.atoms_review.append(atom) # 设置运行时 @@ -64,6 +64,9 @@ class Reactor(): 2: "新记忆模式", 3: "总复习模式" } + print("Atoms New:", self.atoms_new) + print("Atoms Review:", self.atoms_review) + processions = { 1: self.atoms_review, 2: self.atoms_new,