This commit is contained in:
Евгений Храмов 2023-05-14 12:55:40 +03:00
parent 17f9b49463
commit b6eff03c38

@ -420,7 +420,7 @@ def modextract(id_mods_ark, id_game_workshop):
modnamelen = len(modname)
modpath = ("../../../" + "ShooterGame" + "/Content/Mods/" + id_mods_ark + "\x00").encode('utf-8')
modpathlen = len(modpath)
modfile_bytes += struct.pack('<LLL{}sL{}sL'.format(len(modname.encode('utf-8')), len(modpath.encode('utf-8'))), id_mods_ark, 0, len(modname.encode('utf-8')), modname.encode('utf-8'), len(modpath.encode('utf-8')), modpath.encode('utf-8'), nummaps)
modfile_bytes += struct.pack('<LLL{}sL{}sL'.format(len(modname.decode('utf-8')), len(modpath.decode('utf-8'))), id_mods_ark, 0, len(modname.decode('utf-8')), modname.decode('utf-8'), len(modpath.decode('utf-8')), modpath.decode('utf-8'), nummaps)
# modfile_bytes += struct.pack('<LLL{}sL{}sL'.format(modnamelen, modpathlen), id_mods_ark, 0, modnamelen, modname, modpathlen, modpath, nummaps)
for _ in range(nummaps):
mapfilelen = struct.unpack_from('<L', data, offset=pos)