Skip to content

Commit

Permalink
fix(speech): strSelfName
Browse files Browse the repository at this point in the history
调整GlobalMsg的覆写时机
  • Loading branch information
mystringEmpty committed Apr 3, 2024
1 parent ed05ecc commit 494ee39
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 0 additions & 10 deletions Dice/Dice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,16 +291,6 @@ EVE_Enable(eventEnable){
console.log(string("初始化js/python环境失败!") + e.what(), 1, printSTNow());
}
fmt = make_unique<DiceModManager>();
try {
std::unique_lock lock(GlobalMsgMutex);
if (loadJMap(DiceDir / "conf" / "CustomMsg.json", EditedMsg) >= 0
|| loadJMap(fpFileLoc / "CustomMsg.json", EditedMsg) > 0) {
map_merge(GlobalMsg, EditedMsg);
}
}
catch (const std::exception& e) {
console.log(string("读取/conf/CustomMsg.json失败!") + e.what(), 1, printSTNow());
}
loadData();
//初始化黑名单
try {
Expand Down
10 changes: 10 additions & 0 deletions Dice/DiceMod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,16 @@ int DiceModManager::load(ResList& resLog){
}
}
}
//custom_msg
try {
std::unique_lock lock(GlobalMsgMutex);
if (loadJMap(DiceDir / "conf" / "CustomMsg.json", EditedMsg) >= 0) {
map_merge(GlobalMsg, EditedMsg);
}
}
catch (const std::exception& e) {
console.log(string("读取/conf/CustomMsg.json失败!") + e.what(), 1, printSTNow());
}
//custom_help
if (loadJMap(DiceDir / "conf" / "CustomHelp.json", CustomHelp) == -1)
resLog << "解析/conf/CustomHelp.json失败!";
Expand Down

0 comments on commit 494ee39

Please sign in to comment.