Page MenuHomeWildfire Games

Make capturing optional
Needs ReviewPublic

Authored by Angen on Aug 3 2018, 10:24 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Trac Tickets
#3563
Summary

Host can chose to enable/disable capturing for matches. This way the old style can be played where capturing wasn't posssible as well as the new flavor, allowing more variety in the game experience.

Wonders stay capturable in wonder victory games and relics in Capture the relic games.

Test Plan

Start several games combinating capturing option with different victory conditions. Esspecially wonder and relic games,

Diff Detail

Repository
rP 0 A.D. Public Repository
Branch
/ps/trunk
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 6320
Build 10485: Vulcan BuildJenkins
Build 10484: arc lint + arc unit

Unit TestsFailed

TimeTest
0 msJenkins > cxxtest_debug.xml::Unknown Unit Message ("")
Failed to read test report file /mnt/data/jenkins-phabricator/workspace/differential/cxxtest_debug.xml org.dom4j.DocumentException: Error on line 1 of document : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog. at org.dom4j.io.SAXReader.read(SAXReader.java:482)
0 msJenkins > TestAllocators::Unknown Unit Message ("")
0 msJenkins > TestAtlasObjectXML::Unknown Unit Message ("")
0 msJenkins > TestAtlasObjectXML::Unknown Unit Message ("")
0 msJenkins > TestAtlasObjectXML::Unknown Unit Message ("")
View Full Test Results (1 Failed · 312 Passed)

Event Timeline

Angen created this revision.Aug 3 2018, 10:24 PM
Owners added subscribers: Restricted Owners Package, Restricted Owners Package.Aug 3 2018, 10:24 PM
Vulcan added a subscriber: Vulcan.Aug 3 2018, 10:27 PM

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

Linter detected issues:
Executing section Default...
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TerritoryDecay.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TerritoryDecay.js
| 101| 101| 	if (decaying) {
| 102| 102| 		// Start decaying
| 103| 103| 		let cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer);
| 104|    |-		this.timer = cmpTimer.SetInterval(this.entity, IID_TerritoryDecay, "Decay", 1000, 1000, {"rate": this.GetDecayRate()});
|    | 104|+		this.timer = cmpTimer.SetInterval(this.entity, IID_TerritoryDecay, "Decay", 1000, 1000, { "rate": this.GetDecayRate()});
| 105| 105| 	} else {
| 106| 106| 		// Stop decaying
| 107| 107| 		let cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer);
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TerritoryDecay.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TerritoryDecay.js
| 101| 101| 	if (decaying) {
| 102| 102| 		// Start decaying
| 103| 103| 		let cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer);
| 104|    |-		this.timer = cmpTimer.SetInterval(this.entity, IID_TerritoryDecay, "Decay", 1000, 1000, {"rate": this.GetDecayRate()});
|    | 104|+		this.timer = cmpTimer.SetInterval(this.entity, IID_TerritoryDecay, "Decay", 1000, 1000, {"rate": this.GetDecayRate() });
| 105| 105| 	} else {
| 106| 106| 		// Stop decaying
| 107| 107| 		let cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer);

