Search in sources :

Example 16 with WieldCategory

use of pcgen.core.character.WieldCategory in project pcgen by PCGen.

the class WieldToken method parseNonEmptyToken.

@Override
public ParseResult parseNonEmptyToken(LoadContext context, Equipment eq, String value) {
    // TODO Need to convert this to a reference??
    WieldCategory wc = context.getReferenceContext().silentlyGetConstructedCDOMObject(WieldCategory.class, value);
    if (wc == null) {
        return new ParseResult.Fail("In " + getTokenName() + " unable to find WieldCategory for " + value, context);
    }
    context.getObjectContext().put(eq, ObjectKey.WIELD, wc);
    return ParseResult.SUCCESS;
}
Also used : WieldCategory(pcgen.core.character.WieldCategory)

Aggregations

WieldCategory (pcgen.core.character.WieldCategory)16 Equipment (pcgen.core.Equipment)9 SizeAdjustment (pcgen.core.SizeAdjustment)7 LoadContext (pcgen.rules.context.LoadContext)7 FixedSizeFormula (pcgen.cdom.formula.FixedSizeFormula)6 PlayerCharacter (pcgen.core.PlayerCharacter)6 Race (pcgen.core.Race)6 StringTokenizer (java.util.StringTokenizer)4 CDOMSingleRef (pcgen.cdom.reference.CDOMSingleRef)2 QualifiedObject (pcgen.core.QualifiedObject)2 WeaponProf (pcgen.core.WeaponProf)2 File (java.io.File)1 BigDecimal (java.math.BigDecimal)1 Map (java.util.Map)1 TreeMap (java.util.TreeMap)1 TreeSet (java.util.TreeSet)1 UnreachableError (pcgen.base.lang.UnreachableError)1 Capacity (pcgen.cdom.helper.Capacity)1 EquipmentHead (pcgen.cdom.inst.EquipmentHead)1 EquipmentModifier (pcgen.core.EquipmentModifier)1