-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1c41c20
commit 26b0caf
Showing
12 changed files
with
1,717 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: CI | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ main ] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
PACK_NAME: "" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Pack | ||
run: | | ||
if [ ! $PACK_NAME ]; then | ||
PACK_NAME=${GITHUB_REPOSITORY##*/} | ||
fi | ||
echo "PACK_NAME=$PACK_NAME" >> $GITHUB_ENV | ||
cd $PACK_NAME | ||
zip -r ../$PACK_NAME.opk ./ | ||
- name: Upload | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Artifacts | ||
path: ${{ env.PACK_NAME }}.opk | ||
- name: Release | ||
if: github.ref_type == 'tag' | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
token: ${{ secrets.GH_TOKEN }} | ||
files: ${{ env.PACK_NAME }}.opk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# -*- encoding: utf-8 -*- | ||
''' | ||
_______________________ _________________________________________ | ||
__ __ \__ /____ _/_ | / /__ |__ __ \___ _/_ ____/__ ____/ | ||
_ / / /_ / __ / __ | / /__ /| |_ / / /__ / _ / __ __/ | ||
/ /_/ /_ /____/ / __ |/ / _ ___ | /_/ /__/ / / /___ _ /___ | ||
\____/ /_____/___/ _____/ /_/ |_/_____/ /___/ \____/ /_____/ | ||
@File : __init__.py | ||
@Author : lunzhiPenxil仑质 | ||
@Contact : [email protected] | ||
@License : AGPL | ||
@Copyright : (C) 2020-2021, OlivOS-Team | ||
@Desc : None | ||
''' | ||
|
||
import OlivaDiceCore | ||
from . import main | ||
from . import storyEngine | ||
from . import msgReply | ||
from . import msgCustom | ||
from . import msgCustomManager | ||
from . import data | ||
from . import userConfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name" : "OlivaStory核心模块", | ||
"author" : "lunzhiPenxil", | ||
"namespace" : "OlivaStoryCore", | ||
"message_mode" : "old_string", | ||
"info" : "本模块为OlivaStory的核心模块,实现了文游引擎的主要功能。", | ||
"version" : "3.0.0", | ||
"svn" : 1, | ||
"compatible_svn" : 101, | ||
"priority" : 20045, | ||
"support" : [ | ||
{ | ||
"sdk" : "all", | ||
"platform" : "all", | ||
"model" : "all" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# -*- encoding: utf-8 -*- | ||
''' | ||
_______________________ _________________________________________ | ||
__ __ \__ /____ _/_ | / /__ |__ __ \___ _/_ ____/__ ____/ | ||
_ / / /_ / __ / __ | / /__ /| |_ / / /__ / _ / __ __/ | ||
/ /_/ /_ /____/ / __ |/ / _ ___ | /_/ /__/ / / /___ _ /___ | ||
\____/ /_____/___/ _____/ /_/ |_/_____/ /___/ \____/ /_____/ | ||
@File : data.py | ||
@Author : lunzhiPenxil仑质 | ||
@Contact : [email protected] | ||
@License : AGPL | ||
@Copyright : (C) 2020-2021, OlivOS-Team | ||
@Desc : None | ||
''' | ||
|
||
|
||
OlivaStoryCore_ver = '3.0.0' | ||
OlivaStoryCore_svn = 1 | ||
OlivaStoryCore_ver_short = '%s(%s)' % (str(OlivaStoryCore_ver), str(OlivaStoryCore_svn)) | ||
|
||
dataDirRoot = './plugin/data/OlivaStory' | ||
|
||
gProc = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# -*- encoding: utf-8 -*- | ||
''' | ||
_______________________ _________________________________________ | ||
__ __ \__ /____ _/_ | / /__ |__ __ \___ _/_ ____/__ ____/ | ||
_ / / /_ / __ / __ | / /__ /| |_ / / /__ / _ / __ __/ | ||
/ /_/ /_ /____/ / __ |/ / _ ___ | /_/ /__/ / / /___ _ /___ | ||
\____/ /_____/___/ _____/ /_/ |_/_____/ /___/ \____/ /_____/ | ||
@File : main.py | ||
@Author : lunzhiPenxil仑质 | ||
@Contact : [email protected] | ||
@License : AGPL | ||
@Copyright : (C) 2020-2021, OlivOS-Team | ||
@Desc : None | ||
''' | ||
|
||
import OlivOS | ||
import OlivaStoryCore | ||
import OlivaDiceCore | ||
|
||
class Event(object): | ||
def init(plugin_event, Proc): | ||
OlivaStoryCore.msgReply.unity_init(plugin_event, Proc) | ||
|
||
def init_after(plugin_event, Proc): | ||
OlivaDiceCore.crossHook.dictHookList['model'].append(['OlivaStoryCore', OlivaStoryCore.data.OlivaStoryCore_ver_short]) | ||
OlivaStoryCore.msgReply.data_init(plugin_event, Proc) | ||
OlivaStoryCore.storyEngine.data_init(plugin_event, Proc) | ||
|
||
def private_message(plugin_event, Proc): | ||
OlivaStoryCore.msgReply.unity_reply(plugin_event, Proc) | ||
|
||
def group_message(plugin_event, Proc): | ||
OlivaStoryCore.msgReply.unity_reply(plugin_event, Proc) | ||
|
||
def poke(plugin_event, Proc): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# -*- 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 OlivaStoryCore | ||
|
||
dictConsoleSwitchTemplate = { | ||
'default' : {} | ||
} | ||
|
||
dictStrCustomDict = {} | ||
|
||
dictStrCustom = { | ||
'strStoryCoreStoryTall': '{tStoryCoreResult}\n\n{tStoryCoreSelection}', | ||
'strStoryCoreStoryTallNone': '故事不存在', | ||
'strStoryCoreStoryTallBreak': '故事中断了', | ||
'strStoryCoreStoryTallEnd': '故事结束了' | ||
} | ||
|
||
dictStrConst = {} | ||
|
||
dictGValue = {} | ||
|
||
dictTValue = { | ||
'tStoryCoreResult': 'N/A', | ||
'tStoryCoreSelection': 'N/A' | ||
} | ||
|
||
dictHelpDocTemp = {} | ||
|
||
dictUserConfigNoteDefault = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# -*- 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 OlivaStoryCore | ||
|
||
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 OlivaStoryCore.msgCustom.dictStrCustom: | ||
if dictStrCustom_this not in OlivaDiceCore.msgCustom.dictStrCustomDict[bot_info_dict_this]: | ||
OlivaDiceCore.msgCustom.dictStrCustomDict[bot_info_dict_this][dictStrCustom_this] = OlivaStoryCore.msgCustom.dictStrCustom[dictStrCustom_this] | ||
for dictHelpDoc_this in OlivaStoryCore.msgCustom.dictHelpDocTemp: | ||
if dictHelpDoc_this not in OlivaDiceCore.helpDocData.dictHelpDoc[bot_info_dict_this]: | ||
OlivaDiceCore.helpDocData.dictHelpDoc[bot_info_dict_this][dictHelpDoc_this] = OlivaStoryCore.msgCustom.dictHelpDocTemp[dictHelpDoc_this] | ||
OlivaDiceCore.msgCustom.dictStrConst.update(OlivaStoryCore.msgCustom.dictStrConst) | ||
OlivaDiceCore.msgCustom.dictGValue.update(OlivaStoryCore.msgCustom.dictGValue) | ||
OlivaDiceCore.msgCustom.dictTValue.update(OlivaStoryCore.msgCustom.dictTValue) | ||
OlivaDiceCore.userConfig.dictUserConfigNoteDefault.update(OlivaStoryCore.msgCustom.dictUserConfigNoteDefault) | ||
for dictConsoleSwitchTemplate_this in OlivaStoryCore.msgCustom.dictConsoleSwitchTemplate: | ||
if dictConsoleSwitchTemplate_this in OlivaDiceCore.console.dictConsoleSwitchTemplate: | ||
OlivaDiceCore.console.dictConsoleSwitchTemplate[dictConsoleSwitchTemplate_this].update( | ||
OlivaStoryCore.msgCustom.dictConsoleSwitchTemplate[dictConsoleSwitchTemplate_this] | ||
) | ||
OlivaDiceCore.console.initConsoleSwitchByBotDict(bot_info_dict) | ||
OlivaDiceCore.console.readConsoleSwitch() | ||
OlivaDiceCore.console.saveConsoleSwitch() |
Oops, something went wrong.