update mod file to reflect changes done on config.json
This commit is contained in:
parent
2f28e5061c
commit
a8c28d139d
@ -9,13 +9,13 @@ class ChooseTheWeather {
|
|||||||
|
|
||||||
chooseWeather(data) {
|
chooseWeather(data) {
|
||||||
// Get the config file for the weather
|
// Get the config file for the weather
|
||||||
const { weatherTypes, weather, loop, overrides} = require('./config.json');
|
const { weatherTypes, weather, random, overrides} = require('./config.json');
|
||||||
// Get the weather sets to choose from
|
// Get the weather sets to choose from
|
||||||
const weatherSets = require('./weatherSet.json');
|
const weatherSets = require('./weatherSet.json');
|
||||||
// Put the choosen weather from the config in a variable
|
// Put the choosen weather from the config in a variable
|
||||||
let choosenWeather;
|
let choosenWeather;
|
||||||
|
|
||||||
if (loop) {
|
if (random) {
|
||||||
const randomIndex = Math.floor(Math.random() * weatherTypes.length);
|
const randomIndex = Math.floor(Math.random() * weatherTypes.length);
|
||||||
choosenWeather = weatherSets[weatherTypes[randomIndex]];
|
choosenWeather = weatherSets[weatherTypes[randomIndex]];
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user