Skip to content

Commit

Permalink
版本推进至3.0.10
Browse files Browse the repository at this point in the history
+ 戳一戳掷骰支持读取set设置数据 closed #10
  • Loading branch information
lunzhiPenxil committed Nov 15, 2022
1 parent 393982e commit e3a8cb0
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
4 changes: 2 additions & 2 deletions OlivaDiceJoy/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"namespace" : "OlivaDiceJoy",
"message_mode" : "old_string",
"info" : "本模块为OlivaDice的娱乐模块,提供了一些无关紧要的娱乐功能,它们或许是与跑团关系不大、或许只是一些历史原因遗留下来的传统,总之,这些在野蛮生长时期被或是由于开发者无知、或是作为恶性竞争手段、或是用户呼声较大但对于跑团而言意义不明的,被添加进来的小功能,都会被放入这个模块。",
"version" : "3.0.9",
"svn" : 17,
"version" : "3.0.10",
"svn" : 18,
"compatible_svn" : 101,
"priority" : 20010,
"support" : [
Expand Down
4 changes: 2 additions & 2 deletions OlivaDiceJoy/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
'''


OlivaDiceJoy_ver = '3.0.9'
OlivaDiceJoy_svn = 17
OlivaDiceJoy_ver = '3.0.10'
OlivaDiceJoy_svn = 18
OlivaDiceJoy_ver_short = '%s(%s)' % (str(OlivaDiceJoy_ver), str(OlivaDiceJoy_svn))

listPlugin = []
Expand Down
25 changes: 25 additions & 0 deletions OlivaDiceJoy/msgReply.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import time
import traceback
from functools import wraps
import copy

def unity_init(plugin_event, Proc):
pass
Expand Down Expand Up @@ -93,6 +94,7 @@ def poke_jrrp(plugin_event, type):

def poke_rd(plugin_event, event_type):
tmp_group_id = plugin_event.data.group_id
tmp_user_platform = plugin_event.platform['platform']
tmp_hagID = None
if event_type == 'group':
if tmp_group_id == -1:
Expand Down Expand Up @@ -126,6 +128,29 @@ def poke_rd(plugin_event, event_type):
tmp_template_customDefault = tmp_template['customDefault']
if 'mainDice' in tmp_template:
rd_para_str = tmp_template['mainDice']
rd_para_main_str = OlivaDiceCore.userConfig.getUserConfigByKey(
userId = tmp_hagID,
userType = 'group',
platform = tmp_user_platform,
userConfigKey = 'groupMainDice',
botHash = plugin_event.bot_info.hash
)
rd_para_main_D_right = OlivaDiceCore.userConfig.getUserConfigByKey(
userId = tmp_hagID,
userType = 'group',
platform = tmp_user_platform,
userConfigKey = 'groupMainDiceDRight',
botHash = plugin_event.bot_info.hash
)
if rd_para_main_str != None:
rd_para_str = rd_para_main_str
tmp_template_customDefault = copy.deepcopy(tmp_template_customDefault)
if type(rd_para_main_D_right) == int:
if type(tmp_template_customDefault) != dict:
tmp_template_customDefault = {}
if 'd' not in tmp_template_customDefault:
tmp_template_customDefault['d'] = {}
tmp_template_customDefault['d']['rightD'] = rd_para_main_D_right
rd = OlivaDiceCore.onedice.RD(rd_para_str, tmp_template_customDefault, valueTable = skill_valueTable)
rd.roll()
if tmp_pcName == None:
Expand Down

0 comments on commit e3a8cb0

Please sign in to comment.