This commit is contained in:
Евгений Храмов 2023-05-14 14:38:16 +03:00
parent 341bf371a1
commit d5647ee05c

@ -382,9 +382,10 @@ def modextract(id_mod, id_game_workshop):
for dname in dirnames:
os.makedirs(os.path.join(modextractdir, os.path.relpath(os.path.join(dirpath, dname), mod_steam_workshop)), exist_ok=True)
# for fname in filenames:
# if not os.path.isfile(os.path.join(mod_steam_workshop, fname)) and not os.path.isfile(os.path.join(mod_steam_workshop, fname + ".z")):
# os.unlink(os.path.join(modextractdir, fname))
for fname in filenames:
print_line(fname)
if not os.path.isfile(os.path.join(mod_steam_workshop, fname)) and not os.path.isfile(os.path.join(mod_steam_workshop, fname + ".z")):
os.unlink(os.path.join(modextractdir, fname))
for dname in dirnames:
if not os.path.isdir(os.path.join(mod_steam_workshop, dname)):
@ -418,8 +419,6 @@ def modextract(id_mod, id_game_workshop):
modnamelen = len(modname)
modpath = ("../../../" + "ShooterGame" + "/Content/Mods/" + id_mod + "\x00").encode('utf-8')
modpathlen = len(modpath)
print(id_mod, 0, modnamelen, modname, modpathlen, modpath)
type(id_mod)
modfile_bytes += struct.pack('<LLL{}sL{}sL'.format(modnamelen, modpathlen),
int(id_mod), 0, modnamelen, modname, modpathlen, modpath, nummaps)
for _ in range(nummaps):