Change to "color" to "colour"

This commit is contained in:
Daniël van Noord
2021-07-25 14:42:21 +02:00
parent 65eff470cf
commit d0ddc93f7c
20 changed files with 99 additions and 99 deletions

View File

@@ -2,23 +2,23 @@ import { ColourGreen, ColourOrange, ColourRed, ColourYellow } from '../Variables
import FormatTime from './FormatTime';
/**
* This function returns the color to be used for time-strings
* This function returns the colour to be used for time-strings
* @param {number} time Time to be coloured
* @returns {{string, string}} {text, color} Both the formatted time and color as strings in an array
* @returns {{string, string}} {text, colour} Both the formatted time and colour as strings in an array
*/
export default function GetTimeColour(time) {
let color;
let colour;
let text;
if (time <= 0) {
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.TimeFormat)
text = '00:00:00:00:00';
else text = 'Done!';
color = ColourGreen;
colour = ColourGreen;
} else {
text = FormatTime(time);
if (time > 300) color = ColourRed;
else if (time > 60) color = ColourOrange;
else color = ColourYellow;
if (time > 300) colour = ColourRed;
else if (time > 60) colour = ColourOrange;
else colour = ColourYellow;
}
return { text, color };
return { text, colour };
}