1
This commit is contained in:
		
							
								
								
									
										24
									
								
								hlna.py
									
									
									
									
									
								
							
							
						
						
									
										24
									
								
								hlna.py
									
									
									
									
									
								
							| @@ -512,30 +512,6 @@ def modextract(id_mod, id_game_workshop): | |||||||
|                 pos = pos + 4 + mapfilelen |                 pos = pos + 4 + mapfilelen | ||||||
|             mod.write(b"\x33\xFF\x22\xFF\x02\x00\x00\x00\x01") |             mod.write(b"\x33\xFF\x22\xFF\x02\x00\x00\x00\x01") | ||||||
|  |  | ||||||
|     # modfile_bytes = b'' |  | ||||||
|     # with open(os.path.join(dir_ark_mods, 'mod.info'), 'rb') as f: |  | ||||||
|     #     data = f.read() |  | ||||||
|     #     mapnamelen = struct.unpack_from('<L', data, offset=0) |  | ||||||
|     #     mapnamelen = mapnamelen[0] |  | ||||||
|     #     mapname = str(data[4:mapnamelen + 3], 'utf-8') |  | ||||||
|     #     nummaps = struct.unpack_from('<L', data, offset=mapnamelen + 4) |  | ||||||
|     #     nummaps = nummaps[0] |  | ||||||
|     #     pos = mapnamelen + 8 |  | ||||||
|     #     modname = (modname + mapname + "\x00").encode('utf-8') |  | ||||||
|     #     modnamelen = len(modname) |  | ||||||
|     #     modpath = ("../../../" + "ShooterGame" + "/Content/Mods/" + id_mod + "\x00").encode('utf-8') |  | ||||||
|     #     modpathlen = len(modpath) |  | ||||||
|     #     modfile_bytes += struct.pack('<LLL{}sL{}sL'.format(modnamelen, modpathlen), |  | ||||||
|     #                                  int(id_mod), 0, modnamelen, |  | ||||||
|     #                                  modname, modpathlen, modpath, nummaps) |  | ||||||
|     #     for _ in range(nummaps): |  | ||||||
|     #         mapfilelen = struct.unpack_from('<L', data, offset=pos) |  | ||||||
|     #         mapfilelen = mapfilelen[0] |  | ||||||
|     #         mapfile = data[mapnamelen + 12:mapnamelen + 12 + mapfilelen] |  | ||||||
|     #         modfile_bytes += struct.pack('<L{}s'.format(mapfilelen), mapfilelen, mapfile) |  | ||||||
|     #         pos = pos + 4 + mapfilelen |  | ||||||
|     #     modfile_bytes += b'\x33\xFF\x22\xFF\x02\x00\x00\x00\x01' |  | ||||||
|  |  | ||||||
|     if os.path.isfile(os.path.join(dir_extract, "modmeta.info")): |     if os.path.isfile(os.path.join(dir_extract, "modmeta.info")): | ||||||
|         with open(os.path.join(dir_extract, "modmeta.info"), "rb") as f: |         with open(os.path.join(dir_extract, "modmeta.info"), "rb") as f: | ||||||
|             with open(f"{dir_extract}.mod", "ab") as f_out: |             with open(f"{dir_extract}.mod", "ab") as f_out: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user