Page MenuHomeWildfire Games

Send a message when players change entities - D274 prereq
AbandonedPublic

Authored by wraitii on May 5 2019, 6:03 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Summary

Currently, no messages are sent when players change entities (can happen in Atlas).

Haven't looked at other improvements in other components but I'm sure we could remove some assumptions and have cleaner code here and there.

Test Plan

Review message architecture.

Diff Detail

Repository
rP 0 A.D. Public Repository
Branch
temp
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 8863
Build 14537: Vulcan BuildJenkins
Build 14536: arc lint + arc unit

Event Timeline

wraitii created this revision.May 5 2019, 6:03 PM
wraitii retitled this revision from Send a message when players change entities - D278 prereq to Send a message when players change entities - D274 prereq.
wraitii edited the summary of this revision. (Show Details)
Vulcan added a comment.May 5 2019, 6:11 PM

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...
Executing section JS...

binaries/data/mods/public/simulation/components/PlayerManager.js
|  58| »   var·cmpPlayer·=·Engine.QueryInterface(ent,·IID_Player);
|    | [NORMAL] JSHintBear:
|    | 'cmpPlayer' is already defined.

binaries/data/mods/public/simulation/components/PlayerManager.js
|  67| »   for·(var·e·of·entities)
|    | [NORMAL] JSHintBear:
|    | 'e' is already defined.

binaries/data/mods/public/simulation/components/PlayerManager.js
|  69| »   »   var·cmpOwnership·=·Engine.QueryInterface(e,·IID_Ownership);
|    | [NORMAL] JSHintBear:
|    | 'cmpOwnership' is already defined.
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/differential/1328/display/redirect

wraitii updated this revision to Diff 8143.EditedMay 25 2019, 8:53 PM

PlayerChanged > PlayerEntityChanged.

Also this should fix linter comments in PlayerManager.js

Stan added a subscriber: Stan.May 25 2019, 9:35 PM
Stan added inline comments.
binaries/data/mods/public/simulation/components/PlayerManager.js
44–46

Is the reseting loop necessary ?

140–141

Could use the early return below ?

	if (this.playerEntities.length == 0)
		return;
146

-1 = Invalid_PLAYER ?

159–164

let

163

-1 = Invalid_PLAYER ?

wraitii added inline comments.May 25 2019, 9:39 PM
binaries/data/mods/public/simulation/components/PlayerManager.js
44–46

?

140–141

Unlikely to happen tbh.

146

INVALID_ENTITY, not sure if that's a constant in JS simulation scripts.

Stan added inline comments.May 25 2019, 9:44 PM
binaries/data/mods/public/simulation/components/PlayerManager.js
44–46

I mean we are doing the loop twice :)

146

