Skip to content

Commit

Permalink
Fix overlays not being bundled in release
Browse files Browse the repository at this point in the history
  • Loading branch information
NeunEinser committed Sep 11, 2023
1 parent 1ad7883 commit 65856df
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions neunscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def main():
mc_version_info = None

if resourcepack_config != None:
copy_pack(resourcepack_config, f"{target}{os.sep}tmp{os.sep}resourcepack", ["assets", "pack.mcmeta", "pack.png"])
copy_pack(resourcepack_config, f"{target}{os.sep}tmp{os.sep}resourcepack")
version_id: str = config.get("mc")

if version_id != None:
Expand All @@ -47,7 +47,7 @@ def main():

datapack_config = config.get("datapack")
if datapack_config != None:
copy_pack(datapack_config, f"{target}{os.sep}tmp{os.sep}datapack", ["data", "pack.mcmeta", "pack.png"])
copy_pack(datapack_config, f"{target}{os.sep}tmp{os.sep}datapack")

name=config.get("name")
version=config.get("version")
Expand All @@ -68,7 +68,7 @@ def main():
world_config=config.get("world")
worldpath=f"{target}{os.sep}tmp{os.sep}world{os.sep}{name}-{version}"
if world_config != None:
copy_pack(world_config, worldpath, None)
copy_pack(world_config, worldpath)

copy_tree(f"{target}{os.sep}tmp", f"{target}{os.sep}out")
requested_rp_sha = iterate_files(config, target, mc_version_info)
Expand Down Expand Up @@ -314,7 +314,7 @@ def minify_function_file(file_content: str, config: dict):

return output

def copy_pack(pack_config: dict, tmp_dir: str, paths: list[str] | None):
def copy_pack(pack_config: dict, tmp_dir: str, paths: list[str] | None = None):
os.makedirs(tmp_dir)
src=pack_config.get("path")
if src == None:
Expand Down

0 comments on commit 65856df

Please sign in to comment.