Skip to content

Commit

Permalink
Merge pull request #46 from pa733/1.17.1.01
Browse files Browse the repository at this point in the history
AIP support
  • Loading branch information
hhhxiao authored Jun 27, 2021
2 parents 7f434f7 + dbcf98d commit 5dbbef8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/cmake-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,23 @@ jobs:
- name: MkDir
shell: bash
working-directory: ${{github.workspace}}
run: mkdir D:/out
run: |
mkdir D:/out
mkdir -p D:/out/plugins/trapdoor
- name: Copy Output Files
shell: bash
working-directory: ${{github.workspace}}
run: |
cp -r ./package/lang D:/out
cp -r ./package/lang D:/out/plugins/trapdoor
cp ./LICENSE D:/out
cp ./changelog.md D:/out
cp ./README.md D:/out
cp ./README_zh.md D:/out
cp ./Release/*.dll D:/out
cp ./package/trapdoor-config.json D:/out
cp ./package/trapdoor-config.json D:/out/plugins/trapdoor
cp ./trapdoor-disclaimer.md D:/out
- name: package
if: startsWith(github.event.ref, 'refs/tags/')
shell: pwsh
Expand Down
2 changes: 1 addition & 1 deletion api/language/I18nManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace trapdoor {
void I18nManager::findLanguageFile() {
namespace fs = std::filesystem;
fs::path path("lang");
fs::path path("plugins/trapdoor/lang");
if (!fs::exists(path)) {
L_WARNING("can't find the language dictionary");
return;
Expand Down
4 changes: 2 additions & 2 deletions mod/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ void mod_init() {
rmt_CreateGlobalInstance(&rmt);
// displayDisclaimerMessageBox(); //免责声明窗口
initConsole();
trapdoor::initLogger("trapdoor.log"); //初始化日志
trapdoor::initLogger("plugins/trapdoor/trapdoor.log"); //初始化日志
#ifdef BETA
trapdoor::setDevMode(true);
#endif
mod::TrapdoorMod::printCopyRightInfo(); //打印日志
auto *mod = createBDSModInstance();
mod->getI18NManager().initialize();
auto result = mod->asInstance<mod::TrapdoorMod>()->readConfigFile("trapdoor-config.json"); //读取配置文件
auto result = mod->asInstance<mod::TrapdoorMod>()->readConfigFile("plugins/trapdoor/trapdoor-config.json"); //读取配置文件
if (!result) {
L_ERROR("can not read configFile, trapdoor won't be injected");
return;
Expand Down
2 changes: 1 addition & 1 deletion mod/function/BackupHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Copy-Item -Path $SourcePath -Destination "$Destination" -Recurse | Out-Null

std::vector<std::string> getAllBackups(trapdoor::Actor *player) {
namespace fs = std::filesystem;
fs::path backupRootPath("trapdoor-backup");
fs::path backupRootPath("plugins/trapdoor/trapdoor-backup");
if (!fs::exists(backupRootPath)) {
trapdoor::error(player, trapdoor::LANG("backup.error.dictNotExist"));
return {};
Expand Down

0 comments on commit 5dbbef8

Please sign in to comment.