Search in sources :

Example 1 with RaceFacet

use of pcgen.cdom.facet.model.RaceFacet in project pcgen by PCGen.

the class FacetInitialization method doInitialization.

private static void doInitialization() {
    doOtherInitialization();
    doBridges();
    TemplateFacet templateFacet = FacetLibrary.getFacet(TemplateFacet.class);
    ConditionalTemplateFacet conditionalTemplateFacet = FacetLibrary.getFacet(ConditionalTemplateFacet.class);
    RaceFacet raceFacet = FacetLibrary.getFacet(RaceFacet.class);
    ClassFacet classFacet = FacetLibrary.getFacet(ClassFacet.class);
    ClassLevelFacet classLevelFacet = FacetLibrary.getFacet(ClassLevelFacet.class);
    ExpandedCampaignFacet expandedCampaignFacet = FacetLibrary.getFacet(ExpandedCampaignFacet.class);
    EquipmentFacet equipmentFacet = FacetLibrary.getFacet(EquipmentFacet.class);
    EquippedEquipmentFacet equippedFacet = FacetLibrary.getFacet(EquippedEquipmentFacet.class);
    NaturalEquipmentFacet naturalEquipmentFacet = FacetLibrary.getFacet(NaturalEquipmentFacet.class);
    SourcedEquipmentFacet activeEquipmentFacet = FacetLibrary.getFacet(SourcedEquipmentFacet.class);
    ActiveEqModFacet activeEqModFacet = FacetLibrary.getFacet(ActiveEqModFacet.class);
    GlobalModifierFacet globalModifierFacet = FacetLibrary.getFacet(GlobalModifierFacet.class);
    AlignmentFacet alignmentFacet = FacetLibrary.getFacet(AlignmentFacet.class);
    BioSetFacet bioSetFacet = FacetLibrary.getFacet(BioSetFacet.class);
    BioSetTrackingFacet bioSetTrackingFacet = FacetLibrary.getFacet(BioSetTrackingFacet.class);
    CheckFacet checkFacet = FacetLibrary.getFacet(CheckFacet.class);
    DynamicFacet dynamicFacet = FacetLibrary.getFacet(DynamicFacet.class);
    DynamicConsolidationFacet dynamicConsolidationFacet = FacetLibrary.getFacet(DynamicConsolidationFacet.class);
    VarScopedFacet varScopedFacet = FacetLibrary.getFacet(VarScopedFacet.class);
    AutoLanguageFacet autoLangFacet = FacetLibrary.getFacet(AutoLanguageFacet.class);
    WeaponProfFacet weaponProfFacet = FacetLibrary.getFacet(WeaponProfFacet.class);
    LevelFacet levelFacet = FacetLibrary.getFacet(LevelFacet.class);
    SizeFacet sizeFacet = FacetLibrary.getFacet(SizeFacet.class);
    BonusChangeFacet bonusChangeFacet = FacetLibrary.getFacet(BonusChangeFacet.class);
    DeityFacet deityFacet = FacetLibrary.getFacet(DeityFacet.class);
    DomainFacet domainFacet = FacetLibrary.getFacet(DomainFacet.class);
    CompanionModFacet companionModFacet = FacetLibrary.getFacet(CompanionModFacet.class);
    StatFacet statFacet = FacetLibrary.getFacet(StatFacet.class);
    SkillFacet skillFacet = FacetLibrary.getFacet(SkillFacet.class);
    NaturalWeaponProfFacet nwpFacet = FacetLibrary.getFacet(NaturalWeaponProfFacet.class);
    UserEquipmentFacet userEquipmentFacet = FacetLibrary.getFacet(UserEquipmentFacet.class);
    NaturalWeaponFacet naturalWeaponFacet = FacetLibrary.getFacet(NaturalWeaponFacet.class);
    EquipSetFacet equipSetFacet = FacetLibrary.getFacet(EquipSetFacet.class);
    CDOMObjectConsolidationFacet cdomObjectFacet = FacetLibrary.getFacet(CDOMObjectConsolidationFacet.class);
    CDOMObjectSourceFacet cdomSourceFacet = FacetLibrary.getFacet(CDOMObjectSourceFacet.class);
    CharacterConsolidationFacet charObjectFacet = FacetLibrary.getFacet(CharacterConsolidationFacet.class);
    EquipmentConsolidationFacet eqObjectFacet = FacetLibrary.getFacet(EquipmentConsolidationFacet.class);
    GrantedAbilityFacet grantedAbilityFacet = FacetLibrary.getFacet(GrantedAbilityFacet.class);
    DirectAbilityFacet directAbilityFacet = FacetLibrary.getFacet(DirectAbilityFacet.class);
    DirectAbilityInputFacet directAbilityInputFacet = FacetLibrary.getFacet(DirectAbilityInputFacet.class);
    ConditionallyGrantedAbilityFacet cabFacet = FacetLibrary.getFacet(ConditionallyGrantedAbilityFacet.class);
    SimpleAbilityFacet simpleAbilityFacet = FacetLibrary.getFacet(SimpleAbilityFacet.class);
    AbilitySelectionApplication abilitySelectionApplication = FacetLibrary.getFacet(AbilitySelectionApplication.class);
    equipmentFacet.addDataFacetChangeListener(naturalEquipmentFacet);
    equippedFacet.addDataFacetChangeListener(activeEquipmentFacet);
    naturalEquipmentFacet.addDataFacetChangeListener(activeEquipmentFacet);
    activeEquipmentFacet.addDataFacetChangeListener(activeEqModFacet);
    nwpFacet.addDataFacetChangeListener(weaponProfFacet);
    dynamicFacet.addScopeFacetChangeListener(dynamicConsolidationFacet);
    charObjectFacet.addDataFacetChangeListener(naturalWeaponFacet);
    naturalWeaponFacet.addDataFacetChangeListener(equipmentFacet);
    naturalWeaponFacet.addDataFacetChangeListener(userEquipmentFacet);
    naturalWeaponFacet.addDataFacetChangeListener(equipSetFacet);
    classFacet.addLevelChangeListener(levelFacet);
    levelFacet.addLevelChangeListener(conditionalTemplateFacet);
    levelFacet.addLevelChangeListener(sizeFacet);
    grantedAbilityFacet.addDataFacetChangeListener(abilitySelectionApplication);
    grantedAbilityFacet.addDataFacetChangeListener(simpleAbilityFacet);
    directAbilityFacet.addDataFacetChangeListener(grantedAbilityFacet);
    directAbilityInputFacet.addDataFacetChangeListener(grantedAbilityFacet);
    cabFacet.addDataFacetChangeListener(grantedAbilityFacet);
    raceFacet.addDataFacetChangeListener(bioSetTrackingFacet);
    bonusChangeFacet.addBonusChangeListener(sizeFacet, "SIZEMOD", "NUMBER");
    //model done
    expandedCampaignFacet.addDataFacetChangeListener(charObjectFacet);
    //model done
    globalModifierFacet.addDataFacetChangeListener(charObjectFacet);
    //model done
    alignmentFacet.addDataFacetChangeListener(charObjectFacet);
    //model done
    bioSetFacet.addDataFacetChangeListener(charObjectFacet);
    //model done
    checkFacet.addDataFacetChangeListener(charObjectFacet);
    //model done
    classFacet.addDataFacetChangeListener(charObjectFacet);
    //model done
    deityFacet.addDataFacetChangeListener(charObjectFacet);
    //model done
    domainFacet.addDataFacetChangeListener(charObjectFacet);
    //model done
    raceFacet.addDataFacetChangeListener(charObjectFacet);
    sizeFacet.addDataFacetChangeListener(charObjectFacet);
    //model done
    skillFacet.addDataFacetChangeListener(charObjectFacet);
    //model done
    statFacet.addDataFacetChangeListener(charObjectFacet);
    //model done
    templateFacet.addDataFacetChangeListener(charObjectFacet);
    // weaponProfList is still just a list of Strings
    // results.addAll(getWeaponProfList());
    //model done
    classLevelFacet.addDataFacetChangeListener(charObjectFacet);
    //model done
    simpleAbilityFacet.addDataFacetChangeListener(charObjectFacet);
    //model done
    companionModFacet.addDataFacetChangeListener(charObjectFacet);
    activeEquipmentFacet.addDataFacetChangeListener(eqObjectFacet);
    activeEqModFacet.addDataFacetChangeListener(eqObjectFacet);
    eqObjectFacet.addDataFacetChangeListener(cdomObjectFacet);
    charObjectFacet.addDataFacetChangeListener(cdomObjectFacet);
    cdomObjectFacet.addDataFacetChangeListener(nwpFacet);
    cdomSourceFacet.addDataFacetChangeListener(autoLangFacet);
    charObjectFacet.addDataFacetChangeListener(varScopedFacet);
    //model done
    dynamicConsolidationFacet.addDataFacetChangeListener(varScopedFacet);
}
Also used : DynamicConsolidationFacet(pcgen.cdom.facet.model.DynamicConsolidationFacet) VarScopedFacet(pcgen.cdom.facet.model.VarScopedFacet) TemplateFacet(pcgen.cdom.facet.model.TemplateFacet) CompanionModFacet(pcgen.cdom.facet.model.CompanionModFacet) DomainFacet(pcgen.cdom.facet.model.DomainFacet) StatFacet(pcgen.cdom.facet.model.StatFacet) AlignmentFacet(pcgen.cdom.facet.model.AlignmentFacet) DynamicFacet(pcgen.cdom.facet.input.DynamicFacet) ActiveEqModFacet(pcgen.cdom.facet.model.ActiveEqModFacet) RaceFacet(pcgen.cdom.facet.model.RaceFacet) ClassFacet(pcgen.cdom.facet.model.ClassFacet) ClassLevelFacet(pcgen.cdom.facet.model.ClassLevelFacet) CheckFacet(pcgen.cdom.facet.model.CheckFacet) BioSetFacet(pcgen.cdom.facet.model.BioSetFacet) LevelFacet(pcgen.cdom.facet.analysis.LevelFacet) ClassLevelFacet(pcgen.cdom.facet.model.ClassLevelFacet) SizeFacet(pcgen.cdom.facet.model.SizeFacet) SimpleAbilityFacet(pcgen.cdom.facet.model.SimpleAbilityFacet) ExpandedCampaignFacet(pcgen.cdom.facet.model.ExpandedCampaignFacet) DeityFacet(pcgen.cdom.facet.model.DeityFacet) MasterUsableSkillFacet(pcgen.cdom.facet.input.MasterUsableSkillFacet) SkillFacet(pcgen.cdom.facet.model.SkillFacet)

