From b830482122356a549ea22e56dac31eebb1826231 Mon Sep 17 00:00:00 2001 From: Leopold Tal G Date: Wed, 2 Sep 2020 00:20:27 +0200 Subject: [PATCH] fix typos in comments --- src/js/core/sprites.js | 2 +- src/js/game/belt_path.js | 4 ++-- src/js/game/camera.js | 2 +- src/js/game/systems/belt.js | 4 ++-- src/js/game/systems/miner.js | 2 +- src/js/game/systems/underground_belt.js | 2 +- src/js/game/systems/wire.js | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/js/core/sprites.js b/src/js/core/sprites.js index bdcc65b4..b9504423 100644 --- a/src/js/core/sprites.js +++ b/src/js/core/sprites.js @@ -228,7 +228,7 @@ export class AtlasSprite extends BaseSprite { srcX, srcY, - // atlas src siize + // atlas src size srcW, srcH, diff --git a/src/js/game/belt_path.js b/src/js/game/belt_path.js index b999e0ee..07440f80 100644 --- a/src/js/game/belt_path.js +++ b/src/js/game/belt_path.js @@ -1091,7 +1091,7 @@ export class BeltPath extends BasicSerializableObject { computePositionFromProgress(progress) { let currentLength = 0; - // floating point issuses .. + // floating point issues .. assert(progress <= this.totalLength + 0.02, "Progress too big: " + progress); for (let i = 0; i < this.entityPath.length; ++i) { @@ -1206,7 +1206,7 @@ export class BeltPath extends BasicSerializableObject { // Check if the current items are on the belt while (trackPos + beltLength >= currentItemPos - 1e-5) { - // Its on the belt, render it now + // It's on the belt, render it now const staticComp = entity.components.StaticMapEntity; assert( currentItemPos - trackPos >= 0, diff --git a/src/js/game/camera.js b/src/js/game/camera.js index ab73fc83..ddf65d87 100644 --- a/src/js/game/camera.js +++ b/src/js/game/camera.js @@ -123,7 +123,7 @@ export class Camera extends BasicSerializableObject { this.clampZoomLevel(); } - // Simple geters & setters + // Simple getters & setters addScreenShake(amount) { const currentShakeAmount = this.currentShake.length(); diff --git a/src/js/game/systems/belt.js b/src/js/game/systems/belt.js index 4d8151f6..0689d993 100644 --- a/src/js/game/systems/belt.js +++ b/src/js/game/systems/belt.js @@ -360,7 +360,7 @@ export class BeltSystem extends GameSystemWithFilter { const followUpTile = staticComp.origin.add(followUpVector); const followUpEntity = this.root.map.getLayerContentXY(followUpTile.x, followUpTile.y, entity.layer); - // Check if theres a belt at the tile we point to + // Check if there's a belt at the tile we point to if (followUpEntity) { const followUpBeltComp = followUpEntity.components.Belt; if (followUpBeltComp) { @@ -390,7 +390,7 @@ export class BeltSystem extends GameSystemWithFilter { const supplyTile = staticComp.origin.add(supplyVector); const supplyEntity = this.root.map.getLayerContentXY(supplyTile.x, supplyTile.y, entity.layer); - // Check if theres a belt at the tile we point to + // Check if there's a belt at the tile we point to if (supplyEntity) { const supplyBeltComp = supplyEntity.components.Belt; if (supplyBeltComp) { diff --git a/src/js/game/systems/miner.js b/src/js/game/systems/miner.js index 9f966306..dc812f9e 100644 --- a/src/js/game/systems/miner.js +++ b/src/js/game/systems/miner.js @@ -121,7 +121,7 @@ export class MinerSystem extends GameSystemWithFilter { } // Draw the item background - this is to hide the ejected item animation from - // the item ejecto + // the item ejector const padding = 3; const destX = staticComp.origin.x * globalConfig.tileSize + padding; diff --git a/src/js/game/systems/underground_belt.js b/src/js/game/systems/underground_belt.js index 90d29e50..ec8c2d62 100644 --- a/src/js/game/systems/underground_belt.js +++ b/src/js/game/systems/underground_belt.js @@ -91,7 +91,7 @@ export class UndergroundBeltSystem extends GameSystemWithFilter { const range = globalConfig.undergroundBeltMaxTilesByTier[tier]; // FIND ENTRANCE - // Search for the entrance which is furthes apart (this is why we can't reuse logic here) + // Search for the entrance which is furthest apart (this is why we can't reuse logic here) let matchingEntrance = null; for (let i = 0; i < range; ++i) { currentPos.addInplace(offset); diff --git a/src/js/game/systems/wire.js b/src/js/game/systems/wire.js index fa9287e1..79f8a780 100644 --- a/src/js/game/systems/wire.js +++ b/src/js/game/systems/wire.js @@ -162,7 +162,7 @@ export class WireSystem extends GameSystemWithFilter { const tunnelEntities = this.root.entityMgr.getAllWithComponent(WireTunnelComponent); const pinEntities = this.root.entityMgr.getAllWithComponent(WiredPinsComponent); - // Clear all network references, but not on the first update since thats the deserializing one + // Clear all network references, but not on the first update since that's the deserializing one if (!this.isFirstRecompute) { for (let i = 0; i < wireEntities.length; ++i) { wireEntities[i].components.Wire.linkedNetwork = null; @@ -432,7 +432,7 @@ export class WireSystem extends GameSystemWithFilter { continue; } - // Check if its a tunnel, if so, go to the forwarded item + // Check if it's a tunnel, if so, go to the forwarded item const tunnelComp = entity.components.WireTunnel; if (tunnelComp) { if (visitedTunnels.has(entity.uid)) {