MCPcopy Create free account
hub / github.com/PCGen/pcgen / setRollMethodExpressionByName

Method setRollMethodExpressionByName

code/src/java/pcgen/core/GameMode.java:1470–1483  ·  view source on GitHub ↗

Set the roll method expression by name. @param aString

(final String aString)

Source from the content-addressed store, hash-verified

1468 * @param aString
1469 */
1470 public void setRollMethodExpressionByName(final String aString)
1471 {
1472 activeRollMethod =
1473 getModeContext().getReferenceContext().silentlyGetConstructedCDOMObject(RollMethod.class, aString);
1474 if (activeRollMethod == null)
1475 {
1476 setRollMethod(Constants.CHARACTER_STAT_METHOD_USER);
1477 }
1478 else
1479 {
1480 setRollMethod(Constants.CHARACTER_STAT_METHOD_ROLLED);
1481 }
1482 gamemodePrefsContext.setProperty("rollMethodExpression", aString); //$NON-NLS-1$
1483 }
1484
1485 /**
1486 * Get the cost for an ability score.

Callers 2

onCopyMethod · 0.95

Calls 5

getModeContextMethod · 0.95
setRollMethodMethod · 0.95
setPropertyMethod · 0.80
getReferenceContextMethod · 0.65

Tested by

no test coverage detected