use of eidolons.content.DC_ValueManager.VALUE_GROUP in project Eidolons by IDemiurge.
the class DC_RequirementsManager method getTotalCondition.
private Condition getTotalCondition(String valRef, String value) {
List<PARAMETER> params;
String str1 = "";
if (valRef.contains(StringMaster.VAR_SEPARATOR)) {
params = new ArrayList<>();
for (String s : StringMaster.open(valRef, StringMaster.VAR_SEPARATOR)) {
PARAMETER p = ContentManager.getPARAM(s);
if (p == null) {
p = ContentManager.getMastery(s);
}
if (p != null) {
params.add(p);
} else {
VALUE_GROUP template = DC_ValueManager.getValueGroup(s);
params.addAll(new ListMaster<PARAMETER>().getList(template.getParams()));
}
}
} else {
// TODO can we use VG_Condition here?
VALUE_GROUP template = DC_ValueManager.getValueGroup(valRef);
params = new ListMaster<PARAMETER>().getList(template.getParams());
}
for (PARAMETER p : params) {
str1 += StringMaster.getValueRef(KEYS.SOURCE, p) + "+";
}
str1 = StringMaster.cropLast(str1, 1);
return new NumericCondition(false, str1, value);
}
Aggregations