mirror of
https://github.com/solero/houdini.git
synced 2024-11-22 05:27:23 +00:00
Update converted to utilise async crumbs collections properly
This commit is contained in:
parent
049daa8d11
commit
b0f9e2125c
@ -218,7 +218,7 @@ class RoomConverter(IConverter):
|
|||||||
async def convert(self, ctx):
|
async def convert(self, ctx):
|
||||||
room_id = int(ctx.argument)
|
room_id = int(ctx.argument)
|
||||||
if room_id in ctx.p.server.rooms:
|
if room_id in ctx.p.server.rooms:
|
||||||
return ctx.p.server.rooms[room_id]
|
return await ctx.p.server.rooms.get(room_id)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
@ -229,7 +229,7 @@ class ItemConverter(IConverter):
|
|||||||
async def convert(self, ctx):
|
async def convert(self, ctx):
|
||||||
item_id = int(ctx.argument)
|
item_id = int(ctx.argument)
|
||||||
if item_id in ctx.p.server.items:
|
if item_id in ctx.p.server.items:
|
||||||
return ctx.p.server.items[item_id]
|
return await ctx.p.server.items.get(item_id)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
@ -240,7 +240,7 @@ class IglooConverter(IConverter):
|
|||||||
async def convert(self, ctx):
|
async def convert(self, ctx):
|
||||||
igloo_id = int(ctx.argument)
|
igloo_id = int(ctx.argument)
|
||||||
if igloo_id in ctx.p.server.igloos:
|
if igloo_id in ctx.p.server.igloos:
|
||||||
return ctx.p.server.igloos[igloo_id]
|
return await ctx.p.server.igloos.get(igloo_id)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
@ -251,7 +251,7 @@ class FurnitureConverter(IConverter):
|
|||||||
async def convert(self, ctx):
|
async def convert(self, ctx):
|
||||||
furniture_id = int(ctx.argument)
|
furniture_id = int(ctx.argument)
|
||||||
if furniture_id in ctx.p.server.furniture:
|
if furniture_id in ctx.p.server.furniture:
|
||||||
return ctx.p.server.furniture[furniture_id]
|
return await ctx.p.server.furniture.get(furniture_id)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
@ -262,7 +262,7 @@ class FlooringConverter(IConverter):
|
|||||||
async def convert(self, ctx):
|
async def convert(self, ctx):
|
||||||
flooring_id = int(ctx.argument)
|
flooring_id = int(ctx.argument)
|
||||||
if flooring_id in ctx.p.server.flooring:
|
if flooring_id in ctx.p.server.flooring:
|
||||||
return ctx.p.server.flooring[flooring_id]
|
return await ctx.p.server.flooring.get(flooring_id)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
@ -273,7 +273,7 @@ class StampConverter(IConverter):
|
|||||||
async def convert(self, ctx):
|
async def convert(self, ctx):
|
||||||
stamp_id = int(ctx.argument)
|
stamp_id = int(ctx.argument)
|
||||||
if stamp_id in ctx.p.server.stamps:
|
if stamp_id in ctx.p.server.stamps:
|
||||||
return ctx.p.server.stamps[stamp_id]
|
return await ctx.p.server.stamps.get(stamp_id)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user