Pixel-Composer/scripts/version_checker/version_checker.gml
2024-04-08 19:52:24 +07:00

13 lines
310 B
Plaintext

function check_version(path) {
if(!file_exists_empty(path)) {
json_save_struct(path, { version: BUILD_NUMBER });
return true;
}
if(TESTING) return true;
var res = json_load_struct(path);
json_save_struct(path, { version: BUILD_NUMBER });
return struct_try_get(res, "version") != BUILD_NUMBER;
}