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

Method dataAdded

code/src/java/pcgen/cdom/facet/KitChoiceFacet.java:62–75  ·  view source on GitHub ↗

Drives kit selection and adds the selected Kits to the Player Character. Triggered when one of the Facets to which KitChoiceFacet listens fires a DataFacetChangeEvent to indicate a CDOMObject was added to a Player Character. @param dfce The DataFacetChangeEvent containing the informatio

(DataFacetChangeEvent<CharID, CDOMObject> dfce)

Source from the content-addressed store, hash-verified

60 * change
61 */
62 @Override
63 public void dataAdded(DataFacetChangeEvent<CharID, CDOMObject> dfce)
64 {
65 CharID id = dfce.getCharID();
66 PlayerCharacter aPC = trackingFacet.getPC(id);
67 if (!aPC.isImporting())
68 {
69 CDOMObject cdo = dfce.getCDOMObject();
70 for (TransitionChoice<Kit> kit : cdo.getSafeListFor(ListKey.KIT_CHOICE))
71 {
72 kit.act(kit.driveChoice(aPC), cdo, aPC);
73 }
74 }
75 }
76
77 /**
78 * Triggered when one of the Facets to which KitChoiceFacet listens fires a

Callers

nothing calls this directly

Calls 7

isImportingMethod · 0.95
getSafeListForMethod · 0.95
getCharIDMethod · 0.65
getCDOMObjectMethod · 0.65
actMethod · 0.65
driveChoiceMethod · 0.65
getPCMethod · 0.45

Tested by

no test coverage detected