This commit is contained in:
2026-05-06 23:56:01 +03:00
parent 7f380324d4
commit 51d15118ed
2 changed files with 31 additions and 50 deletions

View File

@@ -75,6 +75,7 @@ async function pollAndExecute() {
const researchCmd = adminOn ? cmdData.research : null;
const farmCmd = farmOn ? cmdData.farm : null;
const farmUpgradeCmd = farmOn ? cmdData.farm_upgrade : null;
const cultureCmd = cmdData.culture || null;
if (cmdData.sync_requested) {
log('Sync requested by server — pushing state immediately');
@@ -96,6 +97,7 @@ async function pollAndExecute() {
else if (cmd.type === 'market_offer') result = await executeMarketOffer(cmd);
else if (cmd.type === 'research') result = await executeResearch(cmd);
else if (cmd.type === 'farm_upgrade') result = await executeFarmUpgrade(cmd);
else if (cmd.type === 'culture') result = await executeCultureCommand(cmd);
else if (cmd.type === 'farm_loot') {
// Guard: if auto-farm is mid-run, requeue rather than overlap
if (farmLootRunning) {
@@ -131,6 +133,7 @@ async function pollAndExecute() {
await execute(researchCmd);
await execute(farmCmd);
await execute(farmUpgradeCmd);
await execute(cultureCmd);
}