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 <medievalshell@users.noreply.github.com>
This commit is contained in:
simoleo89
2026-03-17 13:42:36 +01:00
parent 321dff2f6d
commit a0d10caa79
3 changed files with 12 additions and 1 deletions
+1
View File
@@ -11,6 +11,7 @@ export interface IRoomData
tags: string[];
tradeState: number;
allowWalkthrough: boolean;
allowUnderpass: boolean;
lockState: number;
password: string;
allowPets: boolean;
@@ -162,6 +162,11 @@ export const NavigatorRoomSettingsBasicTabView: FC<NavigatorRoomSettingsTabViewP
<input className="form-check-input" type="checkbox" checked={ roomData.allowWalkthrough } onChange={ event => handleChange('allow_walkthrough', event.target.checked) } />
<Text>{ LocalizeText('navigator.roomsettings.allow_walk_through') }</Text>
</Flex>
<Flex alignItems="center" gap={ 1 }>
<Base className="col-3" />
<input className="form-check-input" type="checkbox" checked={ roomData.allowUnderpass } onChange={ event => handleChange('allow_underpass', event.target.checked) } />
<Text>{ LocalizeText('navigator.roomsettings.allow_underpass') }</Text>
</Flex>
<Text variant="danger" underline bold pointer className="d-flex justify-content-center align-items-center gap-1" onClick={ deleteRoom }>
<FaTimes className="fa-icon" /> { LocalizeText('navigator.roomsettings.delete') }
</Text>
@@ -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;