Example 2 with RaceFacet

use of pcgen.cdom.facet.model.RaceFacet in project pcgen by PCGen.

the class StatIntegrationTest method setUp.

@Before
public void setUp() throws Exception {
    DataSetID cid = DataSetID.getID();
    id = CharID.getID(cid);
    altid = CharID.getID(cid);
    stat1 = BuildUtilities.createStat("Stat1", "Stat1");
    stat2 = BuildUtilities.createStat("Stat2", "Stat2");
    unlockedFacet = new UnlockedStatFacet();
    lockFacet = new StatLockFacet();
    lockFacet.setFormulaResolvingFacet(new FormulaResolvingFacet());
    nonAbilityFacet = new NonAbilityFacet();
    NonStatStatFacet nonStatStatFacet = new NonStatStatFacet();
    nonAbilityFacet.setNonStatStatFacet(nonStatStatFacet);
    NonStatToStatFacet nonStatToStatFacet = new NonStatToStatFacet();
    nonAbilityFacet.setNonStatToStatFacet(nonStatToStatFacet);
    rfacet = new RaceFacet();
    tfacet = new TemplateFacet();
    CDOMObjectConsolidationFacet cdomFacet = new CDOMObjectConsolidationFacet();
    CDOMObjectBridge bridge = new CDOMObjectBridge();
    cdomFacet.setBridgeFacet(bridge);
    rfacet.addDataFacetChangeListener(cdomFacet);
    tfacet.addDataFacetChangeListener(cdomFacet);
    cdomFacet.addDataFacetChangeListener(lockFacet);
    cdomFacet.addDataFacetChangeListener(unlockedFacet);
    cdomFacet.addDataFacetChangeListener(nonStatStatFacet);
    cdomFacet.addDataFacetChangeListener(nonStatToStatFacet);
}
Also used : RaceFacet(pcgen.cdom.facet.model.RaceFacet) UnlockedStatFacet(pcgen.cdom.facet.analysis.UnlockedStatFacet) TemplateFacet(pcgen.cdom.facet.model.TemplateFacet) NonStatToStatFacet(pcgen.cdom.facet.analysis.NonStatToStatFacet) DataSetID(pcgen.cdom.enumeration.DataSetID) StatLockFacet(pcgen.cdom.facet.analysis.StatLockFacet) NonStatStatFacet(pcgen.cdom.facet.analysis.NonStatStatFacet) NonAbilityFacet(pcgen.cdom.facet.analysis.NonAbilityFacet) Before(org.junit.Before)

