mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Migrate Marianas to YAML.
This commit is contained in:
parent
06652cd063
commit
f08955ae53
@ -15,7 +15,6 @@ from game.profiling import logged_duration
|
||||
from game.theater import (
|
||||
ConflictTheater,
|
||||
FalklandsTheater,
|
||||
MarianaIslandsTheater,
|
||||
NevadaTheater,
|
||||
NormandyTheater,
|
||||
TheChannelTheater,
|
||||
@ -117,7 +116,6 @@ class Campaign:
|
||||
"Nevada": NevadaTheater,
|
||||
"Normandy": NormandyTheater,
|
||||
"The Channel": TheChannelTheater,
|
||||
"MarianaIslands": MarianaIslandsTheater,
|
||||
"Falklands": FalklandsTheater,
|
||||
}
|
||||
try:
|
||||
|
||||
@ -9,7 +9,6 @@ from uuid import UUID
|
||||
from dcs.mapping import Point
|
||||
from dcs.terrain import (
|
||||
falklands,
|
||||
marianaislands,
|
||||
nevada,
|
||||
normandy,
|
||||
thechannel,
|
||||
@ -307,28 +306,6 @@ class TheChannelTheater(ConflictTheater):
|
||||
return CONDITIONS
|
||||
|
||||
|
||||
class MarianaIslandsTheater(ConflictTheater):
|
||||
terrain = marianaislands.MarianaIslands()
|
||||
|
||||
landmap = load_landmap(Path("resources/marianaislandslandmap.p"))
|
||||
daytime_map = DaytimeMap(
|
||||
dawn=(datetime.time(hour=6), datetime.time(hour=8)),
|
||||
day=(datetime.time(hour=8), datetime.time(hour=16)),
|
||||
dusk=(datetime.time(hour=16), datetime.time(hour=18)),
|
||||
night=(datetime.time(hour=0), datetime.time(hour=5)),
|
||||
)
|
||||
|
||||
@property
|
||||
def timezone(self) -> datetime.timezone:
|
||||
return datetime.timezone(datetime.timedelta(hours=10))
|
||||
|
||||
@property
|
||||
def seasonal_conditions(self) -> SeasonalConditions:
|
||||
from .seasonalconditions.marianaislands import CONDITIONS
|
||||
|
||||
return CONDITIONS
|
||||
|
||||
|
||||
class FalklandsTheater(ConflictTheater):
|
||||
terrain = falklands.Falklands()
|
||||
|
||||
|
||||
@ -1,38 +0,0 @@
|
||||
from .seasonalconditions import SeasonalConditions, Season, WeatherTypeChances
|
||||
|
||||
CONDITIONS = SeasonalConditions(
|
||||
summer_avg_pressure=30.02, # TODO: Find real-world data
|
||||
winter_avg_pressure=29.82, # TODO: Find real-world data
|
||||
summer_avg_temperature=28.0,
|
||||
winter_avg_temperature=27.0,
|
||||
temperature_day_night_difference=1.0,
|
||||
weather_type_chances={
|
||||
# TODO: Find real-world data for all these values
|
||||
Season.Winter: WeatherTypeChances(
|
||||
thunderstorm=2,
|
||||
raining=20,
|
||||
cloudy=40,
|
||||
clear_skies=40,
|
||||
),
|
||||
Season.Spring: WeatherTypeChances(
|
||||
# Spring is dry/sunny in Marianas
|
||||
thunderstorm=1,
|
||||
raining=10,
|
||||
cloudy=30,
|
||||
clear_skies=60,
|
||||
),
|
||||
Season.Summer: WeatherTypeChances(
|
||||
thunderstorm=2,
|
||||
raining=20,
|
||||
cloudy=40,
|
||||
clear_skies=40,
|
||||
),
|
||||
Season.Fall: WeatherTypeChances(
|
||||
# Rain season
|
||||
thunderstorm=5,
|
||||
raining=45,
|
||||
cloudy=30,
|
||||
clear_skies=20,
|
||||
),
|
||||
},
|
||||
)
|
||||
40
resources/theaters/marianaislands/info.yaml
Normal file
40
resources/theaters/marianaislands/info.yaml
Normal file
@ -0,0 +1,40 @@
|
||||
---
|
||||
name: Mariana Islands
|
||||
pydcs_name: MarianaIslands
|
||||
timezone: +10
|
||||
daytime:
|
||||
dawn: [6, 8]
|
||||
day: [8, 16]
|
||||
dusk: [16, 18]
|
||||
night: [0, 5]
|
||||
climate:
|
||||
day_night_temperature_difference: 6.0
|
||||
seasons:
|
||||
winter:
|
||||
average_pressure: 29.82 # TODO: Find real-world data
|
||||
average_temperature: 27.0
|
||||
weather:
|
||||
thunderstorm: 2
|
||||
raining: 20
|
||||
cloudy: 40
|
||||
clear: 40
|
||||
spring:
|
||||
weather:
|
||||
thunderstorm: 1
|
||||
raining: 10
|
||||
cloudy: 30
|
||||
clear: 60
|
||||
summer:
|
||||
average_pressure: 30.02 # TODO: Find real-world data
|
||||
average_temperature: 28.0
|
||||
weather:
|
||||
thunderstorm: 2
|
||||
raining: 20
|
||||
cloudy: 40
|
||||
clear: 40
|
||||
fall:
|
||||
weather:
|
||||
thunderstorm: 5
|
||||
raining: 45
|
||||
cloudy: 30
|
||||
clear: 20
|
||||
Loading…
x
Reference in New Issue
Block a user