dcs-retribution/game/modsupport.py
Dan Albert e3ee988225 Move mod vehicle registration to a decorator.
This cruft doesn't need to be in game.db, it can be kept with the mod
support code.
2022-02-18 12:54:41 -08:00

22 lines
582 B
Python

from typing import Type
from dcs.helicopters import HelicopterType, helicopter_map
from dcs.planes import PlaneType, plane_map
from dcs.unittype import VehicleType
from dcs.vehicles import vehicle_map
def helicoptermod(helicopter: Type[HelicopterType]) -> Type[HelicopterType]:
helicopter_map[helicopter.id] = helicopter
return helicopter
def planemod(plane: Type[PlaneType]) -> Type[PlaneType]:
plane_map[plane.id] = plane
return plane
def vehiclemod(vehicle: Type[VehicleType]) -> Type[VehicleType]:
vehicle_map[vehicle.id] = vehicle
return vehicle