mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
Added POINTS_xxK constants to make future changes easier
This commit is contained in:
parent
b2b46c4d39
commit
9be00d229b
3 changed files with 51 additions and 36 deletions
|
|
@ -277,13 +277,13 @@ function copyMapURL() {
|
|||
|
||||
function changeCellsDensity(value) {
|
||||
switch (value) {
|
||||
case 1 : densityOutput.value = "1K"; break;
|
||||
case 2 : densityOutput.value = "2K"; break;
|
||||
case 3 : densityOutput.value = "5K"; break;
|
||||
default: densityOutput.value = (value-3) * 10 + "K";
|
||||
case POINTS_1K : densityOutput.value = "1K"; break;
|
||||
case POINTS_2K : densityOutput.value = "2K"; break;
|
||||
case POINTS_5K : densityOutput.value = "5K"; break;
|
||||
default: densityOutput.value = (value-POINTS_5K) * 10 + "K";
|
||||
}
|
||||
if (value > 9) densityOutput.style.color = "#b12117";
|
||||
else if (value > 4) densityOutput.style.color = "#dfdf12";
|
||||
if (value > POINTS_50K) densityOutput.style.color = "#b12117";
|
||||
else if (value > POINTS_10K) densityOutput.style.color = "#dfdf12";
|
||||
else densityOutput.style.color = "#038603";
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue