feat: add getBlockRuntimeId

This commit is contained in:
Tsubasa6848
2024-05-15 20:26:39 +08:00
Unverified
parent 83009cd29c
commit 27d969d7f1
2 changed files with 15 additions and 4 deletions
+6
View File
@@ -539,4 +539,10 @@ void Export_Compatibility_API() {
return result;
}
);
RemoteCall::exportAs("GMLIB_API", "getBlockRuntimeId", [](std::string blockName) -> uint {
if (auto block = Block::tryGetFromRegistry(blockName)) {
return block->getRuntimeId();
}
return 0;
});
}