refactor: rewrite experiments shit

This commit is contained in:
Tsubasa6848
2024-05-13 21:15:58 +08:00
Unverified
parent 531ee704ac
commit e08e5d99eb
2 changed files with 9 additions and 19 deletions
+6 -6
View File
@@ -77,12 +77,12 @@ void Export_Compatibility_API() {
}
return result;
});
RemoteCall::exportAs("GMLIB_API", "getExperimentTranslatedName", [](int id) -> std::string {
auto map = GMLIB_Level::getAllExperimentsTranslateKeys();
if (map.count(id)) {
return std::string(map[id]);
}
return "";
RemoteCall::exportAs("GMLIB_API", "getExperimentTranslateKey", [](int id) -> std::string {
std::string result;
try {
result = Experiments::getExperimentTextID(AllExperiments(id));
} catch (...) {}
return result;
});
RemoteCall::exportAs(
"GMLIB_API",