Simplify custom world result editing controls

This commit is contained in:
2026-04-08 19:07:46 +08:00
parent bd9fdcbe31
commit a02f7b6414
125 changed files with 8804 additions and 1462 deletions

View File

@@ -12,6 +12,7 @@ import {
WorldType,
} from '../types';
import { resolveCustomWorldCampScene } from './customWorldCamp';
import { resolveCustomWorldRuleProfile } from './customWorldOwnedSettingLayers';
import {
type CustomWorldThemeMode,
detectCustomWorldThemeMode,
@@ -373,6 +374,21 @@ export function getResourceLabelsForWorld(worldType: WorldType | null | undefine
};
}
const ruleProfile = resolveCustomWorldRuleProfile(profile);
if (ruleProfile) {
return {
hp: ruleProfile.resourceLabels.hp,
mp: ruleProfile.resourceLabels.mp,
maxHp: ruleProfile.resourceLabels.maxHp,
maxMp: ruleProfile.resourceLabels.maxMp,
damage: ruleProfile.resourceLabels.damage,
guard: ruleProfile.resourceLabels.guard,
range: ruleProfile.resourceLabels.range,
cooldown: ruleProfile.resourceLabels.cooldown,
manaCost: ruleProfile.resourceLabels.manaCost,
};
}
const presentation = getWorldPresentation(profile);
return {
hp: presentation.hpLabel,