mirror of
https://github.com/solero/houdini.git
synced 2024-11-09 20:58:20 +00:00
Change spawn_rooms into a property instead of a method
This commit is contained in:
parent
59a26f6028
commit
7619f55b70
@ -176,7 +176,8 @@ class RoomCrumbsCollection(BaseCrumbsCollection):
|
||||
super().__init__(model=Room,
|
||||
key='id')
|
||||
|
||||
def get_spawn_rooms(self):
|
||||
@property
|
||||
def spawn_rooms(self):
|
||||
return [room for room in self.values() if room.spawn]
|
||||
|
||||
async def setup_tables(self):
|
||||
|
@ -30,7 +30,7 @@ from houdini.data.permission import PermissionCrumbsCollection
|
||||
|
||||
try:
|
||||
import uvloop
|
||||
uvloop.install()
|
||||
#uvloop.install()
|
||||
except ImportError:
|
||||
uvloop = None
|
||||
|
||||
@ -184,7 +184,7 @@ class Houdini:
|
||||
self.logger.info('Loaded {} igloo flooring'.format(len(self.flooring)))
|
||||
|
||||
self.rooms = await RoomCrumbsCollection.get_collection()
|
||||
self.spawn_rooms = self.rooms.get_spawn_rooms()
|
||||
self.spawn_rooms = self.rooms.spawn_rooms
|
||||
await self.rooms.setup_tables()
|
||||
await self.rooms.setup_waddles()
|
||||
self.logger.info('Loaded {} rooms ({} spawn)'.format(len(self.rooms), len(self.spawn_rooms)))
|
||||
|
Loading…
Reference in New Issue
Block a user