Search in sources :

Example 1 with ResultFacet

use of pcgen.cdom.facet.analysis.ResultFacet in project pcgen by PCGen.

the class FaceToken method getFace.

public static OrderedPair getFace(CharID id) {
    String varName = ControlUtilities.getControlToken(Globals.getContext(), CControl.FACE);
    if (varName == null) {
        varName = "Face";
    }
    ResultFacet resultFacet = FacetLibrary.getFacet(ResultFacet.class);
    return (OrderedPair) resultFacet.getGlobalVariable(id, varName);
}
Also used : ResultFacet(pcgen.cdom.facet.analysis.ResultFacet) OrderedPair(pcgen.base.math.OrderedPair)

Example 2 with ResultFacet

use of pcgen.cdom.facet.analysis.ResultFacet in project pcgen by PCGen.

the class InfoModel method getVars.

private Object[] getVars(CaseInsensitiveString cis) {
    String[] vars = cdo.get(MapKey.INFOVARS, cis);
    int varCount = vars != null ? vars.length : 0;
    Object[] replacedvars = new Object[varCount];
    if (varCount == 0) {
        return replacedvars;
    }
    ResultFacet resultFacet = FacetLibrary.getFacet(ResultFacet.class);
    for (int i = 0; i < varCount; i++) {
        String varIdent = vars[i];
        replacedvars[i] = resultFacet.getLocalVariable(id, cdo, varIdent);
    }
    return replacedvars;
}
Also used : ResultFacet(pcgen.cdom.facet.analysis.ResultFacet) CDOMObject(pcgen.cdom.base.CDOMObject) CaseInsensitiveString(pcgen.base.lang.CaseInsensitiveString)

Aggregations

ResultFacet (pcgen.cdom.facet.analysis.ResultFacet)2 CaseInsensitiveString (pcgen.base.lang.CaseInsensitiveString)1 OrderedPair (pcgen.base.math.OrderedPair)1 CDOMObject (pcgen.cdom.base.CDOMObject)1