diff --git a/src/js/core/config.js b/src/js/core/config.js index 1a4fb57e..b4a2e3dd 100644 --- a/src/js/core/config.js +++ b/src/js/core/config.js @@ -72,7 +72,7 @@ export const globalConfig = { readerAnalyzeIntervalSeconds: 10, - goalAcceptorItemsRequired: 13, + goalAcceptorItemsRequired: 12, goalAcceptorsPerProducer: 5, puzzleModeSpeed: 3, puzzleMinBoundsSize: 2, diff --git a/src/js/game/components/goal_acceptor.js b/src/js/game/components/goal_acceptor.js index bb13ee61..fa5f5908 100644 --- a/src/js/game/components/goal_acceptor.js +++ b/src/js/game/components/goal_acceptor.js @@ -56,4 +56,12 @@ export class GoalAcceptorComponent extends Component { (globalConfig.puzzleModeSpeed * globalConfig.beltSpeedItemsPerSecond) ); } + + /** + * Copy the current state to another component + * @param {GoalAcceptorComponent} otherComponent + */ + copyAdditionalStateTo(otherComponent) { + otherComponent.item = this.item; + } } diff --git a/src/js/game/systems/goal_acceptor.js b/src/js/game/systems/goal_acceptor.js index 3eeb16b7..60d4a984 100644 --- a/src/js/game/systems/goal_acceptor.js +++ b/src/js/game/systems/goal_acceptor.js @@ -69,7 +69,7 @@ export class GoalAcceptorSystem extends GameSystemWithFilter { const requiredItems = globalConfig.goalAcceptorItemsRequired; - const fillPercentage = clamp(requiredItems, 0, 1); + const fillPercentage = clamp(goalComp.currentDeliveredItems / requiredItems, 0, 1); const center = staticComp.getTileSpaceBounds().getCenter().toWorldSpace(); if (item) { diff --git a/src/js/platform/api.js b/src/js/platform/api.js index 1b8bcdac..db27360d 100644 --- a/src/js/platform/api.js +++ b/src/js/platform/api.js @@ -24,12 +24,12 @@ export class ClientAPI { } getEndpoint() { - //if (G_IS_DEV) { - // return "http://localhost:15001"; - //} - //if (window.location.host === "beta.shapez.io") { - // return "https://api-staging.shapez.io"; - //} + if (G_IS_DEV) { + return "http://localhost:15001"; + } + if (window.location.host === "beta.shapez.io") { + return "https://api-staging.shapez.io"; + } return "https://api.shapez.io"; }