Simplify custom world result editing controls
This commit is contained in:
@@ -25,12 +25,13 @@ import {
|
||||
PRESET_CHARACTERS,
|
||||
} from './characterPresets';
|
||||
import { resolveCustomWorldNpcMonsterPreset } from './customWorldNpcMonsters';
|
||||
import { getCustomWorldMonsterPresetPool } from './customWorldNpcMonsters';
|
||||
import { getRuntimeCustomWorldProfile, resolveRuleWorldType } from './customWorldRuntime';
|
||||
import {
|
||||
resolveCustomWorldCampSceneImage,
|
||||
resolveCustomWorldLandmarkImageMap,
|
||||
} from './customWorldVisuals';
|
||||
import { getMonsterPresetById, getMonsterPresetsByWorld } from './hostileNpcPresets';
|
||||
import { getMonsterPresetById } from './hostileNpcPresets';
|
||||
import sceneNpcOverridesJson from './sceneNpcOverrides.json';
|
||||
import sceneOverridesJson from './sceneOverrides.json';
|
||||
|
||||
@@ -307,7 +308,7 @@ function buildCustomSceneNpc(
|
||||
);
|
||||
const monsterPreset =
|
||||
npc.initialAffinity < 0
|
||||
? resolveCustomWorldNpcMonsterPreset(npc)
|
||||
? resolveCustomWorldNpcMonsterPreset(npc, WorldType.CUSTOM, profile)
|
||||
: null;
|
||||
const hostile = npc.initialAffinity < 0 || Boolean(monsterPreset);
|
||||
const attributeProfile = monsterPreset?.attributeProfile
|
||||
@@ -378,7 +379,7 @@ function buildCustomSceneId(kind: 'camp' | 'landmark', index = 0) {
|
||||
function buildCustomScenePresets(profile: CustomWorldProfile): ScenePreset[] {
|
||||
const campSceneProfile = resolveCustomWorldCampScene(profile);
|
||||
const landmarkImageMap = resolveCustomWorldLandmarkImageMap(profile);
|
||||
const baseMonsterPool: string[] = getMonsterPresetsByWorld(WorldType.CUSTOM)
|
||||
const baseMonsterPool: string[] = getCustomWorldMonsterPresetPool(profile)
|
||||
.map((monster) => monster.id)
|
||||
.filter((monsterId: string, index: number, array: string[]) => array.indexOf(monsterId) === index);
|
||||
const fallbackMonsterIds: string[] = baseMonsterPool.length > 0 ? baseMonsterPool : [];
|
||||
|
||||
Reference in New Issue
Block a user