Search in sources :

Example 21 with VALUE

use of main.content.VALUE in project Eidolons by IDemiurge.

the class CreationHelper method fillOut.

private static void fillOut(ObjType type) {
    List<VALUE> requiredValues = getRequiredValues(type, false);
    // TODO
    requiredValues = new ListObjChooser<VALUE>().selectMulti(requiredValues);
    // TODO allow adding other vals
    for (VALUE val : requiredValues) {
        String value = type.getValue(val);
        if (value.isEmpty()) {
            ListChooser.setTooltip("Set " + val.getName());
            value = getInput(val, type, type.getValue(val));
        }
        type.setValue(val, value);
    }
}
Also used : ListObjChooser(main.swing.generic.components.editors.lists.ListObjChooser) VALUE(main.content.VALUE)

Example 22 with VALUE

use of main.content.VALUE in project Eidolons by IDemiurge.

the class VersionMaster method getVersionDifferenceMap.

public static Map<VALUE, String> getVersionDifferenceMap(VERSION_PERIOD period, int n, ArcaneEntity type) {
    Map<VALUE, String> map = new XLinkedMap<>();
    ObjType oldType = getOlderVersion(type, period, n);
    for (PARAMETER p : oldType.getParamMap().keySet()) {
        int diff = type.getIntParam(p) - oldType.getIntParam(p);
        map.put(p, diff + "");
    }
    return map;
}
Also used : ObjType(main.entity.type.ObjType) XLinkedMap(main.data.XLinkedMap) VALUE(main.content.VALUE) PARAMETER(main.content.values.parameters.PARAMETER)

Example 23 with VALUE

use of main.content.VALUE in project Eidolons by IDemiurge.

the class DataModel method cloneMapsWithExceptions.

public void cloneMapsWithExceptions(DataModel type, VALUE... exceptions) {
    Map<VALUE, String> map = new HashMap<>();
    for (VALUE exception : exceptions) {
        map.put(exception, getValue(exception));
    }
    this.propMap = clonePropMap(type.getPropMap().getMap());
    this.paramMap = cloneParamMap(type.getParamMap().getMap());
    for (VALUE exception : exceptions) {
        String value = map.get(exception);
        if (exception instanceof PARAMETER) {
            paramMap.put(exception.getName(), value);
        } else if (exception instanceof PROPERTY) {
            propMap.put(exception.getName(), value);
        }
    }
    setDirty(true);
}
Also used : HashMap(java.util.HashMap) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) PROPERTY(main.content.values.properties.PROPERTY) VALUE(main.content.VALUE) PARAMETER(main.content.values.parameters.PARAMETER)

Example 24 with VALUE

use of main.content.VALUE in project Eidolons by IDemiurge.

the class DataModel method mergeValues.

public void mergeValues(Entity type, VALUE... vals) {
    for (VALUE val : vals) {
        if (val instanceof PROPERTY) {
            PROPERTY property = (PROPERTY) val;
            addProperty(property, type.getProperty(property), true);
        } else {
            if (val instanceof PARAMETER) {
                PARAMETER parameter = (PARAMETER) val;
                addParam(parameter, type.getParam(parameter), false);
            }
        }
    }
}
Also used : PROPERTY(main.content.values.properties.PROPERTY) VALUE(main.content.VALUE) PARAMETER(main.content.values.parameters.PARAMETER)

Example 25 with VALUE

use of main.content.VALUE in project Eidolons by IDemiurge.

the class HeaderPanel method initValues.

private G_Panel initValues(VALUE[] values, boolean top) {
    G_Panel panel = new G_Panel(// (top) ? "" :
    "flowy");
    for (VALUE v : values) {
        String text = hero.getValue(v);
        if (!top) {
            text = v.getName() + ": " + text;
        }
        JLabel lbl = new JLabel(text);
        // if (!top)
        panel.add(lbl);
    }
    return panel;
}
Also used : G_Panel(main.swing.generic.components.G_Panel) VALUE(main.content.VALUE)

Aggregations

VALUE (main.content.VALUE)33 ObjType (main.entity.type.ObjType)8 PARAMETER (main.content.values.parameters.PARAMETER)7 ArrayList (java.util.ArrayList)5 PROPERTY (main.content.values.properties.PROPERTY)5 PARAMS (eidolons.content.PARAMS)3 UNIT_INFO_PARAMS (eidolons.content.UNIT_INFO_PARAMS)2 MultiValueContainer (eidolons.libgdx.gui.panels.dc.unitinfo.MultiValueContainer)2 List (java.util.List)2 OBJ_TYPE (main.content.OBJ_TYPE)2 G_PROPS (main.content.values.properties.G_PROPS)2 Obj (main.entity.obj.Obj)2 Formula (main.system.math.Formula)2 ChoiceSequence (eidolons.client.cc.gui.neo.choice.ChoiceSequence)1 EntityChoiceView (eidolons.client.cc.gui.neo.choice.EntityChoiceView)1 SequenceManager (eidolons.client.dc.SequenceManager)1 DC_UnitAction (eidolons.entity.active.DC_UnitAction)1 DC_Obj (eidolons.entity.obj.DC_Obj)1 Unit (eidolons.entity.obj.unit.Unit)1 FutureBuilder (eidolons.game.battlecraft.ai.tools.future.FutureBuilder)1