feat: improve first-session combat and visual assets
This commit is contained in:
@@ -8,7 +8,7 @@ import {
|
||||
type BattleUiIconKey
|
||||
} from '../data/battleUiIcons';
|
||||
import { portraitAssetEntriesForKey, portraitKeyForSpeaker, type PortraitAssetEntry } from '../data/portraitAssets';
|
||||
import { storyBackgroundAssets, storyBackgroundKeysFor } from '../data/storyAssets';
|
||||
import { storyBackgroundAssets, storyBackgroundKeyForPage } from '../data/storyAssets';
|
||||
import {
|
||||
ensureUnitAnimations,
|
||||
loadUnitBaseSheets,
|
||||
@@ -701,12 +701,8 @@ export class StoryScene extends Phaser.Scene {
|
||||
}
|
||||
|
||||
private pageBackgroundAssetKey(page: StoryPage) {
|
||||
const keys = storyBackgroundKeysFor(page.background).filter((key) => Boolean(storyBackgroundAssets[key]));
|
||||
if (keys.length <= 1) {
|
||||
return keys[0] ?? page.background;
|
||||
}
|
||||
|
||||
return keys[this.hashString(page.id) % keys.length];
|
||||
const key = storyBackgroundKeyForPage(page.background, page.id);
|
||||
return storyBackgroundAssets[key] ? key : page.background;
|
||||
}
|
||||
|
||||
private applyBackground(page: StoryPage) {
|
||||
|
||||
Reference in New Issue
Block a user