Skip to content

Commit

Permalink
Merge pull request #198 from steven11sjf/brspd
Browse files Browse the repository at this point in the history
brspd
  • Loading branch information
duncathan authored Jul 27, 2024
2 parents db2c05d + e2437df commit 16b9302
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
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)

0 comments on commit 16b9302

Please sign in to comment.