Remove client fallback for readonly item property display
This commit is contained in:
@@ -7,12 +7,8 @@ import {
|
||||
itemPropertyLabel,
|
||||
} from './itemRegistry';
|
||||
|
||||
type PresentationDeps = {
|
||||
formatTimestampMs: (value: unknown) => string;
|
||||
};
|
||||
|
||||
/** Builds shared item-property presentation/validation helpers used by item menus and message echoes. */
|
||||
export function createItemPropertyPresentation(deps: PresentationDeps): {
|
||||
export function createItemPropertyPresentation(): {
|
||||
getItemPropertyValue: (item: WorldItem, key: string) => string;
|
||||
isItemPropertyEditable: (item: WorldItem, key: string) => boolean;
|
||||
describeItemPropertyHelp: (item: WorldItem, key: string) => string;
|
||||
@@ -59,17 +55,6 @@ export function createItemPropertyPresentation(deps: PresentationDeps): {
|
||||
if (metadata?.valueType === 'list' || metadata?.valueType === 'text') {
|
||||
return rawValue === undefined || rawValue === null ? '' : String(rawValue);
|
||||
}
|
||||
if (key === 'type') return item.type;
|
||||
if (key === 'x') return String(item.x);
|
||||
if (key === 'y') return String(item.y);
|
||||
if (key === 'carrierId') return item.carrierId ?? 'none';
|
||||
if (key === 'version') return String(item.version);
|
||||
if (key === 'createdBy') return item.createdBy;
|
||||
if (key === 'createdAt') return deps.formatTimestampMs(item.createdAt);
|
||||
if (key === 'updatedAt') return deps.formatTimestampMs(item.updatedAt);
|
||||
if (key === 'capabilities') return item.capabilities.join(', ') || 'none';
|
||||
if (key === 'useSound') return toSoundDisplayName(item.params.useSound ?? item.useSound);
|
||||
if (key === 'emitSound') return toSoundDisplayName(item.params.emitSound ?? item.emitSound);
|
||||
if (paramValue !== undefined) return String(paramValue);
|
||||
if (globalValue !== undefined) return String(globalValue);
|
||||
return '';
|
||||
|
||||
Reference in New Issue
Block a user