Skip to content

Commit

Permalink
Merge pull request #11 from CoDaS-Lab/develop
Browse files Browse the repository at this point in the history
add multiplayer changes and victim rescue display handler
  • Loading branch information
chiragrank authored Dec 20, 2021
2 parents 93a73db + 6a7f207 commit e3f87ec
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,14 @@ async def rescue_attempt_handler(sid, message):
loop.run_in_executor(executor, save_data, sid, message)


@sio.on("rescue_success")
async def rescue_success_handler(sid, message):
@sio.on("rescue")
async def rescue_handler(sid, message):
console.print(message, sid, style="bold blue")
await sio.emit("rescue_success", message, room=message["rm_id"])


@sio.on("rescue_displayed")
async def rescue_displayed_handler(sid, message):
console.print(message, sid, style="bold blue")
loop = asyncio.get_event_loop()
loop.run_in_executor(executor, save_data, sid, message)
Expand Down

0 comments on commit e3f87ec

Please sign in to comment.