From e822552a607632a4bc3a18cbc8a1fdf90bfa47ce Mon Sep 17 00:00:00 2001 From: isaisstillalive Date: Fri, 3 Jul 2020 16:29:29 +0900 Subject: [PATCH] Refactoring obscure variable name --- src/js/game/hud/parts/base_toolbar.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/game/hud/parts/base_toolbar.js b/src/js/game/hud/parts/base_toolbar.js index 551763ec..f5ec24c6 100644 --- a/src/js/game/hud/parts/base_toolbar.js +++ b/src/js/game/hud/parts/base_toolbar.js @@ -108,18 +108,18 @@ export class HUDBaseToolbar extends BaseHUDPart { return; } - let process = false; + let newBuildingFound = false; let newIndex = this.lastSelectedIndex; for (let i = 0; i < this.supportedBuildings.length; ++i, ++newIndex) { newIndex %= this.supportedBuildings.length; const metaBuilding = gMetaBuildingRegistry.findByClass(this.supportedBuildings[newIndex]); const handle = this.buildingHandles[metaBuilding.id]; if (!handle.selected && handle.unlocked) { - process = true; + newBuildingFound = true; break; } } - if (!process) { + if (!newBuildingFound) { return; } const metaBuildingClass = this.supportedBuildings[newIndex];