diff --git a/src/mercury_engine_data_structures/formats/bmsmsd.py b/src/mercury_engine_data_structures/formats/bmsmsd.py index 179cf22..f3b9da4 100644 --- a/src/mercury_engine_data_structures/formats/bmsmsd.py +++ b/src/mercury_engine_data_structures/formats/bmsmsd.py @@ -4,10 +4,26 @@ from typing import TYPE_CHECKING import construct -from construct.core import Const, Construct, Enum, FlagsEnum, Float32l, Int32sl, Int32ul, Struct +from construct.core import ( + Const, + Construct, + Container, + Enum, + FlagsEnum, + Float32l, + Int32sl, + Int32ul, + Struct, +) from mercury_engine_data_structures.base_resource import BaseResource -from mercury_engine_data_structures.common_types import CVector2D, CVector3D, StrId, VersionAdapter, make_vector +from mercury_engine_data_structures.common_types import ( + CVector2D, + CVector3D, + StrId, + VersionAdapter, + make_vector, +) if TYPE_CHECKING: from mercury_engine_data_structures.game_check import Game @@ -85,3 +101,6 @@ class Bmsmsd(BaseResource): @functools.lru_cache def construct_class(cls, target_game: Game) -> Construct: return BMSMSD + + def get_tile(self, tile_idx: int) -> Container: + return self.raw.tiles[tile_idx]