feat: 支持多场景预设切换

This commit is contained in:
Rock Chin
2023-02-19 11:46:12 +08:00
parent c35fd9c4b7
commit d0bcf6940a
7 changed files with 122 additions and 11 deletions

View File

@@ -189,6 +189,7 @@ def register(name: str, description: str, version: str, author: str):
__current_registering_plugin__ = name
# print("registering plugin: n='{}', d='{}', v={}, a='{}'".format(name, description, version, author))
host.__plugins__[name] = {
"name": name,
"description": description,

View File

@@ -23,6 +23,8 @@ def wrapper_dict_from_plugin_list() -> dict:
def apply_switch(switch: dict):
"""将开关数据应用到插件列表中"""
# print("将开关数据应用到插件列表中")
# print(switch)
for plugin_name in switch:
host.__plugins__[plugin_name]["enabled"] = switch[plugin_name]["enabled"]