From 294aeeae9759a25c19a0de7ff413f5e1b5f96bf9 Mon Sep 17 00:00:00 2001 From: AAA <35992542+TNTcraftHIM@users.noreply.github.com> Date: Thu, 12 Nov 2026 01:42:21 -0400 Subject: [PATCH] refactor: remove unused reply context and design artwork --- prototype/channel-core/src/lib.rs | 38 +++++++--------- prototype/channel-core/src/remote.rs | 3 +- src/client/channel/design/DesignArtwork.tsx | 49 --------------------- 3 files changed, 17 insertions(+), 73 deletions(-) delete mode 100644 src/client/channel/design/DesignArtwork.tsx diff --git a/prototype/channel-core/src/lib.rs b/prototype/channel-core/src/lib.rs index 0b1adac69..ed2e2e84a 100644 --- a/prototype/channel-core/src/lib.rs +++ b/prototype/channel-core/src/lib.rs @@ -247,8 +247,8 @@ impl Authority { } } } else { - for (room, binding, reply) in self.channel.remove_room(room_id) { - self.room_reply(&room, binding, reply, &mut effects); + for (room, reply) in self.channel.remove_room(room_id) { + self.room_reply(&room, reply, &mut effects); } self.broadcast(None, &mut effects); effects.events.push(( @@ -296,8 +296,8 @@ impl Authority { ); match result { Ok((events, replies)) => { - for (room, binding, reply) in replies { - self.room_reply(&room, binding, reply, &mut effects); + for (room, reply) in replies { + self.room_reply(&room, reply, &mut effects); } for (session, event) in events { self.deliver(session, event, &mut effects); @@ -332,8 +332,8 @@ impl Authority { .stop_host(room_id, session_id, connection, *binding_id) { Ok(replies) => { - for (room, binding, reply) in replies { - self.room_reply(&room, binding, reply, &mut effects); + for (room, reply) in replies { + self.room_reply(&room, reply, &mut effects); } self.broadcast(None, &mut effects); if let Some(request_id) = request.request_id { @@ -356,8 +356,8 @@ impl Authority { let sync_hosts = matches!(request.command, Command::Leave); match self.channel.handle(session_id, request.command, now) { Ok(outcome) => { - for (room, binding, reply) in outcome.replies { - self.room_reply(&room, binding, reply, &mut effects); + for (room, reply) in outcome.replies { + self.room_reply(&room, reply, &mut effects); } for (recipient, event) in outcome.events { self.deliver(recipient, event, &mut effects); @@ -413,9 +413,9 @@ impl Authority { pub fn failed_room_delete(&mut self, id: &str, request: &RequestContext) -> Effects { let mut effects = Effects::default(); if let Some(room) = self.channel.remote.get_mut(id) { - for (room, binding, reply) in room.pause() { + for (room, reply) in room.pause() { if &reply.context != request { - self.room_reply(&room, binding, reply, &mut effects); + self.room_reply(&room, reply, &mut effects); } } } @@ -429,8 +429,8 @@ impl Authority { self.channel.now = now; let mut effects = Effects::default(); let (expired, replies) = self.channel.expire_sessions(now); - for (room, binding, reply) in replies { - self.room_reply(&room, binding, reply, &mut effects); + for (room, reply) in replies { + self.room_reply(&room, reply, &mut effects); } if expired { self.sync_hosts(&mut effects, true); @@ -571,8 +571,8 @@ impl Authority { .as_ref() .is_some_and(|reply| matches!(reply.result, RoomResult::Deleted { data_removed: true })) { - for (room, binding, reply) in self.channel.remove_room(room_id) { - self.room_reply(&room, binding, reply, effects); + for (room, reply) in self.channel.remove_room(room_id) { + self.room_reply(&room, reply, effects); } self.broadcast(None, effects); } @@ -580,18 +580,12 @@ impl Authority { self.broadcast(None, effects); } for reply in accepted.replies { - self.room_reply(room_id, output.binding_id, reply, effects); + self.room_reply(room_id, reply, effects); } Ok(()) } - fn room_reply( - &mut self, - room_id: &str, - _binding_id: Uuid, - reply: RoomReply, - effects: &mut Effects, - ) { + fn room_reply(&mut self, room_id: &str, reply: RoomReply, effects: &mut Effects) { let context = reply.context; if self .channel diff --git a/prototype/channel-core/src/remote.rs b/prototype/channel-core/src/remote.rs index fbdaaf445..2e0db5eee 100644 --- a/prototype/channel-core/src/remote.rs +++ b/prototype/channel-core/src/remote.rs @@ -32,7 +32,7 @@ pub(crate) enum ReplyOwner { RouteWake, } -pub(crate) type RetiredRoomReply = (String, Uuid, RoomReply); +pub(crate) type RetiredRoomReply = (String, RoomReply); #[derive(Clone)] pub(crate) struct RemoteRoom { @@ -76,7 +76,6 @@ impl RemoteRoom { .filter_map(|owner| match owner { ReplyOwner::Request { context, .. } => Some(( self.summary.id.clone(), - binding.id, RoomReply { context, result: RoomResult::Error { diff --git a/src/client/channel/design/DesignArtwork.tsx b/src/client/channel/design/DesignArtwork.tsx deleted file mode 100644 index f3b6dcb32..000000000 --- a/src/client/channel/design/DesignArtwork.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import { PersonShape } from "../../components/living/Pawn"; - -/** Original illustrative content for the design boards, not received media. */ -export function DesignArtwork({ kind = "game" }: { kind?: "game" | "drawing" }) { - if (kind === "drawing") return - - - - - a little place to stay.svg - - - - - - - - - - - - - Mallow - - {["--pawn-1", "--pawn-5", "--pawn-6", "--couch", "--ink"].map((color, index) => - )} - ; - return - - - - - - - - - - - - - - - - {[347, 377, 407].map((x, i) => - )} - SIDE BY SIDE02 / 06 - ONE MORE TRY - ; -}