1
This commit is contained in:
@@ -2070,6 +2070,9 @@ function SceneActPreviewRuntime({
|
||||
...current,
|
||||
worldType: WorldType.CUSTOM,
|
||||
customWorldProfile: profile,
|
||||
// 中文注释:幕预览只复用运行时表现,不应进入正式存档和个人游玩记录。
|
||||
runtimeMode: 'preview',
|
||||
runtimePersistenceDisabled: true,
|
||||
currentScene: 'Story',
|
||||
currentScenePreset: previewScenePreset,
|
||||
currentEncounter: previewEncounter,
|
||||
@@ -4873,42 +4876,6 @@ export function WorldEditor({
|
||||
rows={3}
|
||||
/>
|
||||
</Field>
|
||||
<Field label="玩家原始设定">
|
||||
<TextArea
|
||||
value={draft.settingText}
|
||||
onChange={(value) =>
|
||||
setDraft((current) => ({
|
||||
...current,
|
||||
settingText: value,
|
||||
creatorIntent: current.creatorIntent
|
||||
? {
|
||||
...current.creatorIntent,
|
||||
rawSettingText: value,
|
||||
}
|
||||
: current.creatorIntent,
|
||||
}))
|
||||
}
|
||||
rows={4}
|
||||
/>
|
||||
</Field>
|
||||
<WorldAttributeSchemaEditor
|
||||
value={draft.attributeSchema}
|
||||
onChange={(attributeSchema) =>
|
||||
setDraft((current) => ({
|
||||
...current,
|
||||
attributeSchema,
|
||||
ownedSettingLayers: current.ownedSettingLayers
|
||||
? {
|
||||
...current.ownedSettingLayers,
|
||||
ruleProfile: {
|
||||
...current.ownedSettingLayers.ruleProfile,
|
||||
attributeSchema,
|
||||
},
|
||||
}
|
||||
: current.ownedSettingLayers,
|
||||
}))
|
||||
}
|
||||
/>
|
||||
<SaveBar
|
||||
onClose={onClose}
|
||||
onSave={() => {
|
||||
@@ -5134,6 +5101,9 @@ export function WorldFoundationEditor({
|
||||
}) {
|
||||
const initialDraft = useMemo(() => buildFoundationDraft(profile), [profile]);
|
||||
const [draft, setDraft] = useDraft(initialDraft);
|
||||
const [attributeSchemaDraft, setAttributeSchemaDraft] = useDraft(
|
||||
profile.attributeSchema,
|
||||
);
|
||||
|
||||
return (
|
||||
<ModalShell
|
||||
@@ -5170,10 +5140,27 @@ export function WorldFoundationEditor({
|
||||
</div>
|
||||
</Field>
|
||||
))}
|
||||
<WorldAttributeSchemaEditor
|
||||
value={attributeSchemaDraft}
|
||||
onChange={setAttributeSchemaDraft}
|
||||
/>
|
||||
<SaveBar
|
||||
onClose={onClose}
|
||||
onSave={() => {
|
||||
onSave(applyFoundationDraftToProfile(profile, draft));
|
||||
const nextProfile = applyFoundationDraftToProfile(profile, draft);
|
||||
onSave({
|
||||
...nextProfile,
|
||||
attributeSchema: attributeSchemaDraft,
|
||||
ownedSettingLayers: nextProfile.ownedSettingLayers
|
||||
? {
|
||||
...nextProfile.ownedSettingLayers,
|
||||
ruleProfile: {
|
||||
...nextProfile.ownedSettingLayers.ruleProfile,
|
||||
attributeSchema: attributeSchemaDraft,
|
||||
},
|
||||
}
|
||||
: nextProfile.ownedSettingLayers,
|
||||
});
|
||||
onClose();
|
||||
}}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user