use of eidolons.system.options.GameplayOptions.GAMEPLAY_OPTION in project Eidolons by IDemiurge.
the class OptionsMaster method applyGameplayOptions.
private static void applyGameplayOptions(GameplayOptions gameplayOptions) {
for (Object sub : gameplayOptions.getValues().keySet()) {
new EnumMaster<GAMEPLAY_OPTION>().retrieveEnumConst(GAMEPLAY_OPTION.class, gameplayOptions.getValues().get(sub).toString());
GAMEPLAY_OPTION key = gameplayOptions.getKey((sub.toString()));
String value = gameplayOptions.getValue(key);
if (!StringMaster.isInteger(value)) {
switch(key) {
case RULES_SCOPE:
RuleMaster.setScope(new EnumMaster<RULE_SCOPE>().retrieveEnumConst(RULE_SCOPE.class, gameplayOptions.getValues().get(sub).toString()));
break;
case GAME_DIFFICULTY:
if (Eidolons.game != null)
if (Eidolons.game.getBattleMaster() != null)
Eidolons.game.getBattleMaster().getOptionManager().difficultySet(value);
break;
}
}
}
}
Aggregations