From 0df5af4bb25d4940be6dbd04becc3e95ab11a8c9 Mon Sep 17 00:00:00 2001 From: psiberx Date: Sun, 29 Dec 2024 00:07:11 +0300 Subject: [PATCH] Better compatibility check for ink spawner --- src/App/Extensions/InkSpawner/Extension.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/App/Extensions/InkSpawner/Extension.cpp b/src/App/Extensions/InkSpawner/Extension.cpp index 9e5b91f..4a961eb 100644 --- a/src/App/Extensions/InkSpawner/Extension.cpp +++ b/src/App/Extensions/InkSpawner/Extension.cpp @@ -20,7 +20,14 @@ bool App::InkSpawnerExtension::Load() { HookOnceAfter(+[]() { if (Red::GetType<"Codeware">()) - return; + { + bool isNewCodeware{false}; + Red::CString newCodewareVersion{"1.14.0"}; + Red::CallStatic("Codeware", "Require", isNewCodeware, newCodewareVersion); + + if (isNewCodeware) + return; + } Hook(&OnSpawnLocal).OrThrow(); Hook(&OnSpawnExternal).OrThrow();