use of pcgen.base.util.NamedFormula in project pcgen by PCGen.
the class KitGear method processLookups.
private void processLookups(Kit aKit, PlayerCharacter aPC) {
Collection<NamedFormula> lookups = getLookups();
if (lookups == null) {
return;
}
for (NamedFormula lookup : lookups) {
KitTable kt = aKit.getTable(lookup.getName());
KitGear gear = kt.getEntry(aPC, lookup.getFormula().resolve(aPC, "").intValue());
gear.processLookups(aKit, aPC);
overlayGear(gear);
}
}
use of pcgen.base.util.NamedFormula in project pcgen by PCGen.
the class LookupToken method unparse.
@Override
public String[] unparse(LoadContext context, KitGear kitGear) {
Collection<NamedFormula> lookups = kitGear.getLookups();
if (lookups == null) {
return null;
}
List<String> list = new ArrayList<>();
for (NamedFormula nf : lookups) {
list.add(nf.getName() + ',' + nf.getFormula().toString());
}
return list.toArray(new String[list.size()]);
}
Aggregations