mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Refactoring obscure variable name
This commit is contained in:
parent
ada63459aa
commit
e822552a60
@ -108,18 +108,18 @@ export class HUDBaseToolbar extends BaseHUDPart {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let process = false;
|
let newBuildingFound = false;
|
||||||
let newIndex = this.lastSelectedIndex;
|
let newIndex = this.lastSelectedIndex;
|
||||||
for (let i = 0; i < this.supportedBuildings.length; ++i, ++newIndex) {
|
for (let i = 0; i < this.supportedBuildings.length; ++i, ++newIndex) {
|
||||||
newIndex %= this.supportedBuildings.length;
|
newIndex %= this.supportedBuildings.length;
|
||||||
const metaBuilding = gMetaBuildingRegistry.findByClass(this.supportedBuildings[newIndex]);
|
const metaBuilding = gMetaBuildingRegistry.findByClass(this.supportedBuildings[newIndex]);
|
||||||
const handle = this.buildingHandles[metaBuilding.id];
|
const handle = this.buildingHandles[metaBuilding.id];
|
||||||
if (!handle.selected && handle.unlocked) {
|
if (!handle.selected && handle.unlocked) {
|
||||||
process = true;
|
newBuildingFound = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!process) {
|
if (!newBuildingFound) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const metaBuildingClass = this.supportedBuildings[newIndex];
|
const metaBuildingClass = this.supportedBuildings[newIndex];
|
||||||
|
Loading…
Reference in New Issue
Block a user