feat: sync Shanhe 2.2 source and add remote package verification
Shanhe source and offline package checks / verify (pull_request) Failing after 5s

This commit is contained in:
2026-11-01 17:13:46 +08:00
parent 465fee1d07
commit 4845826deb
396 changed files with 6748 additions and 411 deletions
+20
View File
@@ -0,0 +1,20 @@
// Navigate through visible controls, without mutating application state.
export async function chooseProvince(page,code){
const current=await page.evaluate(()=>shanheDebug.state());
if(current.entryCity)await page.locator('#atlas-back').click();
const selected=current.entryProvince;
if(selected===code)return;
if(selected)await page.locator('#atlas-back').click();
if(code)await page.locator('#reference [data-province="'+code+'"] text').click();
}
export async function setDifficulty(page,{speed,bounce,snap}){
if(!await page.locator('#confirm-journey').isVisible())await page.locator('#start').click();
if(speed!==undefined&&speed!==4)throw Error("Timed drop modes were removed; choose snap difficulty instead.");
if(snap!==undefined)await page.locator('#modal [data-snap="'+snap+'"]').click();
if(bounce!==undefined)await page.locator('#modal [data-bounce="'+bounce+'"]').click();
}
export async function startJourney(page,selector='#start'){
if(!await page.locator('#confirm-journey').isVisible())await page.locator(selector).click();
await page.locator('#confirm-journey').click();
}