mirror of
https://github.com/solero/houdini.git
synced 2024-12-23 14:03:38 +00:00
Tidy up navigation.py
This commit is contained in:
parent
cdc5683f88
commit
86dd5d7d56
@ -1,15 +1,14 @@
|
|||||||
from houdini import handlers
|
from houdini import handlers
|
||||||
from houdini.handlers import XTPacket
|
from houdini.handlers import XTPacket
|
||||||
from houdini.converters import RoomConverter
|
from houdini.data.room import Room
|
||||||
|
|
||||||
import random
|
import random
|
||||||
import time
|
import time
|
||||||
import ujson
|
|
||||||
|
|
||||||
|
|
||||||
@handlers.handler(XTPacket('j', 'js'), pre_login=True)
|
@handlers.handler(XTPacket('j', 'js'), pre_login=True)
|
||||||
@handlers.allow_once
|
@handlers.allow_once
|
||||||
async def handle_join_server(p, penguin_id: int, login_key: str, lang: str):
|
async def handle_join_server(p, penguin_id: int, login_key: str):
|
||||||
if penguin_id != p.data.id:
|
if penguin_id != p.data.id:
|
||||||
return await p.close()
|
return await p.close()
|
||||||
|
|
||||||
@ -20,8 +19,6 @@ async def handle_join_server(p, penguin_id: int, login_key: str, lang: str):
|
|||||||
await p.send_xt('js', int(p.data.agent_status), int(0),
|
await p.send_xt('js', int(p.data.agent_status), int(0),
|
||||||
int(p.data.moderator), int(p.data.book_modified))
|
int(p.data.moderator), int(p.data.book_modified))
|
||||||
|
|
||||||
#handleGetMyPlayerPuffles()
|
|
||||||
|
|
||||||
current_time = int(time.time())
|
current_time = int(time.time())
|
||||||
penguin_standard_time = current_time * 1000
|
penguin_standard_time = current_time * 1000
|
||||||
server_time_offset = 7
|
server_time_offset = 7
|
||||||
@ -35,11 +32,12 @@ async def handle_join_server(p, penguin_id: int, login_key: str, lang: str):
|
|||||||
await spawn.add_penguin(p)
|
await spawn.add_penguin(p)
|
||||||
|
|
||||||
await p.data.load_inventories()
|
await p.data.load_inventories()
|
||||||
p.joined_world = True
|
|
||||||
|
|
||||||
p.server.penguins_by_id[p.data.id] = p
|
p.server.penguins_by_id[p.data.id] = p
|
||||||
p.server.penguins_by_username[p.data.username] = p
|
p.server.penguins_by_username[p.data.username] = p
|
||||||
|
|
||||||
|
p.joined_world = True
|
||||||
|
|
||||||
|
|
||||||
@handlers.handler(XTPacket('j', 'jr'))
|
@handlers.handler(XTPacket('j', 'jr'))
|
||||||
@handlers.cooldown(1)
|
@handlers.cooldown(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user