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

Method checkRule

code/src/java/pcgen/core/Globals.java:513–529  ·  view source on GitHub ↗

Find out the state of a PRERULE check @param aKey @return true or false

(final String aKey)

Source from the content-addressed store, hash-verified

511 * @return true or false
512 */
513 public static boolean checkRule(final String aKey)
514 {
515 final RuleCheck rule = SettingsHandler.getGameAsProperty().get().getModeContext().getReferenceContext()
516 .silentlyGetConstructedCDOMObject(RuleCheck.class, aKey);
517 if (rule == null)
518 {
519 return false;
520 }
521 if (SettingsHandler.hasRuleCheck(aKey))
522 {
523 return SettingsHandler.getRuleCheck(aKey);
524 }
525 else
526 {
527 return rule.getDefault();
528 }
529 }
530
531 /**
532 * This method is called by the persistence layer to clear the global

Callers 15

ruleDisabledMethod · 0.95
ruleEnabledMethod · 0.95
passesMethod · 0.95
validateAddLevelMethod · 0.95
refreshLanguageListMethod · 0.95
isRemovableMethod · 0.95
checkAbilityQualifyMethod · 0.95
selectClothesMethod · 0.95
buildBonusLangListMethod · 0.95
validateNewMaxValueMethod · 0.95
validateNewMinValueMethod · 0.95
movementOfTypeMethod · 0.95

Calls 8

getGameAsPropertyMethod · 0.95
hasRuleCheckMethod · 0.95
getRuleCheckMethod · 0.95
getDefaultMethod · 0.95
getModeContextMethod · 0.80
getReferenceContextMethod · 0.65
getMethod · 0.65

Tested by 3

ruleDisabledMethod · 0.76
ruleEnabledMethod · 0.76
passesMethod · 0.76