mirror of
https://github.com/solero/houdini.git
synced 2024-12-23 22:13:38 +00:00
Add IglooRoom collection to Penguin data model
This commit is contained in:
parent
198a015c70
commit
e45ab46b61
@ -11,6 +11,7 @@ from houdini.data.ninja import CardCrumbsCollection
|
|||||||
from houdini.data.pet import PuffleCrumbsCollection, PuffleItemCrumbsCollection
|
from houdini.data.pet import PuffleCrumbsCollection, PuffleItemCrumbsCollection
|
||||||
from houdini.data.buddy import BuddyListCollection, BuddyRequestCollection, CharacterBuddyCollection, \
|
from houdini.data.buddy import BuddyListCollection, BuddyRequestCollection, CharacterBuddyCollection, \
|
||||||
IgnoreListCollection
|
IgnoreListCollection
|
||||||
|
from houdini.data.room import PenguinIglooRoomCollection
|
||||||
|
|
||||||
|
|
||||||
class Penguin(db.Model):
|
class Penguin(db.Model):
|
||||||
@ -91,6 +92,7 @@ class Penguin(db.Model):
|
|||||||
self.inventory = None
|
self.inventory = None
|
||||||
self.permissions = None
|
self.permissions = None
|
||||||
self.igloos = None
|
self.igloos = None
|
||||||
|
self.igloo_rooms = None
|
||||||
self.furniture = None
|
self.furniture = None
|
||||||
self.flooring = None
|
self.flooring = None
|
||||||
self.locations = None
|
self.locations = None
|
||||||
@ -109,6 +111,7 @@ class Penguin(db.Model):
|
|||||||
self.inventory = await ItemCrumbsCollection.get_collection(self.id)
|
self.inventory = await ItemCrumbsCollection.get_collection(self.id)
|
||||||
self.permissions = await PermissionCrumbsCollection.get_collection(self.id)
|
self.permissions = await PermissionCrumbsCollection.get_collection(self.id)
|
||||||
self.igloos = await IglooCrumbsCollection.get_collection(self.id)
|
self.igloos = await IglooCrumbsCollection.get_collection(self.id)
|
||||||
|
self.igloo_rooms = await PenguinIglooRoomCollection.get_collection(self.id)
|
||||||
self.furniture = await FurnitureCrumbsCollection.get_collection(self.id)
|
self.furniture = await FurnitureCrumbsCollection.get_collection(self.id)
|
||||||
self.flooring = await FlooringCrumbsCollection.get_collection(self.id)
|
self.flooring = await FlooringCrumbsCollection.get_collection(self.id)
|
||||||
self.locations = await LocationCrumbsCollection.get_collection(self.id)
|
self.locations = await LocationCrumbsCollection.get_collection(self.id)
|
||||||
|
@ -158,6 +158,16 @@ class PenguinIglooRoom(db.Model, RoomMixin):
|
|||||||
del p.server.igloos_by_penguin_id[self.penguin_id]
|
del p.server.igloos_by_penguin_id[self.penguin_id]
|
||||||
|
|
||||||
|
|
||||||
|
class PenguinIglooRoomCollection(BaseCrumbsCollection):
|
||||||
|
|
||||||
|
def __init__(self, inventory_id=None):
|
||||||
|
super().__init__(model=PenguinIglooRoom,
|
||||||
|
key='id',
|
||||||
|
inventory_model=PenguinIglooRoom,
|
||||||
|
inventory_key='penguin_id',
|
||||||
|
inventory_value='id',
|
||||||
|
inventory_id=inventory_id)
|
||||||
|
|
||||||
|
|
||||||
class RoomTable(db.Model):
|
class RoomTable(db.Model):
|
||||||
__tablename__ = 'room_table'
|
__tablename__ = 'room_table'
|
||||||
|
Loading…
Reference in New Issue
Block a user