Search in sources :

Example 6 with PROPERTY

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);
    }
}
Also used : PROPERTY(main.content.values.properties.PROPERTY) MOD_PROP_TYPE(main.ability.effects.Effect.MOD_PROP_TYPE)

Example 7 with PROPERTY

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);
        }
    }
}
Also used : Ref(main.entity.Ref) ObjType(main.entity.type.ObjType) PROPERTY(main.content.values.properties.PROPERTY) ANIM_VALUES(eidolons.libgdx.anims.AnimData.ANIM_VALUES) DC_SpellObj(eidolons.entity.active.DC_SpellObj)

Example 8 with PROPERTY

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;
}
Also used : PropMap(main.content.values.properties.PropMap) PROPERTY(main.content.values.properties.PROPERTY) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap)

Example 9 with PROPERTY

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;
}
Also used : PROPERTY(main.content.values.properties.PROPERTY) MultiParameter(main.content.values.parameters.MultiParameter) PARAMETER(main.content.values.parameters.PARAMETER)

Example 10 with PROPERTY

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);
}
Also used : PROPERTY(main.content.values.properties.PROPERTY)

Aggregations

PROPERTY (main.content.values.properties.PROPERTY)57 PARAMETER (main.content.values.parameters.PARAMETER)23 ObjType (main.entity.type.ObjType)17 OBJ_TYPE (main.content.OBJ_TYPE)6 ArrayList (java.util.ArrayList)5 VALUE (main.content.VALUE)5 Ref (main.entity.Ref)5 DC_TYPE (main.content.DC_TYPE)4 Node (org.w3c.dom.Node)4 DC_SpellObj (eidolons.entity.active.DC_SpellObj)3 Unit (eidolons.entity.obj.unit.Unit)3 XLinkedMap (main.data.XLinkedMap)3 Obj (main.entity.obj.Obj)3 EnumMaster (main.system.auxiliary.EnumMaster)3 AddBuffEffect (eidolons.ability.effects.attachment.AddBuffEffect)2 ModifyPropertyEffect (eidolons.ability.effects.common.ModifyPropertyEffect)2 File (java.io.File)2 List (java.util.List)2 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)2 MOD_PROP_TYPE (main.ability.effects.Effect.MOD_PROP_TYPE)2