mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 15:06:20 +00:00
fix(wired): @altitude shown 100x too large and round-trip-edited wrong
`liveState.altitude` is already z*100, but the @altitude inspector rows multiplied by 100 again (showing z*10000). The edit-commit path parses the field back as `parsed / 100` (expecting z*100), so the displayed value and the edit parser disagreed: tweaking the shown number wrote a wildly wrong altitude (clamped to the 40 ceiling). Display the raw `altitude` so it round-trips with the editor.
This commit is contained in:
@@ -1181,7 +1181,7 @@ export const WiredCreatorToolsView: FC<{}> = () =>
|
|||||||
{ key: '@position_x', value: String(liveState?.positionX ?? 0), editable: canEditInspection },
|
{ key: '@position_x', value: String(liveState?.positionX ?? 0), editable: canEditInspection },
|
||||||
{ key: '@position_y', value: String(liveState?.positionY ?? 0), editable: canEditInspection },
|
{ key: '@position_y', value: String(liveState?.positionY ?? 0), editable: canEditInspection },
|
||||||
{ key: '@rotation', value: String(liveState?.rotation ?? 0), editable: canEditInspection },
|
{ key: '@rotation', value: String(liveState?.rotation ?? 0), editable: canEditInspection },
|
||||||
{ key: '@altitude', value: String(Math.round((liveState?.altitude ?? 0) * 100)), editable: canEditInspection },
|
{ key: '@altitude', value: String(liveState?.altitude ?? 0), editable: canEditInspection },
|
||||||
{ key: '@is_invisible', value: '0' },
|
{ key: '@is_invisible', value: '0' },
|
||||||
...(wallItemOffset ? [ { key: '@wallitem_offset', value: wallItemOffset, editable: canEditInspection } ] : []),
|
...(wallItemOffset ? [ { key: '@wallitem_offset', value: wallItemOffset, editable: canEditInspection } ] : []),
|
||||||
{ key: '@type', value: `${ selectedFurnitureData?.availableForBuildersClub ? 1 : 0 }${ selectedFurnitureData?.availableForBuildersClub ? ' (BC)' : ' (Normal)' }` },
|
{ key: '@type', value: `${ selectedFurnitureData?.availableForBuildersClub ? 1 : 0 }${ selectedFurnitureData?.availableForBuildersClub ? ' (BC)' : ' (Normal)' }` },
|
||||||
@@ -1294,7 +1294,7 @@ export const WiredCreatorToolsView: FC<{}> = () =>
|
|||||||
{ key: '@position_x', value: String(liveState?.positionX ?? 0), editable: canEditSelectedUser },
|
{ key: '@position_x', value: String(liveState?.positionX ?? 0), editable: canEditSelectedUser },
|
||||||
{ key: '@position_y', value: String(liveState?.positionY ?? 0), editable: canEditSelectedUser },
|
{ key: '@position_y', value: String(liveState?.positionY ?? 0), editable: canEditSelectedUser },
|
||||||
{ key: '@direction', value: String(liveState?.direction ?? 0), editable: canEditSelectedUser },
|
{ key: '@direction', value: String(liveState?.direction ?? 0), editable: canEditSelectedUser },
|
||||||
{ key: '@altitude', value: String(Math.round((liveState?.altitude ?? 0) * 100)) },
|
{ key: '@altitude', value: String(liveState?.altitude ?? 0) },
|
||||||
...((Number(selectedUser.favouriteGroupId ?? 0) > 0)
|
...((Number(selectedUser.favouriteGroupId ?? 0) > 0)
|
||||||
? [ { key: '@favourite_group_id', value: String(selectedUser.favouriteGroupId) } ]
|
? [ { key: '@favourite_group_id', value: String(selectedUser.favouriteGroupId) } ]
|
||||||
: []),
|
: []),
|
||||||
|
|||||||
Reference in New Issue
Block a user