use of pcgen.cdom.enumeration.DataSetID in project pcgen by PCGen.
the class VariableFacetTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
DataSetID cid = DataSetID.getID();
id = CharID.getID(cid);
altid = CharID.getID(cid);
}
use of pcgen.cdom.enumeration.DataSetID in project pcgen by PCGen.
the class HeightFacetTest method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
DataSetID cid = DataSetID.getID();
id = CharID.getID(cid);
}
use of pcgen.cdom.enumeration.DataSetID in project pcgen by PCGen.
the class MasterAvailableSpellFacet method initialize.
/**
* Initializes the global lists of ClassSkillLists. This method only needs
* to be called once for each set of sources that are loaded.
*/
@Override
public synchronized void initialize(LoadContext lc) {
DataSetID dsID = lc.getDataSetID();
MasterListInterface masterLists = SettingsHandler.getGame().getMasterLists();
List<CDOMReference<CDOMList<Spell>>> useLists = new ArrayList<>();
for (CDOMReference ref : masterLists.getActiveLists()) {
Collection<CDOMList<Spell>> lists = ref.getContainedObjects();
for (CDOMList<Spell> list : lists) {
if ((list instanceof ClassSpellList) || (list instanceof DomainSpellList)) {
useLists.add(ref);
break;
}
}
}
for (CDOMReference<CDOMList<Spell>> ref : useLists) {
for (Spell spell : masterLists.getObjects(ref)) {
Collection<AssociatedPrereqObject> assoc = masterLists.getAssociations(ref, spell);
for (AssociatedPrereqObject apo : assoc) {
int lvl = apo.getAssociation(AssociationKey.SPELL_LEVEL);
for (CDOMList<Spell> list : ref.getContainedObjects()) {
AvailableSpell as = new AvailableSpell(list, spell, lvl);
if (apo.hasPrerequisites()) {
as.addAllPrerequisites(apo.getPrerequisiteList());
}
add(dsID, as);
}
}
}
}
}
use of pcgen.cdom.enumeration.DataSetID in project pcgen by PCGen.
the class SolverFactoryFacet method initialize.
@Override
public synchronized void initialize(LoadContext context) {
DataSetID dsID = context.getDataSetID();
set(dsID, context.getVariableContext().getFormulaSetup().getSolverFactory());
}
use of pcgen.cdom.enumeration.DataSetID in project pcgen by PCGen.
the class FormulaSetupFacet method initialize.
@Override
public synchronized void initialize(LoadContext context) {
DataSetID dsID = context.getDataSetID();
SplitFormulaSetup formulaSetup = context.getVariableContext().getFormulaSetup();
set(dsID, formulaSetup);
}
Aggregations