mirror of
https://github.com/solero/houdini.git
synced 2024-11-10 05:08:19 +00:00
Always check player has default furniture, igloo and location
This commit is contained in:
parent
30586157fc
commit
a8421258d2
@ -155,6 +155,13 @@ async def igloos_load(server):
|
|||||||
server.logger.info(f'Loaded {len(server.locations)} igloo locations')
|
server.logger.info(f'Loaded {len(server.locations)} igloo locations')
|
||||||
server.logger.info(f'Loaded {len(server.flooring)} igloo flooring')
|
server.logger.info(f'Loaded {len(server.flooring)} igloo flooring')
|
||||||
|
|
||||||
|
|
||||||
|
DefaultFurnitureItems = [787, 788, 790, 792, 793]
|
||||||
|
DefaultIglooId = 1
|
||||||
|
DefaultLocationId = 1
|
||||||
|
|
||||||
|
|
||||||
|
@handlers.handler(XMLPacket('login'), priority=Priority.Low)
|
||||||
@handlers.allow_once
|
@handlers.allow_once
|
||||||
async def load_igloo_inventory(p):
|
async def load_igloo_inventory(p):
|
||||||
p.igloos = await PenguinIglooCollection.get_collection(p.id)
|
p.igloos = await PenguinIglooCollection.get_collection(p.id)
|
||||||
@ -163,6 +170,16 @@ async def load_igloo_inventory(p):
|
|||||||
p.flooring = await PenguinFlooringCollection.get_collection(p.id)
|
p.flooring = await PenguinFlooringCollection.get_collection(p.id)
|
||||||
p.locations = await PenguinLocationCollection.get_collection(p.id)
|
p.locations = await PenguinLocationCollection.get_collection(p.id)
|
||||||
|
|
||||||
|
if DefaultIglooId not in p.igloos:
|
||||||
|
await p.igloos.insert(igloo_id=DefaultIglooId)
|
||||||
|
|
||||||
|
if DefaultLocationId not in p.locations:
|
||||||
|
await p.locations.insert(location_id=DefaultLocationId)
|
||||||
|
|
||||||
|
for default_item_id in DefaultFurnitureItems:
|
||||||
|
if default_item_id not in p.furniture:
|
||||||
|
await p.furniture.insert(furniture_id=default_item_id)
|
||||||
|
|
||||||
|
|
||||||
@handlers.handler(XTPacket('g', 'gm'))
|
@handlers.handler(XTPacket('g', 'gm'))
|
||||||
@handlers.cooldown(1)
|
@handlers.cooldown(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user