Skip to content

Commit

Permalink
deploy: 73d200d
Browse files Browse the repository at this point in the history
  • Loading branch information
Askaholic committed Feb 22, 2025
1 parent 7c98053 commit 1f2756d
Showing 1 changed file with 12 additions and 43 deletions.
55 changes: 12 additions & 43 deletions lobbyconnection.html
Original file line number Diff line number Diff line change
Expand Up @@ -327,19 +327,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
friends_and_foes.c.subject_id == subject_id
)))

game = self.player.game
visibility_context_manager = contextlib.nullcontext()

if game and game.host == self.player:
# If the player is currently hosting a game, we need to make sure
# that the visibility change is sent to the subject
subject = self.player_service.get_player(subject_id)
visibility_context_manager = self._write_visibility_change_context(
game,
subject,
)

with visibility_context_manager:
with self._get_visibility_context_manager(subject_id):
player_attr.discard(subject_id)

async def command_social_add(self, message):
Expand All @@ -364,20 +352,25 @@ <h2 class="section-title" id="header-classes">Classes</h2>
subject_id=subject_id,
))

with self._get_visibility_context_manager(subject_id):
player_attr.add(subject_id)

def _get_visibility_context_manager(self, subject_id: int):
game = self.player.game
visibility_context_manager = contextlib.nullcontext()

if game and game.host == self.player:
# If the player is currently hosting a game, we need to make sure
# that the visibility change is sent to the subject
subject = self.player_service.get_player(subject_id)
visibility_context_manager = self._write_visibility_change_context(
if subject is None:
return contextlib.nullcontext()

return self._write_visibility_change_context(
game,
subject,
)

with visibility_context_manager:
player_attr.add(subject_id)
return contextlib.nullcontext()

@contextlib.contextmanager
def _write_visibility_change_context(
Expand Down Expand Up @@ -2424,19 +2417,7 @@ <h3>Methods</h3>
subject_id=subject_id,
))

game = self.player.game
visibility_context_manager = contextlib.nullcontext()

if game and game.host == self.player:
# If the player is currently hosting a game, we need to make sure
# that the visibility change is sent to the subject
subject = self.player_service.get_player(subject_id)
visibility_context_manager = self._write_visibility_change_context(
game,
subject,
)

with visibility_context_manager:
with self._get_visibility_context_manager(subject_id):
player_attr.add(subject_id)</code></pre>
</details>
<div class="desc"></div>
Expand Down Expand Up @@ -2466,19 +2447,7 @@ <h3>Methods</h3>
friends_and_foes.c.subject_id == subject_id
)))

game = self.player.game
visibility_context_manager = contextlib.nullcontext()

if game and game.host == self.player:
# If the player is currently hosting a game, we need to make sure
# that the visibility change is sent to the subject
subject = self.player_service.get_player(subject_id)
visibility_context_manager = self._write_visibility_change_context(
game,
subject,
)

with visibility_context_manager:
with self._get_visibility_context_manager(subject_id):
player_attr.discard(subject_id)</code></pre>
</details>
<div class="desc"></div>
Expand Down

0 comments on commit 1f2756d

Please sign in to comment.