From a0d10caa79408936460c7edd99c0a0ffcca7051f Mon Sep 17 00:00:00 2001 From: simoleo89 Date: Tue, 17 Mar 2026 13:42:36 +0100 Subject: [PATCH] feat(room-settings): add underpass walk-under-furniture checkbox Add allowUnderpass toggle to room settings UI (Info tab), allowing room owners to enable/disable walking under elevated furniture per room. Changes: - IRoomData: add allowUnderpass boolean field - NavigatorRoomSettingsView: map allowUnderpass from server data, handle changes, and send via SaveRoomSettingsComposer - NavigatorRoomSettingsBasicTabView: add checkbox below "Disabilita blocco caselle" Requires server-side PR: duckietm/Arcturus-Morningstar-Extended#12 Note: nitro-renderer changes (RoomSettingsData, RoomSettingsDataParser, SaveRoomSettingsComposer) must be applied separately in node_modules. Co-Authored-By: medievalshell --- src/api/navigator/IRoomData.ts | 1 + .../room-settings/NavigatorRoomSettingsBasicTabView.tsx | 5 +++++ .../views/room-settings/NavigatorRoomSettingsView.tsx | 7 ++++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/api/navigator/IRoomData.ts b/src/api/navigator/IRoomData.ts index 9146314..65f3c5d 100644 --- a/src/api/navigator/IRoomData.ts +++ b/src/api/navigator/IRoomData.ts @@ -11,6 +11,7 @@ export interface IRoomData tags: string[]; tradeState: number; allowWalkthrough: boolean; + allowUnderpass: boolean; lockState: number; password: string; allowPets: boolean; diff --git a/src/components/navigator/views/room-settings/NavigatorRoomSettingsBasicTabView.tsx b/src/components/navigator/views/room-settings/NavigatorRoomSettingsBasicTabView.tsx index 340d66b..58de23a 100644 --- a/src/components/navigator/views/room-settings/NavigatorRoomSettingsBasicTabView.tsx +++ b/src/components/navigator/views/room-settings/NavigatorRoomSettingsBasicTabView.tsx @@ -162,6 +162,11 @@ export const NavigatorRoomSettingsBasicTabView: FC handleChange('allow_walkthrough', event.target.checked) } /> { LocalizeText('navigator.roomsettings.allow_walk_through') } + + + handleChange('allow_underpass', event.target.checked) } /> + { LocalizeText('navigator.roomsettings.allow_underpass') } + { LocalizeText('navigator.roomsettings.delete') } diff --git a/src/components/navigator/views/room-settings/NavigatorRoomSettingsView.tsx b/src/components/navigator/views/room-settings/NavigatorRoomSettingsView.tsx index 7b9ecec..29b7f85 100644 --- a/src/components/navigator/views/room-settings/NavigatorRoomSettingsView.tsx +++ b/src/components/navigator/views/room-settings/NavigatorRoomSettingsView.tsx @@ -39,6 +39,7 @@ export const NavigatorRoomSettingsView: FC<{}> = props => tags: data.tags, tradeState: data.tradeMode, allowWalkthrough: data.allowWalkThrough, + allowUnderpass: data.allowUnderpass, lockState: data.doorMode, password: null, allowPets: data.allowPets, @@ -98,6 +99,9 @@ export const NavigatorRoomSettingsView: FC<{}> = props => case 'allow_walkthrough': newValue.allowWalkthrough = Boolean(value); break; + case 'allow_underpass': + newValue.allowUnderpass = Boolean(value); + break; case 'allow_pets': newValue.allowPets = Boolean(value); break; @@ -171,7 +175,8 @@ export const NavigatorRoomSettingsView: FC<{}> = props => newValue.chatSettings.weight, newValue.chatSettings.speed, newValue.chatSettings.distance, - newValue.chatSettings.protection + newValue.chatSettings.protection, + newValue.allowUnderpass )); return newValue;