1
This commit is contained in:
parent
f9068a659c
commit
2424088dd1
11
hlna.py
11
hlna.py
@ -427,12 +427,13 @@ def modextract(id_mod, id_game_workshop):
|
|||||||
pos = pos + 4 + mapfilelen
|
pos = pos + 4 + mapfilelen
|
||||||
modfile_bytes += b'\x33\xFF\x22\xFF\x02\x00\x00\x00\x01'
|
modfile_bytes += b'\x33\xFF\x22\xFF\x02\x00\x00\x00\x01'
|
||||||
|
|
||||||
with open(f"{modextractdir}/modmeta.info", 'ab') as f:
|
if os.path.isfile(os.path.join(modextractdir, "modmeta.info")):
|
||||||
if os.path.isfile(f"{modextractdir}/modmeta.info"):
|
with open(os.path.join(modextractdir, "modmeta.info"), "rb") as f:
|
||||||
f.write(open(f"{modextractdir}/{id_mod}.mod", 'rb').read())
|
with open(f"{modextractdir}.mod", "ab") as f_out:
|
||||||
f.close()
|
f_out.write(f.read())
|
||||||
else:
|
else:
|
||||||
f.write(b'\x01\x00\x00\x00\x08\x00\x00\x00ModType\x00\x02\x00\x00\x001\x00')
|
with open(f"{modextractdir}.mod", "wb") as f_out:
|
||||||
|
f_out.write(b'\x01\x00\x00\x00\x08\x00\x00\x00ModType\x00\x02\x00\x00\x001\x00')
|
||||||
|
|
||||||
with open(modextractdir + '.mod', 'wb') as f:
|
with open(modextractdir + '.mod', 'wb') as f:
|
||||||
f.write(modfile_bytes)
|
f.write(modfile_bytes)
|
||||||
|
Loading…
Reference in New Issue
Block a user