1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00

fix typos in comments

This commit is contained in:
Leopold Tal G 2020-09-02 00:20:27 +02:00
parent 0997c9909b
commit b830482122
7 changed files with 10 additions and 10 deletions

View File

@ -228,7 +228,7 @@ export class AtlasSprite extends BaseSprite {
srcX, srcX,
srcY, srcY,
// atlas src siize // atlas src size
srcW, srcW,
srcH, srcH,

View File

@ -1091,7 +1091,7 @@ export class BeltPath extends BasicSerializableObject {
computePositionFromProgress(progress) { computePositionFromProgress(progress) {
let currentLength = 0; let currentLength = 0;
// floating point issuses .. // floating point issues ..
assert(progress <= this.totalLength + 0.02, "Progress too big: " + progress); assert(progress <= this.totalLength + 0.02, "Progress too big: " + progress);
for (let i = 0; i < this.entityPath.length; ++i) { 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 // Check if the current items are on the belt
while (trackPos + beltLength >= currentItemPos - 1e-5) { 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; const staticComp = entity.components.StaticMapEntity;
assert( assert(
currentItemPos - trackPos >= 0, currentItemPos - trackPos >= 0,

View File

@ -123,7 +123,7 @@ export class Camera extends BasicSerializableObject {
this.clampZoomLevel(); this.clampZoomLevel();
} }
// Simple geters & setters // Simple getters & setters
addScreenShake(amount) { addScreenShake(amount) {
const currentShakeAmount = this.currentShake.length(); const currentShakeAmount = this.currentShake.length();

View File

@ -360,7 +360,7 @@ export class BeltSystem extends GameSystemWithFilter {
const followUpTile = staticComp.origin.add(followUpVector); const followUpTile = staticComp.origin.add(followUpVector);
const followUpEntity = this.root.map.getLayerContentXY(followUpTile.x, followUpTile.y, entity.layer); 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) { if (followUpEntity) {
const followUpBeltComp = followUpEntity.components.Belt; const followUpBeltComp = followUpEntity.components.Belt;
if (followUpBeltComp) { if (followUpBeltComp) {
@ -390,7 +390,7 @@ export class BeltSystem extends GameSystemWithFilter {
const supplyTile = staticComp.origin.add(supplyVector); const supplyTile = staticComp.origin.add(supplyVector);
const supplyEntity = this.root.map.getLayerContentXY(supplyTile.x, supplyTile.y, entity.layer); 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) { if (supplyEntity) {
const supplyBeltComp = supplyEntity.components.Belt; const supplyBeltComp = supplyEntity.components.Belt;
if (supplyBeltComp) { if (supplyBeltComp) {

View File

@ -121,7 +121,7 @@ export class MinerSystem extends GameSystemWithFilter {
} }
// Draw the item background - this is to hide the ejected item animation from // Draw the item background - this is to hide the ejected item animation from
// the item ejecto // the item ejector
const padding = 3; const padding = 3;
const destX = staticComp.origin.x * globalConfig.tileSize + padding; const destX = staticComp.origin.x * globalConfig.tileSize + padding;

View File

@ -91,7 +91,7 @@ export class UndergroundBeltSystem extends GameSystemWithFilter {
const range = globalConfig.undergroundBeltMaxTilesByTier[tier]; const range = globalConfig.undergroundBeltMaxTilesByTier[tier];
// FIND ENTRANCE // 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; let matchingEntrance = null;
for (let i = 0; i < range; ++i) { for (let i = 0; i < range; ++i) {
currentPos.addInplace(offset); currentPos.addInplace(offset);

View File

@ -162,7 +162,7 @@ export class WireSystem extends GameSystemWithFilter {
const tunnelEntities = this.root.entityMgr.getAllWithComponent(WireTunnelComponent); const tunnelEntities = this.root.entityMgr.getAllWithComponent(WireTunnelComponent);
const pinEntities = this.root.entityMgr.getAllWithComponent(WiredPinsComponent); 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) { if (!this.isFirstRecompute) {
for (let i = 0; i < wireEntities.length; ++i) { for (let i = 0; i < wireEntities.length; ++i) {
wireEntities[i].components.Wire.linkedNetwork = null; wireEntities[i].components.Wire.linkedNetwork = null;
@ -432,7 +432,7 @@ export class WireSystem extends GameSystemWithFilter {
continue; 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; const tunnelComp = entity.components.WireTunnel;
if (tunnelComp) { if (tunnelComp) {
if (visitedTunnels.has(entity.uid)) { if (visitedTunnels.has(entity.uid)) {