mirror of
https://github.com/solero/houdini.git
synced 2024-11-25 06:57:24 +00:00
Move all players in igloo when owner switches igloos
This commit is contained in:
parent
758c40bdac
commit
aae36bcf22
@ -290,6 +290,17 @@ async def handle_update_igloo_slot_summary(p, igloo_id: int, slot_summary: _slot
|
|||||||
|
|
||||||
if igloo_id != p.room.id:
|
if igloo_id != p.room.id:
|
||||||
await p.update(igloo=igloo_id).apply()
|
await p.update(igloo=igloo_id).apply()
|
||||||
|
p.server.igloos_by_penguin_id[p.id] = igloo
|
||||||
|
|
||||||
|
igloo.penguins_by_id = p.room.penguins_by_id
|
||||||
|
igloo.penguins_by_username = p.room.penguins_by_username
|
||||||
|
igloo.penguins_by_character_id = p.room.penguins_by_character_id
|
||||||
|
p.room.penguins_by_id = {}
|
||||||
|
p.room.penguins_by_username = {}
|
||||||
|
p.room.penguins_by_character_id = {}
|
||||||
|
|
||||||
|
for penguin in igloo.penguins_by_id.values():
|
||||||
|
penguin.room = igloo
|
||||||
|
|
||||||
for slot in slot_summary:
|
for slot in slot_summary:
|
||||||
igloo_id, locked = map(int, slot.split('|'))
|
igloo_id, locked = map(int, slot.split('|'))
|
||||||
|
Loading…
Reference in New Issue
Block a user