Exemple #1
0
    def tile_maps_by_position(
            self) -> typing.Dict[typing.Tuple[int, int], ZoneMap]:
        if self._world_map_source is None:
            raise ComponentNotPrepared(
                "self._tile_maps_by_position must be prepared before usage")

        return self._tile_maps_by_position
Exemple #2
0
    def server_zone_events_manager(self) -> ZoneEventsManager:
        if self._server_zone_events_manager is None:
            raise ComponentNotPrepared(
                "self._server_zone_events_manager must be prepared before usage"
            )

        return self._server_zone_events_manager
Exemple #3
0
    def server_db_session(self) -> Session:
        if self._server_db_session is None:
            raise ComponentNotPrepared("server_db_session is not created yet")

        return self._server_db_session
Exemple #4
0
    def world_map_source(self) -> WorldMapSource:
        if self._world_map_source is None:
            raise ComponentNotPrepared(
                "self._world_map_source must be prepared before usage")

        return self._world_map_source
Exemple #5
0
 def game(self) -> Game:
     if self._game is None:
         raise ComponentNotPrepared(
             "self._game must be prepared before usage: provide game config folder parameter"
         )
     return self._game
Exemple #6
0
    def display_objects_manager(self) -> DisplayObjectManager:
        if self._display_objects_manager is None:
            raise ComponentNotPrepared(
                "self._display_objects_manager not prepared")

        return self._display_objects_manager
Exemple #7
0
    def spawn(self) -> WorldMapSpawn:
        if self._spawn is None:
            raise ComponentNotPrepared("World source map don't contains spawn meta data")

        return self._spawn