Add probability bool and weather data util
This commit is contained in:
@@ -1121,7 +1121,7 @@ let profanityFilterWords = [
|
|||||||
"anus",
|
"anus",
|
||||||
"apeshit",
|
"apeshit",
|
||||||
"arsehole",
|
"arsehole",
|
||||||
"ass",
|
//"ass",
|
||||||
"asshole",
|
"asshole",
|
||||||
"assmunch",
|
"assmunch",
|
||||||
"autoerotic",
|
"autoerotic",
|
||||||
@@ -3231,3 +3231,19 @@ function isServerGoingToChangeMapsSoon(hour, minute) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
function getRandomBoolWithProbability(percentChance) {
|
||||||
|
return (Math.random() < percentChance / 100);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===========================================================================
|
||||||
|
|
||||||
|
function getWeatherData(weatherIndex, gameId = getGame()) {
|
||||||
|
if (typeof getGameConfig().weather[gameId][weatherIndex] == "undefined") {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return getGameConfig().weather[gameId][weatherIndex];
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===========================================================================
|
||||||
Reference in New Issue
Block a user