mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Add a Falklands theater.
Not at all done yet, but loads. https://github.com/dcs-liberation/dcs_liberation/issues/2242
This commit is contained in:
parent
eb3d2ef049
commit
7e4f81d541
@ -14,6 +14,7 @@ from game.profiling import logged_duration
|
|||||||
from game.theater import (
|
from game.theater import (
|
||||||
CaucasusTheater,
|
CaucasusTheater,
|
||||||
ConflictTheater,
|
ConflictTheater,
|
||||||
|
FalklandsTheater,
|
||||||
MarianaIslandsTheater,
|
MarianaIslandsTheater,
|
||||||
NevadaTheater,
|
NevadaTheater,
|
||||||
NormandyTheater,
|
NormandyTheater,
|
||||||
@ -122,6 +123,7 @@ class Campaign:
|
|||||||
"The Channel": TheChannelTheater,
|
"The Channel": TheChannelTheater,
|
||||||
"Syria": SyriaTheater,
|
"Syria": SyriaTheater,
|
||||||
"MarianaIslands": MarianaIslandsTheater,
|
"MarianaIslands": MarianaIslandsTheater,
|
||||||
|
"Falklands": FalklandsTheater,
|
||||||
}
|
}
|
||||||
theater = theaters[self.data["theater"]]
|
theater = theaters[self.data["theater"]]
|
||||||
t = theater()
|
t = theater()
|
||||||
|
|||||||
@ -10,6 +10,7 @@ from uuid import UUID
|
|||||||
from dcs.mapping import Point
|
from dcs.mapping import Point
|
||||||
from dcs.terrain import (
|
from dcs.terrain import (
|
||||||
caucasus,
|
caucasus,
|
||||||
|
falklands,
|
||||||
marianaislands,
|
marianaislands,
|
||||||
nevada,
|
nevada,
|
||||||
normandy,
|
normandy,
|
||||||
@ -41,7 +42,6 @@ class ReferencePoint:
|
|||||||
class ConflictTheater:
|
class ConflictTheater:
|
||||||
terrain: Terrain
|
terrain: Terrain
|
||||||
|
|
||||||
overview_image: str
|
|
||||||
landmap: Optional[Landmap]
|
landmap: Optional[Landmap]
|
||||||
daytime_map: DaytimeMap
|
daytime_map: DaytimeMap
|
||||||
iads_network: IadsNetwork
|
iads_network: IadsNetwork
|
||||||
@ -256,7 +256,6 @@ class ConflictTheater:
|
|||||||
|
|
||||||
class CaucasusTheater(ConflictTheater):
|
class CaucasusTheater(ConflictTheater):
|
||||||
terrain = caucasus.Caucasus()
|
terrain = caucasus.Caucasus()
|
||||||
overview_image = "caumap.gif"
|
|
||||||
|
|
||||||
landmap = load_landmap(Path("resources/caulandmap.p"))
|
landmap = load_landmap(Path("resources/caulandmap.p"))
|
||||||
daytime_map = DaytimeMap(
|
daytime_map = DaytimeMap(
|
||||||
@ -279,7 +278,6 @@ class CaucasusTheater(ConflictTheater):
|
|||||||
|
|
||||||
class PersianGulfTheater(ConflictTheater):
|
class PersianGulfTheater(ConflictTheater):
|
||||||
terrain = persiangulf.PersianGulf()
|
terrain = persiangulf.PersianGulf()
|
||||||
overview_image = "persiangulf.gif"
|
|
||||||
landmap = load_landmap(Path("resources/gulflandmap.p"))
|
landmap = load_landmap(Path("resources/gulflandmap.p"))
|
||||||
daytime_map = DaytimeMap(
|
daytime_map = DaytimeMap(
|
||||||
dawn=(datetime.time(hour=6), datetime.time(hour=8)),
|
dawn=(datetime.time(hour=6), datetime.time(hour=8)),
|
||||||
@ -301,7 +299,6 @@ class PersianGulfTheater(ConflictTheater):
|
|||||||
|
|
||||||
class NevadaTheater(ConflictTheater):
|
class NevadaTheater(ConflictTheater):
|
||||||
terrain = nevada.Nevada()
|
terrain = nevada.Nevada()
|
||||||
overview_image = "nevada.gif"
|
|
||||||
landmap = load_landmap(Path("resources/nevlandmap.p"))
|
landmap = load_landmap(Path("resources/nevlandmap.p"))
|
||||||
daytime_map = DaytimeMap(
|
daytime_map = DaytimeMap(
|
||||||
dawn=(datetime.time(hour=4), datetime.time(hour=6)),
|
dawn=(datetime.time(hour=4), datetime.time(hour=6)),
|
||||||
@ -323,7 +320,6 @@ class NevadaTheater(ConflictTheater):
|
|||||||
|
|
||||||
class NormandyTheater(ConflictTheater):
|
class NormandyTheater(ConflictTheater):
|
||||||
terrain = normandy.Normandy()
|
terrain = normandy.Normandy()
|
||||||
overview_image = "normandy.gif"
|
|
||||||
landmap = load_landmap(Path("resources/normandylandmap.p"))
|
landmap = load_landmap(Path("resources/normandylandmap.p"))
|
||||||
daytime_map = DaytimeMap(
|
daytime_map = DaytimeMap(
|
||||||
dawn=(datetime.time(hour=6), datetime.time(hour=8)),
|
dawn=(datetime.time(hour=6), datetime.time(hour=8)),
|
||||||
@ -345,7 +341,6 @@ class NormandyTheater(ConflictTheater):
|
|||||||
|
|
||||||
class TheChannelTheater(ConflictTheater):
|
class TheChannelTheater(ConflictTheater):
|
||||||
terrain = thechannel.TheChannel()
|
terrain = thechannel.TheChannel()
|
||||||
overview_image = "thechannel.gif"
|
|
||||||
landmap = load_landmap(Path("resources/channellandmap.p"))
|
landmap = load_landmap(Path("resources/channellandmap.p"))
|
||||||
daytime_map = DaytimeMap(
|
daytime_map = DaytimeMap(
|
||||||
dawn=(datetime.time(hour=6), datetime.time(hour=8)),
|
dawn=(datetime.time(hour=6), datetime.time(hour=8)),
|
||||||
@ -367,7 +362,6 @@ class TheChannelTheater(ConflictTheater):
|
|||||||
|
|
||||||
class SyriaTheater(ConflictTheater):
|
class SyriaTheater(ConflictTheater):
|
||||||
terrain = syria.Syria()
|
terrain = syria.Syria()
|
||||||
overview_image = "syria.gif"
|
|
||||||
landmap = load_landmap(Path("resources/syrialandmap.p"))
|
landmap = load_landmap(Path("resources/syrialandmap.p"))
|
||||||
daytime_map = DaytimeMap(
|
daytime_map = DaytimeMap(
|
||||||
dawn=(datetime.time(hour=6), datetime.time(hour=8)),
|
dawn=(datetime.time(hour=6), datetime.time(hour=8)),
|
||||||
@ -389,7 +383,6 @@ class SyriaTheater(ConflictTheater):
|
|||||||
|
|
||||||
class MarianaIslandsTheater(ConflictTheater):
|
class MarianaIslandsTheater(ConflictTheater):
|
||||||
terrain = marianaislands.MarianaIslands()
|
terrain = marianaislands.MarianaIslands()
|
||||||
overview_image = "marianaislands.gif"
|
|
||||||
|
|
||||||
landmap = load_landmap(Path("resources/marianaislandslandmap.p"))
|
landmap = load_landmap(Path("resources/marianaislandslandmap.p"))
|
||||||
daytime_map = DaytimeMap(
|
daytime_map = DaytimeMap(
|
||||||
@ -408,3 +401,30 @@ class MarianaIslandsTheater(ConflictTheater):
|
|||||||
from .seasonalconditions.marianaislands import CONDITIONS
|
from .seasonalconditions.marianaislands import CONDITIONS
|
||||||
|
|
||||||
return CONDITIONS
|
return CONDITIONS
|
||||||
|
|
||||||
|
|
||||||
|
class FalklandsTheater(ConflictTheater):
|
||||||
|
terrain = falklands.Falklands()
|
||||||
|
|
||||||
|
# TODO: https://github.com/dcs-liberation/dcs_liberation/issues/2242
|
||||||
|
landmap = None
|
||||||
|
|
||||||
|
# TODO: https://github.com/dcs-liberation/dcs_liberation/issues/2242
|
||||||
|
daytime_map = DaytimeMap(
|
||||||
|
dawn=(datetime.time(hour=6), datetime.time(hour=9)),
|
||||||
|
day=(datetime.time(hour=9), datetime.time(hour=18)),
|
||||||
|
dusk=(datetime.time(hour=18), datetime.time(hour=20)),
|
||||||
|
night=(datetime.time(hour=0), datetime.time(hour=5)),
|
||||||
|
)
|
||||||
|
|
||||||
|
# TODO: https://github.com/dcs-liberation/dcs_liberation/issues/2242
|
||||||
|
@property
|
||||||
|
def timezone(self) -> datetime.timezone:
|
||||||
|
return datetime.timezone(datetime.timedelta(hours=4))
|
||||||
|
|
||||||
|
# TODO: https://github.com/dcs-liberation/dcs_liberation/issues/2242
|
||||||
|
@property
|
||||||
|
def seasonal_conditions(self) -> SeasonalConditions:
|
||||||
|
from .seasonalconditions.caucasus import CONDITIONS
|
||||||
|
|
||||||
|
return CONDITIONS
|
||||||
|
|||||||
@ -3,7 +3,6 @@ from typing import Dict
|
|||||||
|
|
||||||
from PySide2.QtGui import QPixmap
|
from PySide2.QtGui import QPixmap
|
||||||
|
|
||||||
from game.theater.theatergroundobject import NAME_BY_CATEGORY
|
|
||||||
from .liberation_theme import get_theme_icons
|
from .liberation_theme import get_theme_icons
|
||||||
|
|
||||||
URLS: Dict[str, str] = {
|
URLS: Dict[str, str] = {
|
||||||
@ -70,6 +69,8 @@ def load_icons():
|
|||||||
ICONS["Terrain_TheChannel"] = QPixmap("./resources/ui/terrain_channel.gif")
|
ICONS["Terrain_TheChannel"] = QPixmap("./resources/ui/terrain_channel.gif")
|
||||||
ICONS["Terrain_Syria"] = QPixmap("./resources/ui/terrain_syria.gif")
|
ICONS["Terrain_Syria"] = QPixmap("./resources/ui/terrain_syria.gif")
|
||||||
ICONS["Terrain_MarianaIslands"] = QPixmap("./resources/ui/terrain_marianas.gif")
|
ICONS["Terrain_MarianaIslands"] = QPixmap("./resources/ui/terrain_marianas.gif")
|
||||||
|
# TODO
|
||||||
|
ICONS["Terrain_Falklands"] = QPixmap("./resources/ui/terrain_marianas.gif")
|
||||||
|
|
||||||
ICONS["Dawn"] = QPixmap("./resources/ui/conditions/timeofday/dawn.png")
|
ICONS["Dawn"] = QPixmap("./resources/ui/conditions/timeofday/dawn.png")
|
||||||
ICONS["Day"] = QPixmap("./resources/ui/conditions/timeofday/day.png")
|
ICONS["Day"] = QPixmap("./resources/ui/conditions/timeofday/day.png")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user