mirror of
https://github.com/solero/houdini.git
synced 2024-11-09 20:58:20 +00:00
Add more converter aliases for better syntax and IDE support
This commit is contained in:
parent
1a5cf4868c
commit
59a26f6028
@ -8,6 +8,11 @@ import collections
|
||||
|
||||
from houdini.cooldown import CooldownError
|
||||
|
||||
from houdini.data.room import Room
|
||||
from houdini.data.item import Item
|
||||
from houdini.data.igloo import Igloo, Furniture, Flooring, Location
|
||||
from houdini.data.stamp import Stamp
|
||||
|
||||
|
||||
class ChecklistError(Exception):
|
||||
"""Raised when a checklist fails"""
|
||||
@ -384,7 +389,13 @@ class _ConverterContext:
|
||||
|
||||
ConverterTypes = {
|
||||
Credentials: CredentialsConverter,
|
||||
WorldCredentials: WorldCredentialsConverter
|
||||
WorldCredentials: WorldCredentialsConverter,
|
||||
|
||||
Room: RoomConverter,
|
||||
Item: ItemConverter,
|
||||
Furniture: FurnitureConverter,
|
||||
Igloo: IglooConverter,
|
||||
Flooring: FlooringConverter
|
||||
}
|
||||
|
||||
|
||||
|
@ -42,6 +42,6 @@ async def handle_join_server(p, penguin_id: int, login_key: str, lang: str):
|
||||
|
||||
@handlers.handler(XTPacket('j', 'jr'))
|
||||
@handlers.cooldown(1)
|
||||
async def handle_join_room(p, room: RoomConverter, x: int, y: int):
|
||||
async def handle_join_room(p, room: Room, x: int, y: int):
|
||||
p.x, p.y = x, y
|
||||
await p.join_room(room)
|
||||
|
Loading…
Reference in New Issue
Block a user