Skip to content

Commit

Permalink
初始化项目
Browse files Browse the repository at this point in the history
+ 指令更新功能基本可用
  • Loading branch information
lunzhiPenxil committed Jan 20, 2022
1 parent 3f5f780 commit bea5171
Show file tree
Hide file tree
Showing 11 changed files with 1,931 additions and 0 deletions.
661 changes: 661 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

661 changes: 661 additions & 0 deletions OlivaDiceMaster/LICENSE

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions OlivaDiceMaster/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# -*- encoding: utf-8 -*-
'''
_______________________ _________________________________________
__ __ \__ /____ _/_ | / /__ |__ __ \___ _/_ ____/__ ____/
_ / / /_ / __ / __ | / /__ /| |_ / / /__ / _ / __ __/
/ /_/ /_ /____/ / __ |/ / _ ___ | /_/ /__/ / / /___ _ /___
\____/ /_____/___/ _____/ /_/ |_/_____/ /___/ \____/ /_____/
@File : __init__.py
@Author : lunzhiPenxil仑质
@Contact : [email protected]
@License : AGPL
@Copyright : (C) 2020-2021, OlivOS-Team
@Desc : None
'''

import OlivaDiceCore
import OlivaDiceMaster.main
import OlivaDiceMaster.msgReply
import OlivaDiceMaster.msgCustom
import OlivaDiceMaster.msgCustomManager
import OlivaDiceMaster.data
import OlivaDiceMaster.webTool
17 changes: 17 additions & 0 deletions OlivaDiceMaster/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name" : "OlivaDice大师模块",
"author" : "lunzhiPenxil",
"namespace" : "OlivaDiceMaster",
"message_mode" : "old_string",
"version" : "3.0.0",
"svn" : 1,
"compatible_svn" : 81,
"priority" : 30020,
"support" : [
{
"sdk" : "all",
"platform" : "all",
"model" : "all"
}
]
}
22 changes: 22 additions & 0 deletions OlivaDiceMaster/data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# -*- encoding: utf-8 -*-
'''
_______________________ _________________________________________
__ __ \__ /____ _/_ | / /__ |__ __ \___ _/_ ____/__ ____/
_ / / /_ / __ / __ | / /__ /| |_ / / /__ / _ / __ __/
/ /_/ /_ /____/ / __ |/ / _ ___ | /_/ /__/ / / /___ _ /___
\____/ /_____/___/ _____/ /_/ |_/_____/ /___/ \____/ /_____/
@File : data.py
@Author : lunzhiPenxil仑质
@Contact : [email protected]
@License : AGPL
@Copyright : (C) 2020-2021, OlivOS-Team
@Desc : None
'''


OlivaDiceMaster_ver = '3.0.0'
OlivaDiceMaster_svn = 1
OlivaDiceMaster_ver_short = '%s(%s)' % (str(OlivaDiceMaster_ver), str(OlivaDiceMaster_svn))

OlivaDiceMaster_oopm_host = 'https://api.dice.center/OlivaDiceVer'
36 changes: 36 additions & 0 deletions OlivaDiceMaster/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# -*- encoding: utf-8 -*-
'''
_______________________ _________________________________________
__ __ \__ /____ _/_ | / /__ |__ __ \___ _/_ ____/__ ____/
_ / / /_ / __ / __ | / /__ /| |_ / / /__ / _ / __ __/
/ /_/ /_ /____/ / __ |/ / _ ___ | /_/ /__/ / / /___ _ /___
\____/ /_____/___/ _____/ /_/ |_/_____/ /___/ \____/ /_____/
@File : main.py
@Author : lunzhiPenxil仑质
@Contact : [email protected]
@License : AGPL
@Copyright : (C) 2020-2021, OlivOS-Team
@Desc : None
'''

import OlivOS
import OlivaDiceMaster
import OlivaDiceCore

class Event(object):
def init(plugin_event, Proc):
OlivaDiceMaster.msgReply.unity_init(plugin_event, Proc)

def init_after(plugin_event, Proc):
OlivaDiceCore.crossHook.dictHookList['model'].append(['OlivaDiceMaster', OlivaDiceMaster.data.OlivaDiceMaster_ver_short])
OlivaDiceMaster.msgReply.data_init(plugin_event, Proc)

def private_message(plugin_event, Proc):
OlivaDiceMaster.msgReply.unity_reply(plugin_event, Proc)

def group_message(plugin_event, Proc):
OlivaDiceMaster.msgReply.unity_reply(plugin_event, Proc)

