1
This commit is contained in:
parent
4e50ae7673
commit
9728466fa6
6
hlna.py
6
hlna.py
@ -487,8 +487,8 @@ def modextract(id_mod, id_game_workshop):
|
|||||||
modname = re.search(r'<div class="workshopItemTitle">(.+)</div>', modname)
|
modname = re.search(r'<div class="workshopItemTitle">(.+)</div>', modname)
|
||||||
modname = modname and modname.group(1)
|
modname = modname and modname.group(1)
|
||||||
|
|
||||||
if os.path.isfile(f"{dir_ark_mods}/.mod"):
|
if os.path.isfile(f"{dir_ark_mods}.mod"):
|
||||||
os.remove(f"{dir_ark_mods}/.mod")
|
os.remove(f"{dir_ark_mods}.mod")
|
||||||
|
|
||||||
modfile_bytes = b''
|
modfile_bytes = b''
|
||||||
with open(os.path.join(dir_ark_mods, 'mod.info'), 'rb') as f:
|
with open(os.path.join(dir_ark_mods, 'mod.info'), 'rb') as f:
|
||||||
@ -513,6 +513,7 @@ def modextract(id_mod, id_game_workshop):
|
|||||||
modfile_bytes += struct.pack('<L{}s'.format(mapfilelen), mapfilelen, mapfile)
|
modfile_bytes += struct.pack('<L{}s'.format(mapfilelen), mapfilelen, mapfile)
|
||||||
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'
|
||||||
|
os.system(modfile_bytes.decode().replace("$arkserverdir", arkserverdir).replace("$modid", modid).replace("$modname", modname).replace("$modextractdir", modextractdir))
|
||||||
|
|
||||||
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:
|
||||||
@ -758,7 +759,6 @@ def zero(x=""):
|
|||||||
if not os.path.exists(dir_config + "config"):
|
if not os.path.exists(dir_config + "config"):
|
||||||
dir_server = path_server()
|
dir_server = path_server()
|
||||||
else:
|
else:
|
||||||
print_line("else")
|
|
||||||
data = read_yaml(game="path_server")
|
data = read_yaml(game="path_server")
|
||||||
if data['path_server'] == "":
|
if data['path_server'] == "":
|
||||||
path_server()
|
path_server()
|
||||||
|
Loading…
Reference in New Issue
Block a user