Index: ps/trunk/binaries/data/mods/_test.sim/simulation/components/test-serialize.js
===================================================================
--- ps/trunk/binaries/data/mods/_test.sim/simulation/components/test-serialize.js
+++ ps/trunk/binaries/data/mods/_test.sim/simulation/components/test-serialize.js
@@ -48,7 +48,7 @@
// print(uneval(this)+"\n");
this.x[0][0] += 1;
return this.x[0][0] + this.x[1][0] + this.x[2][0][0] + this.x[3].y[0];
-}
+};
Engine.RegisterComponentType(IID_Test1, "TestScript1_nontree", TestScript1_nontree);
Index: ps/trunk/binaries/data/mods/mod/gui/common/functions_msgbox.js
===================================================================
--- ps/trunk/binaries/data/mods/mod/gui/common/functions_msgbox.js
+++ ps/trunk/binaries/data/mods/mod/gui/common/functions_msgbox.js
@@ -24,7 +24,7 @@
g_MessageBoxBtnFunctions = [];
g_MessageBoxCallbackArgs = [];
-};
+}
function messageBox(mbWidth, mbHeight, mbMessage, mbTitle, mbButtonCaptions, mbBtnCode, mbCallbackArgs)
{
Index: ps/trunk/binaries/data/mods/mod/gui/termsdialog/termsdialog.js
===================================================================
--- ps/trunk/binaries/data/mods/mod/gui/termsdialog/termsdialog.js
+++ ps/trunk/binaries/data/mods/mod/gui/termsdialog/termsdialog.js
@@ -47,7 +47,7 @@
function initLanguageSelection()
{
let languageLabel = Engine.GetGUIObjectByName("languageLabel");
- let languageLabelWidth = Engine.GetTextWidth(languageLabel.font, languageLabel.caption)
+ let languageLabelWidth = Engine.GetTextWidth(languageLabel.font, languageLabel.caption);
languageLabel.size = "0 0 " + languageLabelWidth + " 100%";
let languageDropdown = Engine.GetGUIObjectByName("languageDropdown");
Index: ps/trunk/binaries/data/mods/mod/hwdetect/test.js
===================================================================
--- ps/trunk/binaries/data/mods/mod/hwdetect/test.js
+++ ps/trunk/binaries/data/mods/mod/hwdetect/test.js
@@ -31,7 +31,7 @@
var disabled = [];
for (var d of ["disable_audio", "disable_s3tc", "disable_shadows", "disable_shadowpcf", "disable_allwater", "disable_fancywater", "override_renderpath"])
if (output[d] !== undefined)
- disabled.push(d+"="+output[d])
+ disabled.push(d+"="+output[d]);
print("
");
print("" + os);
Index: ps/trunk/binaries/data/mods/public/gui/session/menu.js
===================================================================
--- ps/trunk/binaries/data/mods/public/gui/session/menu.js
+++ ps/trunk/binaries/data/mods/public/gui/session/menu.js
@@ -873,7 +873,7 @@
Engine.GetGUIObjectByName("barterHelp").hidden = !canBarter;
if (canBarter)
- g_ResourceData.GetCodes().forEach((resCode, i) => { barterUpdateCommon(resCode, i, "barter", g_ViewedPlayer) });
+ g_ResourceData.GetCodes().forEach((resCode, i) => { barterUpdateCommon(resCode, i, "barter", g_ViewedPlayer); });
}
function getIdleLandTradersText(traderNumber)
Index: ps/trunk/binaries/data/mods/public/gui/session/selection_panels.js
===================================================================
--- ps/trunk/binaries/data/mods/public/gui/session/selection_panels.js
+++ ps/trunk/binaries/data/mods/public/gui/session/selection_panels.js
@@ -941,7 +941,7 @@
"player": data.player
});
- let unitIds = data.unitEntStates.map(status => status.id)
+ let unitIds = data.unitEntStates.map(status => status.id);
let [buildingsCountToTrainFullBatch, fullBatchSize, remainderBatch] =
getTrainingStatus(unitIds, data.item, data.playerState);
Index: ps/trunk/binaries/data/mods/public/maps/random/alpine_valley.js
===================================================================
--- ps/trunk/binaries/data/mods/public/maps/random/alpine_valley.js
+++ ps/trunk/binaries/data/mods/public/maps/random/alpine_valley.js
@@ -200,7 +200,7 @@
{
g_Map.log("Creating mountainrange with " + this.possibleEdges.length + " possible edges");
- let max = this.possibleEdges.length
+ let max = this.possibleEdges.length;
while (this.possibleEdges.length)
{
Index: ps/trunk/binaries/data/mods/public/maps/random/belgian_uplands.js
===================================================================
--- ps/trunk/binaries/data/mods/public/maps/random/belgian_uplands.js
+++ ps/trunk/binaries/data/mods/public/maps/random/belgian_uplands.js
@@ -85,7 +85,7 @@
while (true)
{
- g_Map.log("Randomizing heightmap")
+ g_Map.log("Randomizing heightmap");
createArea(
new MapBoundsPlacer(),
new RandomElevationPainter(heightRange.min, heightRange.max));
Index: ps/trunk/binaries/data/mods/public/maps/random/deep_forest.js
===================================================================
--- ps/trunk/binaries/data/mods/public/maps/random/deep_forest.js
+++ ps/trunk/binaries/data/mods/public/maps/random/deep_forest.js
@@ -162,7 +162,7 @@
// Woods and general hight map
for (var x = 0; x < mapSize; x++)
- for (var z = 0;z < mapSize;z++)
+ for (var z = 0; z < mapSize; z++)
{
let position = new Vector2D(x, z);
Index: ps/trunk/binaries/data/mods/public/maps/random/dodecanese.js
===================================================================
--- ps/trunk/binaries/data/mods/public/maps/random/dodecanese.js
+++ ps/trunk/binaries/data/mods/public/maps/random/dodecanese.js
@@ -366,7 +366,7 @@
// TILE_CENTERED_HEIGHT_MAP also influences the outcome of the placement.
let bridgeOrientation = direction % 2 ? 0 : Math.PI / 2;
bridgeCenter1[direction % 2 ? "y" : "x"] += 0.25;
- bridgeCenter2[direction % 2 ? "y" : "x"] -= 0.25
+ bridgeCenter2[direction % 2 ? "y" : "x"] -= 0.25;
g_Map.placeEntityAnywhere(aBridge, 0, bridgeCenter1, bridgeOrientation);
g_Map.placeEntityAnywhere(aBridge, 0, bridgeCenter2, bridgeOrientation + Math.PI);
@@ -387,7 +387,7 @@
}
if (bridges >= maxBridges)
- break
+ break;
}
g_Map.log("Creating smoke");
Index: ps/trunk/binaries/data/mods/public/maps/random/elephantine_triggers.js
===================================================================
--- ps/trunk/binaries/data/mods/public/maps/random/elephantine_triggers.js
+++ ps/trunk/binaries/data/mods/public/maps/random/elephantine_triggers.js
@@ -9,7 +9,7 @@
Trigger.prototype.InitElephantine_DefenderStance = function()
{
for (let ent of TriggerHelper.GetPlayerEntitiesByClass(elephantinePlayerID, "Soldier"))
- TriggerHelper.SetUnitStance(ent, "defensive")
+ TriggerHelper.SetUnitStance(ent, "defensive");
};
Trigger.prototype.InitElephantine_GarrisonBuildings = function()
Index: ps/trunk/binaries/data/mods/public/maps/random/fields_of_meroe.js
===================================================================
--- ps/trunk/binaries/data/mods/public/maps/random/fields_of_meroe.js
+++ ps/trunk/binaries/data/mods/public/maps/random/fields_of_meroe.js
@@ -170,7 +170,7 @@
undefined,
scaleByMapSize(20, 50),
20,
- [areaPassage])
+ [areaPassage]);
}
var [playerIDs, playerPosition] = playerPlacementRandom(sortAllPlayers(), avoidClasses(clRiver, 15, clPlayer, 30));
Index: ps/trunk/binaries/data/mods/public/maps/random/flood.js
===================================================================
--- ps/trunk/binaries/data/mods/public/maps/random/flood.js
+++ ps/trunk/binaries/data/mods/public/maps/random/flood.js
@@ -67,7 +67,7 @@
const mapSize = g_Map.getSize();
const mapCenter = g_Map.getCenter();
-g_Map.log("Creating player islands...")
+g_Map.log("Creating player islands...");
var [playerIDs, playerPosition] = playerPlacementCircle(fractionToTiles(0.38));
for (let i = 0; i < numPlayers; ++i)
Index: ps/trunk/binaries/data/mods/public/maps/random/hellas.js
===================================================================
--- ps/trunk/binaries/data/mods/public/maps/random/hellas.js
+++ ps/trunk/binaries/data/mods/public/maps/random/hellas.js
@@ -293,7 +293,7 @@
heightShoreline,
[avoidClasses(clDock, 50), new StaticConstraint(avoidClasses(clPlayer, 30, clCliffs, 8))],
0,
- 50)
+ 50);
Engine.SetProgress(65);
let [forestTrees, stragglerTrees] = getTreeCounts(600, 4000, 0.7);
Index: ps/trunk/binaries/data/mods/public/maps/random/hyrcanian_shores.js
===================================================================
--- ps/trunk/binaries/data/mods/public/maps/random/hyrcanian_shores.js
+++ ps/trunk/binaries/data/mods/public/maps/random/hyrcanian_shores.js
@@ -63,7 +63,7 @@
var clBaseResource = g_Map.createTileClass();
var clHighlands = g_Map.createTileClass();
-var waterPosition = fractionToTiles(0.25)
+var waterPosition = fractionToTiles(0.25);
var highlandsPosition = fractionToTiles(0.75);
var startAngle = randomAngle();
Index: ps/trunk/binaries/data/mods/public/maps/random/lake.js
===================================================================
--- ps/trunk/binaries/data/mods/public/maps/random/lake.js
+++ ps/trunk/binaries/data/mods/public/maps/random/lake.js
@@ -66,7 +66,7 @@
for (let i = 0; i < numPlayers; ++i)
addCivicCenterAreaToClass(playerPosition[i], clPlayer);
-g_Map.log("Creating the lake...")
+g_Map.log("Creating the lake...");
createArea(
new ChainPlacer(
2,
Index: ps/trunk/binaries/data/mods/public/maps/random/migration.js
===================================================================
--- ps/trunk/binaries/data/mods/public/maps/random/migration.js
+++ ps/trunk/binaries/data/mods/public/maps/random/migration.js
@@ -128,7 +128,7 @@
Engine.SetProgress(15);
g_Map.log("Create the continent body");
-var continentPosition = Vector2D.add(mapCenter, new Vector2D(0, fractionToTiles(0.38)).rotate(-startAngle)).round()
+var continentPosition = Vector2D.add(mapCenter, new Vector2D(0, fractionToTiles(0.38)).rotate(-startAngle)).round();
createArea(
new ClumpPlacer(diskArea(fractionToTiles(0.4)), 0.8, 0.08, Infinity, continentPosition),
[
Index: ps/trunk/binaries/data/mods/public/maps/random/oasis.js
===================================================================
--- ps/trunk/binaries/data/mods/public/maps/random/oasis.js
+++ ps/trunk/binaries/data/mods/public/maps/random/oasis.js
@@ -5,8 +5,8 @@
const tDune = ["desert_sand_dunes_50"];
const tForestFloor = "desert_forestfloor_palms";
const tDirt = ["desert_dirt_rough","desert_dirt_rough","desert_dirt_rough", "desert_dirt_rough_2", "desert_dirt_rocks_2"];
-const tRoad = "desert_city_tile";;
-const tRoadWild = "desert_city_tile";;
+const tRoad = "desert_city_tile";
+const tRoadWild = "desert_city_tile";
const tShore = "dirta";
const tWater = "desert_sand_wet";
@@ -34,7 +34,7 @@
,tForestFloor,tForestFloor,tForestFloor,tForestFloor];
const heightSeaGround = -3;
-const heightFloraMin = -2.5
+const heightFloraMin = -2.5;
const heightFloraReedsMax = -1.9;
const heightFloraMax = -1;
const heightLand = 1;
@@ -59,13 +59,13 @@
var clFood = g_Map.createTileClass();
var clBaseResource = g_Map.createTileClass();
-var waterRadius = scaleByMapSize(7, 50)
+var waterRadius = scaleByMapSize(7, 50);
var shoreDistance = scaleByMapSize(4, 10);
var forestDistance = scaleByMapSize(6, 20);
var [playerIDs, playerPosition] = playerPlacementCircle(fractionToTiles(0.35));
-g_Map.log("Creating small oasis near the players...")
+g_Map.log("Creating small oasis near the players...");
var forestDist = 1.2 * defaultPlayerBaseRadius();
for (let i = 0; i < numPlayers; ++i)
{
Index: ps/trunk/binaries/data/mods/public/maps/random/pompeii.js
===================================================================
--- ps/trunk/binaries/data/mods/public/maps/random/pompeii.js
+++ ps/trunk/binaries/data/mods/public/maps/random/pompeii.js
@@ -202,7 +202,7 @@
g_TileClasses.baseResource, 10))
],
0,
- 50)
+ 50);
Engine.SetProgress(55);
addElements([
Index: ps/trunk/binaries/data/mods/public/maps/random/rhine_marshlands.js
===================================================================
--- ps/trunk/binaries/data/mods/public/maps/random/rhine_marshlands.js
+++ ps/trunk/binaries/data/mods/public/maps/random/rhine_marshlands.js
@@ -35,7 +35,7 @@
const pForestD = [tForestFloor + TERRAIN_SEPARATOR + oBeech, tForestFloor];
const pForestP = [tForestFloor + TERRAIN_SEPARATOR + oOak, tForestFloor];
-const heightMarsh = -2
+const heightMarsh = -2;
const heightLand = 1;
const heightOffsetBumpWater = 1;
const heightOffsetBumpLand = 2;
Index: ps/trunk/binaries/data/mods/public/maps/random/rmbiome/randombiome.js
===================================================================
--- ps/trunk/binaries/data/mods/public/maps/random/rmbiome/randombiome.js
+++ ps/trunk/binaries/data/mods/public/maps/random/rmbiome/randombiome.js
@@ -50,7 +50,7 @@
return;
}
- let biome = Engine.ReadJSONFile(path)
+ let biome = Engine.ReadJSONFile(path);
let copyProperties = (from, to) => {
for (let prop in from)
Index: ps/trunk/binaries/data/mods/public/maps/random/rmgen-common/wall_builder.js
===================================================================
--- ps/trunk/binaries/data/mods/public/maps/random/rmgen-common/wall_builder.js
+++ ps/trunk/binaries/data/mods/public/maps/random/rmgen-common/wall_builder.js
@@ -623,7 +623,7 @@
{
let wallEle = getWallElement(wallPart[0], style);
let addAngle = scaleFactor * wallEle.length / radius;
- let target = Vector2D.add(center, new Vector2D(radius, 0).rotate(-actualAngle - addAngle))
+ let target = Vector2D.add(center, new Vector2D(radius, 0).rotate(-actualAngle - addAngle));
let place = Vector2D.average([position, target]);
let placeAngle = actualAngle + addAngle / 2;
if (g_Map.inMapBounds(place) && constraint.allows(place.clone().floor()))
Index: ps/trunk/binaries/data/mods/public/maps/random/rmgen/Constraint.js
===================================================================
--- ps/trunk/binaries/data/mods/public/maps/random/rmgen/Constraint.js
+++ ps/trunk/binaries/data/mods/public/maps/random/rmgen/Constraint.js
@@ -18,7 +18,7 @@
function AndConstraint(constraints)
{
if (constraints instanceof Array)
- this.constraints = constraints
+ this.constraints = constraints;
else if (!constraints)
this.constraints = [];
else
@@ -68,7 +68,7 @@
AvoidAreasConstraint.prototype.allows = function(position)
{
- return this.areas.every(area => !area.contains(position))
+ return this.areas.every(area => !area.contains(position));
};
/**
Index: ps/trunk/binaries/data/mods/public/maps/random/rmgen/TileClass.js
===================================================================
--- ps/trunk/binaries/data/mods/public/maps/random/rmgen/TileClass.js
+++ ps/trunk/binaries/data/mods/public/maps/random/rmgen/TileClass.js
@@ -79,7 +79,7 @@
TileClass.prototype.has = function(position)
{
return !!this.inclusionCount[position.x] && !!this.inclusionCount[position.x][position.y];
-}
+};
TileClass.prototype.add = function(position)
{
Index: ps/trunk/binaries/data/mods/public/maps/random/rmgen/placer/noncentered/ConvexPolygonPlacer.js
===================================================================
--- ps/trunk/binaries/data/mods/public/maps/random/rmgen/placer/noncentered/ConvexPolygonPlacer.js
+++ ps/trunk/binaries/data/mods/public/maps/random/rmgen/placer/noncentered/ConvexPolygonPlacer.js
@@ -5,7 +5,7 @@
{
this.polygonVertices = this.getConvexHull(points.map(point => point.clone().round()));
this.failFraction = failFraction;
-};
+}
ConvexPolygonPlacer.prototype.place = function(constraint)
{
Index: ps/trunk/binaries/data/mods/public/maps/random/rmgen/placer/noncentered/EntitiesObstructionPlacer.js
===================================================================
--- ps/trunk/binaries/data/mods/public/maps/random/rmgen/placer/noncentered/EntitiesObstructionPlacer.js
+++ ps/trunk/binaries/data/mods/public/maps/random/rmgen/placer/noncentered/EntitiesObstructionPlacer.js
@@ -24,7 +24,7 @@
new Vector2D(+halfObstructionSize.x, +halfObstructionSize.y)
].map(corner => Vector2D.add(entity.GetPosition2D(), corner.rotate(-entity.rotation.y)));
- points = points.concat(new ConvexPolygonPlacer(obstructionCorners, this.failFraction).place(constraint))
+ points = points.concat(new ConvexPolygonPlacer(obstructionCorners, this.failFraction).place(constraint));
}
return points;
Index: ps/trunk/binaries/data/mods/public/maps/random/schwarzwald.js
===================================================================
--- ps/trunk/binaries/data/mods/public/maps/random/schwarzwald.js
+++ ps/trunk/binaries/data/mods/public/maps/random/schwarzwald.js
@@ -281,7 +281,7 @@
g_Map.log("Planting trees");
for (var x = 0; x < mapSize; x++)
- for (var z = 0;z < mapSize;z++)
+ for (var z = 0; z < mapSize; z++)
{
let position = new Vector2D(x, z);
Index: ps/trunk/binaries/data/mods/public/maps/random/snowflake_searocks.js
===================================================================
--- ps/trunk/binaries/data/mods/public/maps/random/snowflake_searocks.js
+++ ps/trunk/binaries/data/mods/public/maps/random/snowflake_searocks.js
@@ -232,7 +232,7 @@
new TileClassPainter(clLand)
]);
-g_Map.log("Painting cliffs")
+g_Map.log("Painting cliffs");
createArea(
new MapBoundsPlacer(),
new TerrainPainter(tCliff),
Index: ps/trunk/binaries/data/mods/public/maps/random/syria.js
===================================================================
--- ps/trunk/binaries/data/mods/public/maps/random/syria.js
+++ ps/trunk/binaries/data/mods/public/maps/random/syria.js
@@ -10,8 +10,8 @@
const tCliff = ["desert_cliff_persia_1", "desert_cliff_persia_2"];
const tHill = ["desert_dirt_rocks_1", "desert_dirt_rocks_2", "desert_dirt_rocks_3"];
const tDirt = ["desert_dirt_rough", "desert_dirt_rough_2"];
-const tRoad = "desert_shore_stones";;
-const tRoadWild = "desert_grass_a_stones";;
+const tRoad = "desert_shore_stones";
+const tRoadWild = "desert_grass_a_stones";
const oTamarix = "gaia/flora_tree_tamarix";
const oPalm = "gaia/flora_tree_date_palm";
Index: ps/trunk/binaries/data/mods/public/simulation/components/Heal.js
===================================================================
--- ps/trunk/binaries/data/mods/public/simulation/components/Heal.js
+++ ps/trunk/binaries/data/mods/public/simulation/components/Heal.js
@@ -97,7 +97,7 @@
"texture": this.template.RangeOverlay.LineTexture,
"textureMask": this.template.RangeOverlay.LineTextureMask,
"thickness": +this.template.RangeOverlay.LineThickness
- }]
+ }];
};
/**
Index: ps/trunk/binaries/data/mods/public/simulation/components/Mirage.js
===================================================================
--- ps/trunk/binaries/data/mods/public/simulation/components/Mirage.js
+++ ps/trunk/binaries/data/mods/public/simulation/components/Mirage.js
@@ -74,7 +74,7 @@
this.classesList = clone(cmpIdentity.GetClassesList());
};
-Mirage.prototype.GetClassesList = function() { return this.classesList };
+Mirage.prototype.GetClassesList = function() { return this.classesList; };
// Foundation data
Index: ps/trunk/binaries/data/mods/public/simulation/components/SkirmishReplacer.js
===================================================================
--- ps/trunk/binaries/data/mods/public/simulation/components/SkirmishReplacer.js
+++ ps/trunk/binaries/data/mods/public/simulation/components/SkirmishReplacer.js
@@ -35,7 +35,7 @@
var cmpTemplateManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_TemplateManager);
var templateName = cmpTemplateManager.GetCurrentTemplateName(this.entity);
- let specialFilters = templateName.substr(0, templateName.lastIndexOf("|") + 1)
+ let specialFilters = templateName.substr(0, templateName.lastIndexOf("|") + 1);
templateName = removeFiltersFromTemplateName(templateName);
if (templateName in replacementEntities)
Index: ps/trunk/binaries/data/mods/public/simulation/components/TechnologyManager.js
===================================================================
--- ps/trunk/binaries/data/mods/public/simulation/components/TechnologyManager.js
+++ ps/trunk/binaries/data/mods/public/simulation/components/TechnologyManager.js
@@ -449,7 +449,7 @@
*/
TechnologyManager.prototype.GetResearcher = function(tech)
{
- return this.researchQueued.get(tech)
+ return this.researchQueued.get(tech);
};
/**
Index: ps/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
===================================================================
--- ps/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
+++ ps/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
@@ -3936,7 +3936,7 @@
if (!cmpOwnership || cmpOwnership.GetOwner() == INVALID_PLAYER)
return undefined;
- let cmpPosition = Engine.QueryInterface(this.entity, IID_Position)
+ let cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
if (!cmpPosition || !cmpPosition.IsInWorld())
return undefined;
Index: ps/trunk/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
===================================================================
--- ps/trunk/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
+++ ps/trunk/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
@@ -299,7 +299,7 @@
UnitMotionFlying.prototype.GetSpeedMultiplier = function()
{
return this.GetCurrentSpeed() / this.GetWalkSpeed();
-}
+};
UnitMotionFlying.prototype.GetPassabilityClassName = function()
{
Index: ps/trunk/binaries/data/mods/public/simulation/components/tests/setup_test.js
===================================================================
--- ps/trunk/binaries/data/mods/public/simulation/components/tests/setup_test.js
+++ ps/trunk/binaries/data/mods/public/simulation/components/tests/setup_test.js
@@ -1,6 +1,6 @@
Engine.RegisterInterface("TestSetup");
-function TestSetup() {};
+function TestSetup() {}
TestSetup.prototype.Init = function() {};
Engine.RegisterSystemComponentType(IID_TestSetup, "TestSetup", TestSetup);
Index: ps/trunk/binaries/data/mods/public/simulation/components/tests/test_EntityLimits.js
===================================================================
--- ps/trunk/binaries/data/mods/public/simulation/components/tests/test_EntityLimits.js
+++ ps/trunk/binaries/data/mods/public/simulation/components/tests/test_EntityLimits.js
@@ -180,15 +180,15 @@
}
});
-cmpEntityLimits.ChangeCount("Champion", 1)
-TS_ASSERT(cmpEntityLimits.AllowedToReplace(100, "templateA"))
-TS_ASSERT(!cmpEntityLimits.AllowedToReplace(101, "templateA"))
-cmpEntityLimits.ChangeCount("Champion", -1)
-
-cmpEntityLimits.ChangeCount("Tower", 5)
-TS_ASSERT(!cmpEntityLimits.AllowedToReplace(102, "templateD"))
-TS_ASSERT(cmpEntityLimits.AllowedToReplace(103, "templateD"))
-cmpEntityLimits.ChangeCount("Tower", -5)
+cmpEntityLimits.ChangeCount("Champion", 1);
+TS_ASSERT(cmpEntityLimits.AllowedToReplace(100, "templateA"));
+TS_ASSERT(!cmpEntityLimits.AllowedToReplace(101, "templateA"));
+cmpEntityLimits.ChangeCount("Champion", -1);
+
+cmpEntityLimits.ChangeCount("Tower", 5);
+TS_ASSERT(!cmpEntityLimits.AllowedToReplace(102, "templateD"));
+TS_ASSERT(cmpEntityLimits.AllowedToReplace(103, "templateD"));
+cmpEntityLimits.ChangeCount("Tower", -5);
TS_ASSERT_UNEVAL_EQUALS(cmpEntityLimits.GetCounts(), { "Tower": 0, "Wonder": 0, "Hero": 0, "Champion": 0 });
Index: ps/trunk/binaries/data/mods/public/simulation/components/tests/test_Math.js
===================================================================
--- ps/trunk/binaries/data/mods/public/simulation/components/tests/test_Math.js
+++ ps/trunk/binaries/data/mods/public/simulation/components/tests/test_Math.js
@@ -127,7 +127,7 @@
TS_ASSERT(isPositiveZero(Math.square(-0)));
TS_ASSERT_EQUALS(Math.square(Infinity), Infinity);
TS_ASSERT_EQUALS(Math.square(1.772979291871526e-81),3.143455569405258e-162);
-TS_ASSERT_EQUALS(Math.square(1e+155), Infinity)
+TS_ASSERT_EQUALS(Math.square(1e+155), Infinity);
TS_ASSERT_UNEVAL_EQUALS(Math.square(1), 1);
TS_ASSERT_UNEVAL_EQUALS(Math.square(20), 400);
TS_ASSERT_UNEVAL_EQUALS(Math.square(300), 90000);
Index: ps/trunk/binaries/data/mods/public/simulation/components/tests/test_RallyPoint.js
===================================================================
--- ps/trunk/binaries/data/mods/public/simulation/components/tests/test_RallyPoint.js
+++ ps/trunk/binaries/data/mods/public/simulation/components/tests/test_RallyPoint.js
@@ -45,12 +45,12 @@
initialRallyPointTest((cmpRallyPoint) => {});
initialRallyPointTest((cmpRallyPoint) => {
- cmpRallyPoint.Unset()
+ cmpRallyPoint.Unset();
return true;
});
initialRallyPointTest((cmpRallyPoint) => {
- cmpRallyPoint.Reset()
+ cmpRallyPoint.Reset();
return true;
});
Index: ps/trunk/binaries/data/mods/public/simulation/components/tests/test_Vector.js
===================================================================
--- ps/trunk/binaries/data/mods/public/simulation/components/tests/test_Vector.js
+++ ps/trunk/binaries/data/mods/public/simulation/components/tests/test_Vector.js
@@ -165,11 +165,11 @@
let v1 = new Vector2D(-1, 8);
let v2 = new Vector2D(-2, -1);
- let min = Vector2D.min(v1, v2)
+ let min = Vector2D.min(v1, v2);
TS_ASSERT_EQUALS(min.x, -2);
TS_ASSERT_EQUALS(min.y, -1);
- let max = Vector2D.max(v1, v2)
+ let max = Vector2D.max(v1, v2);
TS_ASSERT_EQUALS(max.x, -1);
TS_ASSERT_EQUALS(max.y, 8);
}
Index: ps/trunk/binaries/data/tests/test_setup.js
===================================================================
--- ps/trunk/binaries/data/tests/test_setup.js
+++ ps/trunk/binaries/data/tests/test_setup.js
@@ -18,19 +18,19 @@
global.TS_FAIL = function TS_FAIL(msg)
{
fail(msg);
-}
+};
global.TS_ASSERT = function TS_ASSERT(e)
{
if (!e)
fail("Assert failed");
-}
+};
global.TS_ASSERT_EQUALS = function TS_ASSERT_EQUALS(x, y)
{
if (!(x === y))
fail("Expected equal, got "+uneval(x)+" !== "+uneval(y));
-}
+};
global.TS_ASSERT_EQUALS_APPROX = function TS_ASSERT_EQUALS_APPROX(x, y, maxDifference)
{
@@ -38,13 +38,13 @@
if (Math.abs(x - y) > maxDifference)
fail("Expected almost equal, got " + uneval(x) + " !== " + uneval(y));
-}
+};
global.TS_ASSERT_UNEVAL_EQUALS = function TS_ASSERT_UNEVAL_EQUALS(x, y)
{
if (!(uneval(x) === uneval(y)))
fail("Expected equal, got "+uneval(x)+" !== "+uneval(y));
-}
+};
global.TS_ASSERT_EXCEPTION = function(func)
{
@@ -53,10 +53,10 @@
Engine.TS_FAIL("Missed exception at:\n" + new Error().stack);
} catch (e) {
}
-}
+};
global.TS_ASSERT_NUMBER = function(value)
{
if (typeof value != "number" || !isFinite(value))
fail("The given value must be a real number!");
-}
+};
|