mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Don't allow carrier's path over land in UI
This commit is contained in:
@@ -89,6 +89,15 @@ def set_destination(
|
||||
detail=f"Cannot move {cp} more than "
|
||||
f"{cp.max_move_distance.nautical_miles}nm.",
|
||||
)
|
||||
if (
|
||||
cp.is_fleet
|
||||
and game.theater.landmap
|
||||
and game.theater.landmap.land_inbetween(cp.position, point)
|
||||
):
|
||||
raise HTTPException(
|
||||
status.HTTP_400_BAD_REQUEST,
|
||||
detail=f"Cannot move {cp} over land.",
|
||||
)
|
||||
cp.target_position = point
|
||||
from .. import EventStream
|
||||
|
||||
|
||||
Reference in New Issue
Block a user