use of main.content.values.properties.PROPERTY 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.content.values.properties.PROPERTY in project Eidolons by IDemiurge.
the class AnimationConstructor method preconstructAllForAV.
public static void preconstructAllForAV() {
for (ObjType type : DataManager.getTypes(DC_TYPE.SPELLS)) {
DC_SpellObj active = new DC_SpellObj(type, Player.NEUTRAL, DC_Game.game, new Ref());
AnimData data = null;
try {
int i = 0;
for (ANIM_PART part : ANIM_PART.values()) {
data = new AnimationConstructor().getStandardData(active, part, i);
for (ANIM_VALUES val : ANIM_VALUES.values()) {
String identifier;
switch(val) {
case PARTICLE_EFFECTS:
identifier = "SFX";
break;
case SPRITES:
identifier = "SPRITE";
break;
default:
continue;
}
String value = data.getValue(val);
if (StringMaster.isEmpty(value))
continue;
value = value.replace(PathFinder.getImagePath().toLowerCase(), "");
i++;
PROPERTY prop = ContentManager.findPROP("anim" + "_" + identifier + "_" + part);
if (prop == null)
continue;
type.setProperty(prop, value);
}
}
} catch (Exception e) {
main.system.ExceptionMaster.printStackTrace(e);
}
}
}
use of main.content.values.properties.PROPERTY in project Eidolons by IDemiurge.
the class DataModel method clonePropMap.
protected PropMap clonePropMap(Map<PROPERTY, String> map) {
PropMap clone = new PropMap();
Map<PROPERTY, String> innerMap = new ConcurrentHashMap<>();
innerMap.putAll(map);
clone.setMap(innerMap);
return clone;
}
use of main.content.values.properties.PROPERTY in project Eidolons by IDemiurge.
the class DataModel method getValue.
public String getValue(VALUE val, boolean base) {
String value = "";
if (val instanceof MultiParameter) {
MultiParameter multiParameter = (MultiParameter) val;
for (PARAMETER p : multiParameter.getParameters()) {
value += getParamRounded(p, base) + multiParameter.getSeparator();
// % sign?
}
value = StringMaster.cropLast(value, multiParameter.getSeparator().length());
} else if (val instanceof PARAMETER) {
value = getDoubleParam((PARAMETER) val, base);
} else if (val instanceof PROPERTY) {
value = getProperty((PROPERTY) val);
}
if (value == null) {
LogMaster.log(LogMaster.VALUE_DEBUG, "Value not found: " + val.getName());
}
return value;
}
use of main.content.values.properties.PROPERTY in project Eidolons by IDemiurge.
the class DataModel method setProperty.
public void setProperty(String prop, String value) {
PROPERTY p = ContentManager.getPROP(prop);
setProperty(p, value);
}
Aggregations