1
This commit is contained in:
parent
e1bd358a6d
commit
addcc6f72d
4
hlna.py
4
hlna.py
@ -499,12 +499,12 @@ def modextract(id_mod, id_game_workshop):
|
||||
pos = mapnamelen + 8
|
||||
modname = (modname.encode() or mapname.decode()) + b'\x00'
|
||||
modnamelen = len(modname)
|
||||
modpath = b"../../../" + dir_shooter.encode() + b"/Content/Mods/" + modid.encode() + b'\x00'
|
||||
modpath = b"../../../" + dir_shooter.encode() + b"/Content/Mods/" + id_mod.encode() + b'\x00'
|
||||
modpathlen = len(modpath)
|
||||
with open(f"{dir_ark_mods}.mod", "wb") as mod:
|
||||
print(type(modnamelen))
|
||||
print(type(modpathlen))
|
||||
mod.write(struct.pack('<LLL{}sL{}sL'.format(modnamelen, modpathlen), int(id_mod), 0, modnamelen, modname, modpathlen, modpath, nummaps))
|
||||
mod.write(struct.pack('<LLL{}sL{}sL'.format(modnamelen, modpathlen), int(id_mod), 0, modnamelen, modname, modpathlen, str(modpath), nummaps))
|
||||
for mapnum in range(nummaps):
|
||||
mapfilelen = struct.unpack_from("<L", data, pos)[0]
|
||||
mapfile = data[mapnamelen+12:mapnamelen+12+mapfilelen]
|
||||
|
Loading…
Reference in New Issue
Block a user