Apply the stored preferences to the game mode.
()
| 190 | * Apply the stored preferences to the game mode. |
| 191 | */ |
| 192 | public void applyPreferences() |
| 193 | { |
| 194 | gamemodePrefsContext = prefsContext.createChildContext(name); |
| 195 | String rollMethodExpr = gamemodePrefsContext.getProperty("rollMethodExpression"); //$NON-NLS-1$ |
| 196 | if (StringUtils.isNotBlank(rollMethodExpr)) |
| 197 | { |
| 198 | activeRollMethod = getModeContext().getReferenceContext().silentlyGetConstructedCDOMObject(RollMethod.class, |
| 199 | rollMethodExpr); |
| 200 | if (activeRollMethod == null) |
| 201 | { |
| 202 | Logging.errorPrint("Could not find roll method '" //$NON-NLS-1$ |
| 203 | + rollMethodExpr + "' while loading game mode " + name); //$NON-NLS-1$ |
| 204 | } |
| 205 | } |
| 206 | rollMethod = gamemodePrefsContext.getInt("rollMethod"); //$NON-NLS-1$ |
| 207 | allStatsValue = gamemodePrefsContext.initInt("allStatsValue", 10); //$NON-NLS-1$ |
| 208 | purchaseMethodName = gamemodePrefsContext.getProperty("purchaseMethodName"); //$NON-NLS-1$ |
| 209 | } |
| 210 | |
| 211 | /** |
| 212 | * Set the AC Text. |
no test coverage detected