It is used in UnitAI;

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/simulation2/components/tests/test_scripts.h
|   1| /*·Copyright·(C)·2017·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2017"
Executing section JS...
|    | [NORMAL] ESLintBear (no-extra-semi):
|    | Unnecessary semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/MultiKeyMap.js
|   6|   6| {
|   7|   7| 	this.items = new Map();
|   8|   8| 	// Keys are referred to as 'primaryKey', 'secondaryKey', 'itemID'.
|   9|    |-};
|    |   9|+}
|  10|  10| 
|  11|  11| MultiKeyMap.prototype.Serialize = function()
|  12|  12| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/MultiKeyMap.js
| 157| 157| 	if (!this._exists(primaryKey, secondaryKey))
| 158| 158| 		return [];
| 159| 159| 	return this.items.get(primaryKey).get(secondaryKey);
| 160|    |-}
|    | 160|+};
| 161| 161| 
| 162| 162| /**
| 163| 163|  * @returns a reference to the list of items for that property name and secondaryKey.
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/MultiKeyMap.js
| 167| 167| 	if (!this._exists(primaryKey, secondaryKey))
| 168| 168| 		this._initItemsIfNeeded(primaryKey, secondaryKey);
| 169| 169| 	return this.items.get(primaryKey).get(secondaryKey);
| 170|    |-}
|    | 170|+};
| 171| 171| 
| 172| 172| MultiKeyMap.prototype._exists = function(primaryKey, secondaryKey)
| 173| 173| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/MultiKeyMap.js
| 176| 176| 	if (!this.items.get(primaryKey).has(secondaryKey))
| 177| 177| 		return false;
| 178| 178| 	return true;
| 179|    |-}
|    | 179|+};
| 180| 180| 
| 181| 181| MultiKeyMap.prototype._initItemsIfNeeded = function(primaryKey, secondaryKey)
| 182| 182| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/MultiKeyMap.js
| 184| 184| 		this.items.set(primaryKey, new Map());
| 185| 185| 	if (!this.items.get(primaryKey).get(secondaryKey))
| 186| 186| 		this.items.get(primaryKey).set(secondaryKey, []);
| 187|    |-}
|    | 187|+};
| 188| 188| 
| 189| 189| /**
| 190| 190|  * @returns true if the items list changed in such a way that cached values are possibly invalidated.

binaries/data/mods/public/simulation/helpers/MultiKeyMap.js
| 126| »   »   this._getItems(primaryKey,·secondaryKey).forEach(item·=>·items·=·items.concat(Array(item.count).fill(item.value)));
|    | [NORMAL] ESLintBear (no-return-assign):
|    | Arrow function should not return assignment.

binaries/data/mods/public/simulation/helpers/MultiKeyMap.js
| 196| »   let·existingItems·=·items.filter(item·=>·{·return·item.ID·==·itemID;·});
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'item' is already declared in the upper scope.

binaries/data/mods/public/simulation/helpers/MultiKeyMap.js
|   9| };
|    | [NORMAL] JSHintBear:
|    | Unnecessary semicolon.

binaries/data/mods/public/simulation/helpers/MultiKeyMap.js
| 160| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/MultiKeyMap.js
| 170| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/MultiKeyMap.js
| 179| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/MultiKeyMap.js
| 187| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.
|    | [NORMAL] ESLintBear (no-extra-semi):
|    | Unnecessary semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|   9|   9| 	map.AddItem("prim_b", "item_a", 0, "sec_a");
|  10|  10| 	map.AddItem("prim_c", "item_a", 0, "sec_a");
|  11|  11| 	map.AddItem("prim_c", "item_a", 0, 5);
|  12|    |-};
|    |  12|+}
|  13|  13| 
|  14|  14| // Check that key-related operations are correct.
|  15|  15| function test_keys(map)
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  14|  14| // Check that key-related operations are correct.
|  15|  15| function test_keys(map)
|  16|  16| {
|  17|    |-	TS_ASSERT(map.items.has("prim_a"))
|    |  17|+	TS_ASSERT(map.items.has("prim_a"));
|  18|  18| 	TS_ASSERT(map.items.has("prim_b"))
|  19|  19| 	TS_ASSERT(map.items.has("prim_c"))
|  20|  20| 
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  15|  15| function test_keys(map)
|  16|  16| {
|  17|  17| 	TS_ASSERT(map.items.has("prim_a"))
|  18|    |-	TS_ASSERT(map.items.has("prim_b"))
|    |  18|+	TS_ASSERT(map.items.has("prim_b"));
|  19|  19| 	TS_ASSERT(map.items.has("prim_c"))
|  20|  20| 
|  21|  21| 	TS_ASSERT(map.items.get("prim_a").has("sec_a"))
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  16|  16| {
|  17|  17| 	TS_ASSERT(map.items.has("prim_a"))
|  18|  18| 	TS_ASSERT(map.items.has("prim_b"))
|  19|    |-	TS_ASSERT(map.items.has("prim_c"))
|    |  19|+	TS_ASSERT(map.items.has("prim_c"));
|  20|  20| 
|  21|  21| 	TS_ASSERT(map.items.get("prim_a").has("sec_a"))
|  22|  22| 	TS_ASSERT(map.items.get("prim_a").has("sec_b"))
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  18|  18| 	TS_ASSERT(map.items.has("prim_b"))
|  19|  19| 	TS_ASSERT(map.items.has("prim_c"))
|  20|  20| 
|  21|    |-	TS_ASSERT(map.items.get("prim_a").has("sec_a"))
|    |  21|+	TS_ASSERT(map.items.get("prim_a").has("sec_a"));
|  22|  22| 	TS_ASSERT(map.items.get("prim_a").has("sec_b"))
|  23|  23| 	TS_ASSERT(!map.items.get("prim_a").has("sec_c"))
|  24|  24| 	TS_ASSERT(map.items.get("prim_b").has("sec_a"))
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  19|  19| 	TS_ASSERT(map.items.has("prim_c"))
|  20|  20| 
|  21|  21| 	TS_ASSERT(map.items.get("prim_a").has("sec_a"))
|  22|    |-	TS_ASSERT(map.items.get("prim_a").has("sec_b"))
|    |  22|+	TS_ASSERT(map.items.get("prim_a").has("sec_b"));
|  23|  23| 	TS_ASSERT(!map.items.get("prim_a").has("sec_c"))
|  24|  24| 	TS_ASSERT(map.items.get("prim_b").has("sec_a"))
|  25|  25| 	TS_ASSERT(map.items.get("prim_c").has("sec_a"))
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  20|  20| 
|  21|  21| 	TS_ASSERT(map.items.get("prim_a").has("sec_a"))
|  22|  22| 	TS_ASSERT(map.items.get("prim_a").has("sec_b"))
|  23|    |-	TS_ASSERT(!map.items.get("prim_a").has("sec_c"))
|    |  23|+	TS_ASSERT(!map.items.get("prim_a").has("sec_c"));
|  24|  24| 	TS_ASSERT(map.items.get("prim_b").has("sec_a"))
|  25|  25| 	TS_ASSERT(map.items.get("prim_c").has("sec_a"))
|  26|  26| 	TS_ASSERT(map.items.get("prim_c").has(5))
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  21|  21| 	TS_ASSERT(map.items.get("prim_a").has("sec_a"))
|  22|  22| 	TS_ASSERT(map.items.get("prim_a").has("sec_b"))
|  23|  23| 	TS_ASSERT(!map.items.get("prim_a").has("sec_c"))
|  24|    |-	TS_ASSERT(map.items.get("prim_b").has("sec_a"))
|    |  24|+	TS_ASSERT(map.items.get("prim_b").has("sec_a"));
|  25|  25| 	TS_ASSERT(map.items.get("prim_c").has("sec_a"))
|  26|  26| 	TS_ASSERT(map.items.get("prim_c").has(5))
|  27|  27| 
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  22|  22| 	TS_ASSERT(map.items.get("prim_a").has("sec_b"))
|  23|  23| 	TS_ASSERT(!map.items.get("prim_a").has("sec_c"))
|  24|  24| 	TS_ASSERT(map.items.get("prim_b").has("sec_a"))
|  25|    |-	TS_ASSERT(map.items.get("prim_c").has("sec_a"))
|    |  25|+	TS_ASSERT(map.items.get("prim_c").has("sec_a"));
|  26|  26| 	TS_ASSERT(map.items.get("prim_c").has(5))
|  27|  27| 
|  28|  28| 	TS_ASSERT(map.items.get("prim_a").get("sec_a").length == 3)
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  23|  23| 	TS_ASSERT(!map.items.get("prim_a").has("sec_c"))
|  24|  24| 	TS_ASSERT(map.items.get("prim_b").has("sec_a"))
|  25|  25| 	TS_ASSERT(map.items.get("prim_c").has("sec_a"))
|  26|    |-	TS_ASSERT(map.items.get("prim_c").has(5))
|    |  26|+	TS_ASSERT(map.items.get("prim_c").has(5));
|  27|  27| 
|  28|  28| 	TS_ASSERT(map.items.get("prim_a").get("sec_a").length == 3)
|  29|  29| 	TS_ASSERT(map.items.get("prim_a").get("sec_b").length == 1)
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  25|  25| 	TS_ASSERT(map.items.get("prim_c").has("sec_a"))
|  26|  26| 	TS_ASSERT(map.items.get("prim_c").has(5))
|  27|  27| 
|  28|    |-	TS_ASSERT(map.items.get("prim_a").get("sec_a").length == 3)
|    |  28|+	TS_ASSERT(map.items.get("prim_a").get("sec_a").length == 3);
|  29|  29| 	TS_ASSERT(map.items.get("prim_a").get("sec_b").length == 1)
|  30|  30| 	TS_ASSERT(map.items.get("prim_b").get("sec_a").length == 1)
|  31|  31| 	TS_ASSERT(map.items.get("prim_c").get("sec_a").length == 1)
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  26|  26| 	TS_ASSERT(map.items.get("prim_c").has(5))
|  27|  27| 
|  28|  28| 	TS_ASSERT(map.items.get("prim_a").get("sec_a").length == 3)
|  29|    |-	TS_ASSERT(map.items.get("prim_a").get("sec_b").length == 1)
|    |  29|+	TS_ASSERT(map.items.get("prim_a").get("sec_b").length == 1);
|  30|  30| 	TS_ASSERT(map.items.get("prim_b").get("sec_a").length == 1)
|  31|  31| 	TS_ASSERT(map.items.get("prim_c").get("sec_a").length == 1)
|  32|  32| 	TS_ASSERT(map.items.get("prim_c").get(5).length == 1)
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  27|  27| 
|  28|  28| 	TS_ASSERT(map.items.get("prim_a").get("sec_a").length == 3)
|  29|  29| 	TS_ASSERT(map.items.get("prim_a").get("sec_b").length == 1)
|  30|    |-	TS_ASSERT(map.items.get("prim_b").get("sec_a").length == 1)
|    |  30|+	TS_ASSERT(map.items.get("prim_b").get("sec_a").length == 1);
|  31|  31| 	TS_ASSERT(map.items.get("prim_c").get("sec_a").length == 1)
|  32|  32| 	TS_ASSERT(map.items.get("prim_c").get(5).length == 1)
|  33|  33| 
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  28|  28| 	TS_ASSERT(map.items.get("prim_a").get("sec_a").length == 3)
|  29|  29| 	TS_ASSERT(map.items.get("prim_a").get("sec_b").length == 1)
|  30|  30| 	TS_ASSERT(map.items.get("prim_b").get("sec_a").length == 1)
|  31|    |-	TS_ASSERT(map.items.get("prim_c").get("sec_a").length == 1)
|    |  31|+	TS_ASSERT(map.items.get("prim_c").get("sec_a").length == 1);
|  32|  32| 	TS_ASSERT(map.items.get("prim_c").get(5).length == 1)
|  33|  33| 
|  34|  34| 	TS_ASSERT(map.GetItems("prim_a", "sec_a").length == 3)
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  29|  29| 	TS_ASSERT(map.items.get("prim_a").get("sec_b").length == 1)
|  30|  30| 	TS_ASSERT(map.items.get("prim_b").get("sec_a").length == 1)
|  31|  31| 	TS_ASSERT(map.items.get("prim_c").get("sec_a").length == 1)
|  32|    |-	TS_ASSERT(map.items.get("prim_c").get(5).length == 1)
|    |  32|+	TS_ASSERT(map.items.get("prim_c").get(5).length == 1);
|  33|  33| 
|  34|  34| 	TS_ASSERT(map.GetItems("prim_a", "sec_a").length == 3)
|  35|  35| 	TS_ASSERT(map.GetItems("prim_a", "sec_b").length == 1)
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  31|  31| 	TS_ASSERT(map.items.get("prim_c").get("sec_a").length == 1)
|  32|  32| 	TS_ASSERT(map.items.get("prim_c").get(5).length == 1)
|  33|  33| 
|  34|    |-	TS_ASSERT(map.GetItems("prim_a", "sec_a").length == 3)
|    |  34|+	TS_ASSERT(map.GetItems("prim_a", "sec_a").length == 3);
|  35|  35| 	TS_ASSERT(map.GetItems("prim_a", "sec_b").length == 1)
|  36|  36| 	TS_ASSERT(map.GetItems("prim_b", "sec_a").length == 1)
|  37|  37| 	TS_ASSERT(map.GetItems("prim_c", "sec_a").length == 1)
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  32|  32| 	TS_ASSERT(map.items.get("prim_c").get(5).length == 1)
|  33|  33| 
|  34|  34| 	TS_ASSERT(map.GetItems("prim_a", "sec_a").length == 3)
|  35|    |-	TS_ASSERT(map.GetItems("prim_a", "sec_b").length == 1)
|    |  35|+	TS_ASSERT(map.GetItems("prim_a", "sec_b").length == 1);
|  36|  36| 	TS_ASSERT(map.GetItems("prim_b", "sec_a").length == 1)
|  37|  37| 	TS_ASSERT(map.GetItems("prim_c", "sec_a").length == 1)
|  38|  38| 	TS_ASSERT(map.GetItems("prim_c", 5).length == 1)
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  33|  33| 
|  34|  34| 	TS_ASSERT(map.GetItems("prim_a", "sec_a").length == 3)
|  35|  35| 	TS_ASSERT(map.GetItems("prim_a", "sec_b").length == 1)
|  36|    |-	TS_ASSERT(map.GetItems("prim_b", "sec_a").length == 1)
|    |  36|+	TS_ASSERT(map.GetItems("prim_b", "sec_a").length == 1);
|  37|  37| 	TS_ASSERT(map.GetItems("prim_c", "sec_a").length == 1)
|  38|  38| 	TS_ASSERT(map.GetItems("prim_c", 5).length == 1)
|  39|  39| 
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  34|  34| 	TS_ASSERT(map.GetItems("prim_a", "sec_a").length == 3)
|  35|  35| 	TS_ASSERT(map.GetItems("prim_a", "sec_b").length == 1)
|  36|  36| 	TS_ASSERT(map.GetItems("prim_b", "sec_a").length == 1)
|  37|    |-	TS_ASSERT(map.GetItems("prim_c", "sec_a").length == 1)
|    |  37|+	TS_ASSERT(map.GetItems("prim_c", "sec_a").length == 1);
|  38|  38| 	TS_ASSERT(map.GetItems("prim_c", 5).length == 1)
|  39|  39| 
|  40|  40| 	TS_ASSERT(map.HasItem("prim_a", "item_a", "sec_a"))
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  35|  35| 	TS_ASSERT(map.GetItems("prim_a", "sec_b").length == 1)
|  36|  36| 	TS_ASSERT(map.GetItems("prim_b", "sec_a").length == 1)
|  37|  37| 	TS_ASSERT(map.GetItems("prim_c", "sec_a").length == 1)
|  38|    |-	TS_ASSERT(map.GetItems("prim_c", 5).length == 1)
|    |  38|+	TS_ASSERT(map.GetItems("prim_c", 5).length == 1);
|  39|  39| 
|  40|  40| 	TS_ASSERT(map.HasItem("prim_a", "item_a", "sec_a"))
|  41|  41| 	TS_ASSERT(map.HasItem("prim_a", "item_b", "sec_a"))
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  37|  37| 	TS_ASSERT(map.GetItems("prim_c", "sec_a").length == 1)
|  38|  38| 	TS_ASSERT(map.GetItems("prim_c", 5).length == 1)
|  39|  39| 
|  40|    |-	TS_ASSERT(map.HasItem("prim_a", "item_a", "sec_a"))
|    |  40|+	TS_ASSERT(map.HasItem("prim_a", "item_a", "sec_a"));
|  41|  41| 	TS_ASSERT(map.HasItem("prim_a", "item_b", "sec_a"))
|  42|  42| 	TS_ASSERT(map.HasItem("prim_a", "item_c", "sec_a"))
|  43|  43| 	TS_ASSERT(!map.HasItem("prim_a", "item_d", "sec_a"))
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  38|  38| 	TS_ASSERT(map.GetItems("prim_c", 5).length == 1)
|  39|  39| 
|  40|  40| 	TS_ASSERT(map.HasItem("prim_a", "item_a", "sec_a"))
|  41|    |-	TS_ASSERT(map.HasItem("prim_a", "item_b", "sec_a"))
|    |  41|+	TS_ASSERT(map.HasItem("prim_a", "item_b", "sec_a"));
|  42|  42| 	TS_ASSERT(map.HasItem("prim_a", "item_c", "sec_a"))
|  43|  43| 	TS_ASSERT(!map.HasItem("prim_a", "item_d", "sec_a"))
|  44|  44| 	TS_ASSERT(map.HasItem("prim_a", "item_a", "sec_b"))
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  39|  39| 
|  40|  40| 	TS_ASSERT(map.HasItem("prim_a", "item_a", "sec_a"))
|  41|  41| 	TS_ASSERT(map.HasItem("prim_a", "item_b", "sec_a"))
|  42|    |-	TS_ASSERT(map.HasItem("prim_a", "item_c", "sec_a"))
|    |  42|+	TS_ASSERT(map.HasItem("prim_a", "item_c", "sec_a"));
|  43|  43| 	TS_ASSERT(!map.HasItem("prim_a", "item_d", "sec_a"))
|  44|  44| 	TS_ASSERT(map.HasItem("prim_a", "item_a", "sec_b"))
|  45|  45| 	TS_ASSERT(!map.HasItem("prim_a", "item_b", "sec_b"))
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  40|  40| 	TS_ASSERT(map.HasItem("prim_a", "item_a", "sec_a"))
|  41|  41| 	TS_ASSERT(map.HasItem("prim_a", "item_b", "sec_a"))
|  42|  42| 	TS_ASSERT(map.HasItem("prim_a", "item_c", "sec_a"))
|  43|    |-	TS_ASSERT(!map.HasItem("prim_a", "item_d", "sec_a"))
|    |  43|+	TS_ASSERT(!map.HasItem("prim_a", "item_d", "sec_a"));
|  44|  44| 	TS_ASSERT(map.HasItem("prim_a", "item_a", "sec_b"))
|  45|  45| 	TS_ASSERT(!map.HasItem("prim_a", "item_b", "sec_b"))
|  46|  46| 	TS_ASSERT(!map.HasItem("prim_a", "item_c", "sec_b"))
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  41|  41| 	TS_ASSERT(map.HasItem("prim_a", "item_b", "sec_a"))
|  42|  42| 	TS_ASSERT(map.HasItem("prim_a", "item_c", "sec_a"))
|  43|  43| 	TS_ASSERT(!map.HasItem("prim_a", "item_d", "sec_a"))
|  44|    |-	TS_ASSERT(map.HasItem("prim_a", "item_a", "sec_b"))
|    |  44|+	TS_ASSERT(map.HasItem("prim_a", "item_a", "sec_b"));
|  45|  45| 	TS_ASSERT(!map.HasItem("prim_a", "item_b", "sec_b"))
|  46|  46| 	TS_ASSERT(!map.HasItem("prim_a", "item_c", "sec_b"))
|  47|  47| 	TS_ASSERT(map.HasItem("prim_b", "item_a", "sec_a"))
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  42|  42| 	TS_ASSERT(map.HasItem("prim_a", "item_c", "sec_a"))
|  43|  43| 	TS_ASSERT(!map.HasItem("prim_a", "item_d", "sec_a"))
|  44|  44| 	TS_ASSERT(map.HasItem("prim_a", "item_a", "sec_b"))
|  45|    |-	TS_ASSERT(!map.HasItem("prim_a", "item_b", "sec_b"))
|    |  45|+	TS_ASSERT(!map.HasItem("prim_a", "item_b", "sec_b"));
|  46|  46| 	TS_ASSERT(!map.HasItem("prim_a", "item_c", "sec_b"))
|  47|  47| 	TS_ASSERT(map.HasItem("prim_b", "item_a", "sec_a"))
|  48|  48| 	TS_ASSERT(map.HasItem("prim_c", "item_a", "sec_a"))
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  43|  43| 	TS_ASSERT(!map.HasItem("prim_a", "item_d", "sec_a"))
|  44|  44| 	TS_ASSERT(map.HasItem("prim_a", "item_a", "sec_b"))
|  45|  45| 	TS_ASSERT(!map.HasItem("prim_a", "item_b", "sec_b"))
|  46|    |-	TS_ASSERT(!map.HasItem("prim_a", "item_c", "sec_b"))
|    |  46|+	TS_ASSERT(!map.HasItem("prim_a", "item_c", "sec_b"));
|  47|  47| 	TS_ASSERT(map.HasItem("prim_b", "item_a", "sec_a"))
|  48|  48| 	TS_ASSERT(map.HasItem("prim_c", "item_a", "sec_a"))
|  49|  49| 	TS_ASSERT(map.HasAnyItem("item_a", "sec_b"))
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  44|  44| 	TS_ASSERT(map.HasItem("prim_a", "item_a", "sec_b"))
|  45|  45| 	TS_ASSERT(!map.HasItem("prim_a", "item_b", "sec_b"))
|  46|  46| 	TS_ASSERT(!map.HasItem("prim_a", "item_c", "sec_b"))
|  47|    |-	TS_ASSERT(map.HasItem("prim_b", "item_a", "sec_a"))
|    |  47|+	TS_ASSERT(map.HasItem("prim_b", "item_a", "sec_a"));
|  48|  48| 	TS_ASSERT(map.HasItem("prim_c", "item_a", "sec_a"))
|  49|  49| 	TS_ASSERT(map.HasAnyItem("item_a", "sec_b"))
|  50|  50| 	TS_ASSERT(map.HasAnyItem("item_b", "sec_a"))
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  45|  45| 	TS_ASSERT(!map.HasItem("prim_a", "item_b", "sec_b"))
|  46|  46| 	TS_ASSERT(!map.HasItem("prim_a", "item_c", "sec_b"))
|  47|  47| 	TS_ASSERT(map.HasItem("prim_b", "item_a", "sec_a"))
|  48|    |-	TS_ASSERT(map.HasItem("prim_c", "item_a", "sec_a"))
|    |  48|+	TS_ASSERT(map.HasItem("prim_c", "item_a", "sec_a"));
|  49|  49| 	TS_ASSERT(map.HasAnyItem("item_a", "sec_b"))
|  50|  50| 	TS_ASSERT(map.HasAnyItem("item_b", "sec_a"))
|  51|  51| 	TS_ASSERT(!map.HasAnyItem("item_d", "sec_a"))
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  46|  46| 	TS_ASSERT(!map.HasItem("prim_a", "item_c", "sec_b"))
|  47|  47| 	TS_ASSERT(map.HasItem("prim_b", "item_a", "sec_a"))
|  48|  48| 	TS_ASSERT(map.HasItem("prim_c", "item_a", "sec_a"))
|  49|    |-	TS_ASSERT(map.HasAnyItem("item_a", "sec_b"))
|    |  49|+	TS_ASSERT(map.HasAnyItem("item_a", "sec_b"));
|  50|  50| 	TS_ASSERT(map.HasAnyItem("item_b", "sec_a"))
|  51|  51| 	TS_ASSERT(!map.HasAnyItem("item_d", "sec_a"))
|  52|  52| 	TS_ASSERT(!map.HasAnyItem("item_b", "sec_b"))
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  47|  47| 	TS_ASSERT(map.HasItem("prim_b", "item_a", "sec_a"))
|  48|  48| 	TS_ASSERT(map.HasItem("prim_c", "item_a", "sec_a"))
|  49|  49| 	TS_ASSERT(map.HasAnyItem("item_a", "sec_b"))
|  50|    |-	TS_ASSERT(map.HasAnyItem("item_b", "sec_a"))
|    |  50|+	TS_ASSERT(map.HasAnyItem("item_b", "sec_a"));
|  51|  51| 	TS_ASSERT(!map.HasAnyItem("item_d", "sec_a"))
|  52|  52| 	TS_ASSERT(!map.HasAnyItem("item_b", "sec_b"))
|  53|  53| 
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  48|  48| 	TS_ASSERT(map.HasItem("prim_c", "item_a", "sec_a"))
|  49|  49| 	TS_ASSERT(map.HasAnyItem("item_a", "sec_b"))
|  50|  50| 	TS_ASSERT(map.HasAnyItem("item_b", "sec_a"))
|  51|    |-	TS_ASSERT(!map.HasAnyItem("item_d", "sec_a"))
|    |  51|+	TS_ASSERT(!map.HasAnyItem("item_d", "sec_a"));
|  52|  52| 	TS_ASSERT(!map.HasAnyItem("item_b", "sec_b"))
|  53|  53| 
|  54|  54| 	// Adding the same item increases its count.
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  49|  49| 	TS_ASSERT(map.HasAnyItem("item_a", "sec_b"))
|  50|  50| 	TS_ASSERT(map.HasAnyItem("item_b", "sec_a"))
|  51|  51| 	TS_ASSERT(!map.HasAnyItem("item_d", "sec_a"))
|  52|    |-	TS_ASSERT(!map.HasAnyItem("item_b", "sec_b"))
|    |  52|+	TS_ASSERT(!map.HasAnyItem("item_b", "sec_b"));
|  53|  53| 
|  54|  54| 	// Adding the same item increases its count.
|  55|  55| 	map.AddItem("prim_a", "item_b", 0, "sec_a")
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  52|  52| 	TS_ASSERT(!map.HasAnyItem("item_b", "sec_b"))
|  53|  53| 
|  54|  54| 	// Adding the same item increases its count.
|  55|    |-	map.AddItem("prim_a", "item_b", 0, "sec_a")
|    |  55|+	map.AddItem("prim_a", "item_b", 0, "sec_a");
|  56|  56| 	TS_ASSERT(map.items.get("prim_a").get("sec_a").length == 3)
|  57|  57| 	TS_ASSERT(map.items.get("prim_a").get("sec_a").filter(item => item.ID == "item_b")[0].count == 2)
|  58|  58| 	TS_ASSERT(map.GetItems("prim_a", "sec_a").length == 3)
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  53|  53| 
|  54|  54| 	// Adding the same item increases its count.
|  55|  55| 	map.AddItem("prim_a", "item_b", 0, "sec_a")
|  56|    |-	TS_ASSERT(map.items.get("prim_a").get("sec_a").length == 3)
|    |  56|+	TS_ASSERT(map.items.get("prim_a").get("sec_a").length == 3);
|  57|  57| 	TS_ASSERT(map.items.get("prim_a").get("sec_a").filter(item => item.ID == "item_b")[0].count == 2)
|  58|  58| 	TS_ASSERT(map.GetItems("prim_a", "sec_a").length == 3)
|  59|  59| 	TS_ASSERT(map.GetItems("prim_a", "sec_a", true).length == 4)
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  54|  54| 	// Adding the same item increases its count.
|  55|  55| 	map.AddItem("prim_a", "item_b", 0, "sec_a")
|  56|  56| 	TS_ASSERT(map.items.get("prim_a").get("sec_a").length == 3)
|  57|    |-	TS_ASSERT(map.items.get("prim_a").get("sec_a").filter(item => item.ID == "item_b")[0].count == 2)
|    |  57|+	TS_ASSERT(map.items.get("prim_a").get("sec_a").filter(item => item.ID == "item_b")[0].count == 2);
|  58|  58| 	TS_ASSERT(map.GetItems("prim_a", "sec_a").length == 3)
|  59|  59| 	TS_ASSERT(map.GetItems("prim_a", "sec_a", true).length == 4)
|  60|  60| 
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  55|  55| 	map.AddItem("prim_a", "item_b", 0, "sec_a")
|  56|  56| 	TS_ASSERT(map.items.get("prim_a").get("sec_a").length == 3)
|  57|  57| 	TS_ASSERT(map.items.get("prim_a").get("sec_a").filter(item => item.ID == "item_b")[0].count == 2)
|  58|    |-	TS_ASSERT(map.GetItems("prim_a", "sec_a").length == 3)
|    |  58|+	TS_ASSERT(map.GetItems("prim_a", "sec_a").length == 3);
|  59|  59| 	TS_ASSERT(map.GetItems("prim_a", "sec_a", true).length == 4)
|  60|  60| 
|  61|  61| 	// Adding without stackable doesn't invalidate caches, adding with does.
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  56|  56| 	TS_ASSERT(map.items.get("prim_a").get("sec_a").length == 3)
|  57|  57| 	TS_ASSERT(map.items.get("prim_a").get("sec_a").filter(item => item.ID == "item_b")[0].count == 2)
|  58|  58| 	TS_ASSERT(map.GetItems("prim_a", "sec_a").length == 3)
|  59|    |-	TS_ASSERT(map.GetItems("prim_a", "sec_a", true).length == 4)
|    |  59|+	TS_ASSERT(map.GetItems("prim_a", "sec_a", true).length == 4);
|  60|  60| 
|  61|  61| 	// Adding without stackable doesn't invalidate caches, adding with does.
|  62|  62| 	TS_ASSERT(!map.AddItem("prim_a", "item_b", 0, "sec_a"))
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  59|  59| 	TS_ASSERT(map.GetItems("prim_a", "sec_a", true).length == 4)
|  60|  60| 
|  61|  61| 	// Adding without stackable doesn't invalidate caches, adding with does.
|  62|    |-	TS_ASSERT(!map.AddItem("prim_a", "item_b", 0, "sec_a"))
|    |  62|+	TS_ASSERT(!map.AddItem("prim_a", "item_b", 0, "sec_a"));
|  63|  63| 	TS_ASSERT(map.AddItem("prim_a", "item_b", 0, "sec_a", true))
|  64|  64| 
|  65|  65| 	TS_ASSERT(map.items.get("prim_a").get("sec_a").filter(item => item.ID == "item_b")[0].count == 4)
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  60|  60| 
|  61|  61| 	// Adding without stackable doesn't invalidate caches, adding with does.
|  62|  62| 	TS_ASSERT(!map.AddItem("prim_a", "item_b", 0, "sec_a"))
|  63|    |-	TS_ASSERT(map.AddItem("prim_a", "item_b", 0, "sec_a", true))
|    |  63|+	TS_ASSERT(map.AddItem("prim_a", "item_b", 0, "sec_a", true));
|  64|  64| 
|  65|  65| 	TS_ASSERT(map.items.get("prim_a").get("sec_a").filter(item => item.ID == "item_b")[0].count == 4)
|  66|  66| 
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  62|  62| 	TS_ASSERT(!map.AddItem("prim_a", "item_b", 0, "sec_a"))
|  63|  63| 	TS_ASSERT(map.AddItem("prim_a", "item_b", 0, "sec_a", true))
|  64|  64| 
|  65|    |-	TS_ASSERT(map.items.get("prim_a").get("sec_a").filter(item => item.ID == "item_b")[0].count == 4)
|    |  65|+	TS_ASSERT(map.items.get("prim_a").get("sec_a").filter(item => item.ID == "item_b")[0].count == 4);
|  66|  66| 
|  67|  67| 	// Likewise removing, unless we now reach 0
|  68|  68| 	TS_ASSERT(!map.RemoveItem("prim_a", "item_b", "sec_a"))
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  65|  65| 	TS_ASSERT(map.items.get("prim_a").get("sec_a").filter(item => item.ID == "item_b")[0].count == 4)
|  66|  66| 
|  67|  67| 	// Likewise removing, unless we now reach 0
|  68|    |-	TS_ASSERT(!map.RemoveItem("prim_a", "item_b", "sec_a"))
|    |  68|+	TS_ASSERT(!map.RemoveItem("prim_a", "item_b", "sec_a"));
|  69|  69| 	TS_ASSERT(map.RemoveItem("prim_a", "item_b", "sec_a", true))
|  70|  70| 	TS_ASSERT(!map.RemoveItem("prim_a", "item_b", "sec_a"))
|  71|  71| 	TS_ASSERT(map.RemoveItem("prim_a", "item_b", "sec_a"))
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  66|  66| 
|  67|  67| 	// Likewise removing, unless we now reach 0
|  68|  68| 	TS_ASSERT(!map.RemoveItem("prim_a", "item_b", "sec_a"))
|  69|    |-	TS_ASSERT(map.RemoveItem("prim_a", "item_b", "sec_a", true))
|    |  69|+	TS_ASSERT(map.RemoveItem("prim_a", "item_b", "sec_a", true));
|  70|  70| 	TS_ASSERT(!map.RemoveItem("prim_a", "item_b", "sec_a"))
|  71|  71| 	TS_ASSERT(map.RemoveItem("prim_a", "item_b", "sec_a"))
|  72|  72| 
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  67|  67| 	// Likewise removing, unless we now reach 0
|  68|  68| 	TS_ASSERT(!map.RemoveItem("prim_a", "item_b", "sec_a"))
|  69|  69| 	TS_ASSERT(map.RemoveItem("prim_a", "item_b", "sec_a", true))
|  70|    |-	TS_ASSERT(!map.RemoveItem("prim_a", "item_b", "sec_a"))
|    |  70|+	TS_ASSERT(!map.RemoveItem("prim_a", "item_b", "sec_a"));
|  71|  71| 	TS_ASSERT(map.RemoveItem("prim_a", "item_b", "sec_a"))
|  72|  72| 
|  73|  73| 	// Check that cleanup is done
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  68|  68| 	TS_ASSERT(!map.RemoveItem("prim_a", "item_b", "sec_a"))
|  69|  69| 	TS_ASSERT(map.RemoveItem("prim_a", "item_b", "sec_a", true))
|  70|  70| 	TS_ASSERT(!map.RemoveItem("prim_a", "item_b", "sec_a"))
|  71|    |-	TS_ASSERT(map.RemoveItem("prim_a", "item_b", "sec_a"))
|    |  71|+	TS_ASSERT(map.RemoveItem("prim_a", "item_b", "sec_a"));
|  72|  72| 
|  73|  73| 	// Check that cleanup is done
|  74|  74| 	TS_ASSERT(map.items.get("prim_a").get("sec_a").length == 2)
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  71|  71| 	TS_ASSERT(map.RemoveItem("prim_a", "item_b", "sec_a"))
|  72|  72| 
|  73|  73| 	// Check that cleanup is done
|  74|    |-	TS_ASSERT(map.items.get("prim_a").get("sec_a").length == 2)
|    |  74|+	TS_ASSERT(map.items.get("prim_a").get("sec_a").length == 2);
|  75|  75| 	TS_ASSERT(map.RemoveItem("prim_a", "item_a", "sec_a"))
|  76|  76| 	TS_ASSERT(map.RemoveItem("prim_a", "item_c", "sec_a"))
|  77|  77| 	TS_ASSERT(!map.items.get("prim_a").has("sec_a"))
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  72|  72| 
|  73|  73| 	// Check that cleanup is done
|  74|  74| 	TS_ASSERT(map.items.get("prim_a").get("sec_a").length == 2)
|  75|    |-	TS_ASSERT(map.RemoveItem("prim_a", "item_a", "sec_a"))
|    |  75|+	TS_ASSERT(map.RemoveItem("prim_a", "item_a", "sec_a"));
|  76|  76| 	TS_ASSERT(map.RemoveItem("prim_a", "item_c", "sec_a"))
|  77|  77| 	TS_ASSERT(!map.items.get("prim_a").has("sec_a"))
|  78|  78| 	TS_ASSERT(map.items.get("prim_a").has("sec_b"))
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  73|  73| 	// Check that cleanup is done
|  74|  74| 	TS_ASSERT(map.items.get("prim_a").get("sec_a").length == 2)
|  75|  75| 	TS_ASSERT(map.RemoveItem("prim_a", "item_a", "sec_a"))
|  76|    |-	TS_ASSERT(map.RemoveItem("prim_a", "item_c", "sec_a"))
|    |  76|+	TS_ASSERT(map.RemoveItem("prim_a", "item_c", "sec_a"));
|  77|  77| 	TS_ASSERT(!map.items.get("prim_a").has("sec_a"))
|  78|  78| 	TS_ASSERT(map.items.get("prim_a").has("sec_b"))
|  79|  79| 	TS_ASSERT(map.RemoveItem("prim_a", "item_a", "sec_b"))
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  74|  74| 	TS_ASSERT(map.items.get("prim_a").get("sec_a").length == 2)
|  75|  75| 	TS_ASSERT(map.RemoveItem("prim_a", "item_a", "sec_a"))
|  76|  76| 	TS_ASSERT(map.RemoveItem("prim_a", "item_c", "sec_a"))
|  77|    |-	TS_ASSERT(!map.items.get("prim_a").has("sec_a"))
|    |  77|+	TS_ASSERT(!map.items.get("prim_a").has("sec_a"));
|  78|  78| 	TS_ASSERT(map.items.get("prim_a").has("sec_b"))
|  79|  79| 	TS_ASSERT(map.RemoveItem("prim_a", "item_a", "sec_b"))
|  80|  80| 	TS_ASSERT(!map.items.has("prim_a"))
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  75|  75| 	TS_ASSERT(map.RemoveItem("prim_a", "item_a", "sec_a"))
|  76|  76| 	TS_ASSERT(map.RemoveItem("prim_a", "item_c", "sec_a"))
|  77|  77| 	TS_ASSERT(!map.items.get("prim_a").has("sec_a"))
|  78|    |-	TS_ASSERT(map.items.get("prim_a").has("sec_b"))
|    |  78|+	TS_ASSERT(map.items.get("prim_a").has("sec_b"));
|  79|  79| 	TS_ASSERT(map.RemoveItem("prim_a", "item_a", "sec_b"))
|  80|  80| 	TS_ASSERT(!map.items.has("prim_a"))
|  81|  81| };
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  76|  76| 	TS_ASSERT(map.RemoveItem("prim_a", "item_c", "sec_a"))
|  77|  77| 	TS_ASSERT(!map.items.get("prim_a").has("sec_a"))
|  78|  78| 	TS_ASSERT(map.items.get("prim_a").has("sec_b"))
|  79|    |-	TS_ASSERT(map.RemoveItem("prim_a", "item_a", "sec_b"))
|    |  79|+	TS_ASSERT(map.RemoveItem("prim_a", "item_a", "sec_b"));
|  80|  80| 	TS_ASSERT(!map.items.has("prim_a"))
|  81|  81| };
|  82|  82| 
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  77|  77| 	TS_ASSERT(!map.items.get("prim_a").has("sec_a"))
|  78|  78| 	TS_ASSERT(map.items.get("prim_a").has("sec_b"))
|  79|  79| 	TS_ASSERT(map.RemoveItem("prim_a", "item_a", "sec_b"))
|  80|    |-	TS_ASSERT(!map.items.has("prim_a"))
|    |  80|+	TS_ASSERT(!map.items.has("prim_a"));
|  81|  81| };
|  82|  82| 
|  83|  83| function setup_items(map)
|    | [NORMAL] ESLintBear (no-extra-semi):
|    | Unnecessary semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  78|  78| 	TS_ASSERT(map.items.get("prim_a").has("sec_b"))
|  79|  79| 	TS_ASSERT(map.RemoveItem("prim_a", "item_a", "sec_b"))
|  80|  80| 	TS_ASSERT(!map.items.has("prim_a"))
|  81|    |-};
|    |  81|+}
|  82|  82| 
|  83|  83| function setup_items(map)
|  84|  84| {
|    | [NORMAL] ESLintBear (no-extra-semi):
|    | Unnecessary semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  89|  89| 	map.AddItem("prim_a", "item_a", 5, "sec_b");
|  90|  90| 	map.AddItem("prim_b", "item_a", 6, "sec_a");
|  91|  91| 	map.AddItem("prim_c", "item_a", 7, "sec_a");
|  92|    |-};
|    |  92|+}
|  93|  93| 
|  94|  94| // Check that items returned are correct.
|  95|  95| function test_items(map)
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  95|  95| function test_items(map)
|  96|  96| {
|  97|  97| 	let items = map.GetAllItems("sec_a");
|  98|    |-	TS_ASSERT("prim_a" in items)
|    |  98|+	TS_ASSERT("prim_a" in items);
|  99|  99| 	TS_ASSERT("prim_b" in items)
| 100| 100| 	TS_ASSERT("prim_c" in items)
| 101| 101| 	let sum = 0;
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  96|  96| {
|  97|  97| 	let items = map.GetAllItems("sec_a");
|  98|  98| 	TS_ASSERT("prim_a" in items)
|  99|    |-	TS_ASSERT("prim_b" in items)
|    |  99|+	TS_ASSERT("prim_b" in items);
| 100| 100| 	TS_ASSERT("prim_c" in items)
| 101| 101| 	let sum = 0;
| 102| 102| 	for (let key in items)
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  97|  97| 	let items = map.GetAllItems("sec_a");
|  98|  98| 	TS_ASSERT("prim_a" in items)
|  99|  99| 	TS_ASSERT("prim_b" in items)
| 100|    |-	TS_ASSERT("prim_c" in items)
|    | 100|+	TS_ASSERT("prim_c" in items);
| 101| 101| 	let sum = 0;
| 102| 102| 	for (let key in items)
| 103| 103| 		items[key].forEach(item => sum += item);
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
| 101| 101| 	let sum = 0;
| 102| 102| 	for (let key in items)
| 103| 103| 		items[key].forEach(item => sum += item);
| 104|    |-	TS_ASSERT(sum == 19)
|    | 104|+	TS_ASSERT(sum == 19);
| 105| 105| 
| 106| 106| 	items = map.GetAllItems("sec_a", true);
| 107| 107| 	sum = 0;
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
| 108| 108| 	for (let key in items)
| 109| 109| 		items[key].forEach(item => sum += item);
| 110| 110| 	// We're adding more of the first item_c, the value wasn't replaced.
| 111|    |-	TS_ASSERT(sum == 22)
|    | 111|+	TS_ASSERT(sum == 22);
| 112| 112| };
| 113| 113| 
| 114| 114| // Test items, and test that deserialised versions still pass test (i.e. test serialisation).
|    | [NORMAL] ESLintBear (no-extra-semi):
|    | Unnecessary semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
| 109| 109| 		items[key].forEach(item => sum += item);
| 110| 110| 	// We're adding more of the first item_c, the value wasn't replaced.
| 111| 111| 	TS_ASSERT(sum == 22)
| 112|    |-};
|    | 112|+}
| 113| 113| 
| 114| 114| // Test items, and test that deserialised versions still pass test (i.e. test serialisation).
| 115| 115| let map = new MultiKeyMap();
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
| 119| 119| map = new MultiKeyMap();
| 120| 120| let map2 = new MultiKeyMap();
| 121| 121| setup_keys(map);
| 122|    |-map2.Deserialize(map.Serialize())
|    | 122|+map2.Deserialize(map.Serialize());
| 123| 123| test_keys(map2);
| 124| 124| 
| 125| 125| map = new MultiKeyMap();
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
| 123| 123| test_keys(map2);
| 124| 124| 
| 125| 125| map = new MultiKeyMap();
| 126|    |-setup_items(map)
|    | 126|+setup_items(map);
| 127| 127| test_items(map);
| 128| 128| map = new MultiKeyMap();
| 129| 129| map2 = new MultiKeyMap();
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
| 128| 128| map = new MultiKeyMap();
| 129| 129| map2 = new MultiKeyMap();
| 130| 130| setup_items(map);
| 131|    |-map2.Deserialize(map.Serialize())
|    | 131|+map2.Deserialize(map.Serialize());
| 132| 132| test_items(map2);

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
| 103| »   »   items[key].forEach(item·=>·sum·+=·item);
|    | [NORMAL] ESLintBear (no-return-assign):
|    | Arrow function should not return assignment.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
| 109| »   »   items[key].forEach(item·=>·sum·+=·item);
|    | [NORMAL] ESLintBear (no-return-assign):
|    | Arrow function should not return assignment.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  12| };
|    | [NORMAL] JSHintBear:
|    | Unnecessary semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  17| »   TS_ASSERT(map.items.has("prim_a"))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  18| »   TS_ASSERT(map.items.has("prim_b"))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  19| »   TS_ASSERT(map.items.has("prim_c"))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  21| »   TS_ASSERT(map.items.get("prim_a").has("sec_a"))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  22| »   TS_ASSERT(map.items.get("prim_a").has("sec_b"))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  23| »   TS_ASSERT(!map.items.get("prim_a").has("sec_c"))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  24| »   TS_ASSERT(map.items.get("prim_b").has("sec_a"))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  25| »   TS_ASSERT(map.items.get("prim_c").has("sec_a"))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  26| »   TS_ASSERT(map.items.get("prim_c").has(5))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  28| »   TS_ASSERT(map.items.get("prim_a").get("sec_a").length·==·3)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  29| »   TS_ASSERT(map.items.get("prim_a").get("sec_b").length·==·1)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  30| »   TS_ASSERT(map.items.get("prim_b").get("sec_a").length·==·1)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  31| »   TS_ASSERT(map.items.get("prim_c").get("sec_a").length·==·1)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  32| »   TS_ASSERT(map.items.get("prim_c").get(5).length·==·1)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  34| »   TS_ASSERT(map.GetItems("prim_a",·"sec_a").length·==·3)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  35| »   TS_ASSERT(map.GetItems("prim_a",·"sec_b").length·==·1)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  36| »   TS_ASSERT(map.GetItems("prim_b",·"sec_a").length·==·1)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  37| »   TS_ASSERT(map.GetItems("prim_c",·"sec_a").length·==·1)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  38| »   TS_ASSERT(map.GetItems("prim_c",·5).length·==·1)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  40| »   TS_ASSERT(map.HasItem("prim_a",·"item_a",·"sec_a"))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  41| »   TS_ASSERT(map.HasItem("prim_a",·"item_b",·"sec_a"))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  42| »   TS_ASSERT(map.HasItem("prim_a",·"item_c",·"sec_a"))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  43| »   TS_ASSERT(!map.HasItem("prim_a",·"item_d",·"sec_a"))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  44| »   TS_ASSERT(map.HasItem("prim_a",·"item_a",·"sec_b"))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  45| »   TS_ASSERT(!map.HasItem("prim_a",·"item_b",·"sec_b"))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  46| »   TS_ASSERT(!map.HasItem("prim_a",·"item_c",·"sec_b"))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  47| »   TS_ASSERT(map.HasItem("prim_b",·"item_a",·"sec_a"))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  48| »   TS_ASSERT(map.HasItem("prim_c",·"item_a",·"sec_a"))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  49| »   TS_ASSERT(map.HasAnyItem("item_a",·"sec_b"))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  50| »   TS_ASSERT(map.HasAnyItem("item_b",·"sec_a"))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  51| »   TS_ASSERT(!map.HasAnyItem("item_d",·"sec_a"))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  52| »   TS_ASSERT(!map.HasAnyItem("item_b",·"sec_b"))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  55| »   map.AddItem("prim_a",·"item_b",·0,·"sec_a")
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  56| »   TS_ASSERT(map.items.get("prim_a").get("sec_a").length·==·3)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  57| »   TS_ASSERT(map.items.get("prim_a").get("sec_a").filter(item·=>·item.ID·==·"item_b")[0].count·==·2)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  58| »   TS_ASSERT(map.GetItems("prim_a",·"sec_a").length·==·3)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  59| »   TS_ASSERT(map.GetItems("prim_a",·"sec_a",·true).length·==·4)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  62| »   TS_ASSERT(!map.AddItem("prim_a",·"item_b",·0,·"sec_a"))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  63| »   TS_ASSERT(map.AddItem("prim_a",·"item_b",·0,·"sec_a",·true))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  65| »   TS_ASSERT(map.items.get("prim_a").get("sec_a").filter(item·=>·item.ID·==·"item_b")[0].count·==·4)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  68| »   TS_ASSERT(!map.RemoveItem("prim_a",·"item_b",·"sec_a"))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  69| »   TS_ASSERT(map.RemoveItem("prim_a",·"item_b",·"sec_a",·true))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  70| »   TS_ASSERT(!map.RemoveItem("prim_a",·"item_b",·"sec_a"))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  71| »   TS_ASSERT(map.RemoveItem("prim_a",·"item_b",·"sec_a"))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  74| »   TS_ASSERT(map.items.get("prim_a").get("sec_a").length·==·2)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  75| »   TS_ASSERT(map.RemoveItem("prim_a",·"item_a",·"sec_a"))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  76| »   TS_ASSERT(map.RemoveItem("prim_a",·"item_c",·"sec_a"))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  77| »   TS_ASSERT(!map.items.get("prim_a").has("sec_a"))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  78| »   TS_ASSERT(map.items.get("prim_a").has("sec_b"))
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/tests/test_MultiKeyMap.js
|  78| »   TS_ASSERT(map.items.get("prim_a").has("sec_b"))
|    | [MAJOR] JSHintBear:
|    | Too many errors. (58% scanned).
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/differential/1499/display/redirect

This comment was removed by wraitii.
wraitii updated this revision to Diff 9334.Thu, Aug 15, 10:01 AM
wraitii edited the summary of this revision. (Show Details)

Cleaned up.

Reasoning to not use the existing MT_EntityRenamed message is that this is a bit of a special behaviour, and it seems like it is better to use more specific messages here to improve performance, as EntityRenamed is used by other components also.

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/381/display/redirect

Stan added inline comments.Thu, Aug 15, 11:25 AM
binaries/data/mods/public/simulation/components/PlayerManager.js
30

INVALID_ENTITY ?

elexis added a subscriber: elexis.Thu, Aug 15, 12:06 PM

RemoveLastPlayer sends before deletion, ReplacePlayer sends after deletion. It should be the same order as for regular entities.

wraitii updated this revision to Diff 9341.Thu, Aug 15, 12:13 PM

Make ordering consistent:

  • PlayerChanged is sent
  • Entities are changed owner from invalid to player
  • player ent is destroyed

This is the same order (with an additional step) as Transform.js

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/385/display/redirect

Freagarach added inline comments.
binaries/data/mods/public/simulation/components/PlayerManager.js
38

Perhaps the example should stay, it's actually quite informative.
(e.g. with cached quantities like in TechnologyManager)

159

let (as @Stan pointed out below).

wraitii added inline comments.Thu, Aug 15, 12:33 PM
binaries/data/mods/public/simulation/components/PlayerManager.js
38

Comment is irrelevant with D274 since that doesn't change per-entity modifications anymore.

44–46

It seems sensible, as globalownershipChanged code could want to get information on the player, which possibly might no longer exist unless going through this two-step process.

wraitii abandoned this revision.Sun, Aug 18, 9:42 AM

Merged back in D274