diff --git a/houdini/handlers/play/item.py b/houdini/handlers/play/item.py index e86e5f8..849d7b3 100644 --- a/houdini/handlers/play/item.py +++ b/houdini/handlers/play/item.py @@ -49,11 +49,23 @@ async def items_load(server): server.items = await ItemCollection.get_collection() server.logger.info(f'Loaded {len(server.items)} clothing items') + +DefaultInventory = [1285, 9106] + + +@handlers.handler(XMLPacket('login'), priority=Priority.Low) @handlers.allow_once async def load_inventory(p): p.inventory = await PenguinItemCollection.get_collection(p.id) p.permissions = await PenguinPermissionCollection.get_collection(p.id) + if p.color not in p.inventory: + await p.inventory.insert(item_id=p.color) + + for default_item_id in DefaultInventory: + if default_item_id not in p.inventory: + await p.inventory.insert(item_id=default_item_id) + @handlers.handler(XTPacket('i', 'gi')) @handlers.allow_once