Bases: IntEnum
This enum class provides the integer values used to reference the different variants of scenarios (and the game).
Source code in AoE2ScenarioParser/datasets/scenario_variant.py
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 | class ScenarioVariant(IntEnum):
"""
This enum class provides the integer values used to reference the different variants of scenarios (and the game).
"""
LEGACY = 0
AOE2 = 1
ROR = 2
def to_display_name(self) -> str:
return {
ScenarioVariant.LEGACY: 'Legacy',
ScenarioVariant.AOE2: 'Age of Empires 2',
ScenarioVariant.ROR: 'Return of Rome',
}[self]
def applicants(self):
return {
ScenarioVariant.LEGACY: 'AoC & Bare HD',
ScenarioVariant.AOE2: 'HD with expansions & DE',
ScenarioVariant.ROR: 'Return of Rome',
}[self]
|
Attributes
AOE2 = 1
class-attribute
instance-attribute
Value:
1
LEGACY = 0
class-attribute
instance-attribute
Value:
0
ROR = 2
class-attribute
instance-attribute
Value:
2
Functions
def applicants(...)
Source code in AoE2ScenarioParser/datasets/scenario_variant.py
| def applicants(self):
return {
ScenarioVariant.LEGACY: 'AoC & Bare HD',
ScenarioVariant.AOE2: 'HD with expansions & DE',
ScenarioVariant.ROR: 'Return of Rome',
}[self]
|
def to_display_name(...)
Source code in AoE2ScenarioParser/datasets/scenario_variant.py
| def to_display_name(self) -> str:
return {
ScenarioVariant.LEGACY: 'Legacy',
ScenarioVariant.AOE2: 'Age of Empires 2',
ScenarioVariant.ROR: 'Return of Rome',
}[self]
|