def poke(plugin_event, Proc):
pass
59 changes: 59 additions & 0 deletions OlivaDiceMaster/msgCustom.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# -*- encoding: utf-8 -*-
'''
_______________________ _________________________________________
__ __ \__ /____ _/_ | / /__ |__ __ \___ _/_ ____/__ ____/
_ / / /_ / __ / __ | / /__ /| |_ / / /__ / _ / __ __/
/ /_/ /_ /____/ / __ |/ / _ ___ | /_/ /__/ / / /___ _ /___
\____/ /_____/___/ _____/ /_/ |_/_____/ /___/ \____/ /_____/
@File : msgCustom.py
@Author : lunzhiPenxil仑质
@Contact : [email protected]
@License : AGPL
@Copyright : (C) 2020-2021, OlivOS-Team
@Desc : None
'''

import OlivOS
import OlivaDiceCore
import OlivaDiceMaster

dictStrCustomDict = {}

dictStrCustom = {
'strMasterReply': '{tMasterResult}',
'strMasterOopmApiFailed': '更新源访问失败',
'strMasterOopmNotMatch': '未找到匹配模块条目',
'strMasterOopmDownload': '{tMasterOopkNameList}\n模块已下载成功',
'strMasterOopmCopy': '{tMasterOopkNameList}\n模块已安装成功',
'strMasterOopmUpdate': '{tMasterOopkNameList}\n模块已更新成功',
'strMasterOopmUpdateAllDone': '所选模块已更新成功,即将重载',
'strMasterOopmUpdateNotNeed': '所有模块已为最新版本,无需更新',
'strMasterOopmUpdateNotSkipSrc': '{tMasterOopkNameList}\n模块为手动部署模式,已跳过',
'strMasterOopmUpdateNotSkipDev': '{tMasterOopkNameList}\n模块为开发模式,已跳过',
'strMasterOopmDownloadFailed': '{tMasterOopkNameList}\n模块下载失败',
'strMasterOopmCopyFailed': '{tMasterOopkNameList}\n模块安装失败'
}

dictStrConst = {
}

dictGValue = {
}

dictTValue = {
'tMasterResult': 'N/A',
'tMasterOopkNameList': 'N/A'
}

dictHelpDocTemp = {
'OlivaDiceMaster': '''[OlivaDiceMaster]
OlivaDice大师模块
本模块为青果跑团掷骰机器人(OlivaDice)大师模块,集成与跑团无关的骰主管理功能功能(如指令更新等)。
核心开发者: lunzhiPenxil仑质
[.help OlivaDiceMaster更新] 查看本模块更新日志
注: 本模块为可选重要模块。''',

'OlivaDiceMaster更新': '''[OlivaDiceMaster]
3.0.0: 指令更新''',
}
36 changes: 36 additions & 0 deletions OlivaDiceMaster/msgCustomManager.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# -*- encoding: utf-8 -*-
'''
_______________________ _________________________________________
__ __ \__ /____ _/_ | / /__ |__ __ \___ _/_ ____/__ ____/
_ / / /_ / __ / __ | / /__ /| |_ / / /__ / _ / __ __/
/ /_/ /_ /____/ / __ |/ / _ ___ | /_/ /__/ / / /___ _ /___
\____/ /_____/___/ _____/ /_/ |_/_____/ /___/ \____/ /_____/
@File : msgCustomManager.py
@Author : lunzhiPenxil仑质
@Contact : [email protected]
@License : AGPL
@Copyright : (C) 2020-2021, OlivOS-Team
@Desc : None
'''

import OlivOS
import OlivaDiceCore
import OlivaDiceMaster

import os
import json

def initMsgCustom(bot_info_dict):
for bot_info_dict_this in bot_info_dict:
if bot_info_dict_this not in OlivaDiceCore.msgCustom.dictStrCustomDict:
OlivaDiceCore.msgCustom.dictStrCustomDict[bot_info_dict_this] = {}
for dictStrCustom_this in OlivaDiceMaster.msgCustom.dictStrCustom:
if dictStrCustom_this not in OlivaDiceCore.msgCustom.dictStrCustomDict[bot_info_dict_this]:
OlivaDiceCore.msgCustom.dictStrCustomDict[bot_info_dict_this][dictStrCustom_this] = OlivaDiceMaster.msgCustom.dictStrCustom[dictStrCustom_this]
for dictHelpDoc_this in OlivaDiceMaster.msgCustom.dictHelpDocTemp:
if dictHelpDoc_this not in OlivaDiceCore.helpDocData.dictHelpDoc[bot_info_dict_this]:
OlivaDiceCore.helpDocData.dictHelpDoc[bot_info_dict_this][dictHelpDoc_this] = OlivaDiceMaster.msgCustom.dictHelpDocTemp[dictHelpDoc_this]
OlivaDiceCore.msgCustom.dictStrConst.update(OlivaDiceMaster.msgCustom.dictStrConst)
OlivaDiceCore.msgCustom.dictGValue.update(OlivaDiceMaster.msgCustom.dictGValue)
OlivaDiceCore.msgCustom.dictTValue.update(OlivaDiceMaster.msgCustom.dictTValue)
Loading

0 comments on commit bea5171

Please sign in to comment.