From e3734c5ead6e02ee79495e290b750a3af68985f7 Mon Sep 17 00:00:00 2001 From: bmy <2583236812@qq.com> Date: Thu, 23 May 2024 14:33:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B5=8B=E8=AF=95=E5=AD=90=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E8=AF=BB=E5=8F=96=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cfg_main.toml | 18 +++++++++--------- cfg_subtask.toml | 19 +++++++++++++++++++ subtask.py | 3 +++ 3 files changed, 31 insertions(+), 9 deletions(-) diff --git a/cfg_main.toml b/cfg_main.toml index 1f20d4f..7d7b47d 100644 --- a/cfg_main.toml +++ b/cfg_main.toml @@ -3,12 +3,12 @@ logger_filename = "log/file_{time}.log" logger_format = "{time} {level} {message}" [task] -GetBlock_enable = true # 人员施救使能 -PutBlock_enable = false # 紧急转移使能 -GetBBall_enable = true # 整装上阵使能 -UpTower_enable = true # 通信抢修使能 -GetRBall_enable = true # 高空排险使能 -PutBBall_enable = true # 派发物资使能 -PutHanoi_enable = true # 物资盘点使能 -MoveArea_enable = true # 应急避险使能 -KickAss_enable = true # 扫黑除暴使能 +GetBlock_enable = true # 人员施救使能 +PutBlock_enable = true # 紧急转移使能 +GetBBall_enable = true # 整装上阵使能 +UpTower_enable = true # 通信抢修使能 +GetRBall_enable = true # 高空排险使能 +PutBBall_enable = true # 派发物资使能 +PutHanoi_enable = true # 物资盘点使能 +MoveArea_enable = true # 应急避险使能 +KickAss_enable = true # 扫黑除暴使能 diff --git a/cfg_subtask.toml b/cfg_subtask.toml index e69de29..ffa4435 100644 --- a/cfg_subtask.toml +++ b/cfg_subtask.toml @@ -0,0 +1,19 @@ +[get_block] + +[put_block] + +[get_bball] + +[up_tower] + +[get_rball] + +[put_bball] + +[put_hanoi1] + +[put_hanoi2] + +[move_area] + +[kick_ass] diff --git a/subtask.py b/subtask.py index d82034a..46e596f 100644 --- a/subtask.py +++ b/subtask.py @@ -2,6 +2,7 @@ from enum import Enum from loguru import logger from utils import label_filter from utils import tlabel +import toml import time # 任务类 @@ -86,6 +87,7 @@ class get_block(): else: return False def exec(): + cfg = toml.load('cfg_subtask.toml') # 加载任务配置 pass @@ -100,6 +102,7 @@ class put_block(): else: return False def exec(): + cfg = toml.load('cfg_subtask.toml') # 加载任务配置 pass # 整装上阵