From 8ea30f0508d210c1f08a900990b08968a535be30 Mon Sep 17 00:00:00 2001 From: Tiger Date: Tue, 20 Jan 2026 10:13:51 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E4=BA=86Docstring?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 +++++--- app/routes/assets.py | 3 +++ app/routes/cards.py | 3 +++ app/routes/matters.py | 3 +++ app/routes/pages.py | 3 +++ app/routes/reactions.py | 3 +++ app/utils/assets.py | 3 +++ app/utils/cards.py | 3 +++ app/utils/matters.py | 3 +++ app/utils/reactions.py | 3 +++ resources/conditions/list.json | 3 +++ 11 files changed, 35 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 26d7d98..9fd23ee 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,8 @@ backend/ ```json { - "Carbon-Oxygen-": "CarbonDioxide" + "Carbon-Oxygen-": "CarbonDioxide", + "...": "..." } ``` @@ -76,10 +77,11 @@ backend/ { "pics": { "Carbon": "cards/Carbon.png", - "Oxygen": "cards/Oxygen.png" + "Oxygen": "cards/Oxygen.png", + "...": "..." }, "sounds": { - // ... + "...": "..." } } ``` diff --git a/app/routes/assets.py b/app/routes/assets.py index 965039a..2f149e1 100644 --- a/app/routes/assets.py +++ b/app/routes/assets.py @@ -1,3 +1,6 @@ +''' +资源文件读取路由 +''' from flask import Blueprint, send_file from ..utils import assets diff --git a/app/routes/cards.py b/app/routes/cards.py index db11aee..7f16766 100644 --- a/app/routes/cards.py +++ b/app/routes/cards.py @@ -1,3 +1,6 @@ +''' +卡牌定义文件读取路由 +''' from flask import Blueprint from ..utils import cards diff --git a/app/routes/matters.py b/app/routes/matters.py index 1edc06e..88a0a8c 100644 --- a/app/routes/matters.py +++ b/app/routes/matters.py @@ -1,3 +1,6 @@ +''' +物质定义文件读取路由 +''' from flask import Blueprint from ..utils import matters diff --git a/app/routes/pages.py b/app/routes/pages.py index eb1c89f..2d54d4a 100644 --- a/app/routes/pages.py +++ b/app/routes/pages.py @@ -1,3 +1,6 @@ +''' +网页路由 +''' from flask import Blueprint, jsonify page_bp = Blueprint("page", __name__, "/") diff --git a/app/routes/reactions.py b/app/routes/reactions.py index 4579a27..87f4aaf 100644 --- a/app/routes/reactions.py +++ b/app/routes/reactions.py @@ -1,3 +1,6 @@ +''' +反应定义文件读取路由 +''' from flask import Blueprint from ..utils import reactions diff --git a/app/utils/assets.py b/app/utils/assets.py index 038e4a3..c6aad86 100644 --- a/app/utils/assets.py +++ b/app/utils/assets.py @@ -1,3 +1,6 @@ +''' +读取资源文件列表和路径 +''' import json def readAssetsList() -> dict: diff --git a/app/utils/cards.py b/app/utils/cards.py index 6f7853d..64a7343 100644 --- a/app/utils/cards.py +++ b/app/utils/cards.py @@ -1,3 +1,6 @@ +''' +读取卡牌定义文件列表和内容 +''' import json def readCardList() -> dict: diff --git a/app/utils/matters.py b/app/utils/matters.py index 0bf59a8..6bcb2c0 100644 --- a/app/utils/matters.py +++ b/app/utils/matters.py @@ -1,3 +1,6 @@ +''' +读取物质定义文件列表和内容 +''' import json def readMatterList() -> dict: diff --git a/app/utils/reactions.py b/app/utils/reactions.py index 34db0a3..c24e684 100644 --- a/app/utils/reactions.py +++ b/app/utils/reactions.py @@ -1,3 +1,6 @@ +''' +读取反应定义文件列表和内容 +''' import json def readReactionList() -> dict: diff --git a/resources/conditions/list.json b/resources/conditions/list.json index e69de29..f61b33b 100644 --- a/resources/conditions/list.json +++ b/resources/conditions/list.json @@ -0,0 +1,3 @@ +{ + "Ignite": "Ignite" +} \ No newline at end of file