From dac78d9ca80c2150a4f645566a8927d1871b75c3 Mon Sep 17 00:00:00 2001 From: Silvris <58583688+Silvris@users.noreply.github.com> Date: Sat, 18 May 2024 03:59:43 -0500 Subject: [PATCH] Update gifting.py --- worlds/kdl3/gifting.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/worlds/kdl3/gifting.py b/worlds/kdl3/gifting.py index fff8881d35..e162609100 100644 --- a/worlds/kdl3/gifting.py +++ b/worlds/kdl3/gifting.py @@ -2,10 +2,10 @@ import typing if typing.TYPE_CHECKING: - from CommonClient import CommonContext + from SNIClient import SNIContext -async def update_object(ctx: "CommonContext", key: str, value: typing.Dict[str, typing.Any]) -> None: +async def update_object(ctx: "SNIContext", key: str, value: typing.Dict[str, typing.Any]) -> None: await ctx.send_msgs([ { "cmd": "Set", @@ -19,7 +19,7 @@ async def update_object(ctx: "CommonContext", key: str, value: typing.Dict[str, ]) -async def pop_object(ctx: "CommonContext", key: str, value: str) -> None: +async def pop_object(ctx: "SNIContext", key: str, value: str) -> None: await ctx.send_msgs([ { "cmd": "Set", @@ -33,14 +33,14 @@ async def pop_object(ctx: "CommonContext", key: str, value: str) -> None: ]) -async def initialize_giftboxes(ctx: "CommonContext", giftbox_key: str, motherbox_key: str, is_open: bool) -> None: +async def initialize_giftboxes(ctx: "SNIContext", giftbox_key: str, motherbox_key: str, is_open: bool) -> None: ctx.set_notify(motherbox_key, giftbox_key) await update_object(ctx, f"Giftboxes;{ctx.team}", {f"{ctx.slot}": { "IsOpen": is_open, **kdl3_gifting_options }}) - setattr(ctx, "gifting", is_open) + ctx.client_handler.gifting = is_open kdl3_gifting_options = {