Search in sources :

Example 6 with VALUE

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

the class MC_ControlPanel method doEdit.

public static void doEdit(MusicList list, boolean alt) {
    VALUE val = AT_PROPS.MUSIC_GENRE;
    if (!alt) // choose val
    {
        val = std_edit_vals[DialogMaster.optionChoice(std_edit_vals, "What value to edit?")];
    }
    // ListChooser.chooseString(stringList);
    String input = CreationHelper.getInput(val, list, list.getValue(val));
    list.setValue(val, input, true);
}
Also used : VALUE(main.content.VALUE)

Example 7 with VALUE

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

the class MC_ControlPanel method massEdit.

public static void massEdit(boolean emptyOnly) {
    List<ObjType> types = DataManager.getTypes(AT_OBJ_TYPE.MUSIC_LIST);
    VALUE prop = getMassFilterValue();
    if (prop != null) {
        String filterValue = inputMassValue(prop);
        for (ObjType sub : new ArrayList<>(types)) // if (emptyOnly) {
        {
            if (!sub.checkContainerProp((PROPERTY) prop, filterValue, true)) {
                types.remove(sub);
            }
        }
    // } else if (!generic.checkValue(prop, filterValue))
    // types.remove(generic);
    }
    prop = getMassEditValue();
    if (prop == null) {
        return;
    }
    if (emptyOnly) {
        for (ObjType sub : new ArrayList<>(types)) {
            if (sub.checkValue(prop)) {
                types.remove(sub);
            }
        }
    }
    massEdit(types, prop);
}
Also used : ObjType(main.entity.type.ObjType) PROPERTY(main.content.values.properties.PROPERTY) VALUE(main.content.VALUE)

Example 8 with VALUE

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

the class PromptMaster method fillOut.

public static void fillOut(ArcaneEntity entity, boolean emptyOnly) {
    // entity.getOBJ_TYPE_ENUM();
    for (VALUE t : CreationHelper.getRequiredValues(entity, false)) {
        String value = entity.getValue(t);
        if (!StringMaster.isEmpty(value)) {
            if (emptyOnly) {
                continue;
            }
        }
        String input = CreationHelper.getInput(t, entity, value);
        if (!StringMaster.isEmpty(input)) {
            entity.setValue(value, input, true);
        } else if (DialogMaster.confirm("Done?")) {
            break;
        } else {
            entity.setValue(value, input, true);
        }
    }
}
Also used : VALUE(main.content.VALUE)

Example 9 with VALUE

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

the class InfoMaster method getOrReasonString.

public static String getOrReasonString(String value, VALUE... p) {
    String string = "";
    for (VALUE param : p) {
        string += param.getName() + OR;
    }
    string = string.substring(0, string.length() - OR.length());
    string += PARAM_REASON_STRING + value;
    return string;
}
Also used : VALUE(main.content.VALUE)

Example 10 with VALUE

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

the class ValuePageManager method initMaps.

private static void initMaps(Map<OBJ_TYPE, Map<String, List<VALUE>>> pageMaps, VALUE[][][] pageArray, String[] PAGE_NAMES, boolean alt) {
    for (DC_TYPE TYPE : DC_TYPE.values()) {
        int i = TYPE.getCode();
        if (pageArray.length <= i) {
            break;
        }
        VALUE[][] pages = pageArray[i];
        if (pages == null) {
            continue;
        }
        List<String> pageNames = StringMaster.openContainer(PAGE_NAMES[i]);
        List<List<VALUE>> pageList = new ArrayMaster<VALUE>().get2dList(pages);
        Map<String, List<VALUE>> map = new MapMaster<String, List<VALUE>>().constructMap(pageNames, pageList);
        if (!alt) {
            map.put(DC_HEADER, Arrays.asList(ValuePages.GENERIC_DC_HEADER));
            map.put(AV_HEADER, Arrays.asList(ValuePages.GENERIC_AV_HEADER));
            map.put(AV_TRAILING_PAGE, Arrays.asList(ValuePages.AV_TRAILING_PAGE));
            map.put(DC_TRAILING_PAGE, Arrays.asList(ValuePages.DC_TRAILING_PAGE));
        }
        pageMaps.put(TYPE, map);
    }
}
Also used : DC_TYPE(main.content.DC_TYPE) 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