Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

brspd #198

Merged
merged 1 commit into from
Jul 27, 2024
Merged

brspd #198

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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Construct type definitions for Mercury Engine
| BREV | Missing | Missing | ✓ | ✓ |
| BRFLD | Missing | Missing | ✓ | ✓ |
| BRSA | Missing | Missing | ✓ | ✓ |
| BRSPD | Missing | Missing | ✗ | ✗ |
| BRSPD | Missing | Missing | ✓ | ✓ |
| BSHDAT | ✗ | ✗ | ✗ | ✗ |
| BSMAT | Missing | Missing | ✓ | ✓ |
| BTUNDA | Missing | Missing | ✓ | ✓ |
Expand Down
2 changes: 2 additions & 0 deletions src/mercury_engine_data_structures/formats/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
from mercury_engine_data_structures.formats.brev import Brev
from mercury_engine_data_structures.formats.brfld import Brfld
from mercury_engine_data_structures.formats.brsa import Brsa
from mercury_engine_data_structures.formats.brspd import Brspd
from mercury_engine_data_structures.formats.bsmat import Bsmat
from mercury_engine_data_structures.formats.gui_files import Bmscp, Bmssh, Bmssk, Bmsss
from mercury_engine_data_structures.formats.ini import Ini
Expand Down Expand Up @@ -85,6 +86,7 @@
"BMTRE": Bmtre,
"BNVIB": Bnvib,
"BRSA": Brsa,
"BRSPD": Brspd,
"BREM": Brem,
"BRES": Bres,
"BREV": Brev,
Expand Down
11 changes: 11 additions & 0 deletions src/mercury_engine_data_structures/formats/brspd.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from construct import Construct

from mercury_engine_data_structures.formats import standard_format
from mercury_engine_data_structures.formats.base_resource import BaseResource
from mercury_engine_data_structures.game_check import Game


class Brspd(BaseResource):
@classmethod
def construct_class(cls, target_game: Game) -> Construct:
return standard_format.game_model("CShotAudioWeaponPresets", "1.1.2")
10 changes: 10 additions & 0 deletions tests/formats/test_brspd.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import pytest
from tests.test_lib import parse_build_compare_editor

from mercury_engine_data_structures import dread_data
from mercury_engine_data_structures.formats.brspd import Brspd


@pytest.mark.parametrize("brspd_path", dread_data.all_files_ending_with(".brspd"))
def test_brspd(dread_file_tree, brspd_path):
parse_build_compare_editor(Brspd, dread_file_tree, brspd_path)