Add combat action sprite sheets
This commit is contained in:
@@ -74,6 +74,22 @@ try {
|
||||
throw new Error(`Debug battle state was not available: ${JSON.stringify(result.battleState)}`);
|
||||
}
|
||||
|
||||
const actionTexturesLoaded = await page.evaluate(() => {
|
||||
const textures = window.__HEROS_GAME__?.textures;
|
||||
return [
|
||||
'unit-liu-bei-actions',
|
||||
'unit-guan-yu-actions',
|
||||
'unit-zhang-fei-actions',
|
||||
'unit-rebel-actions',
|
||||
'unit-rebel-archer-actions',
|
||||
'unit-rebel-cavalry-actions',
|
||||
'unit-rebel-leader-actions'
|
||||
].every((key) => textures?.exists(key));
|
||||
});
|
||||
if (!actionTexturesLoaded) {
|
||||
throw new Error('Expected all unit action textures to be loaded.');
|
||||
}
|
||||
|
||||
const cameraBeforeScroll = result.battleState.camera;
|
||||
if (
|
||||
!cameraBeforeScroll ||
|
||||
|
||||
Reference in New Issue
Block a user