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
def locations(self): from base.models import Area return Area.fetch(self.temp_key, player=self, available=True)