Fixes broken use of a function, removes an unused parameter, fixes the incorrect property name in the gui.
Details
Details
- Reviewers
fatherbushido - Group Reviewers
Restricted Owners Package (Owns No Changed Paths) - Commits
- rP20112: Cleanup of damage type related code in cmpDeathDamage.
Check that nothing in the gui uses that property so far. Also check that the new code is doing what the previous one was trying to do.
Sort of related to D866.
Diff Detail
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Comment Actions
Build is green
Updating workspaces. Build (release)... Build (debug)... Running release tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK! Checking XML files...
http://jenkins-master:8080/job/phabricator/1960/ for more details.
Comment Actions
Executing section Default... Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (no-else-return): | | Unnecessary 'else' after 'return'. |----| | /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/simulation/components/GuiInterface.js | 209| 209| { | 210| 210| if (this.miragedEntities[player]) | 211| 211| return this.renamedEntities.concat(this.miragedEntities[player]); | 212| |- else | 213| |- return this.renamedEntities; | | 212|+ return this.renamedEntities; | 214| 213| }; | 215| 214| | 216| 215| GuiInterface.prototype.ClearRenamedEntities = function() | | [NORMAL] ESLintBear (no-else-return): | | Unnecessary 'else' after 'return'. |----| | /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/simulation/components/GuiInterface.js |1236|1236| |1237|1237| return false; |1238|1238| } |1239| |- else |1240| |- { | |1239|+ |1241|1240| // Move all existing cached entities outside of the world and reset their use count |1242|1241| for (let tpl in this.placementWallEntities) |1243|1242| { |1271|1270| } |1272|1271| } |1273|1272| } |1274| |- } | |1273|+ |1275|1274| |1276|1275| // prevent division by zero errors further on if the start and end positions are the same |1277|1276| if (end.pos && (start.pos.x === end.pos.x && start.pos.z === end.pos.z)) | | [NORMAL] ESLintBear (no-else-return): | | Unnecessary 'else' after 'return'. |----| | /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/simulation/components/GuiInterface.js | |++++| /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/simulation/components/GuiInterface.js |2038|2038| { |2039|2039| if (exposedFunctions[name]) |2040|2040| return this[name](player, args); |2041| |- else |2042| |- throw new Error("Invalid GuiInterface Call name \""+name+"\""); | |2041|+ throw new Error("Invalid GuiInterface Call name \""+name+"\""); |2043|2042| }; |2044|2043| |2045|2044| Engine.RegisterSystemComponentType(IID_GuiInterface, "GuiInterface", GuiInterface); binaries/data/mods/public/simulation/components/GuiInterface.js | 664| » for·(let·name·of·auraNames) | | [NORMAL] ESLintBear (no-shadow): | | 'name' is already declared in the upper scope. binaries/data/mods/public/simulation/components/GuiInterface.js | 664| » for·(let·name·of·auraNames) | | [NORMAL] ESLintBear (no-shadow): | | 'name' is already declared in the upper scope. binaries/data/mods/public/simulation/components/GuiInterface.js | 764| » if·(notification.players·==·undefined) | | [NORMAL] JSHintBear: | | Use '===' to compare with 'undefined'. binaries/data/mods/public/simulation/components/GuiInterface.js |1032| » » » » if·(cmd.queued·==·true) | | [NORMAL] JSHintBear: | | Use '===' to compare with 'true'. binaries/data/mods/public/simulation/components/GuiInterface.js |1094| » » if·(cmd.template·==·"") | | [NORMAL] JSHintBear: | | Use '===' to compare with ''. binaries/data/mods/public/simulation/components/GuiInterface.js |1515| » » » » if·(terrainGroundPrev·!=·null·||·terrainGroundNext·!=·null) | | [NORMAL] JSHintBear: | | Use '!==' to compare with 'null'. binaries/data/mods/public/simulation/components/GuiInterface.js |1515| » » » » if·(terrainGroundPrev·!=·null·||·terrainGroundNext·!=·null) | | [NORMAL] JSHintBear: | | Use '!==' to compare with 'null'. binaries/data/mods/public/simulation/components/GuiInterface.js |1637| » if·(numRequiredPieces·>·0·&&·result.pieces.length·==·0) | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. binaries/data/mods/public/simulatio
http://jenkins-master:8080/job/phabricator_lint/475/ for more details.
Comment Actions
(shame on me)
unused param in first file. (ok in the test file)
wrong usage in the second file resulting in a wrong object. Code unused cuurently in the gui so it wasnt noticeable. Returned object consistent with the one in template.js in case a tooltip uses both.