From 295183a0ff24356b411e629d29eef8d811f214bb Mon Sep 17 00:00:00 2001 From: MysterD Date: Fri, 15 Apr 2022 18:24:17 -0700 Subject: [PATCH] Prevent DynOS from attempting to generate lvls when they already exist --- data/dynos_bin_lvl.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/data/dynos_bin_lvl.cpp b/data/dynos_bin_lvl.cpp index f1936f1e..db6327b9 100644 --- a/data/dynos_bin_lvl.cpp +++ b/data/dynos_bin_lvl.cpp @@ -2149,6 +2149,10 @@ void DynOS_Lvl_GeneratePack(const SysPath &aPackFolder) { SysPath _Folder = fstring("%s/%s", aPackFolder.c_str(), _PackEnt->d_name); if (!fs_sys_dir_exists(_Folder.c_str())) continue; + // Prevent generating from folders that likely already generated + SysPath _LvlFile = fstring("%s/level_%s_entry.lvl", aPackFolder.c_str(), _PackEnt->d_name); + if (fs_sys_file_exists(_LvlFile.c_str())) continue; + // Only parse folders with a 'script.c' if (!fs_sys_file_exists(fstring("%s/script.c", _Folder.c_str()).c_str()) && !fs_sys_file_exists(fstring("%s/custom.script.c", _Folder.c_str()).c_str())) continue;