Skip to content

Commit

Permalink
Better compatibility check for ink spawner
Browse files Browse the repository at this point in the history
  • Loading branch information
psiberx committed Dec 28, 2024
1 parent 47f144f commit 0df5af4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/App/Extensions/InkSpawner/Extension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@ bool App::InkSpawnerExtension::Load()
{
HookOnceAfter<Raw::CBaseEngine::InitEngine>(+[]() {
if (Red::GetType<"Codeware">())
return;
{
bool isNewCodeware{false};
Red::CString newCodewareVersion{"1.14.0"};
Red::CallStatic("Codeware", "Require", isNewCodeware, newCodewareVersion);

if (isNewCodeware)
return;
}

Hook<Raw::InkWidgetLibrary::SpawnFromLocal>(&OnSpawnLocal).OrThrow();
Hook<Raw::InkWidgetLibrary::SpawnFromExternal>(&OnSpawnExternal).OrThrow();
Expand Down

0 comments on commit 0df5af4

Please sign in to comment.