Complete overhaul of code structure and relevant files (#639)

This commit is contained in:
Daniël van Noord
2021-03-14 00:41:14 +01:00
committed by GitHub
parent bb34bce9a5
commit 1bffb58782
163 changed files with 7369 additions and 10882 deletions

View File

@@ -0,0 +1,22 @@
import UpdateUpgrades from '../../Disp/BuildingsUpgrades/Upgrades';
import { CMOptions } from '../VariablesAndData';
/**
* Section: Functions related to the Upgrade Bar
/**
* This function toggles the upgrade bar and the colours of upgrades
* It is called by a change in CM.Options.UpBarColor
*/
export default function ToggleUpgradeBarAndColor() {
if (CMOptions.UpBarColor === 1) { // Colours and bar on
l('CMUpgradeBar').style.display = '';
UpdateUpgrades();
} else if (CMOptions.UpBarColor === 2) { // Colours on and bar off
l('CMUpgradeBar').style.display = 'none';
UpdateUpgrades();
} else { // Colours and bar off
l('CMUpgradeBar').style.display = 'none';
Game.RebuildUpgrades();
}
}