Aggregations

RaceFacet (pcgen.cdom.facet.model.RaceFacet)2 TemplateFacet (pcgen.cdom.facet.model.TemplateFacet)2 Before (org.junit.Before)1 DataSetID (pcgen.cdom.enumeration.DataSetID)1 LevelFacet (pcgen.cdom.facet.analysis.LevelFacet)1 NonAbilityFacet (pcgen.cdom.facet.analysis.NonAbilityFacet)1 NonStatStatFacet (pcgen.cdom.facet.analysis.NonStatStatFacet)1 NonStatToStatFacet (pcgen.cdom.facet.analysis.NonStatToStatFacet)1 StatLockFacet (pcgen.cdom.facet.analysis.StatLockFacet)1 UnlockedStatFacet (pcgen.cdom.facet.analysis.UnlockedStatFacet)1 DynamicFacet (pcgen.cdom.facet.input.DynamicFacet)1 MasterUsableSkillFacet (pcgen.cdom.facet.input.MasterUsableSkillFacet)1 ActiveEqModFacet (pcgen.cdom.facet.model.ActiveEqModFacet)1 AlignmentFacet (pcgen.cdom.facet.model.AlignmentFacet)1 BioSetFacet (pcgen.cdom.facet.model.BioSetFacet)1 CheckFacet (pcgen.cdom.facet.model.CheckFacet)1 ClassFacet (pcgen.cdom.facet.model.ClassFacet)1 ClassLevelFacet (pcgen.cdom.facet.model.ClassLevelFacet)1 CompanionModFacet (pcgen.cdom.facet.model.CompanionModFacet)1 DeityFacet (pcgen.cdom.facet.model.DeityFacet)1