Skip to content

MapManagerDE

Classes

MapManagerDE

Bases: MapManager

Manager of all DE map related features

Source code in AoE2ScenarioParser/objects/managers/de/map_manager_de.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
class MapManagerDE(MapManager):
    """Manager of all DE map related features"""
    _link_list = [
        RetrieverObjectLinkGroup("Map", group=[
            RetrieverObjectLink("map_color_mood"),
            RetrieverObjectLink("collide_and_correct"),
            RetrieverObjectLink("villager_force_drop", support=Support(since=1.37)),
            RetrieverObjectLink("map_width"),
            RetrieverObjectLink("map_height"),
            RetrieverObjectLink("terrain", link="terrain_data", process_as_object=TerrainTile),
        ])
    ]

    def __init__(self,
                 map_color_mood: str,
                 collide_and_correct: bool,
                 villager_force_drop: bool,
                 map_width: int,
                 map_height: int,
                 terrain: List[TerrainTile],
                 **kwargs,
                 ):
        super().__init__(map_width, map_height, terrain, **kwargs)

        self.map_color_mood: str = map_color_mood
        self.collide_and_correct: bool = collide_and_correct
        self.villager_force_drop: bool = villager_force_drop

    @property
    def collide_and_correct(self):
        warn("Moved to the OptionManager. Use: `option_manager.collide_and_correct` instead", DeprecationWarning)
        return self._collide_and_correct

    @collide_and_correct.setter
    def collide_and_correct(self, value):
        warn("Moved to the OptionManager. Use: `option_manager.collide_and_correct` instead", DeprecationWarning)
        self._collide_and_correct = value

    @property
    def villager_force_drop(self):
        warn("Moved to the OptionManager. Use: `option_manager.villager_force_drop` instead", DeprecationWarning)
        return self._villager_force_drop

    @villager_force_drop.setter
    def villager_force_drop(self, value):
        warn("Moved to the OptionManager. Use: `option_manager.villager_force_drop` instead", DeprecationWarning)
        self._villager_force_drop = value

Attributes

collide_and_correct property writable
map_color_mood: str = map_color_mood instance-attribute
Type: str
Value: map_color_mood
villager_force_drop property writable

Functions


def __init__(...)

Parameters:

Name Type Description Default
map_color_mood str - required
collide_and_correct bool - required
villager_force_drop bool - required
map_width int - required
map_height int - required
terrain List[TerrainTile] - required
kwargs ? - {}
Source code in AoE2ScenarioParser/objects/managers/de/map_manager_de.py
24
25
26
27
28
29
30
31
32
33
34
35
36
37
def __init__(self,
             map_color_mood: str,
             collide_and_correct: bool,
             villager_force_drop: bool,
             map_width: int,
             map_height: int,
             terrain: List[TerrainTile],
             **kwargs,
             ):
    super().__init__(map_width, map_height, terrain, **kwargs)

    self.map_color_mood: str = map_color_mood
    self.collide_and_correct: bool = collide_and_correct
    self.villager_force_drop: bool = villager_force_drop

Functions