mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Handle map reset when the game is loaded/unloaded.
https://github.com/dcs-liberation/dcs_liberation/issues/2039 Partial fix for https://github.com/dcs-liberation/dcs_liberation/issues/2045 (now works in the new map, old one not fixed yet).
This commit is contained in:
@@ -10,15 +10,19 @@ router: APIRouter = APIRouter(prefix="/debug/waypoint-geometries")
|
||||
|
||||
|
||||
@router.get("/hold/{flight_id}")
|
||||
def hold_zones(flight_id: UUID, game: Game = Depends(GameContext.get)) -> HoldZonesJs:
|
||||
def hold_zones(
|
||||
flight_id: UUID, game: Game = Depends(GameContext.require)
|
||||
) -> HoldZonesJs:
|
||||
return HoldZonesJs.for_flight(game.db.flights.get(flight_id), game)
|
||||
|
||||
|
||||
@router.get("/ip/{flight_id}")
|
||||
def ip_zones(flight_id: UUID, game: Game = Depends(GameContext.get)) -> IpZonesJs:
|
||||
def ip_zones(flight_id: UUID, game: Game = Depends(GameContext.require)) -> IpZonesJs:
|
||||
return IpZonesJs.for_flight(game.db.flights.get(flight_id), game)
|
||||
|
||||
|
||||
@router.get("/join/{flight_id}")
|
||||
def join_zones(flight_id: UUID, game: Game = Depends(GameContext.get)) -> JoinZonesJs:
|
||||
def join_zones(
|
||||
flight_id: UUID, game: Game = Depends(GameContext.require)
|
||||
) -> JoinZonesJs:
|
||||
return JoinZonesJs.for_flight(game.db.flights.get(flight_id), game)
|
||||
|
||||
Reference in New Issue
Block a user