Again noticed by ValihrAnt https://www.youtube.com/watch?v=C-D_CwlTBtY, that as observer one does not see bonuses to cost for training.
Making that optional as I do not think we want it everywhere.
Differential D2054
Apply modifications to template values based on entity owner instead watching player Silier on Jul 7 2019, 4:00 PM. Authored by
Details
Again noticed by ValihrAnt https://www.youtube.com/watch?v=C-D_CwlTBtY, that as observer one does not see bonuses to cost for training. Making that optional as I do not think we want it everywhere. Check we do not affect values of another player.
Diff Detail
Event TimelineComment Actions Successful build - Chance fights ever on the side of the prudent. Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js | 392| 392| function getRepairTimeTooltip(entState) | 393| 393| { | 394| 394| return sprintf(translate("%(label)s %(details)s"), { | 395| |- "label": headerFont(translate("Number of repairers:")), | | 395|+ "label": headerFont(translate("Number of repairers:")), | 396| 396| "details": entState.repairable.numBuilders | 397| 397| }) + "\n" + (entState.repairable.numBuilders ? | 398| 398| sprintf(translatePlural( | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js | 393| 393| { | 394| 394| return sprintf(translate("%(label)s %(details)s"), { | 395| 395| "label": headerFont(translate("Number of repairers:")), | 396| |- "details": entState.repairable.numBuilders | | 396|+ "details": entState.repairable.numBuilders | 397| 397| }) + "\n" + (entState.repairable.numBuilders ? | 398| 398| sprintf(translatePlural( | 399| 399| "Add another worker to speed up the repairs by %(second)s second.", | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js | 394| 394| return sprintf(translate("%(label)s %(details)s"), { | 395| 395| "label": headerFont(translate("Number of repairers:")), | 396| 396| "details": entState.repairable.numBuilders | 397| |- }) + "\n" + (entState.repairable.numBuilders ? | | 397|+ }) + "\n" + (entState.repairable.numBuilders ? | 398| 398| sprintf(translatePlural( | 399| 399| "Add another worker to speed up the repairs by %(second)s second.", | 400| 400| "Add another worker to speed up the repairs by %(second)s seconds.", | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js | 414| 414| function getBuildTimeTooltip(entState) | 415| 415| { | 416| 416| return sprintf(translate("%(label)s %(details)s"), { | 417| |- "label": headerFont(translate("Number of builders:")), | | 417|+ "label": headerFont(translate("Number of builders:")), | 418| 418| "details": entState.foundation.numBuilders | 419| 419| }) + "\n" + (entState.foundation.numBuilders ? | 420| 420| sprintf(translatePlural( | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js | 415| 415| { | 416| 416| return sprintf(translate("%(label)s %(details)s"), { | 417| 417| "label": headerFont(translate("Number of builders:")), | 418| |- "details": entState.foundation.numBuilders | | 418|+ "details": entState.foundation.numBuilders | 419| 419| }) + "\n" + (entState.foundation.numBuilders ? | 420| 420| sprintf(translatePlural( | 421| 421| "Add another worker to speed up the construction by %(second)s second.", | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js | 416| 416| return sprintf(translate("%(label)s %(details)s"), { | 417| 417| "label": headerFont(translate("Number of builders:")), | 418| 418| "details": entState.foundation.numBuilders | 419| |- }) + "\n" + (entState.foundation.numBuilders ? | | 419|+ }) + "\n" + (entState.foundation.numBuilders ? | 420| 420| sprintf(translatePlural( | 421| 421| "Add another worker to speed up the construction by %(second)s second.", | 422| 422| "Add another worker to speed up the construction by %(second)s seconds.", | | [NORMAL] ESLintBear (object-curly-spacing): | | A space is required after '{'. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | 222| 222| { | 223| 223| if (!(templateName in g_TemplateData)) | 224| 224| { | 225| |- let template = Engine.GuiInterfaceCall("GetTemplateData", {"templateName": templateName, "templatePlayer": templatePlayer}); | | 225|+ let template = Engine.GuiInterfaceCall("GetTemplateData", { "templateName": templateName, "templatePlayer": templatePlayer}); | 226| 226| translateObjectKeys(template, ["specific", "generic", "tooltip"]); | 227| 227| g_TemplateData[templateName] = deepfreeze(template); | 228| 228| } | | [NORMAL] ESLintBear (object-curly-spacing): | | A space is required before '}'. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | 222| 222| { | 223| 223| if (!(templateName in g_TemplateData)) | 224| 224| { | 225| |- let template = Engine.GuiInterfaceCall("GetTemplateData", {"templateName": templateName, "templatePlayer": templatePlayer}); | | 225|+ let template = Engine.GuiInterfaceCall("GetTemplateData", {"templateName": templateName, "templatePlayer": templatePlayer }); | 226| 226| translateObjectKeys(template, ["specific", "generic", "tooltip"]); | 227| 227| g_TemplateData[templateName] = deepfreeze(template); | 228| 228| } | | [NORMAL] ESLintBear (indent): | | Expected indentation of 6 tabs but found 5. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | 391| 391| // Players see colors depending on diplomacy | 392| 392| g_DisplayedPlayerColors[i] = | 393| 393| g_ViewedPlayer == i ? getDiplomacyColor("self") : | 394| |- g_Players[g_ViewedPlayer].isAlly[i] ? getDiplomacyColor("ally") : | | 394|+ g_Players[g_ViewedPlayer].isAlly[i] ? getDiplomacyColor("ally") : | 395| 395| g_Players[g_ViewedPlayer].isNeutral[i] ? getDiplomacyColor("neutral") : | 396| 396| getDiplomacyColor("enemy"); | 397| 397| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 7 tabs but found 5. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | 392| 392| g_DisplayedPlayerColors[i] = | 393| 393| g_ViewedPlayer == i ? getDiplomacyColor("self") : | 394| 394| g_Players[g_ViewedPlayer].isAlly[i] ? getDiplomacyColor("ally") : | 395| |- g_Players[g_ViewedPlayer].isNeutral[i] ? getDiplomacyColor("neutral") : | | 395|+ g_Players[g_ViewedPlayer].isNeutral[i] ? getDiplomacyColor("neutral") : | 396| 396| getDiplomacyColor("enemy"); | 397| 397| | 398| 398| g_DisplayedPlayerColors[0] = g_Players[0].color; | | [NORMAL] ESLintBear (indent): | | Expected indentation of 8 tabs but found 5. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | 393| 393| g_ViewedPlayer == i ? getDiplomacyColor("self") : | 394| 394| g_Players[g_ViewedPlayer].isAlly[i] ? getDiplomacyColor("ally") : | 395| 395| g_Players[g_ViewedPlayer].isNeutral[i] ? getDiplomacyColor("neutral") : | 396| |- getDiplomacyColor("enemy"); | | 396|+ getDiplomacyColor("enemy"); | 397| 397| | 398| 398| g_DisplayedPlayerColors[0] = g_Players[0].color; | 399| 399| } | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | 643| 643| "civ": setStringTags(g_CivData[g_Players[g_ViewedPlayer].civ].Name, { "font": "sans-bold-stroke-14" }), | 644| 644| "hotkey_civinfo": colorizeHotkey("%(hotkey)s", "civinfo"), | 645| 645| "hotkey_structree": colorizeHotkey("%(hotkey)s", "structree") | 646| |- }); | | 646|+ }); | 647| 647| } | 648| 648| | 649| 649| // Following gaia can be interesting on scripted maps | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js |1193|1193| |1194|1194| let orderHotkeyTooltip = Object.keys(viewablePlayerStates).length <= 1 ? "" : |1195|1195| "\n" + sprintf(translate("%(order)s: %(hotkey)s to change order."), { |1196| |- "hotkey": setStringTags("\\[Click]", g_HotkeyTags), | |1196|+ "hotkey": setStringTags("\\[Click]", g_HotkeyTags), |1197|1197| "order": tooltipSort == 0 ? translate("Unordered") : tooltipSort == 1 ? translate("Descending") : translate("Ascending") |1198|1198| }); |1199|1199| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js |1194|1194| let orderHotkeyTooltip = Object.keys(viewablePlayerStates).length <= 1 ? "" : |1195|1195| "\n" + sprintf(translate("%(order)s: %(hotkey)s to change order."), { |1196|1196| "hotkey": setStringTags("\\[Click]", g_HotkeyTags), |1197| |- "order": tooltipSort == 0 ? translate("Unordered") : tooltipSort == 1 ? translate("Descending") : translate("Ascending") | |1197|+ "order": tooltipSort == 0 ? translate("Unordered") : tooltipSort == 1 ? translate("Descending") : translate("Ascending") |1198|1198| }); |1199|1199| |1200|1200| let resCodes = g_ResourceData.GetCodes(); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 1. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js |1195|1195| "\n" + sprintf(translate("%(order)s: %(hotkey)s to change order."), { |1196|1196| "hotkey": setStringTags("\\[Click]", g_HotkeyTags), |1197|1197| "order": tooltipSort == 0 ? translate("Unordered") : tooltipSort == 1 ? translate("Descending") : translate("Ascending") |1198| |- }); | |1198|+ }); |1199|1199| |1200|1200| let resCodes = g_ResourceData.GetCodes(); |1201|1201| for (let r = 0; r < resCodes.length; ++r) | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js |1678|1678| for (let rct of resourcesCounterTypes) |1679|1679| for (let rt of resourcesTypes) |1680|1680| reportObject[rt + rct.substr(9)] = playerStatistics[rct][rt]; |1681| |- // eg. rt = food rct.substr = Gathered rct = resourcesGathered | |1681|+ // eg. rt = food rct.substr = Gathered rct = resourcesGathered |1682|1682| |1683|1683| reportObject.vegetarianFoodGathered = playerStatistics.resourcesGathered.vegetarianFood; |1684|1684| for (let type of unitsClasses) binaries/data/mods/public/gui/session/session.js |1054| » let·getPanelEntNameTooltip·=·panelEntState·=>·"[font=\"sans-bold-16\"]"·+·template.name.specific·+·"[/font]"; | | [NORMAL] ESLintBear (no-shadow): | | 'panelEntState' is already declared in the upper scope. binaries/data/mods/public/gui/session/session.js |1129| » » button.onpress·=·(function(i)·{·return·function()·{·performGroup((Engine.HotkeyIsPressed("selection.add")·?·"add"·:·"select"),·i);·};·})(i); | | [NORMAL] ESLintBear (no-shadow): | | 'i' is already declared in the upper scope. binaries/data/mods/public/gui/session/session.js |1130| » » button.ondoublepress·=·(function(i)·{·return·function()·{·performGroup("snap",·i);·};·})(i); | | [NORMAL] ESLintBear (no-shadow): | | 'i' is already declared in the upper scope. binaries/data/mods/public/gui/session/session.js |1131| » » button.onpressright·=·(function(i)·{·return·function()·{·performGroup("breakUp",·i);·};·})(i); | | [NORMAL] ESLintBear (no-shadow): | | 'i' is already declared in the upper scope. | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'if' condition. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/selection_panels.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/selection_panels.js | 452| 452| continue; | 453| 453| | 454| 454| if (state.pack.progress == 0) | 455| |- { | | 455|+ | 456| 456| if (state.pack.packed) | 457| 457| checks.unpackButton = true; | 458| 458| else | 459| 459| checks.packButton = true; | 460| |- } | | 460|+ | 461| 461| else if (state.pack.packed) | 462| 462| checks.unpackCancelButton = true; | 463| 463| else | | [NORMAL] ESLintBear (space-before-function-paren): | | Unexpected space before function parentheses. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/selection_panels.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/selection_panels.js | 763| 763| addResearchToQueue(data.item.researchFacilityId, t); | 764| 764| })(tech); | 765| 765| | 766| |- button.onPressRight = (t => function () { | | 766|+ button.onPressRight = (t => function() { | 767| 767| showTemplateDetails( | 768| 768| t, | 769| 769| GetTemplateData(data.unitEntStates.find(state => state.id == data.item.researchFacilityId).template).nativeCiv); binaries/data/mods/public/gui/session/selection_panels.js | 48| » » » switch·(data.item) | | [NORMAL] ESLintBear (default-case): | | Expected a default case. binaries/data/mods/public/gui/session/selection_panels.js | 59| » » switch·(data.item) | | [NORMAL] ESLintBear (default-case): | | Expected a default case. binaries/data/mods/public/gui/session/selection_panels.js | 731| » » » » » » switch·(entity.check) | | [NORMAL] ESLintBear (default-case): | | Expected a default case. | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'if' condition. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | 66| 66| let phase = ""; | 67| 67| let cmpTechnologyManager = QueryPlayerIDInterface(i, IID_TechnologyManager); | 68| 68| if (cmpTechnologyManager) | 69| |- { | | 69|+ | 70| 70| if (cmpTechnologyManager.IsTechnologyResearched("phase_city")) | 71| 71| phase = "city"; | 72| 72| else if (cmpTechnologyManager.IsTechnologyResearched("phase_town")) | 73| 73| phase = "town"; | 74| 74| else if (cmpTechnologyManager.IsTechnologyResearched("phase_village")) | 75| 75| phase = "village"; | 76| |- } | | 76|+ | 77| 77| | 78| 78| // store player ally/neutral/enemy data as arrays | 79| 79| let allies = []; | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'if' condition. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | 415| 415| ret.attack[type].elevationBonus = range.elevationBonus; | 416| 416| | 417| 417| if (cmpUnitAI && cmpPosition && cmpPosition.IsInWorld()) | 418| |- { | | 418|+ | 419| 419| // For units, take the range in front of it, no spread. So angle = 0 | 420| 420| ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 0); | 421| |- } | | 421|+ | 422| 422| else if(cmpPosition && cmpPosition.IsInWorld()) | 423| 423| { | 424| 424| // For buildings, take the average elevation around it. So angle = 2*pi | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'if' condition. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | 420| 420| ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 0); | 421| 421| } | 422| 422| else if(cmpPosition && cmpPosition.IsInWorld()) | 423| |- { | | 423|+ | 424| 424| // For buildings, take the average elevation around it. So angle = 2*pi | 425| 425| ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 2*Math.PI); | 426| |- } | | 426|+ | 427| 427| else | 428| 428| { | 429| 429| // not in world, set a default? | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'else'. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | 425| 425| ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 2*Math.PI); | 426| 426| } | 427| 427| else | 428| |- { | | 428|+ | 429| 429| // not in world, set a default? | 430| 430| ret.attack[type].elevationAdaptedRange = ret.attack.maxRange; | 431| |- } | | 431|+ | 432| 432| } | 433| 433| } | 434| 434| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | 799| 799| updateEntityColor(data.showAllStatusBars && (i == player || player == -1) ? | 800| 800| [IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer, IID_StatusBars] : | 801| 801| [IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer], | 802| |- cmpRangeManager.GetEntitiesByPlayer(i)); | | 802|+ cmpRangeManager.GetEntitiesByPlayer(i)); | 803| 803| } | 804| 804| updateEntityColor([IID_Selectable, IID_StatusBars], data.selected); | 805| 805| Engine.QueryInterface(SYSTEM_ENTITY, IID_TerritoryManager).UpdateColors(); | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'else'. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js |1318|1318| } |1319|1319| } |1320|1320| else |1321| |- { | |1321|+ |1322|1322| // Didn't snap to an existing entity, add the starting tower manually. To prevent odd-looking rotation jumps |1323|1323| // when shift-clicking to build a wall, reuse the placement angle that was last seen on a validly positioned |1324|1324| // wall piece. |1339|1339| "pos": start.pos, |1340|1340| "angle": previewEntities.length > 0 ? previewEntities[0].angle : this.placementWallLastAngle |1341|1341| }); |1342| |- } | |1342|+ |1343|1343| |1344|1344| if (end.pos) |1345|1345| { | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'if' condition. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js |1342|1342| } |1343|1343| |1344|1344| if (end.pos) |1345| |- { | |1345|+ |1346|1346| // Analogous to the starting side case above |1347|1347| if (end.snappedEnt && end.snappedEnt != INVALID_ENTITY) |1348|1348| { |1380|1380| "pos": end.pos, |1381|1381| "angle": previewEntities.length > 0 ? previewEntities[previewEntities.length-1].angle : this.placementWallLastAngle |1382|1382| }); |1383| |- } | |1383|+ |1384|1384| |1385|1385| let cmpTerrain = Engine.QueryInterface(SYSTEM_ENTITY, IID_Terrain); |1386|1386| if (!cmpTerrain) | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'if' condition. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js |1558|1558| |1559|1559| let cmpVisual = Engine.QueryInterface(ent, IID_Visual); |1560|1560| if (cmpVisual) |1561| |- { | |1561|+ |1562|1562| if (!allPiecesValid || !canAfford) |1563|1563| cmpVisual.SetShadingColor(1.4, 0.4, 0.4, 1); |1564|1564| else |1565|1565| cmpVisual.SetShadingColor(1, 1, 1, 1); |1566| |- } | |1566|+ |1567|1567| |1568|1568| ++entPool.numUsed; |1569|1569| } | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 6. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js |1632|1632| { |1633|1633| minDist2 = dist2; |1634|1634| minDistEntitySnapData = { |1635| |- "x": pos.x, | |1635|+ "x": pos.x, |1636|1636| "z": pos.z, |1637|1637| "angle": cmpPosition.GetRotation().y, |1638|1638| "ent": ent | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 6. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js |1633|1633| minDist2 = dist2; |1634|1634| minDistEntitySnapData = { |1635|1635| "x": pos.x, |1636| |- "z": pos.z, | |1636|+ "z": pos.z, |1637|1637| "angle": cmpPosition.GetRotation().y, |1638|1638| "ent": ent |1639|1639| }; | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 6. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js |1634|1634| minDistEntitySnapData = { |1635|1635| "x": pos.x, |1636|1636| "z": pos.z, |1637| |- "angle": cmpPosition.GetRotation().y, | |1637|+ "angle": cmpPosition.GetRotation().y, |1638|1638| "ent": ent |1639|1639| }; |1640|1640| } | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 6. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js |1635|1635| "x": pos.x, |1636|1636| "z": pos.z, |1637|1637| "angle": cmpPosition.GetRotation().y, |1638| |- "ent": ent | |1638|+ "ent": ent |1639|1639| }; |1640|1640| } |1641|1641| } | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'if' condition. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js |1780|1780| result.gain = cmpEntityTrader.GetGoods().amount; |1781|1781| } |1782|1782| else if (data.target === secondMarket) |1783| |- { | |1783|+ |1784|1784| result = { |1785|1785| "type": "is second", |1786|1786| "gain": cmpEntityTrader.GetGoods().amount, |1787|1787| }; |1788| |- } | |1788|+ |1789|1789| else if (!firstMarket) |1790|1790| { |1791|1791| result = { "type": "set first" }; | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'if' condition. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js |1787|1787| }; |1788|1788| } |1789|1789| else if (!firstMarket) |1790| |- { | |1790|+ |1791|1791| result = { "type": "set first" }; |1792| |- } | |1792|+ |1793|1793| else if (!secondMarket) |1794|1794| { |1795|1795| result = { | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'if' condition. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js |1791|1791| result = { "type": "set first" }; |1792|1792| } |1793|1793| else if (!secondMarket) |1794| |- { | |1794|+ |1795|1795| result = { |1796|1796| "type": "set second", |1797|1797| "gain": cmpEntityTrader.CalculateGain(firstMarket, data.target), |1798|1798| }; |1799| |- } | |1799|+ |1800|1800| else |1801|1801| { |1802|1802| // Else both markets are not null and target is different from them | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'else'. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js |1798|1798| }; |1799|1799| } |1800|1800| else |1801| |- { | |1801|+ |1802|1802| // Else both markets are not null and target is different from them |1803|1803| result = { "type": "set first" }; |1804| |- } | |1804|+ |1805|1805| return result; |1806|1806| }; |1807|1807| Executing section cli... Link to build: https://jenkins.wildfiregames.com/job/differential/1935/display/redirect Comment Actions This is great, many thanks! I just tried it out and it solves something that has bothered me for a long time. Comment Actions I added it only for training, I should and will add it for research and building to be complete. Only stats not displayed with updates could be when you right click at icon. Anything else should be taken from entity state, which has current values. Comment Actions [complete] Comment Actions Successful build - Chance fights ever on the side of the prudent. Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'if' condition. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/selection_panels.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/selection_panels.js | 455| 455| continue; | 456| 456| | 457| 457| if (state.pack.progress == 0) | 458| |- { | | 458|+ | 459| 459| if (state.pack.packed) | 460| 460| checks.unpackButton = true; | 461| 461| else | 462| 462| checks.packButton = true; | 463| |- } | | 463|+ | 464| 464| else if (state.pack.packed) | 465| 465| checks.unpackCancelButton = true; | 466| 466| else | | [NORMAL] ESLintBear (space-before-function-paren): | | Unexpected space before function parentheses. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/selection_panels.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/selection_panels.js | 766| 766| addResearchToQueue(data.item.researchFacilityId, t); | 767| 767| })(tech); | 768| 768| | 769| |- button.onPressRight = (t => function () { | | 769|+ button.onPressRight = (t => function() { | 770| 770| showTemplateDetails( | 771| 771| t, | 772| 772| GetTemplateData(data.unitEntStates.find(state => state.id == data.item.researchFacilityId).template).nativeCiv); binaries/data/mods/public/gui/session/selection_panels.js | 48| » » » switch·(data.item) | | [NORMAL] ESLintBear (default-case): | | Expected a default case. binaries/data/mods/public/gui/session/selection_panels.js | 59| » » switch·(data.item) | | [NORMAL] ESLintBear (default-case): | | Expected a default case. binaries/data/mods/public/gui/session/selection_panels.js | 734| » » » » » » switch·(entity.check) | | [NORMAL] ESLintBear (default-case): | | Expected a default case. | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js | 392| 392| function getRepairTimeTooltip(entState) | 393| 393| { | 394| 394| return sprintf(translate("%(label)s %(details)s"), { | 395| |- "label": headerFont(translate("Number of repairers:")), | | 395|+ "label": headerFont(translate("Number of repairers:")), | 396| 396| "details": entState.repairable.numBuilders | 397| 397| }) + "\n" + (entState.repairable.numBuilders ? | 398| 398| sprintf(translatePlural( | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js | 393| 393| { | 394| 394| return sprintf(translate("%(label)s %(details)s"), { | 395| 395| "label": headerFont(translate("Number of repairers:")), | 396| |- "details": entState.repairable.numBuilders | | 396|+ "details": entState.repairable.numBuilders | 397| 397| }) + "\n" + (entState.repairable.numBuilders ? | 398| 398| sprintf(translatePlural( | 399| 399| "Add another worker to speed up the repairs by %(second)s second.", | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js | 394| 394| return sprintf(translate("%(label)s %(details)s"), { | 395| 395| "label": headerFont(translate("Number of repairers:")), | 396| 396| "details": entState.repairable.numBuilders | 397| |- }) + "\n" + (entState.repairable.numBuilders ? | | 397|+ }) + "\n" + (entState.repairable.numBuilders ? | 398| 398| sprintf(translatePlural( | 399| 399| "Add another worker to speed up the repairs by %(second)s second.", | 400| 400| "Add another worker to speed up the repairs by %(second)s seconds.", | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js | 414| 414| function getBuildTimeTooltip(entState) | 415| 415| { | 416| 416| return sprintf(translate("%(label)s %(details)s"), { | 417| |- "label": headerFont(translate("Number of builders:")), | | 417|+ "label": headerFont(translate("Number of builders:")), | 418| 418| "details": entState.foundation.numBuilders | 419| 419| }) + "\n" + (entState.foundation.numBuilders ? | 420| 420| sprintf(translatePlural( | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js | 415| 415| { | 416| 416| return sprintf(translate("%(label)s %(details)s"), { | 417| 417| "label": headerFont(translate("Number of builders:")), | 418| |- "details": entState.foundation.numBuilders | | 418|+ "details": entState.foundation.numBuilders | 419| 419| }) + "\n" + (entState.foundation.numBuilders ? | 420| 420| sprintf(translatePlural( | 421| 421| "Add another worker to speed up the construction by %(second)s second.", | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js | 416| 416| return sprintf(translate("%(label)s %(details)s"), { | 417| 417| "label": headerFont(translate("Number of builders:")), | 418| 418| "details": entState.foundation.numBuilders | 419| |- }) + "\n" + (entState.foundation.numBuilders ? | | 419|+ }) + "\n" + (entState.foundation.numBuilders ? | 420| 420| sprintf(translatePlural( | 421| 421| "Add another worker to speed up the construction by %(second)s second.", | 422| 422| "Add another worker to speed up the construction by %(second)s seconds.", | | [NORMAL] ESLintBear (object-curly-spacing): | | A space is required after '{'. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | 222| 222| { | 223| 223| if (!(templateName in g_TemplateData)) | 224| 224| { | 225| |- let template = Engine.GuiInterfaceCall("GetTemplateData", {"templateName": templateName, "templatePlayer": templatePlayer}); | | 225|+ let template = Engine.GuiInterfaceCall("GetTemplateData", { "templateName": templateName, "templatePlayer": templatePlayer}); | 226| 226| translateObjectKeys(template, ["specific", "generic", "tooltip"]); | 227| 227| g_TemplateData[templateName] = deepfreeze(template); | 228| 228| } | | [NORMAL] ESLintBear (object-curly-spacing): | | A space is required before '}'. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | 222| 222| { | 223| 223| if (!(templateName in g_TemplateData)) | 224| 224| { | 225| |- let template = Engine.GuiInterfaceCall("GetTemplateData", {"templateName": templateName, "templatePlayer": templatePlayer}); | | 225|+ let template = Engine.GuiInterfaceCall("GetTemplateData", {"templateName": templateName, "templatePlayer": templatePlayer }); | 226| 226| translateObjectKeys(template, ["specific", "generic", "tooltip"]); | 227| 227| g_TemplateData[templateName] = deepfreeze(template); | 228| 228| } | | [NORMAL] ESLintBear (indent): | | Expected indentation of 6 tabs but found 5. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | 391| 391| // Players see colors depending on diplomacy | 392| 392| g_DisplayedPlayerColors[i] = | 393| 393| g_ViewedPlayer == i ? getDiplomacyColor("self") : | 394| |- g_Players[g_ViewedPlayer].isAlly[i] ? getDiplomacyColor("ally") : | | 394|+ g_Players[g_ViewedPlayer].isAlly[i] ? getDiplomacyColor("ally") : | 395| 395| g_Players[g_ViewedPlayer].isNeutral[i] ? getDiplomacyColor("neutral") : | 396| 396| getDiplomacyColor("enemy"); | 397| 397| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 7 tabs but found 5. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | 392| 392| g_DisplayedPlayerColors[i] = | 393| 393| g_ViewedPlayer == i ? getDiplomacyColor("self") : | 394| 394| g_Players[g_ViewedPlayer].isAlly[i] ? getDiplomacyColor("ally") : | 395| |- g_Players[g_ViewedPlayer].isNeutral[i] ? getDiplomacyColor("neutral") : | | 395|+ g_Players[g_ViewedPlayer].isNeutral[i] ? getDiplomacyColor("neutral") : | 396| 396| getDiplomacyColor("enemy"); | 397| 397| | 398| 398| g_DisplayedPlayerColors[0] = g_Players[0].color; | | [NORMAL] ESLintBear (indent): | | Expected indentation of 8 tabs but found 5. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | 393| 393| g_ViewedPlayer == i ? getDiplomacyColor("self") : | 394| 394| g_Players[g_ViewedPlayer].isAlly[i] ? getDiplomacyColor("ally") : | 395| 395| g_Players[g_ViewedPlayer].isNeutral[i] ? getDiplomacyColor("neutral") : | 396| |- getDiplomacyColor("enemy"); | | 396|+ getDiplomacyColor("enemy"); | 397| 397| | 398| 398| g_DisplayedPlayerColors[0] = g_Players[0].color; | 399| 399| } | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | 643| 643| "civ": setStringTags(g_CivData[g_Players[g_ViewedPlayer].civ].Name, { "font": "sans-bold-stroke-14" }), | 644| 644| "hotkey_civinfo": colorizeHotkey("%(hotkey)s", "civinfo"), | 645| 645| "hotkey_structree": colorizeHotkey("%(hotkey)s", "structree") | 646| |- }); | | 646|+ }); | 647| 647| } | 648| 648| | 649| 649| // Following gaia can be interesting on scripted maps | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js |1193|1193| |1194|1194| let orderHotkeyTooltip = Object.keys(viewablePlayerStates).length <= 1 ? "" : |1195|1195| "\n" + sprintf(translate("%(order)s: %(hotkey)s to change order."), { |1196| |- "hotkey": setStringTags("\\[Click]", g_HotkeyTags), | |1196|+ "hotkey": setStringTags("\\[Click]", g_HotkeyTags), |1197|1197| "order": tooltipSort == 0 ? translate("Unordered") : tooltipSort == 1 ? translate("Descending") : translate("Ascending") |1198|1198| }); |1199|1199| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js |1194|1194| let orderHotkeyTooltip = Object.keys(viewablePlayerStates).length <= 1 ? "" : |1195|1195| "\n" + sprintf(translate("%(order)s: %(hotkey)s to change order."), { |1196|1196| "hotkey": setStringTags("\\[Click]", g_HotkeyTags), |1197| |- "order": tooltipSort == 0 ? translate("Unordered") : tooltipSort == 1 ? translate("Descending") : translate("Ascending") | |1197|+ "order": tooltipSort == 0 ? translate("Unordered") : tooltipSort == 1 ? translate("Descending") : translate("Ascending") |1198|1198| }); |1199|1199| |1200|1200| let resCodes = g_ResourceData.GetCodes(); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 1. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js |1195|1195| "\n" + sprintf(translate("%(order)s: %(hotkey)s to change order."), { |1196|1196| "hotkey": setStringTags("\\[Click]", g_HotkeyTags), |1197|1197| "order": tooltipSort == 0 ? translate("Unordered") : tooltipSort == 1 ? translate("Descending") : translate("Ascending") |1198| |- }); | |1198|+ }); |1199|1199| |1200|1200| let resCodes = g_ResourceData.GetCodes(); |1201|1201| for (let r = 0; r < resCodes.length; ++r) | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/session.js |1678|1678| for (let rct of resourcesCounterTypes) |1679|1679| for (let rt of resourcesTypes) |1680|1680| reportObject[rt + rct.substr(9)] = playerStatistics[rct][rt]; |1681| |- // eg. rt = food rct.substr = Gathered rct = resourcesGathered | |1681|+ // eg. rt = food rct.substr = Gathered rct = resourcesGathered |1682|1682| |1683|1683| reportObject.vegetarianFoodGathered = playerStatistics.resourcesGathered.vegetarianFood; |1684|1684| for (let type of unitsClasses) binaries/data/mods/public/gui/session/session.js |1054| » let·getPanelEntNameTooltip·=·panelEntState·=>·"[font=\"sans-bold-16\"]"·+·template.name.specific·+·"[/font]"; | | [NORMAL] ESLintBear (no-shadow): | | 'panelEntState' is already declared in the upper scope. binaries/data/mods/public/gui/session/session.js |1129| » » button.onpress·=·(function(i)·{·return·function()·{·performGroup((Engine.HotkeyIsPressed("selection.add")·?·"add"·:·"select"),·i);·};·})(i); | | [NORMAL] ESLintBear (no-shadow): | | 'i' is already declared in the upper scope. binaries/data/mods/public/gui/session/session.js |1130| » » button.ondoublepress·=·(function(i)·{·return·function()·{·performGroup("snap",·i);·};·})(i); | | [NORMAL] ESLintBear (no-shadow): | | 'i' is already declared in the upper scope. binaries/data/mods/public/gui/session/session.js |1131| » » button.onpressright·=·(function(i)·{·return·function()·{·performGroup("breakUp",·i);·};·})(i); | | [NORMAL] ESLintBear (no-shadow): | | 'i' is already declared in the upper scope. | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'if' condition. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | 66| 66| let phase = ""; | 67| 67| let cmpTechnologyManager = QueryPlayerIDInterface(i, IID_TechnologyManager); | 68| 68| if (cmpTechnologyManager) | 69| |- { | | 69|+ | 70| 70| if (cmpTechnologyManager.IsTechnologyResearched("phase_city")) | 71| 71| phase = "city"; | 72| 72| else if (cmpTechnologyManager.IsTechnologyResearched("phase_town")) | 73| 73| phase = "town"; | 74| 74| else if (cmpTechnologyManager.IsTechnologyResearched("phase_village")) | 75| 75| phase = "village"; | 76| |- } | | 76|+ | 77| 77| | 78| 78| // store player ally/neutral/enemy data as arrays | 79| 79| let allies = []; | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'if' condition. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | 415| 415| ret.attack[type].elevationBonus = range.elevationBonus; | 416| 416| | 417| 417| if (cmpUnitAI && cmpPosition && cmpPosition.IsInWorld()) | 418| |- { | | 418|+ | 419| 419| // For units, take the range in front of it, no spread. So angle = 0 | 420| 420| ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 0); | 421| |- } | | 421|+ | 422| 422| else if(cmpPosition && cmpPosition.IsInWorld()) | 423| 423| { | 424| 424| // For buildings, take the average elevation around it. So angle = 2*pi | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'if' condition. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | 420| 420| ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 0); | 421| 421| } | 422| 422| else if(cmpPosition && cmpPosition.IsInWorld()) | 423| |- { | | 423|+ | 424| 424| // For buildings, take the average elevation around it. So angle = 2*pi | 425| 425| ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 2*Math.PI); | 426| |- } | | 426|+ | 427| 427| else | 428| 428| { | 429| 429| // not in world, set a default? | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'else'. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | 425| 425| ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 2*Math.PI); | 426| 426| } | 427| 427| else | 428| |- { | | 428|+ | 429| 429| // not in world, set a default? | 430| 430| ret.attack[type].elevationAdaptedRange = ret.attack.maxRange; | 431| |- } | | 431|+ | 432| 432| } | 433| 433| } | 434| 434| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | 799| 799| updateEntityColor(data.showAllStatusBars && (i == player || player == -1) ? | 800| 800| [IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer, IID_StatusBars] : | 801| 801| [IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer], | 802| |- cmpRangeManager.GetEntitiesByPlayer(i)); | | 802|+ cmpRangeManager.GetEntitiesByPlayer(i)); | 803| 803| } | 804| 804| updateEntityColor([IID_Selectable, IID_StatusBars], data.selected); | 805| 805| Engine.QueryInterface(SYSTEM_ENTITY, IID_TerritoryManager).UpdateColors(); | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'else'. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js |1318|1318| } |1319|1319| } |1320|1320| else |1321| |- { | |1321|+ |1322|1322| // Didn't snap to an existing entity, add the starting tower manually. To prevent odd-looking rotation jumps |1323|1323| // when shift-clicking to build a wall, reuse the placement angle that was last seen on a validly positioned |1324|1324| // wall piece. |1339|1339| "pos": start.pos, |1340|1340| "angle": previewEntities.length > 0 ? previewEntities[0].angle : this.placementWallLastAngle |1341|1341| }); |1342| |- } | |1342|+ |1343|1343| |1344|1344| if (end.pos) |1345|1345| { | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'if' condition. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js |1342|1342| } |1343|1343| |1344|1344| if (end.pos) |1345| |- { | |1345|+ |1346|1346| // Analogous to the starting side case above |1347|1347| if (end.snappedEnt && end.snappedEnt != INVALID_ENTITY) |1348|1348| { |1380|1380| "pos": end.pos, |1381|1381| "angle": previewEntities.length > 0 ? previewEntities[previewEntities.length-1].angle : this.placementWallLastAngle |1382|1382| }); |1383| |- } | |1383|+ |1384|1384| |1385|1385| let cmpTerrain = Engine.QueryInterface(SYSTEM_ENTITY, IID_Terrain); |1386|1386| if (!cmpTerrain) | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'if' condition. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js |1558|1558| |1559|1559| let cmpVisual = Engine.QueryInterface(ent, IID_Visual); |1560|1560| if (cmpVisual) |1561| |- { | |1561|+ |1562|1562| if (!allPiecesValid || !canAfford) |1563|1563| cmpVisual.SetShadingColor(1.4, 0.4, 0.4, 1); |1564|1564| else |1565|1565| cmpVisual.SetShadingColor(1, 1, 1, 1); |1566| |- } | |1566|+ |1567|1567| |1568|1568| ++entPool.numUsed; |1569|1569| } | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 6. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js |1632|1632| { |1633|1633| minDist2 = dist2; |1634|1634| minDistEntitySnapData = { |1635| |- "x": pos.x, | |1635|+ "x": pos.x, |1636|1636| "z": pos.z, |1637|1637| "angle": cmpPosition.GetRotation().y, |1638|1638| "ent": ent | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 6. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js |1633|1633| minDist2 = dist2; |1634|1634| minDistEntitySnapData = { |1635|1635| "x": pos.x, |1636| |- "z": pos.z, | |1636|+ "z": pos.z, |1637|1637| "angle": cmpPosition.GetRotation().y, |1638|1638| "ent": ent |1639|1639| }; | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 6. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js |1634|1634| minDistEntitySnapData = { |1635|1635| "x": pos.x, |1636|1636| "z": pos.z, |1637| |- "angle": cmpPosition.GetRotation().y, | |1637|+ "angle": cmpPosition.GetRotation().y, |1638|1638| "ent": ent |1639|1639| }; |1640|1640| } | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 6. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js |1635|1635| "x": pos.x, |1636|1636| "z": pos.z, |1637|1637| "angle": cmpPosition.GetRotation().y, |1638| |- "ent": ent | |1638|+ "ent": ent |1639|1639| }; |1640|1640| } |1641|1641| } | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'if' condition. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js |1780|1780| result.gain = cmpEntityTrader.GetGoods().amount; |1781|1781| } |1782|1782| else if (data.target === secondMarket) |1783| |- { | |1783|+ |1784|1784| result = { |1785|1785| "type": "is second", |1786|1786| "gain": cmpEntityTrader.GetGoods().amount, |1787|1787| }; |1788| |- } | |1788|+ |1789|1789| else if (!firstMarket) |1790|1790| { |1791|1791| result = { "type": "set first" }; | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'if' condition. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js |1787|1787| }; |1788|1788| } |1789|1789| else if (!firstMarket) |1790| |- { | |1790|+ |1791|1791| result = { "type": "set first" }; |1792| |- } | |1792|+ |1793|1793| else if (!secondMarket) |1794|1794| { |1795|1795| result = { | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'if' condition. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js |1791|1791| result = { "type": "set first" }; |1792|1792| } |1793|1793| else if (!secondMarket) |1794| |- { | |1794|+ |1795|1795| result = { |1796|1796| "type": "set second", |1797|1797| "gain": cmpEntityTrader.CalculateGain(firstMarket, data.target), |1798|1798| }; |1799| |- } | |1799|+ |1800|1800| else |1801|1801| { |1802|1802| // Else both markets are not null and target is different from them | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'else'. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js |1798|1798| }; |1799|1799| } |1800|1800| else |1801| |- { | |1801|+ |1802|1802| // Else both markets are not null and target is different from them |1803|1803| result = { "type": "set first" }; |1804| |- } | |1804|+ |1805|1805| return result; |1806|1806| }; |1807|1807| Executing section cli... Link to build: https://jenkins.wildfiregames.com/job/differential/1936/display/redirect Comment Actions However, I'm getting the following recurring errors when attempting to build palisades (or another wallset): WARNING: JavaScript warning: simulation/components/GuiInterface.js line 540 Script value conversion check failed: v.isString() || v.isNumber() (got type undefined) ERROR: CCacheLoader failed to find archived or source file for: "simulation/templates/undefined.xml" ERROR: Failed to load entity template 'undefined' ERROR: JavaScript error: simulation/components/GuiInterface.js line 1199 TypeError: this.placementWallEntities[tpl].templateData is null GuiInterface.prototype.SetWallPlacementPreview@simulation/components/GuiInterface.js:1199:8 GuiInterface.prototype.ScriptCall@simulation/components/GuiInterface.js:1973:1 updateBuildingPlacementPreview@gui/session/input.js:195:1 handleInputAfterGui@gui/session/input.js:1076:4 ERROR: Error calling component script function ScriptCall Comment Actions Successful build - Chance fights ever on the side of the prudent. Link to build: https://jenkins.wildfiregames.com/job/docker-differential/8/display/redirect Comment Actions That's quick! And yes, I can confirm the errors have now gone, thank you. ([EDIT]: And I've also solved that duplicated cost tooltip within my mod: I forgot to remove a line.) Comment Actions "Apply modifications to template values based on entity owner instead watching player" sounds like #5109 Comment Actions Successful build - Chance fights ever on the side of the prudent. Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/595/display/redirect Comment Actions Successful build - Chance fights ever on the side of the prudent. Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (object-curly-spacing): | | A space is required after '{'. |----| | /zpool0/trunk/binaries/data/mods/public/gui/session/session.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/session.js | 212| 212| { | 213| 213| if (!(templateName in g_TemplateData)) | 214| 214| { | 215| |- let template = Engine.GuiInterfaceCall("GetTemplateData", {"templateName": templateName, "templatePlayer": templatePlayer}); | | 215|+ let template = Engine.GuiInterfaceCall("GetTemplateData", { "templateName": templateName, "templatePlayer": templatePlayer}); | 216| 216| translateObjectKeys(template, ["specific", "generic", "tooltip"]); | 217| 217| g_TemplateData[templateName] = deepfreeze(template); | 218| 218| } | | [NORMAL] ESLintBear (object-curly-spacing): | | A space is required before '}'. |----| | /zpool0/trunk/binaries/data/mods/public/gui/session/session.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/session.js | 212| 212| { | 213| 213| if (!(templateName in g_TemplateData)) | 214| 214| { | 215| |- let template = Engine.GuiInterfaceCall("GetTemplateData", {"templateName": templateName, "templatePlayer": templatePlayer}); | | 215|+ let template = Engine.GuiInterfaceCall("GetTemplateData", {"templateName": templateName, "templatePlayer": templatePlayer }); | 216| 216| translateObjectKeys(template, ["specific", "generic", "tooltip"]); | 217| 217| g_TemplateData[templateName] = deepfreeze(template); | 218| 218| } binaries/data/mods/public/gui/session/session.js | 685| » » button.onpress·=·(function(i)·{·return·function()·{·performGroup((Engine.HotkeyIsPressed("selection.add")·?·"add"·:·"select"),·i);·};·})(i); | | [NORMAL] ESLintBear (no-shadow): | | 'i' is already declared in the upper scope. binaries/data/mods/public/gui/session/session.js | 686| » » button.ondoublepress·=·(function(i)·{·return·function()·{·performGroup("snap",·i);·};·})(i); | | [NORMAL] ESLintBear (no-shadow): | | 'i' is already declared in the upper scope. binaries/data/mods/public/gui/session/session.js | 687| » » button.onpressright·=·(function(i)·{·return·function()·{·performGroup("breakUp",·i);·};·})(i); | | [NORMAL] ESLintBear (no-shadow): | | 'i' is already declared in the upper scope. | | [NORMAL] ESLintBear (space-before-function-paren): | | Unexpected space before function parentheses. |----| | /zpool0/trunk/binaries/data/mods/public/gui/session/selection_panels.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/selection_panels.js | 764| 764| addResearchToQueue(data.item.researchFacilityId, t); | 765| 765| })(tech); | 766| 766| | 767| |- button.onPressRight = (t => function () { | | 767|+ button.onPressRight = (t => function() { | 768| 768| showTemplateDetails( | 769| 769| t, | 770| 770| GetTemplateData(data.unitEntStates.find(state => state.id == data.item.researchFacilityId).template).nativeCiv); binaries/data/mods/public/gui/session/selection_panels.js | 50| » » » switch·(data.item) | | [NORMAL] ESLintBear (default-case): | | Expected a default case. binaries/data/mods/public/gui/session/selection_panels.js | 61| » » switch·(data.item) | | [NORMAL] ESLintBear (default-case): | | Expected a default case. binaries/data/mods/public/gui/session/selection_panels.js | 732| » » » » » » switch·(entity.check) | | [NORMAL] ESLintBear (default-case): | | Expected a default case. | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js | 823| 823| updateEntityColor(data.showAllStatusBars && (i == player || player == -1) ? | 824| 824| [IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer, IID_StatusBars] : | 825| 825| [IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer], | 826| |- cmpRangeManager.GetEntitiesByPlayer(i)); | | 826|+ cmpRangeManager.GetEntitiesByPlayer(i)); | 827| 827| } | 828| 828| updateEntityColor([IID_Selectable, IID_StatusBars], data.selected); | 829| 829| Engine.QueryInterface(SYSTEM_ENTITY, IID_TerritoryManager).UpdateColors(); | | [NORMAL] ESLintBear (object-curly-spacing): | | A space is required after '{'. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js |1221|1221| this.placementWallEntities[tpl] = { |1222|1222| "numUsed": 0, |1223|1223| "entities": [], |1224| |- "templateData": this.GetTemplateData(player, {"templateName": tpl}), | |1224|+ "templateData": this.GetTemplateData(player, { "templateName": tpl}), |1225|1225| }; |1226|1226| |1227|1227| // ensure that the loaded template data contains a wallPiece component | | [NORMAL] ESLintBear (object-curly-spacing): | | A space is required before '}'. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js |1221|1221| this.placementWallEntities[tpl] = { |1222|1222| "numUsed": 0, |1223|1223| "entities": [], |1224| |- "templateData": this.GetTemplateData(player, {"templateName": tpl}), | |1224|+ "templateData": this.GetTemplateData(player, {"templateName": tpl }), |1225|1225| }; |1226|1226| |1227|1227| // ensure that the loaded template data contains a wallPiece component | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 6. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js |1656|1656| { |1657|1657| minDist2 = dist2; |1658|1658| minDistEntitySnapData = { |1659| |- "x": pos.x, | |1659|+ "x": pos.x, |1660|1660| "z": pos.z, |1661|1661| "angle": cmpPosition.GetRotation().y, |1662|1662| "ent": ent | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 6. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js |1657|1657| minDist2 = dist2; |1658|1658| minDistEntitySnapData = { |1659|1659| "x": pos.x, |1660| |- "z": pos.z, | |1660|+ "z": pos.z, |1661|1661| "angle": cmpPosition.GetRotation().y, |1662|1662| "ent": ent |1663|1663| }; | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 6. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js |1658|1658| minDistEntitySnapData = { |1659|1659| "x": pos.x, |1660|1660| "z": pos.z, |1661| |- "angle": cmpPosition.GetRotation().y, | |1661|+ "angle": cmpPosition.GetRotation().y, |1662|1662| "ent": ent |1663|1663| }; |1664|1664| } | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 6. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js |1659|1659| "x": pos.x, |1660|1660| "z": pos.z, |1661|1661| "angle": cmpPosition.GetRotation().y, |1662| |- "ent": ent | |1662|+ "ent": ent |1663|1663| }; |1664|1664| } |1665|1665| } Executing section cli... Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1111/display/redirect Comment Actions Successful build - Chance fights ever on the side of the prudent. Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/730/display/redirect Comment Actions Successful build - Chance fights ever on the side of the prudent. Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (object-curly-spacing): | | A space is required after '{'. |----| | /zpool0/trunk/binaries/data/mods/public/gui/session/session.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/session.js | 212| 212| { | 213| 213| if (!(templateName in g_TemplateData)) | 214| 214| { | 215| |- let template = Engine.GuiInterfaceCall("GetTemplateData", {"templateName": templateName, "owner": owner}); | | 215|+ let template = Engine.GuiInterfaceCall("GetTemplateData", { "templateName": templateName, "owner": owner}); | 216| 216| translateObjectKeys(template, ["specific", "generic", "tooltip"]); | 217| 217| g_TemplateData[templateName] = deepfreeze(template); | 218| 218| } | | [NORMAL] ESLintBear (object-curly-spacing): | | A space is required before '}'. |----| | /zpool0/trunk/binaries/data/mods/public/gui/session/session.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/session.js | 212| 212| { | 213| 213| if (!(templateName in g_TemplateData)) | 214| 214| { | 215| |- let template = Engine.GuiInterfaceCall("GetTemplateData", {"templateName": templateName, "owner": owner}); | | 215|+ let template = Engine.GuiInterfaceCall("GetTemplateData", {"templateName": templateName, "owner": owner }); | 216| 216| translateObjectKeys(template, ["specific", "generic", "tooltip"]); | 217| 217| g_TemplateData[templateName] = deepfreeze(template); | 218| 218| } binaries/data/mods/public/gui/session/session.js | 685| » » button.onpress·=·(function(i)·{·return·function()·{·performGroup((Engine.HotkeyIsPressed("selection.add")·?·"add"·:·"select"),·i);·};·})(i); | | [NORMAL] ESLintBear (no-shadow): | | 'i' is already declared in the upper scope. binaries/data/mods/public/gui/session/session.js | 686| » » button.ondoublepress·=·(function(i)·{·return·function()·{·performGroup("snap",·i);·};·})(i); | | [NORMAL] ESLintBear (no-shadow): | | 'i' is already declared in the upper scope. binaries/data/mods/public/gui/session/session.js | 687| » » button.onpressright·=·(function(i)·{·return·function()·{·performGroup("breakUp",·i);·};·})(i); | | [NORMAL] ESLintBear (no-shadow): | | 'i' is already declared in the upper scope. | | [NORMAL] ESLintBear (space-before-function-paren): | | Unexpected space before function parentheses. |----| | /zpool0/trunk/binaries/data/mods/public/gui/session/selection_panels.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/selection_panels.js | 764| 764| addResearchToQueue(data.item.researchFacilityId, t); | 765| 765| })(tech); | 766| 766| | 767| |- button.onPressRight = (t => function () { | | 767|+ button.onPressRight = (t => function() { | 768| 768| showTemplateDetails( | 769| 769| t, | 770| 770| GetTemplateData(data.unitEntStates.find(state => state.id == data.item.researchFacilityId).template).nativeCiv); binaries/data/mods/public/gui/session/selection_panels.js | 50| » » » switch·(data.item) | | [NORMAL] ESLintBear (default-case): | | Expected a default case. binaries/data/mods/public/gui/session/selection_panels.js | 61| » » switch·(data.item) | | [NORMAL] ESLintBear (default-case): | | Expected a default case. binaries/data/mods/public/gui/session/selection_panels.js | 732| » » » » » » switch·(entity.check) | | [NORMAL] ESLintBear (default-case): | | Expected a default case. | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js | 823| 823| updateEntityColor(data.showAllStatusBars && (i == player || player == -1) ? | 824| 824| [IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer, IID_StatusBars] : | 825| 825| [IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer], | 826| |- cmpRangeManager.GetEntitiesByPlayer(i)); | | 826|+ cmpRangeManager.GetEntitiesByPlayer(i)); | 827| 827| } | 828| 828| updateEntityColor([IID_Selectable, IID_StatusBars], data.selected); | 829| 829| Engine.QueryInterface(SYSTEM_ENTITY, IID_TerritoryManager).UpdateColors(); | | [NORMAL] ESLintBear (object-curly-spacing): | | A space is required after '{'. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js |1221|1221| this.placementWallEntities[tpl] = { |1222|1222| "numUsed": 0, |1223|1223| "entities": [], |1224| |- "templateData": this.GetTemplateData(player, {"templateName": tpl}), | |1224|+ "templateData": this.GetTemplateData(player, { "templateName": tpl}), |1225|1225| }; |1226|1226| |1227|1227| // ensure that the loaded template data contains a wallPiece component | | [NORMAL] ESLintBear (object-curly-spacing): | | A space is required before '}'. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js |1221|1221| this.placementWallEntities[tpl] = { |1222|1222| "numUsed": 0, |1223|1223| "entities": [], |1224| |- "templateData": this.GetTemplateData(player, {"templateName": tpl}), | |1224|+ "templateData": this.GetTemplateData(player, {"templateName": tpl }), |1225|1225| }; |1226|1226| |1227|1227| // ensure that the loaded template data contains a wallPiece component | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 6. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js |1656|1656| { |1657|1657| minDist2 = dist2; |1658|1658| minDistEntitySnapData = { |1659| |- "x": pos.x, | |1659|+ "x": pos.x, |1660|1660| "z": pos.z, |1661|1661| "angle": cmpPosition.GetRotation().y, |1662|1662| "ent": ent | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 6. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js |1657|1657| minDist2 = dist2; |1658|1658| minDistEntitySnapData = { |1659|1659| "x": pos.x, |1660| |- "z": pos.z, | |1660|+ "z": pos.z, |1661|1661| "angle": cmpPosition.GetRotation().y, |1662|1662| "ent": ent |1663|1663| }; | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 6. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js |1658|1658| minDistEntitySnapData = { |1659|1659| "x": pos.x, |1660|1660| "z": pos.z, |1661| |- "angle": cmpPosition.GetRotation().y, | |1661|+ "angle": cmpPosition.GetRotation().y, |1662|1662| "ent": ent |1663|1663| }; |1664|1664| } | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 6. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js |1659|1659| "x": pos.x, |1660|1660| "z": pos.z, |1661|1661| "angle": cmpPosition.GetRotation().y, |1662| |- "ent": ent | |1662|+ "ent": ent |1663|1663| }; |1664|1664| } |1665|1665| } Executing section cli... Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1246/display/redirect Comment Actions Successful build - Chance fights ever on the side of the prudent. Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/764/display/redirect Comment Actions Successful build - Chance fights ever on the side of the prudent. Linter detected issues: Executing section Source... Executing section JS... binaries/data/mods/public/gui/session/session.js | 692| » » button.onpress·=·(function(i)·{·return·function()·{·performGroup((Engine.HotkeyIsPressed("selection.add")·?·"add"·:·"select"),·i);·};·})(i); | | [NORMAL] ESLintBear (no-shadow): | | 'i' is already declared in the upper scope. binaries/data/mods/public/gui/session/session.js | 693| » » button.ondoublepress·=·(function(i)·{·return·function()·{·performGroup("snap",·i);·};·})(i); | | [NORMAL] ESLintBear (no-shadow): | | 'i' is already declared in the upper scope. binaries/data/mods/public/gui/session/session.js | 694| » » button.onpressright·=·(function(i)·{·return·function()·{·performGroup("breakUp",·i);·};·})(i); | | [NORMAL] ESLintBear (no-shadow): | | 'i' is already declared in the upper scope. | | [NORMAL] ESLintBear (space-before-function-paren): | | Unexpected space before function parentheses. |----| | /zpool0/trunk/binaries/data/mods/public/gui/session/selection_panels.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/selection_panels.js | 764| 764| addResearchToQueue(data.item.researchFacilityId, t); | 765| 765| })(tech); | 766| 766| | 767| |- button.onPressRight = (t => function () { | | 767|+ button.onPressRight = (t => function() { | 768| 768| showTemplateDetails( | 769| 769| t, | 770| 770| GetTemplateData(data.unitEntStates.find(state => state.id == data.item.researchFacilityId).template).nativeCiv); binaries/data/mods/public/gui/session/selection_panels.js | 50| » » » switch·(data.item) | | [NORMAL] ESLintBear (default-case): | | Expected a default case. binaries/data/mods/public/gui/session/selection_panels.js | 61| » » switch·(data.item) | | [NORMAL] ESLintBear (default-case): | | Expected a default case. binaries/data/mods/public/gui/session/selection_panels.js | 732| » » » » » » switch·(entity.check) | | [NORMAL] ESLintBear (default-case): | | Expected a default case. | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js | 823| 823| updateEntityColor(data.showAllStatusBars && (i == player || player == -1) ? | 824| 824| [IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer, IID_StatusBars] : | 825| 825| [IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer], | 826| |- cmpRangeManager.GetEntitiesByPlayer(i)); | | 826|+ cmpRangeManager.GetEntitiesByPlayer(i)); | 827| 827| } | 828| 828| updateEntityColor([IID_Selectable, IID_StatusBars], data.selected); | 829| 829| Engine.QueryInterface(SYSTEM_ENTITY, IID_TerritoryManager).UpdateColors(); | | [NORMAL] ESLintBear (object-curly-spacing): | | A space is required after '{'. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js |1221|1221| this.placementWallEntities[tpl] = { |1222|1222| "numUsed": 0, |1223|1223| "entities": [], |1224| |- "templateData": this.GetTemplateData(player, {"templateName": tpl}), | |1224|+ "templateData": this.GetTemplateData(player, { "templateName": tpl}), |1225|1225| }; |1226|1226| |1227|1227| // ensure that the loaded template data contains a wallPiece component | | [NORMAL] ESLintBear (object-curly-spacing): | | A space is required before '}'. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js |1221|1221| this.placementWallEntities[tpl] = { |1222|1222| "numUsed": 0, |1223|1223| "entities": [], |1224| |- "templateData": this.GetTemplateData(player, {"templateName": tpl}), | |1224|+ "templateData": this.GetTemplateData(player, {"templateName": tpl }), |1225|1225| }; |1226|1226| |1227|1227| // ensure that the loaded template data contains a wallPiece component | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 6. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js |1656|1656| { |1657|1657| minDist2 = dist2; |1658|1658| minDistEntitySnapData = { |1659| |- "x": pos.x, | |1659|+ "x": pos.x, |1660|1660| "z": pos.z, |1661|1661| "angle": cmpPosition.GetRotation().y, |1662|1662| "ent": ent | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 6. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js |1657|1657| minDist2 = dist2; |1658|1658| minDistEntitySnapData = { |1659|1659| "x": pos.x, |1660| |- "z": pos.z, | |1660|+ "z": pos.z, |1661|1661| "angle": cmpPosition.GetRotation().y, |1662|1662| "ent": ent |1663|1663| }; | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 6. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js |1658|1658| minDistEntitySnapData = { |1659|1659| "x": pos.x, |1660|1660| "z": pos.z, |1661| |- "angle": cmpPosition.GetRotation().y, | |1661|+ "angle": cmpPosition.GetRotation().y, |1662|1662| "ent": ent |1663|1663| }; |1664|1664| } | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 6. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js |1659|1659| "x": pos.x, |1660|1660| "z": pos.z, |1661|1661| "angle": cmpPosition.GetRotation().y, |1662| |- "ent": ent | |1662|+ "ent": ent |1663|1663| }; |1664|1664| } |1665|1665| } Executing section cli... Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1280/display/redirect |