Use feature supported check util
This commit is contained in:
@@ -1696,60 +1696,65 @@ function areServerElementsSupported() {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function isTimeSupported() {
|
function isTimeSupported() {
|
||||||
return supportedFeatures.time[getGame()];
|
return isGameFeatureSupported("time");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function isWeatherSupported() {
|
function isWeatherSupported() {
|
||||||
return supportedFeatures.weather[getGame()];
|
return isGameFeatureSupported("weather");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function arePickupsSupported() {
|
function arePickupsSupported() {
|
||||||
return supportedFeatures.pickups[getGame()];
|
return isGameFeatureSupported("pickups");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function areBlipsSupported() {
|
function areBlipsSupported() {
|
||||||
return supportedFeatures.blips[getGame()];
|
return isGameFeatureSupported("blips");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function areMarkersSupported() {
|
function areMarkersSupported() {
|
||||||
return supportedFeatures.markers[getGame()];
|
return isGameFeatureSupported("markers");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function isFadeCameraSupported() {
|
function isFadeCameraSupported() {
|
||||||
return supportedFeatures.fadeCamera[getGame()];
|
return isGameFeatureSupported("fadeCamera");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function isCustomCameraSupported() {
|
function isCustomCameraSupported() {
|
||||||
return supportedFeatures.customCamera[getGame()];
|
return isGameFeatureSupported("customCamera");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function areFightStylesSupported() {
|
function areFightStylesSupported() {
|
||||||
return supportedFeatures.fightStyles[getGame()];
|
return isGameFeatureSupported("fightStyles");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function areWorldLabelsSupported() {
|
function areWorldLabelsSupported() {
|
||||||
return supportedFeatures.worldLabels[getGame()];
|
return isGameFeatureSupported("worldLabels");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function isGameFeatureSupported(featureName) {
|
function isGameFeatureSupported(featureName) {
|
||||||
|
if (typeof supportedFeatures[featureName] === "undefined") {
|
||||||
|
submitBugReport(null, `[AUTOMATED REPORT] Game feature support error. Unknown feature name: ${featureName}`);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return supportedFeatures[featureName][getGame()];
|
return supportedFeatures[featureName][getGame()];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user