2021-09-07 19:56:15 +02:00
|
|
|
from typing import List, Optional, Type
|
2021-09-04 17:17:22 +02:00
|
|
|
|
|
|
|
from bemani.backend.base import Base, Factory
|
|
|
|
from bemani.backend.mga.mga import MetalGearArcade
|
|
|
|
from bemani.common import Model
|
|
|
|
from bemani.data import Config, Data
|
|
|
|
|
|
|
|
|
|
|
|
class MetalGearArcadeFactory(Factory):
|
2021-09-07 19:56:15 +02:00
|
|
|
MANAGED_CLASSES: List[Type[Base]] = [
|
2021-09-04 17:17:22 +02:00
|
|
|
MetalGearArcade,
|
|
|
|
]
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def register_all(cls) -> None:
|
2022-10-15 20:56:30 +02:00
|
|
|
for gamecode in ["I36"]:
|
2021-09-04 17:17:22 +02:00
|
|
|
Base.register(gamecode, MetalGearArcadeFactory)
|
|
|
|
|
|
|
|
@classmethod
|
2022-10-15 20:56:30 +02:00
|
|
|
def create(
|
|
|
|
cls,
|
|
|
|
data: Data,
|
|
|
|
config: Config,
|
|
|
|
model: Model,
|
|
|
|
parentmodel: Optional[Model] = None,
|
|
|
|
) -> Optional[Base]:
|
|
|
|
if model.gamecode == "I36":
|
2021-09-04 17:17:22 +02:00
|
|
|
return MetalGearArcade(data, config, model)
|
|
|
|
|
|
|
|
# Unknown game version
|
|
|
|
return None
|