Search in sources :

Example 31 with ObjType

use of main.entity.type.ObjType in project Eidolons by IDemiurge.

the class SkillTabNew method resetComps.

public void resetComps() {
    if (isReinitDataRequired() || isDirty()) {
        initData();
    }
    int i = 0;
    for (HC_PagedListPanel pagedListPanel : listPages) {
        ArrayList<ObjType> data = getData(SKILL_DISPLAY_GROUPS.values()[i]);
        i++;
        pagedListPanel.setData(data);
        pagedListPanel.initPages();
        getItemManager().add(pagedListPanel);
        pagedListPanel.refresh();
        if (pagedListPanel.getParent() == null) {
            addComps();
        }
    }
}
Also used : ObjType(main.entity.type.ObjType) HC_PagedListPanel(eidolons.client.cc.gui.pages.HC_PagedListPanel)

Example 32 with ObjType

use of main.entity.type.ObjType in project Eidolons by IDemiurge.

the class SkillTabNew method getData.

private ArrayList<ObjType> getData(SKILL_DISPLAY_GROUPS g) {
    ArrayList<PARAMETER> list = new ArrayList<>(Arrays.asList(g.getMasteries()));
    ArrayList<ObjType> data = new ArrayList<>();
    for (ObjType type : this.data) {
        PARAMETER mastery = ContentManager.getPARAM(type.getProperty(G_PROPS.MASTERY));
        if (list.contains(mastery)) {
            data.add(type);
        }
    }
    return data;
}
Also used : ObjType(main.entity.type.ObjType) ArrayList(java.util.ArrayList) PARAMETER(main.content.values.parameters.PARAMETER)

Example 33 with ObjType

use of main.entity.type.ObjType in project Eidolons by IDemiurge.

the class JewelrySlots method getSortedJewelryData.

public static List<ObjType> getSortedJewelryData(List<ObjType> data) {
    List<ObjType> sortedData = new ArrayList<>();
    ListMaster.fillWithNullElements(sortedData, LIST_SIZE);
    int rings = 0;
    boolean left = true;
    for (ObjType type : data) {
        if (type.checkProperty(G_PROPS.JEWELRY_TYPE, "" + ItemEnums.JEWELRY_TYPE.AMULET)) {
            sortedData.set(AMULET_INDEX, type);
        } else {
            int index = rings;
            if (!left) {
                index++;
            } else {
                rings++;
            }
            if (index >= AMULET_INDEX) {
                index++;
            }
            if (index >= sortedData.size()) {
                return sortedData;
            }
            left = !left;
            sortedData.set(index, type);
        }
    }
    return sortedData;
}
Also used : ObjType(main.entity.type.ObjType) ArrayList(java.util.ArrayList)

Example 34 with ObjType

use of main.entity.type.ObjType in project Eidolons by IDemiurge.

the class StatsControlComponent method resetBuffer.

public void resetBuffer() {
    setBufferType(new ObjType(hero.getType()));
    LogMaster.log(1, "*** buffer reset: " + bufferType);
    if (mp != null) {
        getMp().resetBuffer();
    }
}
Also used : ObjType(main.entity.type.ObjType)

Example 35 with ObjType

use of main.entity.type.ObjType in project Eidolons by IDemiurge.

the class HC_Tree method updateLinks.

private void updateLinks() {
    if (HC_Master.getPreviousSelectedTreeNode() == HC_Master.getSelectedTreeNode()) {
        return;
    }
    HT_Node node = HC_Master.getSelectedTreeNode();
    linksToHighlight = new ArrayList<>();
    selectionPathNodes.clear();
    if (node != null) {
        ObjType type = node.getType();
        // could cache per type too
        while (true) {
            node = map.getNodeForType(node.getParentType());
            if (node == null) {
                break;
            }
            selectionPathNodes.add(node);
            StaticTreeLink link = map.getLinkForChildType(node.getType());
            if (link == null) {
            }
            if (link == null) {
                continue;
            }
            linksToHighlight.add(link);
        }
        linksToHighlight.add(map.getLinkForChildType(type));
    }
    dynamicLinks = new ArrayList<>();
    // add req links
    for (ObjType t : HC_Master.getRequiredSkills(getSelectedType(), false)) {
        XLine line = getLine(getSelectedType(), t);
        TreeLink link = new TreeLink(LINK_TYPE.REQUIRED, line);
        dynamicLinks.add(link);
    }
    // add node from another
    // special requirements (e.g. Mastery, deity, class...)
    DataManager.getChildren(getSelectedType(), getTypes());
}
Also used : XLine(main.swing.XLine) StaticTreeLink(eidolons.client.cc.gui.neo.tree.logic.StaticTreeLink) ObjType(main.entity.type.ObjType) TreeLink(eidolons.client.cc.gui.neo.tree.logic.TreeLink) StaticTreeLink(eidolons.client.cc.gui.neo.tree.logic.StaticTreeLink)

Aggregations

ObjType (main.entity.type.ObjType)354 ArrayList (java.util.ArrayList)42 Coordinates (main.game.bf.Coordinates)30 Ref (main.entity.Ref)25 Unit (eidolons.entity.obj.unit.Unit)24 OBJ_TYPE (main.content.OBJ_TYPE)18 PROPERTY (main.content.values.properties.PROPERTY)18 DC_TYPE (main.content.DC_TYPE)16 PARAMETER (main.content.values.parameters.PARAMETER)16 File (java.io.File)15 Entity (main.entity.Entity)12 XLinkedMap (main.data.XLinkedMap)11 EnumMaster (main.system.auxiliary.EnumMaster)11 DC_SpellObj (eidolons.entity.active.DC_SpellObj)9 MATERIAL (main.content.enums.entity.ItemEnums.MATERIAL)9 Obj (main.entity.obj.Obj)9 QUALITY_LEVEL (main.content.enums.entity.ItemEnums.QUALITY_LEVEL)8 MusicList (main.music.entity.MusicList)8 Wave (eidolons.game.battlecraft.logic.battle.arena.Wave)6 C_OBJ_TYPE (main.content.C_OBJ_TYPE)6