Search in sources :

Example 6 with BaseKit

use of pcgen.core.kit.BaseKit in project pcgen by PCGen.

the class TableToken method process.

@Override
public boolean process(LoadContext context, Kit obj) {
    for (BaseKit bk : obj.getSafeListFor(ListKey.KIT_TASKS)) {
        if (bk instanceof KitTable) {
            obj.removeFromListFor(ListKey.KIT_TASKS, bk);
            KitTable kt = obj.addTable((KitTable) bk);
            if (kt != null) {
                Logging.errorPrint("Kit Table: " + kt.getTableName() + " in Kit " + obj.getKeyName() + " was a duplicate, " + "Kit had more than one table with that name.");
                return false;
            }
        }
    }
    return true;
}
Also used : BaseKit(pcgen.core.kit.BaseKit) KitTable(pcgen.core.kit.KitTable)

Example 7 with BaseKit

use of pcgen.core.kit.BaseKit in project pcgen by PCGen.

the class StatToken method process.

@Override
public boolean process(LoadContext context, Kit obj) {
    for (BaseKit bk : obj.getSafeListFor(ListKey.KIT_TASKS)) {
        if (bk instanceof KitStat) {
            obj.removeFromListFor(ListKey.KIT_TASKS, bk);
            obj.addStat((KitStat) bk);
        }
    }
    return true;
}
Also used : KitStat(pcgen.core.kit.KitStat) BaseKit(pcgen.core.kit.BaseKit)

Aggregations

BaseKit (pcgen.core.kit.BaseKit)7 BigDecimal (java.math.BigDecimal)3 ArrayList (java.util.ArrayList)3 KitStat (pcgen.core.kit.KitStat)3 Kit (pcgen.core.Kit)2 KitTable (pcgen.core.kit.KitTable)1 HtmlInfoBuilder (pcgen.gui2.util.HtmlInfoBuilder)1