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

Method dataAdded

code/src/java/pcgen/cdom/facet/ArmorProfFacet.java:56–65  ·  view source on GitHub ↗

Processes added CDOMObjects to determine whether they contained an AUTO:ARMORPROF, and if so, processes the contents of that token to add the appropriate ArmorProfProviders to the Player Character. Triggered when one of the Facets to which ArmorProfFacet listens fires a DataFacetChangeEvent to indi

(DataFacetChangeEvent<CharID, CDOMObject> dfce)

Source from the content-addressed store, hash-verified

54 * change
55 */
56 @Override
57 public void dataAdded(DataFacetChangeEvent<CharID, CDOMObject> dfce)
58 {
59 CDOMObject cdo = dfce.getCDOMObject();
60 List<ArmorProfProvider> armorProfs = cdo.getListFor(ListKey.AUTO_ARMORPROF);
61 if (armorProfs != null)
62 {
63 armorProfProviderFacet.addAll(dfce.getCharID(), armorProfs, cdo);
64 }
65 }
66
67 /**
68 * Processes removed CDOMObjects to determine whether they contained an

Callers

nothing calls this directly

Calls 4

getListForMethod · 0.95
getCDOMObjectMethod · 0.65
addAllMethod · 0.65
getCharIDMethod · 0.65

Tested by

no test coverage detected