From 0ed10486f719c23ab7e0e84d2e119a7fa5f70475 Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Sat, 6 Jul 2024 09:07:19 +0800 Subject: refactor!: rewrite core business logic --- examples/BRP/src/__init__.py | 0 examples/COC7/Character.py | 3 ++- examples/COC7/Wiki.py | 4 +++- examples/COC7/__init__.py | 2 +- examples/_BRP/src/__init__.py | 0 5 files changed, 6 insertions(+), 3 deletions(-) delete mode 100644 examples/BRP/src/__init__.py create mode 100644 examples/_BRP/src/__init__.py (limited to 'examples') diff --git a/examples/BRP/src/__init__.py b/examples/BRP/src/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/examples/COC7/Character.py b/examples/COC7/Character.py index 37e2a4e..bb30661 100644 --- a/examples/COC7/Character.py +++ b/examples/COC7/Character.py @@ -4,9 +4,10 @@ import math from typing import Union from dataclasses import dataclass -from hrc.rule import aliases +from hrc.rule import Rule from hrc.rule.BaseRule import CharacterCard +aliases = Rule.aliases @dataclass class Attributes(CharacterCard.Attribute): diff --git a/examples/COC7/Wiki.py b/examples/COC7/Wiki.py index e6a730a..b97f717 100644 --- a/examples/COC7/Wiki.py +++ b/examples/COC7/Wiki.py @@ -1 +1,3 @@ -# MyRule \ No newline at end of file +# MyRule + +class Wiki(): ... \ No newline at end of file diff --git a/examples/COC7/__init__.py b/examples/COC7/__init__.py index baea4c7..25acdaa 100644 --- a/examples/COC7/__init__.py +++ b/examples/COC7/__init__.py @@ -15,7 +15,7 @@ class COC7(Rule): attr: Attributes = Depends() # 必须实现一个继承自 Character.Attribute 的子类 wiki: Wiki = Depends() # 可选实现一个 Wiki 类 - @core.event_post_processor_hook + @core.event_postprocessor_hook async def auto_card(self): if self.session and self.session.gid and self.ac: if hasattr(self.pc.trans, "生命") or hasattr(self.pc.trans, "理智"): diff --git a/examples/_BRP/src/__init__.py b/examples/_BRP/src/__init__.py new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3-70-g09d2