binaries/data/mods/public/simulation/components/TerritoryDecay.js
| 101| »   if·(decaying)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/components/TerritoryDecay.js
| 101| »   if·(decaying)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/components/TerritoryDecay.js
| 105| »   }·else·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Closing curly brace appears on the same line as the subsequent block.
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Capturable.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Capturable.js
|  18|  18| 	this.cp = [];
|  19|  19| };
|  20|  20| 
|  21|    |-//// Interface functions ////
|    |  21|+// // Interface functions ////
|  22|  22| 
|  23|  23| /**
|  24|  24|  * Returns the current capture points array
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Capturable.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Capturable.js
| 143| 143| 	return sourceEnemyCp > 0;
| 144| 144| };
| 145| 145| 
| 146|    |-//// Private functions ////
|    | 146|+// // Private functions ////
| 147| 147| 
| 148| 148| /**
| 149| 149|  * This has to be called whenever the capture points are changed.
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Capturable.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Capturable.js
| 258| 258| 	Engine.PostMessage(this.entity, MT_CaptureRegenStateChanged, { "regenerating": true, "regenRate": regenRate, "territoryDecay": decay });
| 259| 259| };
| 260| 260| 
| 261|    |-//// Message Listeners ////
|    | 261|+// // Message Listeners ////
| 262| 262| 
| 263| 263| Capturable.prototype.OnValueModification = function(msg)
| 264| 264| {

binaries/data/mods/public/simulation/components/Capturable.js
| 190| »   »   var·garrisonRegenRate·=·0;
|    | [NORMAL] JSHintBear:
|    | 'garrisonRegenRate' is already defined.

binaries/data/mods/public/simulation/components/Capturable.js
| 192| »   return·regenRate·+·garrisonRegenRate;
|    | [NORMAL] JSHintBear:
|    | 'garrisonRegenRate' used out of scope.

binaries/data/mods/public/simulation/helpers/Commands.js
| 900| »   var·ids·=·[·id·for·(id·in·members)·];
|    | [MAJOR] ESLintBear:
|    | Parsing error: Unexpected token for

binaries/data/mods/public/simulation/helpers/Commands.js
|  53| var·g_Commands·=·{
|    | [NORMAL] JSHintBear:
|    | 'g_Commands' was used before it was defined.

binaries/data/mods/public/simulation/helpers/Commands.js
| 541| »   »   »   »   ····&&·player·!=·+cmd.owner)
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/helpers/Commands.js
| 729| »   »   »   »   var·cmpGUIInterface·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_GuiInterface);
|    | [NORMAL] JSHintBear:
|    | 'cmpGUIInterface' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
| 900| »   var·ids·=·[·id·for·(id·in·members)·];
|    | [NORMAL] JSHintBear:
|    | 'array comprehension' is only available in Mozilla JavaScript extensions (use moz option).

binaries/data/mods/public/simulation/helpers/Commands.js
| 900| »   var·ids·=·[·id·for·(id·in·members)·];
|    | [NORMAL] JSHintBear:
|    | Expected 'for' and instead saw 'id'.

binaries/data/mods/public/simulation/helpers/Commands.js
| 950| »   »   for·(var·i·=·0;·i·<·length;·++i)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
| 963| »   »   var·count·=·0;
|    | [NORMAL] JSHintBear:
|    | 'count' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1110| »   »   var·cmpGuiInterface·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_GuiInterface);
|    | [NORMAL] JSHintBear:
|    | 'cmpGuiInterface' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1362| »   »   var·piece·=·pieces[j];
|    | [NORMAL] JSHintBear:
|    | 'piece' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1445| »   »   var·cmpUnitAI·=·Engine.QueryInterface(ent,·IID_UnitAI);
|    | [NORMAL] JSHintBear:
|    | 'cmpUnitAI' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1483| »   »   »   &&·cmpFormation.GetMemberCount()·==·formation.entities.length)
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/helpers/Commands.js
|1509| »   »   »   »   »   var·cmpUnitAI·=·Engine.QueryInterface(ent,·IID_UnitAI);
|    | [NORMAL] JSHintBear:
|    | 'cmpUnitAI' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1542| »   »   »   var·cmpFormation·=·Engine.QueryInterface(formationEnt,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  62|  62| var g_RomanNumbers = [undefined, "I", "II", "III", "IV", "V", "VI", "VII", "VIII"];
|  63|  63| 
|  64|  64| var g_PlayerTeamList = prepareForDropdown([{
|  65|    |-		"label": translateWithContext("team", "None"),
|    |  65|+	"label": translateWithContext("team", "None"),
|  66|  66| 		"id": -1
|  67|  67| 	}].concat(
|  68|  68| 		Array(g_MaxTeams).fill(0).map((v, i) => ({
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  63|  63| 
|  64|  64| var g_PlayerTeamList = prepareForDropdown([{
|  65|  65| 		"label": translateWithContext("team", "None"),
|  66|    |-		"id": -1
|    |  66|+	"id": -1
|  67|  67| 	}].concat(
|  68|  68| 		Array(g_MaxTeams).fill(0).map((v, i) => ({
|  69|  69| 			"label": i + 1,
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 0 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  64|  64| var g_PlayerTeamList = prepareForDropdown([{
|  65|  65| 		"label": translateWithContext("team", "None"),
|  66|  66| 		"id": -1
|  67|    |-	}].concat(
|    |  67|+}].concat(
|  68|  68| 		Array(g_MaxTeams).fill(0).map((v, i) => ({
|  69|  69| 			"label": i + 1,
|  70|  70| 			"id": i
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  65|  65| 		"label": translateWithContext("team", "None"),
|  66|  66| 		"id": -1
|  67|  67| 	}].concat(
|  68|    |-		Array(g_MaxTeams).fill(0).map((v, i) => ({
|    |  68|+	Array(g_MaxTeams).fill(0).map((v, i) => ({
|  69|  69| 			"label": i + 1,
|  70|  70| 			"id": i
|  71|  71| 		}))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  66|  66| 		"id": -1
|  67|  67| 	}].concat(
|  68|  68| 		Array(g_MaxTeams).fill(0).map((v, i) => ({
|  69|    |-			"label": i + 1,
|    |  69|+		"label": i + 1,
|  70|  70| 			"id": i
|  71|  71| 		}))
|  72|  72| 	)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  67|  67| 	}].concat(
|  68|  68| 		Array(g_MaxTeams).fill(0).map((v, i) => ({
|  69|  69| 			"label": i + 1,
|  70|    |-			"id": i
|    |  70|+		"id": i
|  71|  71| 		}))
|  72|  72| 	)
|  73|  73| );
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  68|  68| 		Array(g_MaxTeams).fill(0).map((v, i) => ({
|  69|  69| 			"label": i + 1,
|  70|  70| 			"id": i
|  71|    |-		}))
|    |  71|+	}))
|  72|  72| 	)
|  73|  73| );
|  74|  74| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 0 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  69|  69| 			"label": i + 1,
|  70|  70| 			"id": i
|  71|  71| 		}))
|  72|    |-	)
|    |  72|+)
|  73|  73| );
|  74|  74| 
|  75|  75| /**
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  78|  78| var g_RelicCountList = Object.keys(g_CivData).map((civ, i) => i + 1);
|  79|  79| 
|  80|  80| var g_PlayerCivList = g_CivData && prepareForDropdown([{
|  81|    |-		"name": translateWithContext("civilization", "Random"),
|    |  81|+	"name": translateWithContext("civilization", "Random"),
|  82|  82| 		"tooltip": translate("Picks one civilization at random when the game starts."),
|  83|  83| 		"color": g_ColorRandom,
|  84|  84| 		"code": "random"
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  79|  79| 
|  80|  80| var g_PlayerCivList = g_CivData && prepareForDropdown([{
|  81|  81| 		"name": translateWithContext("civilization", "Random"),
|  82|    |-		"tooltip": translate("Picks one civilization at random when the game starts."),
|    |  82|+	"tooltip": translate("Picks one civilization at random when the game starts."),
|  83|  83| 		"color": g_ColorRandom,
|  84|  84| 		"code": "random"
|  85|  85| 	}].concat(
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  80|  80| var g_PlayerCivList = g_CivData && prepareForDropdown([{
|  81|  81| 		"name": translateWithContext("civilization", "Random"),
|  82|  82| 		"tooltip": translate("Picks one civilization at random when the game starts."),
|  83|    |-		"color": g_ColorRandom,
|    |  83|+	"color": g_ColorRandom,
|  84|  84| 		"code": "random"
|  85|  85| 	}].concat(
|  86|  86| 		Object.keys(g_CivData).filter(
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  81|  81| 		"name": translateWithContext("civilization", "Random"),
|  82|  82| 		"tooltip": translate("Picks one civilization at random when the game starts."),
|  83|  83| 		"color": g_ColorRandom,
|  84|    |-		"code": "random"
|    |  84|+	"code": "random"
|  85|  85| 	}].concat(
|  86|  86| 		Object.keys(g_CivData).filter(
|  87|  87| 			civ => g_CivData[civ].SelectableInGameSetup
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 0 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  82|  82| 		"tooltip": translate("Picks one civilization at random when the game starts."),
|  83|  83| 		"color": g_ColorRandom,
|  84|  84| 		"code": "random"
|  85|    |-	}].concat(
|    |  85|+}].concat(
|  86|  86| 		Object.keys(g_CivData).filter(
|  87|  87| 			civ => g_CivData[civ].SelectableInGameSetup
|  88|  88| 		).map(civ => ({
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  83|  83| 		"color": g_ColorRandom,
|  84|  84| 		"code": "random"
|  85|  85| 	}].concat(
|  86|    |-		Object.keys(g_CivData).filter(
|    |  86|+	Object.keys(g_CivData).filter(
|  87|  87| 			civ => g_CivData[civ].SelectableInGameSetup
|  88|  88| 		).map(civ => ({
|  89|  89| 			"name": g_CivData[civ].Name,
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  84|  84| 		"code": "random"
|  85|  85| 	}].concat(
|  86|  86| 		Object.keys(g_CivData).filter(
|  87|    |-			civ => g_CivData[civ].SelectableInGameSetup
|    |  87|+		civ => g_CivData[civ].SelectableInGameSetup
|  88|  88| 		).map(civ => ({
|  89|  89| 			"name": g_CivData[civ].Name,
|  90|  90| 			"tooltip": g_CivData[civ].History,
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  85|  85| 	}].concat(
|  86|  86| 		Object.keys(g_CivData).filter(
|  87|  87| 			civ => g_CivData[civ].SelectableInGameSetup
|  88|    |-		).map(civ => ({
|    |  88|+	).map(civ => ({
|  89|  89| 			"name": g_CivData[civ].Name,
|  90|  90| 			"tooltip": g_CivData[civ].History,
|  91|  91| 			"color": g_ColorRegular,
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  86|  86| 		Object.keys(g_CivData).filter(
|  87|  87| 			civ => g_CivData[civ].SelectableInGameSetup
|  88|  88| 		).map(civ => ({
|  89|    |-			"name": g_CivData[civ].Name,
|    |  89|+		"name": g_CivData[civ].Name,
|  90|  90| 			"tooltip": g_CivData[civ].History,
|  91|  91| 			"color": g_ColorRegular,
|  92|  92| 			"code": civ
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  87|  87| 			civ => g_CivData[civ].SelectableInGameSetup
|  88|  88| 		).map(civ => ({
|  89|  89| 			"name": g_CivData[civ].Name,
|  90|    |-			"tooltip": g_CivData[civ].History,
|    |  90|+		"tooltip": g_CivData[civ].History,
|  91|  91| 			"color": g_ColorRegular,
|  92|  92| 			"code": civ
|  93|  93| 		})).sort(sortNameIgnoreCase)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  88|  88| 		).map(civ => ({
|  89|  89| 			"name": g_CivData[civ].Name,
|  90|  90| 			"tooltip": g_CivData[civ].History,
|  91|    |-			"color": g_ColorRegular,
|    |  91|+		"color": g_ColorRegular,
|  92|  92| 			"code": civ
|  93|  93| 		})).sort(sortNameIgnoreCase)
|  94|  94| 	)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  89|  89| 			"name": g_CivData[civ].Name,
|  90|  90| 			"tooltip": g_CivData[civ].History,
|  91|  91| 			"color": g_ColorRegular,
|  92|    |-			"code": civ
|    |  92|+		"code": civ
|  93|  93| 		})).sort(sortNameIgnoreCase)
|  94|  94| 	)
|  95|  95| );
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  90|  90| 			"tooltip": g_CivData[civ].History,
|  91|  91| 			"color": g_ColorRegular,
|  92|  92| 			"code": civ
|  93|    |-		})).sort(sortNameIgnoreCase)
|    |  93|+	})).sort(sortNameIgnoreCase)
|  94|  94| 	)
|  95|  95| );
|  96|  96| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 0 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  91|  91| 			"color": g_ColorRegular,
|  92|  92| 			"code": civ
|  93|  93| 		})).sort(sortNameIgnoreCase)
|  94|    |-	)
|    |  94|+)
|  95|  95| );
|  96|  96| 
|  97|  97| /**
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'enabled'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
| 958| 958| 			"set": checked => {
| 959| 959| 				g_GameAttributes.settings.Capturable = checked;
| 960| 960| 			},
| 961|    |-			"enabled":() => true,
|    | 961|+			"enabled": () => true,
| 962| 962| 			"initOrder": 1000
| 963| 963| 		},
| 964| 964| 		"enableCheats": {
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|1146|1146| 		translate("%(hotkey_civinfo)s / %(hotkey_structree)s: View History / Structure Tree\nLast opened will be reopened on click."), {
|1147|1147| 			"hotkey_civinfo": colorizeHotkey("%(hotkey)s", "civinfo"),
|1148|1148| 			"hotkey_structree": colorizeHotkey("%(hotkey)s", "structree")
|1149|    |-	});
|    |1149|+		});
|1150|1150| }
|1151|1151| 
|1152|1152| function initDefaults()
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|1240|1240| 			offset = -Math.min(slideSpeed * dt, maxOffset);
|1241|1241| 	}
|1242|1242| 
|1243|    |-	updateSettingsPanelPosition(offset);	
|    |1243|+	updateSettingsPanelPosition(offset);
|1244|1244| }
|1245|1245| 
|1246|1246| /**
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|1771|1771| 	let biomeList;
|1772|1772| 
|1773|1773| 	if (g_GameAttributes.mapType == "random" && g_GameAttributes.settings.SupportedBiomes)
|1774|    |-	{
|    |1774|+	
|1775|1775| 		if (typeof g_GameAttributes.settings.SupportedBiomes == "string")
|1776|1776| 			biomeList = g_Settings.Biomes.filter(biome => biome.Id.startsWith(g_GameAttributes.settings.SupportedBiomes));
|1777|1777| 		else
|1778|1778| 			biomeList = g_Settings.Biomes.filter(
|1779|1779| 				biome => g_GameAttributes.settings.SupportedBiomes.indexOf(biome.Id) != -1);
|1780|    |-	}
|    |1780|+	
|1781|1781| 
|1782|1782| 	g_BiomeList = biomeList && prepareForDropdown(
|1783|1783| 		[{

binaries/data/mods/public/gui/gamesetup/gamesetup.js
|2015| »   while·(g_IsNetworked)
|    | [NORMAL] ESLintBear (no-unmodified-loop-condition):
|    | 'g_IsNetworked' is not modified in this loop.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|  96|  96| 
|  97|  97| 		let playerDescription;
|  98|  98| 		if (isAI)
|  99|    |-		{
|    |  99|+		
| 100| 100| 			if (playerData.Civ)
| 101| 101| 			{
| 102| 102| 				if (isActive)
| 115| 115| 					// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 116| 116| 					playerDescription = translate("%(playerName)s (%(AIdescription)s, %(state)s)");
| 117| 117| 			}
| 118|    |-		}
|    | 118|+		
| 119| 119| 		else
| 120| 120| 		{
| 121| 121| 			if (playerData.Offline)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|  98|  98| 		if (isAI)
|  99|  99| 		{
| 100| 100| 			if (playerData.Civ)
| 101|    |-			{
|    | 101|+			
| 102| 102| 				if (isActive)
| 103| 103| 					// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 104| 104| 					playerDescription = translate("%(playerName)s (%(civ)s, %(AIdescription)s)");
| 105| 105| 				else
| 106| 106| 					// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 107| 107| 					playerDescription = translate("%(playerName)s (%(civ)s, %(AIdescription)s, %(state)s)");
| 108|    |-			}
|    | 108|+			
| 109| 109| 			else
| 110| 110| 			{
| 111| 111| 				if (isActive)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 107| 107| 					playerDescription = translate("%(playerName)s (%(civ)s, %(AIdescription)s, %(state)s)");
| 108| 108| 			}
| 109| 109| 			else
| 110|    |-			{
|    | 110|+			
| 111| 111| 				if (isActive)
| 112| 112| 					// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 113| 113| 					playerDescription = translate("%(playerName)s (%(AIdescription)s)");
| 114| 114| 				else
| 115| 115| 					// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 116| 116| 					playerDescription = translate("%(playerName)s (%(AIdescription)s, %(state)s)");
| 117|    |-			}
|    | 117|+			
| 118| 118| 		}
| 119| 119| 		else
| 120| 120| 		{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 117| 117| 			}
| 118| 118| 		}
| 119| 119| 		else
| 120|    |-		{
|    | 120|+		
| 121| 121| 			if (playerData.Offline)
| 122| 122| 			{
| 123| 123| 				// Can only occur in the lobby for now, so no strings with civ needed
| 145| 145| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 146| 146| 						playerDescription = translate("%(playerName)s (%(state)s)");
| 147| 147| 			}
| 148|    |-		}
|    | 148|+		
| 149| 149| 
| 150| 150| 		// Sort player descriptions by team
| 151| 151| 		if (!playerDescriptions[teamIdx])
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 119| 119| 		else
| 120| 120| 		{
| 121| 121| 			if (playerData.Offline)
| 122|    |-			{
|    | 122|+			
| 123| 123| 				// Can only occur in the lobby for now, so no strings with civ needed
| 124| 124| 				if (isActive)
| 125| 125| 					// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 127| 127| 				else
| 128| 128| 					// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 129| 129| 					playerDescription = translate("%(playerName)s (OFFLINE, %(state)s)");
| 130|    |-			}
|    | 130|+			
| 131| 131| 			else
| 132| 132| 			{
| 133| 133| 				if (playerData.Civ)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 129| 129| 					playerDescription = translate("%(playerName)s (OFFLINE, %(state)s)");
| 130| 130| 			}
| 131| 131| 			else
| 132|    |-			{
|    | 132|+			
| 133| 133| 				if (playerData.Civ)
| 134| 134| 					if (isActive)
| 135| 135| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 144| 144| 					else
| 145| 145| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 146| 146| 						playerDescription = translate("%(playerName)s (%(state)s)");
| 147|    |-			}
|    | 147|+			
| 148| 148| 		}
| 149| 149| 
| 150| 150| 		// Sort player descriptions by team
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 138| 138| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 139| 139| 						playerDescription = translate("%(playerName)s (%(civ)s, %(state)s)");
| 140| 140| 				else
| 141|    |-					if (isActive)
|    | 141|+				if (isActive)
| 142| 142| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 143| 143| 						playerDescription = translate("%(playerName)s");
| 144| 144| 					else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 139| 139| 						playerDescription = translate("%(playerName)s (%(civ)s, %(state)s)");
| 140| 140| 				else
| 141| 141| 					if (isActive)
| 142|    |-						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
|    | 142|+				// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 143| 143| 						playerDescription = translate("%(playerName)s");
| 144| 144| 					else
| 145| 145| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 140| 140| 				else
| 141| 141| 					if (isActive)
| 142| 142| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 143|    |-						playerDescription = translate("%(playerName)s");
|    | 143|+					playerDescription = translate("%(playerName)s");
| 144| 144| 					else
| 145| 145| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 146| 146| 						playerDescription = translate("%(playerName)s (%(state)s)");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 141| 141| 					if (isActive)
| 142| 142| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 143| 143| 						playerDescription = translate("%(playerName)s");
| 144|    |-					else
|    | 144|+				else
| 145| 145| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 146| 146| 						playerDescription = translate("%(playerName)s (%(state)s)");
| 147| 147| 			}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 142| 142| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 143| 143| 						playerDescription = translate("%(playerName)s");
| 144| 144| 					else
| 145|    |-						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
|    | 145|+				// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 146| 146| 						playerDescription = translate("%(playerName)s (%(state)s)");
| 147| 147| 			}
| 148| 148| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 143| 143| 						playerDescription = translate("%(playerName)s");
| 144| 144| 					else
| 145| 145| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 146|    |-						playerDescription = translate("%(playerName)s (%(state)s)");
|    | 146|+					playerDescription = translate("%(playerName)s (%(state)s)");
| 147| 147| 			}
| 148| 148| 		}
| 149| 149| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 333| 333| 		titles.push({
| 334| 334| 			"label": translate("Map Description"),
| 335| 335| 			"value": g_GameAttributes.settings.Description ?
| 336|    |-					translate(g_GameAttributes.settings.Description) :
|    | 336|+				translate(g_GameAttributes.settings.Description) :
| 337| 337| 					translate("Sorry, no description available.")
| 338| 338| 		});
| 339| 339| 	}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 334| 334| 			"label": translate("Map Description"),
| 335| 335| 			"value": g_GameAttributes.settings.Description ?
| 336| 336| 					translate(g_GameAttributes.settings.Description) :
| 337|    |-					translate("Sorry, no description available.")
|    | 337|+				translate("Sorry, no description available.")
| 338| 338| 		});
| 339| 339| 	}
| 340| 340| 

binaries/data/mods/public/gui/common/gamedescription.js
| 373| »   »   let·difficulty·=·g_Settings.TriggerDifficulties.find(difficulty·=>·difficulty.Difficulty·==·g_GameAttributes.settings.TriggerDifficulty);
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'difficulty' is already declared in the upper scope.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-in'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
|  52|  52| 		}
|  53|  53| 	}
|  54|  54| 	for (let enemy in attackingArmies)
|  55|    |-	{
|    |  55|+	
|  56|  56| 		for (let ally in attackingArmies[enemy])
|  57|  57| 		{
|  58|  58| 			if (this.attackedAllies[ally] === undefined)
|  59|  59| 				this.attackedAllies[ally] = 0;
|  60|  60| 			this.attackedAllies[ally] += 1;
|  61|  61| 		}
|  62|    |-	}
|    |  62|+	
|  63|  63| 	this.checkEnemyArmies(gameState);
|  64|  64| 	this.checkEnemyUnits(gameState);
|  65|  65| 	this.assignDefenders(gameState);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
|  70|  70| m.DefenseManager.prototype.makeIntoArmy = function(gameState, entityID, type = "default")
|  71|  71| {
|  72|  72| 	if (type == "default")
|  73|    |-	{
|    |  73|+	
|  74|  74| 		// Try to add it to an existing army.
|  75|  75| 		for (let army of this.armies)
|  76|  76| 			if (army.getType() == type && army.addFoe(gameState, entityID))
|  77|  77| 				return;	// over
|  78|    |-	}
|    |  78|+	
|  79|  79| 
|  80|  80| 	// Create a new army for it.
|  81|  81| 	let army = new m.DefenseArmy(gameState, [entityID], type);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
| 179| 179| 		if (territoryOwner != PlayerID && this.attackedAllies[territoryOwner] &&
| 180| 180| 		                                  this.attackedAllies[territoryOwner] > 1 &&
| 181| 181| 		                                  this.GetCooperationLevel(territoryOwner) > 0.7)
| 182|    |-		{
|    | 182|+		
| 183| 183| 			for (let building of gameState.getAllyStructures(territoryOwner).values())
| 184| 184| 			{
| 185| 185| 				if (building.foundationProgress() == 0 ||
| 188| 188| 				if (!this.territoryMap.isBlinking(building.position()))
| 189| 189| 					return true;
| 190| 190| 			}
| 191|    |-		}
|    | 191|+		
| 192| 192| 
| 193| 193| 		// Update the number of enemies attacking this ally
| 194| 194| 		let enemy = entity.owner();
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
| 211| 211| 	if (i == PlayerID)
| 212| 212| 	{
| 213| 213| 		if (!this.armies.length)
| 214|    |-		{
|    | 214|+		
| 215| 215| 			// check if we can recover capture points from any of our notdecaying structures
| 216| 216| 			for (let ent of gameState.getOwnStructures().values())
| 217| 217| 			{
| 231| 231| 				this.makeIntoArmy(gameState, ent.id(), "capturing");
| 232| 232| 				break;
| 233| 233| 			}
| 234|    |-		}
|    | 234|+		
| 235| 235| 		return;
| 236| 236| 	}
| 237| 237| 	else if (!gameState.isPlayerEnemy(i))
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
| 330| 330| 		if (!gameState.isPlayerEnemy(owner))
| 331| 331| 		{
| 332| 332| 			if (gameState.isPlayerMutualAlly(owner))
| 333|    |-			{
|    | 333|+			
| 334| 334| 				// update the number of enemies attacking this ally
| 335| 335| 				for (let id of army.foeEntities)
| 336| 336| 				{
| 345| 345| 					this.attackingArmies[enemy][owner] += 1;
| 346| 346| 					break;
| 347| 347| 				}
| 348|    |-			}
|    | 348|+			
| 349| 349| 			continue;
| 350| 350| 		}
| 351| 351| 		else if (owner != 0)   // enemy army back in its territory
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-of'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
| 532| 532| 		army.checkEvents(gameState, events);
| 533| 533| 
| 534| 534| 	for (let evt of events.OwnershipChanged)   // capture events
| 535|    |-	{
|    | 535|+	
| 536| 536| 		if (gameState.isPlayerMutualAlly(evt.from) && evt.to > 0)
| 537| 537| 		{
| 538| 538| 			let ent = gameState.getEntityById(evt.entity);
| 539| 539| 			if (ent && ent.hasClass("CivCentre")) // one of our cc has been captured
| 540| 540| 				gameState.ai.HQ.attackManager.switchDefenseToAttack(gameState, ent, { "range": 150 });
| 541| 541| 		}
| 542|    |-	}
|    | 542|+	
| 543| 543| 
| 544| 544| 	let allAttacked = {};
| 545| 545| 	for (let evt of events.Attacked)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
| 554| 554| 		let attacker = gameState.getEntityById(evt.attacker);
| 555| 555| 		if (attacker && gameState.isEntityOwn(attacker) && gameState.isEntityEnemy(target) && !attacker.hasClass("Ship") &&
| 556| 556| 		   (!target.hasClass("Structure") || target.attackRange("Ranged")))
| 557|    |-		{
|    | 557|+		
| 558| 558| 			// If enemies are in range of one of our defensive structures, garrison it for arrow multiplier
| 559| 559| 			// (enemy non-defensive structure are not considered to stay in sync with garrisonManager)
| 560| 560| 			if (attacker.position() && attacker.isGarrisonHolder() && attacker.getArrowMultiplier() &&
| 561| 561| 			    (target.owner() != 0 || !target.hasClass("Unit") ||
| 562| 562| 			     target.unitAIState() && target.unitAIState().split(".")[1] == "COMBAT"))
| 563| 563| 				this.garrisonUnitsInside(gameState, attacker, { "attacker": target });
| 564|    |-		}
|    | 564|+		
| 565| 565| 
| 566| 566| 		if (!gameState.isEntityOwn(target))
| 567| 567| 			continue;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
| 758| 758| 	let typeGarrison = data.type || "protection";
| 759| 759| 	let allowMelee = gameState.ai.HQ.garrisonManager.allowMelee(target);
| 760| 760| 	if (allowMelee === undefined)
| 761|    |-	{
|    | 761|+	
| 762| 762| 		// Should be kept in sync with garrisonManager to avoid garrisoning-ungarrisoning some units
| 763| 763| 		if (data.attacker)
| 764| 764| 			allowMelee = data.attacker.hasClass("Structure") ? data.attacker.attackRange("Ranged") : !m.isSiegeUnit(data.attacker);
| 765| 765| 		else
| 766| 766| 			allowMelee = true;
| 767|    |-	}
|    | 767|+	
| 768| 768| 	let units = gameState.getOwnUnits().filter(ent => {
| 769| 769| 		if (!ent.position())
| 770| 770| 			return false;

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

Angen updated this revision to Diff 6840.Aug 3 2018, 11:55 PM

missing files

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

Linter detected issues:
Executing section Default...
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/CaptureManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/CaptureManager.js
|   5|   5| 	this.allowedCapturing = true;
|   6|   6| 	this.wonderVictory = false;
|   7|   7| 	this.relicVictory = false;
|   8|    |-}
|    |   8|+};
|   9|   9| 
|  10|  10| CaptureManager.prototype.IsCapturingAllowed = function(entity)
|  11|  11| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/CaptureManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/CaptureManager.js
|  26|  26| 			return true;
|  27|  27| 	}
|  28|  28| 	return this.allowedCapturing;
|  29|    |-}
|    |  29|+};
|  30|  30| 
|  31|  31| CaptureManager.prototype.SetCapturableGame = function(allowedCapturing)
|  32|  32| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/CaptureManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/CaptureManager.js
|  31|  31| CaptureManager.prototype.SetCapturableGame = function(allowedCapturing)
|  32|  32| {
|  33|  33| 	this.allowedCapturing = allowedCapturing;
|  34|    |-}
|    |  34|+};
|  35|  35| 
|  36|  36| CaptureManager.prototype.SetWonderVictory = function(wonderVictory)
|  37|  37| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/CaptureManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/CaptureManager.js
|  36|  36| CaptureManager.prototype.SetWonderVictory = function(wonderVictory)
|  37|  37| {
|  38|  38| 	this.wonderVictory = wonderVictory;
|  39|    |-}
|    |  39|+};
|  40|  40| 
|  41|  41| CaptureManager.prototype.SetRelicVictory = function(relicVictory)
|  42|  42| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/CaptureManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/CaptureManager.js
|  41|  41| CaptureManager.prototype.SetRelicVictory = function(relicVictory)
|  42|  42| {
|  43|  43| 	this.relicVictory = relicVictory;
|  44|    |-}
|    |  44|+};
|  45|  45| 
|  46|  46| Engine.RegisterSystemComponentType(IID_CaptureManager, "CaptureManager", CaptureManager);

binaries/data/mods/public/simulation/components/CaptureManager.js
|  18| »   if·(this.relicVictory)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/components/CaptureManager.js
|  23| »   if·(this.wonderVictory)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/components/CaptureManager.js
|   8| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/CaptureManager.js
|  29| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/CaptureManager.js
|  34| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/CaptureManager.js
|  39| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/CaptureManager.js
|  44| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TerritoryDecay.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TerritoryDecay.js
| 101| 101| 	if (decaying) {
| 102| 102| 		// Start decaying
| 103| 103| 		let cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer);
| 104|    |-		this.timer = cmpTimer.SetInterval(this.entity, IID_TerritoryDecay, "Decay", 1000, 1000, {"rate": this.GetDecayRate()});
|    | 104|+		this.timer = cmpTimer.SetInterval(this.entity, IID_TerritoryDecay, "Decay", 1000, 1000, { "rate": this.GetDecayRate()});
| 105| 105| 	} else {
| 106| 106| 		// Stop decaying
| 107| 107| 		let cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer);
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TerritoryDecay.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TerritoryDecay.js
| 101| 101| 	if (decaying) {
| 102| 102| 		// Start decaying
| 103| 103| 		let cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer);
| 104|    |-		this.timer = cmpTimer.SetInterval(this.entity, IID_TerritoryDecay, "Decay", 1000, 1000, {"rate": this.GetDecayRate()});
|    | 104|+		this.timer = cmpTimer.SetInterval(this.entity, IID_TerritoryDecay, "Decay", 1000, 1000, {"rate": this.GetDecayRate() });
| 105| 105| 	} else {
| 106| 106| 		// Stop decaying
| 107| 107| 		let cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer);

binaries/data/mods/public/simulation/components/TerritoryDecay.js
| 101| »   if·(decaying)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/components/TerritoryDecay.js
| 101| »   if·(decaying)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/components/TerritoryDecay.js
| 105| »   }·else·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Closing curly brace appears on the same line as the subsequent block.
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Capturable.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Capturable.js
|  18|  18| 	this.cp = [];
|  19|  19| };
|  20|  20| 
|  21|    |-//// Interface functions ////
|    |  21|+// // Interface functions ////
|  22|  22| 
|  23|  23| /**
|  24|  24|  * Returns the current capture points array
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Capturable.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Capturable.js
| 143| 143| 	return sourceEnemyCp > 0;
| 144| 144| };
| 145| 145| 
| 146|    |-//// Private functions ////
|    | 146|+// // Private functions ////
| 147| 147| 
| 148| 148| /**
| 149| 149|  * This has to be called whenever the capture points are changed.
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Capturable.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Capturable.js
| 258| 258| 	Engine.PostMessage(this.entity, MT_CaptureRegenStateChanged, { "regenerating": true, "regenRate": regenRate, "territoryDecay": decay });
| 259| 259| };
| 260| 260| 
| 261|    |-//// Message Listeners ////
|    | 261|+// // Message Listeners ////
| 262| 262| 
| 263| 263| Capturable.prototype.OnValueModification = function(msg)
| 264| 264| {

binaries/data/mods/public/simulation/components/Capturable.js
| 190| »   »   var·garrisonRegenRate·=·0;
|    | [NORMAL] JSHintBear:
|    | 'garrisonRegenRate' is already defined.

binaries/data/mods/public/simulation/components/Capturable.js
| 192| »   return·regenRate·+·garrisonRegenRate;
|    | [NORMAL] JSHintBear:
|    | 'garrisonRegenRate' used out of scope.

binaries/data/mods/public/simulation/helpers/Commands.js
| 900| »   var·ids·=·[·id·for·(id·in·members)·];
|    | [MAJOR] ESLintBear:
|    | Parsing error: Unexpected token for

binaries/data/mods/public/simulation/helpers/Commands.js
|  53| var·g_Commands·=·{
|    | [NORMAL] JSHintBear:
|    | 'g_Commands' was used before it was defined.

binaries/data/mods/public/simulation/helpers/Commands.js
| 541| »   »   »   »   ····&&·player·!=·+cmd.owner)
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/helpers/Commands.js
| 729| »   »   »   »   var·cmpGUIInterface·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_GuiInterface);
|    | [NORMAL] JSHintBear:
|    | 'cmpGUIInterface' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
| 900| »   var·ids·=·[·id·for·(id·in·members)·];
|    | [NORMAL] JSHintBear:
|    | 'array comprehension' is only available in Mozilla JavaScript extensions (use moz option).

binaries/data/mods/public/simulation/helpers/Commands.js
| 900| »   var·ids·=·[·id·for·(id·in·members)·];
|    | [NORMAL] JSHintBear:
|    | Expected 'for' and instead saw 'id'.

binaries/data/mods/public/simulation/helpers/Commands.js
| 950| »   »   for·(var·i·=·0;·i·<·length;·++i)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
| 963| »   »   var·count·=·0;
|    | [NORMAL] JSHintBear:
|    | 'count' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1110| »   »   var·cmpGuiInterface·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_GuiInterface);
|    | [NORMAL] JSHintBear:
|    | 'cmpGuiInterface' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1362| »   »   var·piece·=·pieces[j];
|    | [NORMAL] JSHintBear:
|    | 'piece' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1445| »   »   var·cmpUnitAI·=·Engine.QueryInterface(ent,·IID_UnitAI);
|    | [NORMAL] JSHintBear:
|    | 'cmpUnitAI' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1483| »   »   »   &&·cmpFormation.GetMemberCount()·==·formation.entities.length)
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/helpers/Commands.js
|1509| »   »   »   »   »   var·cmpUnitAI·=·Engine.QueryInterface(ent,·IID_UnitAI);
|    | [NORMAL] JSHintBear:
|    | 'cmpUnitAI' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1542| »   »   »   var·cmpFormation·=·Engine.QueryInterface(formationEnt,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-in'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
|  52|  52| 		}
|  53|  53| 	}
|  54|  54| 	for (let enemy in attackingArmies)
|  55|    |-	{
|    |  55|+	
|  56|  56| 		for (let ally in attackingArmies[enemy])
|  57|  57| 		{
|  58|  58| 			if (this.attackedAllies[ally] === undefined)
|  59|  59| 				this.attackedAllies[ally] = 0;
|  60|  60| 			this.attackedAllies[ally] += 1;
|  61|  61| 		}
|  62|    |-	}
|    |  62|+	
|  63|  63| 	this.checkEnemyArmies(gameState);
|  64|  64| 	this.checkEnemyUnits(gameState);
|  65|  65| 	this.assignDefenders(gameState);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
|  70|  70| m.DefenseManager.prototype.makeIntoArmy = function(gameState, entityID, type = "default")
|  71|  71| {
|  72|  72| 	if (type == "default")
|  73|    |-	{
|    |  73|+	
|  74|  74| 		// Try to add it to an existing army.
|  75|  75| 		for (let army of this.armies)
|  76|  76| 			if (army.getType() == type && army.addFoe(gameState, entityID))
|  77|  77| 				return;	// over
|  78|    |-	}
|    |  78|+	
|  79|  79| 
|  80|  80| 	// Create a new army for it.
|  81|  81| 	let army = new m.DefenseArmy(gameState, [entityID], type);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
| 179| 179| 		if (territoryOwner != PlayerID && this.attackedAllies[territoryOwner] &&
| 180| 180| 		                                  this.attackedAllies[territoryOwner] > 1 &&
| 181| 181| 		                                  this.GetCooperationLevel(territoryOwner) > 0.7)
| 182|    |-		{
|    | 182|+		
| 183| 183| 			for (let building of gameState.getAllyStructures(territoryOwner).values())
| 184| 184| 			{
| 185| 185| 				if (building.foundationProgress() == 0 ||
| 188| 188| 				if (!this.territoryMap.isBlinking(building.position()))
| 189| 189| 					return true;
| 190| 190| 			}
| 191|    |-		}
|    | 191|+		
| 192| 192| 
| 193| 193| 		// Update the number of enemies attacking this ally
| 194| 194| 		let enemy = entity.owner();
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
| 211| 211| 	if (i == PlayerID)
| 212| 212| 	{
| 213| 213| 		if (!this.armies.length)
| 214|    |-		{
|    | 214|+		
| 215| 215| 			// check if we can recover capture points from any of our notdecaying structures
| 216| 216| 			for (let ent of gameState.getOwnStructures().values())
| 217| 217| 			{
| 231| 231| 				this.makeIntoArmy(gameState, ent.id(), "capturing");
| 232| 232| 				break;
| 233| 233| 			}
| 234|    |-		}
|    | 234|+		
| 235| 235| 		return;
| 236| 236| 	}
| 237| 237| 	else if (!gameState.isPlayerEnemy(i))
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
| 330| 330| 		if (!gameState.isPlayerEnemy(owner))
| 331| 331| 		{
| 332| 332| 			if (gameState.isPlayerMutualAlly(owner))
| 333|    |-			{
|    | 333|+			
| 334| 334| 				// update the number of enemies attacking this ally
| 335| 335| 				for (let id of army.foeEntities)
| 336| 336| 				{
| 345| 345| 					this.attackingArmies[enemy][owner] += 1;
| 346| 346| 					break;
| 347| 347| 				}
| 348|    |-			}
|    | 348|+			
| 349| 349| 			continue;
| 350| 350| 		}
| 351| 351| 		else if (owner != 0)   // enemy army back in its territory
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-of'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
| 532| 532| 		army.checkEvents(gameState, events);
| 533| 533| 
| 534| 534| 	for (let evt of events.OwnershipChanged)   // capture events
| 535|    |-	{
|    | 535|+	
| 536| 536| 		if (gameState.isPlayerMutualAlly(evt.from) && evt.to > 0)
| 537| 537| 		{
| 538| 538| 			let ent = gameState.getEntityById(evt.entity);
| 539| 539| 			if (ent && ent.hasClass("CivCentre")) // one of our cc has been captured
| 540| 540| 				gameState.ai.HQ.attackManager.switchDefenseToAttack(gameState, ent, { "range": 150 });
| 541| 541| 		}
| 542|    |-	}
|    | 542|+	
| 543| 543| 
| 544| 544| 	let allAttacked = {};
| 545| 545| 	for (let evt of events.Attacked)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
| 554| 554| 		let attacker = gameState.getEntityById(evt.attacker);
| 555| 555| 		if (attacker && gameState.isEntityOwn(attacker) && gameState.isEntityEnemy(target) && !attacker.hasClass("Ship") &&
| 556| 556| 		   (!target.hasClass("Structure") || target.attackRange("Ranged")))
| 557|    |-		{
|    | 557|+		
| 558| 558| 			// If enemies are in range of one of our defensive structures, garrison it for arrow multiplier
| 559| 559| 			// (enemy non-defensive structure are not considered to stay in sync with garrisonManager)
| 560| 560| 			if (attacker.position() && attacker.isGarrisonHolder() && attacker.getArrowMultiplier() &&
| 561| 561| 			    (target.owner() != 0 || !target.hasClass("Unit") ||
| 562| 562| 			     target.unitAIState() && target.unitAIState().split(".")[1] == "COMBAT"))
| 563| 563| 				this.garrisonUnitsInside(gameState, attacker, { "attacker": target });
| 564|    |-		}
|    | 564|+		
| 565| 565| 
| 566| 566| 		if (!gameState.isEntityOwn(target))
| 567| 567| 			continue;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
| 758| 758| 	let typeGarrison = data.type || "protection";
| 759| 759| 	let allowMelee = gameState.ai.HQ.garrisonManager.allowMelee(target);
| 760| 760| 	if (allowMelee === undefined)
| 761|    |-	{
|    | 761|+	
| 762| 762| 		// Should be kept in sync with garrisonManager to avoid garrisoning-ungarrisoning some units
| 763| 763| 		if (data.attacker)
| 764| 764| 			allowMelee = data.attacker.hasClass("Structure") ? data.attacker.attackRange("Ranged") : !m.isSiegeUnit(data.attacker);
| 765| 765| 		else
| 766| 766| 			allowMelee = true;
| 767|    |-	}
|    | 767|+	
| 768| 768| 	let units = gameState.getOwnUnits().filter(ent => {
| 769| 769| 		if (!ent.position())
| 770| 770| 			return false;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|  96|  96| 
|  97|  97| 		let playerDescription;
|  98|  98| 		if (isAI)
|  99|    |-		{
|    |  99|+		
| 100| 100| 			if (playerData.Civ)
| 101| 101| 			{
| 102| 102| 				if (isActive)
| 115| 115| 					// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 116| 116| 					playerDescription = translate("%(playerName)s (%(AIdescription)s, %(state)s)");
| 117| 117| 			}
| 118|    |-		}
|    | 118|+		
| 119| 119| 		else
| 120| 120| 		{
| 121| 121| 			if (playerData.Offline)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|  98|  98| 		if (isAI)
|  99|  99| 		{
| 100| 100| 			if (playerData.Civ)
| 101|    |-			{
|    | 101|+			
| 102| 102| 				if (isActive)
| 103| 103| 					// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 104| 104| 					playerDescription = translate("%(playerName)s (%(civ)s, %(AIdescription)s)");
| 105| 105| 				else
| 106| 106| 					// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 107| 107| 					playerDescription = translate("%(playerName)s (%(civ)s, %(AIdescription)s, %(state)s)");
| 108|    |-			}
|    | 108|+			
| 109| 109| 			else
| 110| 110| 			{
| 111| 111| 				if (isActive)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 107| 107| 					playerDescription = translate("%(playerName)s (%(civ)s, %(AIdescription)s, %(state)s)");
| 108| 108| 			}
| 109| 109| 			else
| 110|    |-			{
|    | 110|+			
| 111| 111| 				if (isActive)
| 112| 112| 					// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 113| 113| 					playerDescription = translate("%(playerName)s (%(AIdescription)s)");
| 114| 114| 				else
| 115| 115| 					// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 116| 116| 					playerDescription = translate("%(playerName)s (%(AIdescription)s, %(state)s)");
| 117|    |-			}
|    | 117|+			
| 118| 118| 		}
| 119| 119| 		else
| 120| 120| 		{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 117| 117| 			}
| 118| 118| 		}
| 119| 119| 		else
| 120|    |-		{
|    | 120|+		
| 121| 121| 			if (playerData.Offline)
| 122| 122| 			{
| 123| 123| 				// Can only occur in the lobby for now, so no strings with civ needed
| 145| 145| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 146| 146| 						playerDescription = translate("%(playerName)s (%(state)s)");
| 147| 147| 			}
| 148|    |-		}
|    | 148|+		
| 149| 149| 
| 150| 150| 		// Sort player descriptions by team
| 151| 151| 		if (!playerDescriptions[teamIdx])
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 119| 119| 		else
| 120| 120| 		{
| 121| 121| 			if (playerData.Offline)
| 122|    |-			{
|    | 122|+			
| 123| 123| 				// Can only occur in the lobby for now, so no strings with civ needed
| 124| 124| 				if (isActive)
| 125| 125| 					// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 127| 127| 				else
| 128| 128| 					// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 129| 129| 					playerDescription = translate("%(playerName)s (OFFLINE, %(state)s)");
| 130|    |-			}
|    | 130|+			
| 131| 131| 			else
| 132| 132| 			{
| 133| 133| 				if (playerData.Civ)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 129| 129| 					playerDescription = translate("%(playerName)s (OFFLINE, %(state)s)");
| 130| 130| 			}
| 131| 131| 			else
| 132|    |-			{
|    | 132|+			
| 133| 133| 				if (playerData.Civ)
| 134| 134| 					if (isActive)
| 135| 135| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 144| 144| 					else
| 145| 145| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 146| 146| 						playerDescription = translate("%(playerName)s (%(state)s)");
| 147|    |-			}
|    | 147|+			
| 148| 148| 		}
| 149| 149| 
| 150| 150| 		// Sort player descriptions by team
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 138| 138| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 139| 139| 						playerDescription = translate("%(playerName)s (%(civ)s, %(state)s)");
| 140| 140| 				else
| 141|    |-					if (isActive)
|    | 141|+				if (isActive)
| 142| 142| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 143| 143| 						playerDescription = translate("%(playerName)s");
| 144| 144| 					else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 139| 139| 						playerDescription = translate("%(playerName)s (%(civ)s, %(state)s)");
| 140| 140| 				else
| 141| 141| 					if (isActive)
| 142|    |-						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
|    | 142|+				// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 143| 143| 						playerDescription = translate("%(playerName)s");
| 144| 144| 					else
| 145| 145| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 140| 140| 				else
| 141| 141| 					if (isActive)
| 142| 142| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 143|    |-						playerDescription = translate("%(playerName)s");
|    | 143|+					playerDescription = translate("%(playerName)s");
| 144| 144| 					else
| 145| 145| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 146| 146| 						playerDescription = translate("%(playerName)s (%(state)s)");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 141| 141| 					if (isActive)
| 142| 142| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 143| 143| 						playerDescription = translate("%(playerName)s");
| 144|    |-					else
|    | 144|+				else
| 145| 145| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 146| 146| 						playerDescription = translate("%(playerName)s (%(state)s)");
| 147| 147| 			}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 142| 142| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 143| 143| 						playerDescription = translate("%(playerName)s");
| 144| 144| 					else
| 145|    |-						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
|    | 145|+				// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 146| 146| 						playerDescription = translate("%(playerName)s (%(state)s)");
| 147| 147| 			}
| 148| 148| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 143| 143| 						playerDescription = translate("%(playerName)s");
| 144| 144| 					else
| 145| 145| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 146|    |-						playerDescription = translate("%(playerName)s (%(state)s)");
|    | 146|+					playerDescription = translate("%(playerName)s (%(state)s)");
| 147| 147| 			}
| 148| 148| 		}
| 149| 149| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 333| 333| 		titles.push({
| 334| 334| 			"label": translate("Map Description"),
| 335| 335| 			"value": g_GameAttributes.settings.Description ?
| 336|    |-					translate(g_GameAttributes.settings.Description) :
|    | 336|+				translate(g_GameAttributes.settings.Description) :
| 337| 337| 					translate("Sorry, no description available.")
| 338| 338| 		});
| 339| 339| 	}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 334| 334| 			"label": translate("Map Description"),
| 335| 335| 			"value": g_GameAttributes.settings.Description ?
| 336| 336| 					translate(g_GameAttributes.settings.Description) :
| 337|    |-					translate("Sorry, no description available.")
|    | 337|+				translate("Sorry, no description available.")
| 338| 338| 		});
| 339| 339| 	}
| 340| 340| 

binaries/data/mods/public/gui/common/gamedescription.js
| 373| »   »   let·difficulty·=·g_Settings.TriggerDifficulties.find(difficulty·=>·difficulty.Difficulty·==·g_GameAttributes.settings.TriggerDifficulty);
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'difficulty' is already declared in the upper scope.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  62|  62| var g_RomanNumbers = [undefined, "I", "II", "III", "IV", "V", "VI", "VII", "VIII"];
|  63|  63| 
|  64|  64| var g_PlayerTeamList = prepareForDropdown([{
|  65|    |-		"label": translateWithContext("team", "None"),
|    |  65|+	"label": translateWithContext("team", "None"),
|  66|  66| 		"id": -1
|  67|  67| 	}].concat(
|  68|  68| 		Array(g_MaxTeams).fill(0).map((v, i) => ({
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  63|  63| 
|  64|  64| var g_PlayerTeamList = prepareForDropdown([{
|  65|  65| 		"label": translateWithContext("team", "None"),
|  66|    |-		"id": -1
|    |  66|+	"id": -1
|  67|  67| 	}].concat(
|  68|  68| 		Array(g_MaxTeams).fill(0).map((v, i) => ({
|  69|  69| 			"label": i + 1,
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 0 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  64|  64| var g_PlayerTeamList = prepareForDropdown([{
|  65|  65| 		"label": translateWithContext("team", "None"),
|  66|  66| 		"id": -1
|  67|    |-	}].concat(
|    |  67|+}].concat(
|  68|  68| 		Array(g_MaxTeams).fill(0).map((v, i) => ({
|  69|  69| 			"label": i + 1,
|  70|  70| 			"id": i
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  65|  65| 		"label": translateWithContext("team", "None"),
|  66|  66| 		"id": -1
|  67|  67| 	}].concat(
|  68|    |-		Array(g_MaxTeams).fill(0).map((v, i) => ({
|    |  68|+	Array(g_MaxTeams).fill(0).map((v, i) => ({
|  69|  69| 			"label": i + 1,
|  70|  70| 			"id": i
|  71|  71| 		}))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  66|  66| 		"id": -1
|  67|  67| 	}].concat(
|  68|  68| 		Array(g_MaxTeams).fill(0).map((v, i) => ({
|  69|    |-			"label": i + 1,
|    |  69|+		"label": i + 1,
|  70|  70| 			"id": i
|  71|  71| 		}))
|  72|  72| 	)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  67|  67| 	}].concat(
|  68|  68| 		Array(g_MaxTeams).fill(0).map((v, i) => ({
|  69|  69| 			"label": i + 1,
|  70|    |-			"id": i
|    |  70|+		"id": i
|  71|  71| 		}))
|  72|  72| 	)
|  73|  73| );
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  68|  68| 		Array(g_MaxTeams).fill(0).map((v, i) => ({
|  69|  69| 			"label": i + 1,
|  70|  70| 			"id": i
|  71|    |-		}))
|    |  71|+	}))
|  72|  72| 	)
|  73|  73| );
|  74|  74| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 0 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  69|  69| 			"label": i + 1,
|  70|  70| 			"id": i
|  71|  71| 		}))
|  72|    |-	)
|    |  72|+)
|  73|  73| );
|  74|  74| 
|  75|  75| /**
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  78|  78| var g_RelicCountList = Object.keys(g_CivData).map((civ, i) => i + 1);
|  79|  79| 
|  80|  80| var g_PlayerCivList = g_CivData && prepareForDropdown([{
|  81|    |-		"name": translateWithContext("civilization", "Random"),
|    |  81|+	"name": translateWithContext("civilization", "Random"),
|  82|  82| 		"tooltip": translate("Picks one civilization at random when the game starts."),
|  83|  83| 		"color": g_ColorRandom,
|  84|  84| 		"code": "random"
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  79|  79| 
|  80|  80| var g_PlayerCivList = g_CivData && prepareForDropdown([{
|  81|  81| 		"name": translateWithContext("civilization", "Random"),
|  82|    |-		"tooltip": translate("Picks one civilization at random when the game starts."),
|    |  82|+	"tooltip": translate("Picks one civilization at random when the game starts."),
|  83|  83| 		"color": g_ColorRandom,
|  84|  84| 		"code": "random"
|  85|  85| 	}].concat(
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  80|  80| var g_PlayerCivList = g_CivData && prepareForDropdown([{
|  81|  81| 		"name": translateWithContext("civilization", "Random"),
|  82|  82| 		"tooltip": translate("Picks one civilization at random when the game starts."),
|  83|    |-		"color": g_ColorRandom,
|    |  83|+	"color": g_ColorRandom,
|  84|  84| 		"code": "random"
|  85|  85| 	}].concat(
|  86|  86| 		Object.keys(g_CivData).filter(
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  81|  81| 		"name": translateWithContext("civilization", "Random"),
|  82|  82| 		"tooltip": translate("Picks one civilization at random when the game starts."),
|  83|  83| 		"color": g_ColorRandom,
|  84|    |-		"code": "random"
|    |  84|+	"code": "random"
|  85|  85| 	}].concat(
|  86|  86| 		Object.keys(g_CivData).filter(
|  87|  87| 			civ => g_CivData[civ].SelectableInGameSetup
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 0 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  82|  82| 		"tooltip": translate("Picks one civilization at random when the game starts."),
|  83|  83| 		"color": g_ColorRandom,
|  84|  84| 		"code": "random"
|  85|    |-	}].concat(
|    |  85|+}].concat(
|  86|  86| 		Object.keys(g_CivData).filter(
|  87|  87| 			civ => g_CivData[civ].SelectableInGameSetup
|  88|  88| 		).map(civ => ({
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  83|  83| 		"color": g_ColorRandom,
|  84|  84| 		"code": "random"
|  85|  85| 	}].concat(
|  86|    |-		Object.keys(g_CivData).filter(
|    |  86|+	Object.keys(g_CivData).filter(
|  87|  87| 			civ => g_CivData[civ].SelectableInGameSetup
|  88|  88| 		).map(civ => ({
|  89|  89| 			"name": g_CivData[civ].Name,
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  84|  84| 		"code": "random"
|  85|  85| 	}].concat(
|  86|  86| 		Object.keys(g_CivData).filter(
|  87|    |-			civ => g_CivData[civ].SelectableInGameSetup
|    |  87|+		civ => g_CivData[civ].SelectableInGameSetup
|  88|  88| 		).map(civ => ({
|  89|  89| 			"name": g_CivData[civ].Name,
|  90|  90| 			"tooltip": g_CivData[civ].History,
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  85|  85| 	}].concat(
|  86|  86| 		Object.keys(g_CivData).filter(
|  87|  87| 			civ => g_CivData[civ].SelectableInGameSetup
|  88|    |-		).map(civ => ({
|    |  88|+	).map(civ => ({
|  89|  89| 			"name": g_CivData[civ].Name,
|  90|  90| 			"tooltip": g_CivData[civ].History,
|  91|  91| 			"color": g_ColorRegular,
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  86|  86| 		Object.keys(g_CivData).filter(
|  87|  87| 			civ => g_CivData[civ].SelectableInGameSetup
|  88|  88| 		).map(civ => ({
|  89|    |-			"name": g_CivData[civ].Name,
|    |  89|+		"name": g_CivData[civ].Name,
|  90|  90| 			"tooltip": g_CivData[civ].History,
|  91|  91| 			"color": g_ColorRegular,
|  92|  92| 			"code": civ
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  87|  87| 			civ => g_CivData[civ].SelectableInGameSetup
|  88|  88| 		).map(civ => ({
|  89|  89| 			"name": g_CivData[civ].Name,
|  90|    |-			"tooltip": g_CivData[civ].History,
|    |  90|+		"tooltip": g_CivData[civ].History,
|  91|  91| 			"color": g_ColorRegular,
|  92|  92| 			"code": civ
|  93|  93| 		})).sort(sortNameIgnoreCase)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  88|  88| 		).map(civ => ({
|  89|  89| 			"name": g_CivData[civ].Name,
|  90|  90| 			"tooltip": g_CivData[civ].History,
|  91|    |-			"color": g_ColorRegular,
|    |  91|+		"color": g_ColorRegular,
|  92|  92| 			"code": civ
|  93|  93| 		})).sort(sortNameIgnoreCase)
|  94|  94| 	)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  89|  89| 			"name": g_CivData[civ].Name,
|  90|  90| 			"tooltip": g_CivData[civ].History,
|  91|  91| 			"color": g_ColorRegular,
|  92|    |-			"code": civ
|    |  92|+		"code": civ
|  93|  93| 		})).sort(sortNameIgnoreCase)
|  94|  94| 	)
|  95|  95| );
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  90|  90| 			"tooltip": g_CivData[civ].History,
|  91|  91| 			"color": g_ColorRegular,
|  92|  92| 			"code": civ
|  93|    |-		})).sort(sortNameIgnoreCase)
|    |  93|+	})).sort(sortNameIgnoreCase)
|  94|  94| 	)
|  95|  95| );
|  96|  96| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 0 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  91|  91| 			"color": g_ColorRegular,
|  92|  92| 			"code": civ
|  93|  93| 		})).sort(sortNameIgnoreCase)
|  94|    |-	)
|    |  94|+)
|  95|  95| );
|  96|  96| 
|  97|  97| /**
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'enabled'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
| 958| 958| 			"set": checked => {
| 959| 959| 				g_GameAttributes.settings.Capturable = checked;
| 960| 960| 			},
| 961|    |-			"enabled":() => true,
|    | 961|+			"enabled": () => true,
| 962| 962| 			"initOrder": 1000
| 963| 963| 		},
| 964| 964| 		"enableCheats": {
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|1146|1146| 		translate("%(hotkey_civinfo)s / %(hotkey_structree)s: View History / Structure Tree\nLast opened will be reopened on click."), {
|1147|1147| 			"hotkey_civinfo": colorizeHotkey("%(hotkey)s", "civinfo"),
|1148|1148| 			"hotkey_structree": colorizeHotkey("%(hotkey)s", "structree")
|1149|    |-	});
|    |1149|+		});
|1150|1150| }
|1151|1151| 
|1152|1152| function initDefaults()
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|1240|1240| 			offset = -Math.min(slideSpeed * dt, maxOffset);
|1241|1241| 	}
|1242|1242| 
|1243|    |-	updateSettingsPanelPosition(offset);	
|    |1243|+	updateSettingsPanelPosition(offset);
|1244|1244| }
|1245|1245| 
|1246|1246| /**
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|1771|1771| 	let biomeList;
|1772|1772| 
|1773|1773| 	if (g_GameAttributes.mapType == "random" && g_GameAttributes.settings.SupportedBiomes)
|1774|    |-	{
|    |1774|+	
|1775|1775| 		if (typeof g_GameAttributes.settings.SupportedBiomes == "string")
|1776|1776| 			biomeList = g_Settings.Biomes.filter(biome => biome.Id.startsWith(g_GameAttributes.settings.SupportedBiomes));
|1777|1777| 		else
|1778|1778| 			biomeList = g_Settings.Biomes.filter(
|1779|1779| 				biome => g_GameAttributes.settings.SupportedBiomes.indexOf(biome.Id) != -1);
|1780|    |-	}
|    |1780|+	
|1781|1781| 
|1782|1782| 	g_BiomeList = biomeList && prepareForDropdown(
|1783|1783| 		[{

binaries/data/mods/public/gui/gamesetup/gamesetup.js
|2015| »   while·(g_IsNetworked)
|    | [NORMAL] ESLintBear (no-unmodified-loop-condition):
|    | 'g_IsNetworked' is not modified in this loop.

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

smiley added a subscriber: smiley.Aug 4 2018, 4:56 AM
smiley added inline comments.
binaries/data/mods/public/simulation/components/CaptureManager.js
12

L28 makes these two checks redundant AFAICS.

smiley added inline comments.Aug 4 2018, 5:07 AM
binaries/data/mods/public/simulation/components/CaptureManager.js
6

Why not use EndGameManager instead of these two properties (which IMO, is a little out of place)?

Vulcan added a comment.Aug 5 2018, 7:10 PM

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

Linter detected issues:
Executing section Default...
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/CaptureManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/CaptureManager.js
|   5|   5| 	this.allowedCapturing = true;
|   6|   6| 	this.wonderVictory = false;
|   7|   7| 	this.relicVictory = false;
|   8|    |-}
|    |   8|+};
|   9|   9| 
|  10|  10| CaptureManager.prototype.IsCapturingAllowed = function(entity)
|  11|  11| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/CaptureManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/CaptureManager.js
|  26|  26| 			return true;
|  27|  27| 	}
|  28|  28| 	return this.allowedCapturing;
|  29|    |-}
|    |  29|+};
|  30|  30| 
|  31|  31| CaptureManager.prototype.SetCapturableGame = function(allowedCapturing)
|  32|  32| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/CaptureManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/CaptureManager.js
|  31|  31| CaptureManager.prototype.SetCapturableGame = function(allowedCapturing)
|  32|  32| {
|  33|  33| 	this.allowedCapturing = allowedCapturing;
|  34|    |-}
|    |  34|+};
|  35|  35| 
|  36|  36| CaptureManager.prototype.SetWonderVictory = function(wonderVictory)
|  37|  37| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/CaptureManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/CaptureManager.js
|  36|  36| CaptureManager.prototype.SetWonderVictory = function(wonderVictory)
|  37|  37| {
|  38|  38| 	this.wonderVictory = wonderVictory;
|  39|    |-}
|    |  39|+};
|  40|  40| 
|  41|  41| CaptureManager.prototype.SetRelicVictory = function(relicVictory)
|  42|  42| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/CaptureManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/CaptureManager.js
|  41|  41| CaptureManager.prototype.SetRelicVictory = function(relicVictory)
|  42|  42| {
|  43|  43| 	this.relicVictory = relicVictory;
|  44|    |-}
|    |  44|+};
|  45|  45| 
|  46|  46| Engine.RegisterSystemComponentType(IID_CaptureManager, "CaptureManager", CaptureManager);

binaries/data/mods/public/simulation/components/CaptureManager.js
|  18| »   if·(this.relicVictory)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/components/CaptureManager.js
|  23| »   if·(this.wonderVictory)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/components/CaptureManager.js
|   8| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/CaptureManager.js
|  29| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/CaptureManager.js
|  34| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/CaptureManager.js
|  39| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/CaptureManager.js
|  44| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TerritoryDecay.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TerritoryDecay.js
| 101| 101| 	if (decaying) {
| 102| 102| 		// Start decaying
| 103| 103| 		let cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer);
| 104|    |-		this.timer = cmpTimer.SetInterval(this.entity, IID_TerritoryDecay, "Decay", 1000, 1000, {"rate": this.GetDecayRate()});
|    | 104|+		this.timer = cmpTimer.SetInterval(this.entity, IID_TerritoryDecay, "Decay", 1000, 1000, { "rate": this.GetDecayRate()});
| 105| 105| 	} else {
| 106| 106| 		// Stop decaying
| 107| 107| 		let cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer);
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TerritoryDecay.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TerritoryDecay.js
| 101| 101| 	if (decaying) {
| 102| 102| 		// Start decaying
| 103| 103| 		let cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer);
| 104|    |-		this.timer = cmpTimer.SetInterval(this.entity, IID_TerritoryDecay, "Decay", 1000, 1000, {"rate": this.GetDecayRate()});
|    | 104|+		this.timer = cmpTimer.SetInterval(this.entity, IID_TerritoryDecay, "Decay", 1000, 1000, {"rate": this.GetDecayRate() });
| 105| 105| 	} else {
| 106| 106| 		// Stop decaying
| 107| 107| 		let cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer);

binaries/data/mods/public/simulation/components/TerritoryDecay.js
| 101| »   if·(decaying)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/components/TerritoryDecay.js
| 101| »   if·(decaying)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/components/TerritoryDecay.js
| 105| »   }·else·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Closing curly brace appears on the same line as the subsequent block.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|  96|  96| 
|  97|  97| 		let playerDescription;
|  98|  98| 		if (isAI)
|  99|    |-		{
|    |  99|+		
| 100| 100| 			if (playerData.Civ)
| 101| 101| 			{
| 102| 102| 				if (isActive)
| 115| 115| 					// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 116| 116| 					playerDescription = translate("%(playerName)s (%(AIdescription)s, %(state)s)");
| 117| 117| 			}
| 118|    |-		}
|    | 118|+		
| 119| 119| 		else
| 120| 120| 		{
| 121| 121| 			if (playerData.Offline)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|  98|  98| 		if (isAI)
|  99|  99| 		{
| 100| 100| 			if (playerData.Civ)
| 101|    |-			{
|    | 101|+			
| 102| 102| 				if (isActive)
| 103| 103| 					// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 104| 104| 					playerDescription = translate("%(playerName)s (%(civ)s, %(AIdescription)s)");
| 105| 105| 				else
| 106| 106| 					// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 107| 107| 					playerDescription = translate("%(playerName)s (%(civ)s, %(AIdescription)s, %(state)s)");
| 108|    |-			}
|    | 108|+			
| 109| 109| 			else
| 110| 110| 			{
| 111| 111| 				if (isActive)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 107| 107| 					playerDescription = translate("%(playerName)s (%(civ)s, %(AIdescription)s, %(state)s)");
| 108| 108| 			}
| 109| 109| 			else
| 110|    |-			{
|    | 110|+			
| 111| 111| 				if (isActive)
| 112| 112| 					// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 113| 113| 					playerDescription = translate("%(playerName)s (%(AIdescription)s)");
| 114| 114| 				else
| 115| 115| 					// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 116| 116| 					playerDescription = translate("%(playerName)s (%(AIdescription)s, %(state)s)");
| 117|    |-			}
|    | 117|+			
| 118| 118| 		}
| 119| 119| 		else
| 120| 120| 		{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 117| 117| 			}
| 118| 118| 		}
| 119| 119| 		else
| 120|    |-		{
|    | 120|+		
| 121| 121| 			if (playerData.Offline)
| 122| 122| 			{
| 123| 123| 				// Can only occur in the lobby for now, so no strings with civ needed
| 145| 145| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 146| 146| 						playerDescription = translate("%(playerName)s (%(state)s)");
| 147| 147| 			}
| 148|    |-		}
|    | 148|+		
| 149| 149| 
| 150| 150| 		// Sort player descriptions by team
| 151| 151| 		if (!playerDescriptions[teamIdx])
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 119| 119| 		else
| 120| 120| 		{
| 121| 121| 			if (playerData.Offline)
| 122|    |-			{
|    | 122|+			
| 123| 123| 				// Can only occur in the lobby for now, so no strings with civ needed
| 124| 124| 				if (isActive)
| 125| 125| 					// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 127| 127| 				else
| 128| 128| 					// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 129| 129| 					playerDescription = translate("%(playerName)s (OFFLINE, %(state)s)");
| 130|    |-			}
|    | 130|+			
| 131| 131| 			else
| 132| 132| 			{
| 133| 133| 				if (playerData.Civ)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 129| 129| 					playerDescription = translate("%(playerName)s (OFFLINE, %(state)s)");
| 130| 130| 			}
| 131| 131| 			else
| 132|    |-			{
|    | 132|+			
| 133| 133| 				if (playerData.Civ)
| 134| 134| 					if (isActive)
| 135| 135| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 144| 144| 					else
| 145| 145| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 146| 146| 						playerDescription = translate("%(playerName)s (%(state)s)");
| 147|    |-			}
|    | 147|+			
| 148| 148| 		}
| 149| 149| 
| 150| 150| 		// Sort player descriptions by team
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 138| 138| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 139| 139| 						playerDescription = translate("%(playerName)s (%(civ)s, %(state)s)");
| 140| 140| 				else
| 141|    |-					if (isActive)
|    | 141|+				if (isActive)
| 142| 142| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 143| 143| 						playerDescription = translate("%(playerName)s");
| 144| 144| 					else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 139| 139| 						playerDescription = translate("%(playerName)s (%(civ)s, %(state)s)");
| 140| 140| 				else
| 141| 141| 					if (isActive)
| 142|    |-						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
|    | 142|+				// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 143| 143| 						playerDescription = translate("%(playerName)s");
| 144| 144| 					else
| 145| 145| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 140| 140| 				else
| 141| 141| 					if (isActive)
| 142| 142| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 143|    |-						playerDescription = translate("%(playerName)s");
|    | 143|+					playerDescription = translate("%(playerName)s");
| 144| 144| 					else
| 145| 145| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 146| 146| 						playerDescription = translate("%(playerName)s (%(state)s)");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 141| 141| 					if (isActive)
| 142| 142| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 143| 143| 						playerDescription = translate("%(playerName)s");
| 144|    |-					else
|    | 144|+				else
| 145| 145| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 146| 146| 						playerDescription = translate("%(playerName)s (%(state)s)");
| 147| 147| 			}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 142| 142| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 143| 143| 						playerDescription = translate("%(playerName)s");
| 144| 144| 					else
| 145|    |-						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
|    | 145|+				// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 146| 146| 						playerDescription = translate("%(playerName)s (%(state)s)");
| 147| 147| 			}
| 148| 148| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 143| 143| 						playerDescription = translate("%(playerName)s");
| 144| 144| 					else
| 145| 145| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 146|    |-						playerDescription = translate("%(playerName)s (%(state)s)");
|    | 146|+					playerDescription = translate("%(playerName)s (%(state)s)");
| 147| 147| 			}
| 148| 148| 		}
| 149| 149| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 333| 333| 		titles.push({
| 334| 334| 			"label": translate("Map Description"),
| 335| 335| 			"value": g_GameAttributes.settings.Description ?
| 336|    |-					translate(g_GameAttributes.settings.Description) :
|    | 336|+				translate(g_GameAttributes.settings.Description) :
| 337| 337| 					translate("Sorry, no description available.")
| 338| 338| 		});
| 339| 339| 	}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 334| 334| 			"label": translate("Map Description"),
| 335| 335| 			"value": g_GameAttributes.settings.Description ?
| 336| 336| 					translate(g_GameAttributes.settings.Description) :
| 337|    |-					translate("Sorry, no description available.")
|    | 337|+				translate("Sorry, no description available.")
| 338| 338| 		});
| 339| 339| 	}
| 340| 340| 

binaries/data/mods/public/gui/common/gamedescription.js
| 373| »   »   let·difficulty·=·g_Settings.TriggerDifficulties.find(difficulty·=>·difficulty.Difficulty·==·g_GameAttributes.settings.TriggerDifficulty);
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'difficulty' is already declared in the upper scope.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-in'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
|  52|  52| 		}
|  53|  53| 	}
|  54|  54| 	for (let enemy in attackingArmies)
|  55|    |-	{
|    |  55|+	
|  56|  56| 		for (let ally in attackingArmies[enemy])
|  57|  57| 		{
|  58|  58| 			if (this.attackedAllies[ally] === undefined)
|  59|  59| 				this.attackedAllies[ally] = 0;
|  60|  60| 			this.attackedAllies[ally] += 1;
|  61|  61| 		}
|  62|    |-	}
|    |  62|+	
|  63|  63| 	this.checkEnemyArmies(gameState);
|  64|  64| 	this.checkEnemyUnits(gameState);
|  65|  65| 	this.assignDefenders(gameState);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
|  70|  70| m.DefenseManager.prototype.makeIntoArmy = function(gameState, entityID, type = "default")
|  71|  71| {
|  72|  72| 	if (type == "default")
|  73|    |-	{
|    |  73|+	
|  74|  74| 		// Try to add it to an existing army.
|  75|  75| 		for (let army of this.armies)
|  76|  76| 			if (army.getType() == type && army.addFoe(gameState, entityID))
|  77|  77| 				return;	// over
|  78|    |-	}
|    |  78|+	
|  79|  79| 
|  80|  80| 	// Create a new army for it.
|  81|  81| 	let army = new m.DefenseArmy(gameState, [entityID], type);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
| 179| 179| 		if (territoryOwner != PlayerID && this.attackedAllies[territoryOwner] &&
| 180| 180| 		                                  this.attackedAllies[territoryOwner] > 1 &&
| 181| 181| 		                                  this.GetCooperationLevel(territoryOwner) > 0.7)
| 182|    |-		{
|    | 182|+		
| 183| 183| 			for (let building of gameState.getAllyStructures(territoryOwner).values())
| 184| 184| 			{
| 185| 185| 				if (building.foundationProgress() == 0 ||
| 188| 188| 				if (!this.territoryMap.isBlinking(building.position()))
| 189| 189| 					return true;
| 190| 190| 			}
| 191|    |-		}
|    | 191|+		
| 192| 192| 
| 193| 193| 		// Update the number of enemies attacking this ally
| 194| 194| 		let enemy = entity.owner();
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
| 211| 211| 	if (i == PlayerID)
| 212| 212| 	{
| 213| 213| 		if (!this.armies.length)
| 214|    |-		{
|    | 214|+		
| 215| 215| 			// check if we can recover capture points from any of our notdecaying structures
| 216| 216| 			for (let ent of gameState.getOwnStructures().values())
| 217| 217| 			{
| 231| 231| 				this.makeIntoArmy(gameState, ent.id(), "capturing");
| 232| 232| 				break;
| 233| 233| 			}
| 234|    |-		}
|    | 234|+		
| 235| 235| 		return;
| 236| 236| 	}
| 237| 237| 	else if (!gameState.isPlayerEnemy(i))
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
| 330| 330| 		if (!gameState.isPlayerEnemy(owner))
| 331| 331| 		{
| 332| 332| 			if (gameState.isPlayerMutualAlly(owner))
| 333|    |-			{
|    | 333|+			
| 334| 334| 				// update the number of enemies attacking this ally
| 335| 335| 				for (let id of army.foeEntities)
| 336| 336| 				{
| 345| 345| 					this.attackingArmies[enemy][owner] += 1;
| 346| 346| 					break;
| 347| 347| 				}
| 348|    |-			}
|    | 348|+			
| 349| 349| 			continue;
| 350| 350| 		}
| 351| 351| 		else if (owner != 0)   // enemy army back in its territory
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-of'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
| 532| 532| 		army.checkEvents(gameState, events);
| 533| 533| 
| 534| 534| 	for (let evt of events.OwnershipChanged)   // capture events
| 535|    |-	{
|    | 535|+	
| 536| 536| 		if (gameState.isPlayerMutualAlly(evt.from) && evt.to > 0)
| 537| 537| 		{
| 538| 538| 			let ent = gameState.getEntityById(evt.entity);
| 539| 539| 			if (ent && ent.hasClass("CivCentre")) // one of our cc has been captured
| 540| 540| 				gameState.ai.HQ.attackManager.switchDefenseToAttack(gameState, ent, { "range": 150 });
| 541| 541| 		}
| 542|    |-	}
|    | 542|+	
| 543| 543| 
| 544| 544| 	let allAttacked = {};
| 545| 545| 	for (let evt of events.Attacked)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
| 554| 554| 		let attacker = gameState.getEntityById(evt.attacker);
| 555| 555| 		if (attacker && gameState.isEntityOwn(attacker) && gameState.isEntityEnemy(target) && !attacker.hasClass("Ship") &&
| 556| 556| 		   (!target.hasClass("Structure") || target.attackRange("Ranged")))
| 557|    |-		{
|    | 557|+		
| 558| 558| 			// If enemies are in range of one of our defensive structures, garrison it for arrow multiplier
| 559| 559| 			// (enemy non-defensive structure are not considered to stay in sync with garrisonManager)
| 560| 560| 			if (attacker.position() && attacker.isGarrisonHolder() && attacker.getArrowMultiplier() &&
| 561| 561| 			    (target.owner() != 0 || !target.hasClass("Unit") ||
| 562| 562| 			     target.unitAIState() && target.unitAIState().split(".")[1] == "COMBAT"))
| 563| 563| 				this.garrisonUnitsInside(gameState, attacker, { "attacker": target });
| 564|    |-		}
|    | 564|+		
| 565| 565| 
| 566| 566| 		if (!gameState.isEntityOwn(target))
| 567| 567| 			continue;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/ai/petra/defenseManager.js
| 758| 758| 	let typeGarrison = data.type || "protection";
| 759| 759| 	let allowMelee = gameState.ai.HQ.garrisonManager.allowMelee(target);
| 760| 760| 	if (allowMelee === undefined)
| 761|    |-	{
|    | 761|+	
| 762| 762| 		// Should be kept in sync with garrisonManager to avoid garrisoning-ungarrisoning some units
| 763| 763| 		if (data.attacker)
| 764| 764| 			allowMelee = data.attacker.hasClass("Structure") ? data.attacker.attackRange("Ranged") : !m.isSiegeUnit(data.attacker);
| 765| 765| 		else
| 766| 766| 			allowMelee = true;
| 767|    |-	}
|    | 767|+	
| 768| 768| 	let units = gameState.getOwnUnits().filter(ent => {
| 769| 769| 		if (!ent.position())
| 770| 770| 			return false;
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Capturable.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Capturable.js
|  18|  18| 	this.cp = [];
|  19|  19| };
|  20|  20| 
|  21|    |-//// Interface functions ////
|    |  21|+// // Interface functions ////
|  22|  22| 
|  23|  23| /**
|  24|  24|  * Returns the current capture points array
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Capturable.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Capturable.js
| 143| 143| 	return sourceEnemyCp > 0;
| 144| 144| };
| 145| 145| 
| 146|    |-//// Private functions ////
|    | 146|+// // Private functions ////
| 147| 147| 
| 148| 148| /**
| 149| 149|  * This has to be called whenever the capture points are changed.
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Capturable.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Capturable.js
| 258| 258| 	Engine.PostMessage(this.entity, MT_CaptureRegenStateChanged, { "regenerating": true, "regenRate": regenRate, "territoryDecay": decay });
| 259| 259| };
| 260| 260| 
| 261|    |-//// Message Listeners ////
|    | 261|+// // Message Listeners ////
| 262| 262| 
| 263| 263| Capturable.prototype.OnValueModification = function(msg)
| 264| 264| {

binaries/data/mods/public/simulation/components/Capturable.js
| 190| »   »   var·garrisonRegenRate·=·0;
|    | [NORMAL] JSHintBear:
|    | 'garrisonRegenRate' is already defined.

binaries/data/mods/public/simulation/components/Capturable.js
| 192| »   return·regenRate·+·garrisonRegenRate;
|    | [NORMAL] JSHintBear:
|    | 'garrisonRegenRate' used out of scope.

binaries/data/mods/public/simulation/helpers/Commands.js
| 900| »   var·ids·=·[·id·for·(id·in·members)·];
|    | [MAJOR] ESLintBear:
|    | Parsing error: Unexpected token for

binaries/data/mods/public/simulation/helpers/Commands.js
|  53| var·g_Commands·=·{
|    | [NORMAL] JSHintBear:
|    | 'g_Commands' was used before it was defined.

binaries/data/mods/public/simulation/helpers/Commands.js
| 541| »   »   »   »   ····&&·player·!=·+cmd.owner)
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/helpers/Commands.js
| 729| »   »   »   »   var·cmpGUIInterface·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_GuiInterface);
|    | [NORMAL] JSHintBear:
|    | 'cmpGUIInterface' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
| 900| »   var·ids·=·[·id·for·(id·in·members)·];
|    | [NORMAL] JSHintBear:
|    | 'array comprehension' is only available in Mozilla JavaScript extensions (use moz option).

binaries/data/mods/public/simulation/helpers/Commands.js
| 900| »   var·ids·=·[·id·for·(id·in·members)·];
|    | [NORMAL] JSHintBear:
|    | Expected 'for' and instead saw 'id'.

binaries/data/mods/public/simulation/helpers/Commands.js
| 950| »   »   for·(var·i·=·0;·i·<·length;·++i)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
| 963| »   »   var·count·=·0;
|    | [NORMAL] JSHintBear:
|    | 'count' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1110| »   »   var·cmpGuiInterface·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_GuiInterface);
|    | [NORMAL] JSHintBear:
|    | 'cmpGuiInterface' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1362| »   »   var·piece·=·pieces[j];
|    | [NORMAL] JSHintBear:
|    | 'piece' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1445| »   »   var·cmpUnitAI·=·Engine.QueryInterface(ent,·IID_UnitAI);
|    | [NORMAL] JSHintBear:
|    | 'cmpUnitAI' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1483| »   »   »   &&·cmpFormation.GetMemberCount()·==·formation.entities.length)
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/helpers/Commands.js
|1509| »   »   »   »   »   var·cmpUnitAI·=·Engine.QueryInterface(ent,·IID_UnitAI);
|    | [NORMAL] JSHintBear:
|    | 'cmpUnitAI' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1542| »   »   »   var·cmpFormation·=·Engine.QueryInterface(formationEnt,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  62|  62| var g_RomanNumbers = [undefined, "I", "II", "III", "IV", "V", "VI", "VII", "VIII"];
|  63|  63| 
|  64|  64| var g_PlayerTeamList = prepareForDropdown([{
|  65|    |-		"label": translateWithContext("team", "None"),
|    |  65|+	"label": translateWithContext("team", "None"),
|  66|  66| 		"id": -1
|  67|  67| 	}].concat(
|  68|  68| 		Array(g_MaxTeams).fill(0).map((v, i) => ({
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  63|  63| 
|  64|  64| var g_PlayerTeamList = prepareForDropdown([{
|  65|  65| 		"label": translateWithContext("team", "None"),
|  66|    |-		"id": -1
|    |  66|+	"id": -1
|  67|  67| 	}].concat(
|  68|  68| 		Array(g_MaxTeams).fill(0).map((v, i) => ({
|  69|  69| 			"label": i + 1,
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 0 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  64|  64| var g_PlayerTeamList = prepareForDropdown([{
|  65|  65| 		"label": translateWithContext("team", "None"),
|  66|  66| 		"id": -1
|  67|    |-	}].concat(
|    |  67|+}].concat(
|  68|  68| 		Array(g_MaxTeams).fill(0).map((v, i) => ({
|  69|  69| 			"label": i + 1,
|  70|  70| 			"id": i
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  65|  65| 		"label": translateWithContext("team", "None"),
|  66|  66| 		"id": -1
|  67|  67| 	}].concat(
|  68|    |-		Array(g_MaxTeams).fill(0).map((v, i) => ({
|    |  68|+	Array(g_MaxTeams).fill(0).map((v, i) => ({
|  69|  69| 			"label": i + 1,
|  70|  70| 			"id": i
|  71|  71| 		}))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  66|  66| 		"id": -1
|  67|  67| 	}].concat(
|  68|  68| 		Array(g_MaxTeams).fill(0).map((v, i) => ({
|  69|    |-			"label": i + 1,
|    |  69|+		"label": i + 1,
|  70|  70| 			"id": i
|  71|  71| 		}))
|  72|  72| 	)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  67|  67| 	}].concat(
|  68|  68| 		Array(g_MaxTeams).fill(0).map((v, i) => ({
|  69|  69| 			"label": i + 1,
|  70|    |-			"id": i
|    |  70|+		"id": i
|  71|  71| 		}))
|  72|  72| 	)
|  73|  73| );
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  68|  68| 		Array(g_MaxTeams).fill(0).map((v, i) => ({
|  69|  69| 			"label": i + 1,
|  70|  70| 			"id": i
|  71|    |-		}))
|    |  71|+	}))
|  72|  72| 	)
|  73|  73| );
|  74|  74| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 0 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  69|  69| 			"label": i + 1,
|  70|  70| 			"id": i
|  71|  71| 		}))
|  72|    |-	)
|    |  72|+)
|  73|  73| );
|  74|  74| 
|  75|  75| /**
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  78|  78| var g_RelicCountList = Object.keys(g_CivData).map((civ, i) => i + 1);
|  79|  79| 
|  80|  80| var g_PlayerCivList = g_CivData && prepareForDropdown([{
|  81|    |-		"name": translateWithContext("civilization", "Random"),
|    |  81|+	"name": translateWithContext("civilization", "Random"),
|  82|  82| 		"tooltip": translate("Picks one civilization at random when the game starts."),
|  83|  83| 		"color": g_ColorRandom,
|  84|  84| 		"code": "random"
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  79|  79| 
|  80|  80| var g_PlayerCivList = g_CivData && prepareForDropdown([{
|  81|  81| 		"name": translateWithContext("civilization", "Random"),
|  82|    |-		"tooltip": translate("Picks one civilization at random when the game starts."),
|    |  82|+	"tooltip": translate("Picks one civilization at random when the game starts."),
|  83|  83| 		"color": g_ColorRandom,
|  84|  84| 		"code": "random"
|  85|  85| 	}].concat(
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  80|  80| var g_PlayerCivList = g_CivData && prepareForDropdown([{
|  81|  81| 		"name": translateWithContext("civilization", "Random"),
|  82|  82| 		"tooltip": translate("Picks one civilization at random when the game starts."),
|  83|    |-		"color": g_ColorRandom,
|    |  83|+	"color": g_ColorRandom,
|  84|  84| 		"code": "random"
|  85|  85| 	}].concat(
|  86|  86| 		Object.keys(g_CivData).filter(
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  81|  81| 		"name": translateWithContext("civilization", "Random"),
|  82|  82| 		"tooltip": translate("Picks one civilization at random when the game starts."),
|  83|  83| 		"color": g_ColorRandom,
|  84|    |-		"code": "random"
|    |  84|+	"code": "random"
|  85|  85| 	}].concat(
|  86|  86| 		Object.keys(g_CivData).filter(
|  87|  87| 			civ => g_CivData[civ].SelectableInGameSetup
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 0 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  82|  82| 		"tooltip": translate("Picks one civilization at random when the game starts."),
|  83|  83| 		"color": g_ColorRandom,
|  84|  84| 		"code": "random"
|  85|    |-	}].concat(
|    |  85|+}].concat(
|  86|  86| 		Object.keys(g_CivData).filter(
|  87|  87| 			civ => g_CivData[civ].SelectableInGameSetup
|  88|  88| 		).map(civ => ({
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  83|  83| 		"color": g_ColorRandom,
|  84|  84| 		"code": "random"
|  85|  85| 	}].concat(
|  86|    |-		Object.keys(g_CivData).filter(
|    |  86|+	Object.keys(g_CivData).filter(
|  87|  87| 			civ => g_CivData[civ].SelectableInGameSetup
|  88|  88| 		).map(civ => ({
|  89|  89| 			"name": g_CivData[civ].Name,
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  84|  84| 		"code": "random"
|  85|  85| 	}].concat(
|  86|  86| 		Object.keys(g_CivData).filter(
|  87|    |-			civ => g_CivData[civ].SelectableInGameSetup
|    |  87|+		civ => g_CivData[civ].SelectableInGameSetup
|  88|  88| 		).map(civ => ({
|  89|  89| 			"name": g_CivData[civ].Name,
|  90|  90| 			"tooltip": g_CivData[civ].History,
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  85|  85| 	}].concat(
|  86|  86| 		Object.keys(g_CivData).filter(
|  87|  87| 			civ => g_CivData[civ].SelectableInGameSetup
|  88|    |-		).map(civ => ({
|    |  88|+	).map(civ => ({
|  89|  89| 			"name": g_CivData[civ].Name,
|  90|  90| 			"tooltip": g_CivData[civ].History,
|  91|  91| 			"color": g_ColorRegular,
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  86|  86| 		Object.keys(g_CivData).filter(
|  87|  87| 			civ => g_CivData[civ].SelectableInGameSetup
|  88|  88| 		).map(civ => ({
|  89|    |-			"name": g_CivData[civ].Name,
|    |  89|+		"name": g_CivData[civ].Name,
|  90|  90| 			"tooltip": g_CivData[civ].History,
|  91|  91| 			"color": g_ColorRegular,
|  92|  92| 			"code": civ
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  87|  87| 			civ => g_CivData[civ].SelectableInGameSetup
|  88|  88| 		).map(civ => ({
|  89|  89| 			"name": g_CivData[civ].Name,
|  90|    |-			"tooltip": g_CivData[civ].History,
|    |  90|+		"tooltip": g_CivData[civ].History,
|  91|  91| 			"color": g_ColorRegular,
|  92|  92| 			"code": civ
|  93|  93| 		})).sort(sortNameIgnoreCase)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  88|  88| 		).map(civ => ({
|  89|  89| 			"name": g_CivData[civ].Name,
|  90|  90| 			"tooltip": g_CivData[civ].History,
|  91|    |-			"color": g_ColorRegular,
|    |  91|+		"color": g_ColorRegular,
|  92|  92| 			"code": civ
|  93|  93| 		})).sort(sortNameIgnoreCase)
|  94|  94| 	)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  89|  89| 			"name": g_CivData[civ].Name,
|  90|  90| 			"tooltip": g_CivData[civ].History,
|  91|  91| 			"color": g_ColorRegular,
|  92|    |-			"code": civ
|    |  92|+		"code": civ
|  93|  93| 		})).sort(sortNameIgnoreCase)
|  94|  94| 	)
|  95|  95| );
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  90|  90| 			"tooltip": g_CivData[civ].History,
|  91|  91| 			"color": g_ColorRegular,
|  92|  92| 			"code": civ
|  93|    |-		})).sort(sortNameIgnoreCase)
|    |  93|+	})).sort(sortNameIgnoreCase)
|  94|  94| 	)
|  95|  95| );
|  96|  96| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 0 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  91|  91| 			"color": g_ColorRegular,
|  92|  92| 			"code": civ
|  93|  93| 		})).sort(sortNameIgnoreCase)
|  94|    |-	)
|    |  94|+)
|  95|  95| );
|  96|  96| 
|  97|  97| /**
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'enabled'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
| 958| 958| 			"set": checked => {
| 959| 959| 				g_GameAttributes.settings.Capturable = checked;
| 960| 960| 			},
| 961|    |-			"enabled":() => true,
|    | 961|+			"enabled": () => true,
| 962| 962| 			"initOrder": 1000
| 963| 963| 		},
| 964| 964| 		"enableCheats": {
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|1146|1146| 		translate("%(hotkey_civinfo)s / %(hotkey_structree)s: View History / Structure Tree\nLast opened will be reopened on click."), {
|1147|1147| 			"hotkey_civinfo": colorizeHotkey("%(hotkey)s", "civinfo"),
|1148|1148| 			"hotkey_structree": colorizeHotkey("%(hotkey)s", "structree")
|1149|    |-	});
|    |1149|+		});
|1150|1150| }
|1151|1151| 
|1152|1152| function initDefaults()
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|1240|1240| 			offset = -Math.min(slideSpeed * dt, maxOffset);
|1241|1241| 	}
|1242|1242| 
|1243|    |-	updateSettingsPanelPosition(offset);	
|    |1243|+	updateSettingsPanelPosition(offset);
|1244|1244| }
|1245|1245| 
|1246|1246| /**
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|1771|1771| 	let biomeList;
|1772|1772| 
|1773|1773| 	if (g_GameAttributes.mapType == "random" && g_GameAttributes.settings.SupportedBiomes)
|1774|    |-	{
|    |1774|+	
|1775|1775| 		if (typeof g_GameAttributes.settings.SupportedBiomes == "string")
|1776|1776| 			biomeList = g_Settings.Biomes.filter(biome => biome.Id.startsWith(g_GameAttributes.settings.SupportedBiomes));
|1777|1777| 		else
|1778|1778| 			biomeList = g_Settings.Biomes.filter(
|1779|1779| 				biome => g_GameAttributes.settings.SupportedBiomes.indexOf(biome.Id) != -1);
|1780|    |-	}
|    |1780|+	
|1781|1781| 
|1782|1782| 	g_BiomeList = biomeList && prepareForDropdown(
|1783|1783| 		[{

binaries/data/mods/public/gui/gamesetup/gamesetup.js
|2015| »   while·(g_IsNetworked)
|    | [NORMAL] ESLintBear (no-unmodified-loop-condition):
|    | 'g_IsNetworked' is not modified in this loop.

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

Itms added a subscriber: Itms.Aug 5 2018, 7:18 PM

ERROR: JavaScript error: simulation/components/Capturable.js line 28
ReferenceError: IID_CaptureManager is not defined
Capturable.prototype.GetCapturePoints@simulation/components/Capturable.js:28:6
@simulation/components/tests/test_Capturable.js:96:26
testCapturable@simulation/components/tests/test_Capturable.js:86:2
@simulation/components/tests/test_Capturable.js:91:1

elexis added a comment.Aug 5 2018, 7:31 PM

The ticket was written the capturing was introduced. So it felt like reduction of player choice, but capturing has become integral part of 0ads character. So not sure if we should really offer this gamesetup option in vanilla.
Mods certainly should be able to play without capturing, but that sounds like just disabling Capturable in all components.
The same is what I wonder here. Usually we disable components that should remain inactive rather than adding a system component deciding.

Enabling capturing in every component but disabling capturing in a second component is indirection, means memory allocation for code that is not used, checks for the component being enabled or not (even if not many).

The alternative would be to insert an uncapturable| for entity. But that doesn't sound clean either. So perhaps your implementationis the one with least disadvantages.
(Also I didn't consider the territorydecay aspect).

Then again I'm not sure if we should really implement the feature of in one of the two ways or rather leave it for a mod to disable everything.

binaries/data/mods/public/simulation/components/CaptureManager.js
6

yes, only store variables in one place

44

missing semicolons

binaries/data/mods/public/simulation/components/TerritoryDecay.js
105

(wrong whitespace, braces format here and one line above)

Stan added a reviewer: Restricted Owners Package.Thu, Jun 20, 3:40 PM
Stan added subscribers: Freagarach, wraitii, Stan.

I don't really like our current capturing, but I don't think we want a "no-capture" game mode in Vanilla 0 A.D., and as @elexis said mods can just remove Capturable.
If capturing is deemed bad enough that people would rather play without it, we should just rework the feature or remove it.

I'm not sure how well the game handle removing all capture-related values. Probably fine. If not, should be fixed.
What would be nice is better support for different kinds of capturing I guess.

As far as the opinion of a newbie with hardly any gameplay experience is valued, I agree with @elexis and @wraitii. Despite many edge cases, I do not think it is too hard te remove capture from all templates and stuff, but I haven't really searched for it yet ;)
A thought: When capturing GAIA animals (e.g. sheep, horses) gets incorporated, that should be treated differently as it may turn into a core aspect of the game.

What would be nice is better support for different kinds of capturing I guess.

What do you mean with different kinds of capturing?

I couldn't convince myself that it would be right to support disabling capturing in the gamesetup for vanilla. But for mods it would be good to provide an easy way to implement that.

It would have been nice if one could achieve the same with a template-only solution, i.e. that all entities are constructed without a Capturable component except the wonder/relic. Then one wouldn't have to add any code complexity, no bugs in the code, no performance impact.
The special/filter/ templates can achieve that, but that one would have to be applied every time any entity as constructed during the game. And the case distinction (wonder/relic or not) would require logic that depends on parsing the identity class of the constructed entity. Hence it seems that wouldn't work. The victorytype dependent templates that would have the special/filter/uncapturable filter applied could only be filtered by the template name, or folder pattern, which seems less universal than an identity class.
Actually, perhaps it's possible to apply the special filter templates to the given tempalte filename when an entity is constructed, determine the identity class from that, prior to actually having constructed a template with these values; then run the victory script capturable identity classes test on it, and apply the uncapturable special filter depending on the result.

And even more code would be avoided if capturing was disabled in the templates of the mod.
So I'm not sure if the ticket is a won't fix, or whether it would be good to provide the freedom to chose.
Modularity isn't so bad on the other hand.
Perhaps the question is rather whether the freedom provided is the freedom between two reasonably sane choices or between a choice that is almost always right and almost always wrong,
i.e. whether capturing with the bugfixes after the ticket creation and after the siege / wall rebalancing few alphas ago has become so polished and balanced that it the non-capturing variant would leave a worse impression of the game to the player than the variant with the current capturing system.

I suppose one of the reasons players may want to disable capturing is the effect where raiders capture houses and delete them, whereas that is impossible without capturing. I.e. in a rated 1v1 that may be decided in the first 20 minutes.
One of the reasons speaking against disabled capturing root territory influence on the opponent makes the buildings health decay while the territory flickers, whereas converting the ownership slowly seems much more logical.

(So still unconvinced whether the ticket shouldn't be closed as won't fix.)

binaries/data/mods/public/simulation/components/Capturable.js
30

The comment states that it returns an array, callers assumes that that is the return value type. The function should rather undefined or an array with 0 points each (if the approach of the implementation is right)

binaries/data/mods/public/simulation/components/TerritoryDecay.js
176

inline variable

binaries/data/mods/public/simulation/helpers/Setup.js
70

The scripts should be agnostic of the victory conditions that may exist. Instead it there would have to be a property in the victory type json file that restricts which identity classes must be capturable regardless of the gamesetup option.