refactor: Update resource path to use getModDir
This commit is contained in:
+1
-2
@@ -59,8 +59,7 @@ void Entry::loadI18n() {
|
|||||||
|
|
||||||
void Entry::loadResourcePack() {
|
void Entry::loadResourcePack() {
|
||||||
gmlib::tools::VanillaFix::setFixI18nEnabled();
|
gmlib::tools::VanillaFix::setFixI18nEnabled();
|
||||||
std::string resourcePath = "./plugins/DeathMessages/resource/";
|
auto resource = gmlib::i18n::ResourceI18n(getSelf().getModDir() / u8"resource", MOD_NAME, 0, 8, 0);
|
||||||
auto resource = gmlib::i18n::ResourceI18n(resourcePath, MOD_NAME, 0, 8, 0);
|
|
||||||
resource.addLanguage("en_US", en_US);
|
resource.addLanguage("en_US", en_US);
|
||||||
resource.addLanguage("zh_CN", zh_CN);
|
resource.addLanguage("zh_CN", zh_CN);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ target("DeathMessages") -- Change this to your mod name.
|
|||||||
set_exceptions("none") -- To avoid conflicts with /EHa
|
set_exceptions("none") -- To avoid conflicts with /EHa
|
||||||
set_kind("shared")
|
set_kind("shared")
|
||||||
set_languages("cxx23")
|
set_languages("cxx23")
|
||||||
|
set_symbols("debug")
|
||||||
|
|
||||||
after_build(function (target)
|
after_build(function (target)
|
||||||
local mod_packer = import("scripts.after_build")
|
local mod_packer = import("scripts.after_build")
|
||||||
|
|||||||
Reference in New Issue
Block a user