diff options
| author | 2023-10-07 07:49:33 +0800 | |
|---|---|---|
| committer | 2023-10-07 07:49:33 +0800 | |
| commit | 4b174b5b5646f748a9cd1bba33c7e4f9b247eecb (patch) | |
| tree | 449c75ad7b2278208de946b28819af25cfe39667 /docs/Core | |
| parent | 1d61716d07eafa928a90bb51e311d5a66778cad6 (diff) | |
| download | infini-4b174b5b5646f748a9cd1bba33c7e4f9b247eecb.tar.gz infini-4b174b5b5646f748a9cd1bba33c7e4f9b247eecb.zip | |
feat(docs): version update
Diffstat (limited to 'docs/Core')
| -rw-r--r-- | docs/Core/index.md | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/docs/Core/index.md b/docs/Core/index.md index 3f3422b6..aff4930b 100644 --- a/docs/Core/index.md +++ b/docs/Core/index.md @@ -21,7 +21,7 @@ ``` shell git clone https://github.com/HydroRoll-Team/HydroRollCore.git cd HydroRollCore -poetry install --no-dev +pdm install # 或者使用pip # pip install HydroRollCore ``` @@ -30,16 +30,17 @@ poetry install --no-dev ``` shell mkdir myrules && cd myrules && mkdir rule1 -echo.> config.toml && echo.> __init__.py :: 创建空的配置文件和python运行脚本 +echo.> config.toml +echo.> __init__.py ``` 在 `__init__.py` 创建一个 `rule` 实例并继承 `Rule` 基类, 通过编写合适的相关方法与类注册规则包实现规则的自定义。 ``` python -from HydroRollCore import Rules +from HydroRollCore import Rule -class Myrule(Rules): - """自设规则包,继承 Rules 基类""" +class Myrule(Rule): + """自设规则包,继承 Rule 基类""" ``` 3. 合理修改你的 `config.toml` 配置文件,完成注册! |
