Esempio n. 1
0
    def get_area_by_name(self, name=None):
        from base.models import Area

        area = Area.get(self.temp_key, name=name, player=self.player)

        if area is None:
            data = world.get_area(room_name=name)

            if data is None:
                return None

            area = Area.new(self.player, data, temp_key=self.temp_key)

        return area
Esempio n. 2
0
    def locations(self):
        from base.models import Area

        return Area.fetch(self.temp_key, player=self, available=True)