Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ requires-python = ">=3.10"
dependencies = [
"mercury-engine-data-structures>=0.33",
"jsonschema>=4.0.0",
"json-delta>=2.0.2"
"json-delta>=2.0.2",
"open-dread-rando-exlaunch>=1.1.0"
]
dynamic = ["version"]

Expand Down
5 changes: 3 additions & 2 deletions src/open_dread_rando/dread_patcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import typing
from pathlib import Path

import open_dread_rando_exlaunch

Check warning on line 7 in src/open_dread_rando/dread_patcher.py

View check run for this annotation

Codecov / codecov/patch

src/open_dread_rando/dread_patcher.py#L7

Added line #L7 was not covered by tests
from construct import ListContainer
from mercury_engine_data_structures.file_tree_editor import OutputFormat

Expand All @@ -16,7 +17,7 @@
from open_dread_rando.logger import LOG
from open_dread_rando.misc_patches import elevator, lua_util
from open_dread_rando.misc_patches.actor_patcher import apply_actor_patches
from open_dread_rando.misc_patches.exefs import include_depackager, patch_exefs
from open_dread_rando.misc_patches.exefs import patch_exefs

Check warning on line 20 in src/open_dread_rando/dread_patcher.py

View check run for this annotation

Codecov / codecov/patch

src/open_dread_rando/dread_patcher.py#L20

Added line #L20 was not covered by tests
from open_dread_rando.misc_patches.model_patcher import generate_custom_models
from open_dread_rando.misc_patches.sprite_patches import patch_sprites
from open_dread_rando.misc_patches.text_patches import apply_text_patches, patch_credits, patch_hints, patch_text
Expand Down Expand Up @@ -307,7 +308,7 @@
patch_exefs(exefs_patches, configuration)

if output_format == OutputFormat.ROMFS:
include_depackager(out_exefs)
open_dread_rando_exlaunch.include_depackager(out_exefs)

Check warning on line 311 in src/open_dread_rando/dread_patcher.py

View check run for this annotation

Codecov / codecov/patch

src/open_dread_rando/dread_patcher.py#L311

Added line #L311 was not covered by tests

LOG.info("Saving modified lua scripts")
lua_editor.save_modifications(editor)
Expand Down
8 changes: 0 additions & 8 deletions src/open_dread_rando/files/dread_depackager/README.md

This file was deleted.

Binary file not shown.
Binary file removed src/open_dread_rando/files/dread_depackager/subsdk9
Binary file not shown.
6 changes: 0 additions & 6 deletions src/open_dread_rando/misc_patches/exefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,3 @@ def patch_exefs(exefs_patches: Path, configuration: dict):
provided_patches = files_path().joinpath("exefs_patches")
shutil.copytree(provided_patches, exefs_patches, dirs_exist_ok=True)


def include_depackager(exefs_path: Path):
exefs_path.mkdir(parents=True, exist_ok=True)

dread_depackager = files_path().joinpath("dread_depackager")
shutil.copytree(dread_depackager, exefs_path, dirs_exist_ok=True)
10 changes: 7 additions & 3 deletions tests/test_full_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@ def test_export(dread_path, tmp_path, test_files_dir, configuration_path):
)
assert len(list(output_path.rglob("*.lc"))) == 33

ips = sorted(
exefs_path = output_path.joinpath("DreadRandovania", "exefs")

exefs_files = sorted(
f.relative_to(output_path).as_posix()
for f in output_path.joinpath("DreadRandovania", "exefs").glob("*.ips")
for f in exefs_path.iterdir() if f.name != ".gitignore"
)
assert ips == [
assert exefs_files == [
"DreadRandovania/exefs/49161D9CCBC15DF944D0B6278A3C446C006B0BE8.ips",
"DreadRandovania/exefs/646761F643AFEBB379EDD5E6A5151AF2CEF93DC1.ips",
"DreadRandovania/exefs/main.npdm",
"DreadRandovania/exefs/subsdk9",
]