Skip to content

Commit ef72813

Browse files
authored
Merge pull request #19 from Okaetsu/fix_startup_hang
Fix startup hang
2 parents bb988c2 + fa35a3f commit ef72813

2 files changed

Lines changed: 20 additions & 18 deletions

File tree

include/SDK/PalSignatures.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ namespace Palworld {
2020
{ "FPakPlatformFile::GetPakFolders", "48 89 5C 24 08 48 89 74 24 10 48 89 7C 24 18 4C 89 74 24 20 55 48 8B EC 48 83 EC 40 48 8D 4D F0 48 8B DA E8" },
2121
{ "AsyncTask", "48 8B C4 41 54 41 57 48 81 EC B8 00 00 00 48 89 58 08" },
2222
{ "AGameModeBase::InitGameState", "40 53 48 83 EC 20 48 8B 41 10 48 8B D9 48 8B 91 F0 02 00 00" },
23-
{ "UPalDynamicItemWorldSubsystem::Create_ServerInternal", "40 55 53 56 41 54 41 55 41 56 48 8D AC 24 E8 FE FF FF" },
2423
};
2524
static inline std::unordered_map<std::string, std::string> SignaturesCallResolve {
2625
};

src/dllmain.cpp

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,14 @@ class PalSchema : public RC::CppUserModBase
1919
PalSchema() : CppUserModBase()
2020
{
2121
ModName = STR("PalSchema");
22-
ModVersion = STR("0.3.0");
22+
ModVersion = STR("0.3.1");
2323
ModDescription = STR("Allows modifying of Palworld's DataTables and DataAssets dynamically.");
2424
ModAuthors = STR("Okaetsu");
2525

2626
PS::PSConfig::Load();
2727
Palworld::SignatureManager::Initialize();
2828
MainLoader.PreInitialize();
2929

30-
register_tab(STR("Pal Schema"), [](CppUserModBase* instance) {
31-
auto mod = dynamic_cast<PalSchema*>(instance);
32-
if (!mod)
33-
{
34-
return;
35-
}
36-
37-
if (ImGui::Button("Reload Schema Mods"))
38-
{
39-
UECustom::AsyncTask(UECustom::ENamedThreads::GameThread, [mod]() {
40-
mod->reload_mods();
41-
});
42-
}
43-
});
44-
4530
PS::Log<RC::LogLevel::Verbose>(STR("{} v{} by {} loaded.\n"), ModName, ModVersion, ModAuthors);
4631
}
4732

@@ -56,7 +41,25 @@ class PalSchema : public RC::CppUserModBase
5641

5742
auto on_ui_init() -> void override
5843
{
59-
UE4SS_ENABLE_IMGUI()
44+
if (UE4SSProgram::settings_manager.Debug.DebugConsoleVisible)
45+
{
46+
UE4SS_ENABLE_IMGUI()
47+
48+
register_tab(STR("Pal Schema"), [](CppUserModBase* instance) {
49+
auto mod = dynamic_cast<PalSchema*>(instance);
50+
if (!mod)
51+
{
52+
return;
53+
}
54+
55+
if (ImGui::Button("Reload Schema Mods"))
56+
{
57+
UECustom::AsyncTask(UECustom::ENamedThreads::GameThread, [mod]() {
58+
mod->reload_mods();
59+
});
60+
}
61+
});
62+
}
6063
}
6164

6265
auto on_update() -> void override

0 commit comments

Comments
 (0)