Move constants from laypout.py to theathergroup.py

Should fix the "FIXED_POS_ARG not defined" error
This commit is contained in:
Raffson 2024-10-12 16:32:02 +02:00
parent 4aacc68f4a
commit ff2ec07d83
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99
3 changed files with 11 additions and 8 deletions

View File

@ -19,8 +19,6 @@ from game.layout import LAYOUTS
from game.layout.layout import (
TgoLayout,
TgoLayoutUnitGroup,
FIXED_POS_ARG,
FIXED_HDG_ARG,
)
from game.point_with_heading import PointWithHeading
from game.theater.theatergroundobject import (
@ -28,7 +26,13 @@ from game.theater.theatergroundobject import (
IadsBuildingGroundObject,
NavalGroundObject,
)
from game.theater.theatergroup import IadsGroundGroup, IadsRole, TheaterGroup
from game.theater.theatergroup import (
IadsGroundGroup,
IadsRole,
TheaterGroup,
FIXED_POS_ARG,
FIXED_HDG_ARG,
)
from game.utils import escape_string_for_lua
if TYPE_CHECKING:

View File

@ -33,10 +33,6 @@ if TYPE_CHECKING:
from game.theater.controlpoint import ControlPoint
FIXED_POS_ARG = "--fix-pos"
FIXED_HDG_ARG = "--fix-hdg"
class LayoutException(Exception):
pass

View File

@ -17,10 +17,13 @@ from game.theater.iadsnetwork.iadsrole import IadsRole
from game.utils import Heading, Distance, meters
if TYPE_CHECKING:
from game.layout.layout import LayoutUnit, FIXED_POS_ARG, FIXED_HDG_ARG
from game.layout.layout import LayoutUnit
from game.sim import GameUpdateEvents
from game.theater.theatergroundobject import TheaterGroundObject
FIXED_POS_ARG = "--fix-pos"
FIXED_HDG_ARG = "--fix-hdg"
@dataclass
class TheaterUnit: