Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
insraq committed Feb 7, 2025
1 parent 7d5a8b8 commit 969b76c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion shared/logic/BuildingLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export function getPetraBaseStorage(petra: IBuildingData): number {
}

export function getMaxWarpSpeed(gs: GameState): number {
return findSpecialBuilding("Petra", gs) ? MAX_PETRA_SPEED_UP : 2;
return findSpecialBuilding("Petra", gs)?.building.status !== "building" ? MAX_PETRA_SPEED_UP : 2;
}

export function getMaxWarpStorage(gs: GameState): number {
Expand Down
3 changes: 3 additions & 0 deletions src/scripts/logic/OnProductionComplete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1515,6 +1515,9 @@ export function onProductionComplete({ xy, offline }: { xy: Tile; offline: boole
if ((building.resources.TradeValue ?? 0) > EAST_INDIA_COMPANY_BOOST_PER_EV) {
safeAdd(building.resources, "TradeValue", -EAST_INDIA_COMPANY_BOOST_PER_EV);
getBuildingsByType("Caravansary", gs)?.forEach((tile, xy) => {
if (tile.building.status !== "completed" || tile.building.capacity <= 0) {
return;
}
grid.getNeighbors(tileToPoint(xy)).forEach((p) => {
mapSafePush(Tick.next.tileMultipliers, pointToTile(p), {
output: gs.festival ? 2 : 1,
Expand Down

0 comments on commit 969b76c

Please sign in to comment.