use of main.ability.effects.Effect.MOD_PROP_TYPE in project Eidolons by IDemiurge.
the class EffectAnimation method drawTextColumn.
private void drawTextColumn(Map<PROPERTY, List<Object>> map, boolean onSource) {
int y = 4;
for (PROPERTY p : map.keySet()) {
MOD_PROP_TYPE type = (MOD_PROP_TYPE) map.get(p).get(0);
String prefix = (type == MOD_PROP_TYPE.ADD) ? "+" : "=";
Boolean negative = (type == MOD_PROP_TYPE.ADD) ? false : null;
if (type == MOD_PROP_TYPE.REMOVE) {
prefix = "-";
negative = true;
}
String string = p.getName() + prefix + StringMaster.getWellFormattedString(map.get(p).get(1).toString());
// MigMaster.getCenteredTextPosition(string, font, w);
int x = 5;
y += drawTextColored(onSource, negative, string, font, x, y);
}
}
use of main.ability.effects.Effect.MOD_PROP_TYPE in project Eidolons by IDemiurge.
the class MC_ControlPanel method massEdit.
public static void massEdit(List<ObjType> types, VALUE prop) {
// GenericListChooser.s
types = ListChooser.chooseTypes_(types);
if (types.isEmpty()) {
return;
}
String value = inputMassValue(prop);
if (StringMaster.isEmpty(value)) {
return;
}
MOD_PROP_TYPE p = new EnumMaster<MOD_PROP_TYPE>().selectEnum(MOD_PROP_TYPE.class);
// }
for (ObjType sub : (types)) {
sub.modifyProperty(p, (PROPERTY) prop, value);
}
}
use of main.ability.effects.Effect.MOD_PROP_TYPE in project Eidolons by IDemiurge.
the class EffectFinder method initPropModEffects.
public static void initPropModEffects(Effects modEffects, Map<PROPERTY, String> propMap, Ref ref) {
for (PROPERTY prop : propMap.keySet()) {
String amount = propMap.get(prop);
MOD_PROP_TYPE code1 = MOD_PROP_TYPE.ADD;
if (amount.contains(StringMaster.REMOVE)) {
code1 = MOD_PROP_TYPE.REMOVE;
amount.replace(StringMaster.REMOVE, "");
}
if (amount.contains(StringMaster.SET)) {
code1 = MOD_PROP_TYPE.SET;
amount.replace(StringMaster.SET, "");
}
ModifyPropertyEffect e = new ModifyPropertyEffect(prop, code1, amount);
modEffects.add(e);
}
}
Aggregations