Search in sources :

Example 76 with ObjType

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

the class AV_DataManager method save.

public void save(ObjType type) {
    Stack<ObjType> stack = stackMap.get(type);
    if (stack == null) {
        addType(type);
        stack = stackMap.get(type);
    }
    stack.push(new ObjType(type));
}
Also used : ObjType(main.entity.type.ObjType)

Example 77 with ObjType

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

the class AE_Manager method getDoc.

public static Node getDoc(String typeName) {
    OBJ_TYPE TYPE = ArcaneVault.getSelectedOBJ_TYPE();
    // if (!ArcaneVault.isDialogueMode()) {
    // TYPE = DC_TYPE.ABILS;
    // } else {
    // TYPE = DC_TYPE.DIALOGUE;
    // }
    ObjType type;
    if (ArcaneVault.isMacroMode()) {
        type = DataManager.getType(typeName);
    // DialogueType diagType = (DialogueType) type;
    // return diagType.getDoc();
    }
    type = DataManager.getType(typeName, TYPE.getName());
    XmlDocHolder abilType = (XmlDocHolder) type;
    // return XML_Converter.getDoc(abilType.getProperty(G_PROPS.ABILITIES));
    return abilType.getDoc();
}
Also used : C_OBJ_TYPE(main.content.C_OBJ_TYPE) OBJ_TYPE(main.content.OBJ_TYPE) ObjType(main.entity.type.ObjType) XmlDocHolder(main.data.ability.construct.XmlDocHolder)

Example 78 with ObjType

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

the class MusicCore method findList.

public static MusicList findList(String name) {
    // String list = new SearchMaster<String>().find(name,
    // listTypeMap.keySet());
    // if (list == null)
    // list = new SearchMaster<String>().findClosest(name,
    // listTypeMap.keySet());
    ObjType type = DataManager.findType(name, AT_OBJ_TYPE.MUSIC_LIST);
    MusicList list = getList(type.getName());
    if (list == null) {
        list = new MusicList(type);
    }
    return list;
}
Also used : ObjType(main.entity.type.ObjType) MusicList(main.music.entity.MusicList)

Example 79 with ObjType

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

the class MusicCore method getFilterView.

public static MusicListPanel getFilterView(String filterVal, PROPERTY filterProp) {
    Map<String, List<String>> map = new XLinkedMap<>();
    String name = filterProp.getName() + " by " + filterVal;
    MusicListPanel panel = new MusicListPanel(name, map);
    int maxSize = 0;
    int i = 0;
    for (String substring : StringMaster.open(filterVal)) {
        List<String> list = new ArrayList<>();
        for (ObjType type : DataManager.getTypes(AT_OBJ_TYPE.MUSIC_LIST)) {
            if (type.checkProperty(filterProp, substring)) {
                list.add(type.getProperty(G_PROPS.HOTKEY) + "::" + type.getProperty(AT_PROPS.PATH));
            }
        }
        if (maxSize < list.size()) {
            maxSize = list.size();
        }
        map.put(i + "", list);
        i++;
    }
    List<String> musicConsts = StringMaster.openContainer(filterVal);
    int customWrap = 2 + maxSize / 14;
    if (customWrap < 0) {
        customWrap = 0;
    }
    G_Panel v = panel.initView(map, false, customWrap, musicConsts);
    panel.setView(v);
    panel.setName(name);
    v.setName(name);
    return panel;
}
Also used : ObjType(main.entity.type.ObjType) XLinkedMap(main.data.XLinkedMap) G_Panel(main.swing.generic.components.G_Panel) MusicListPanel(main.music.gui.MusicListPanel) MusicList(main.music.entity.MusicList) List(java.util.List)

Example 80 with ObjType

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

the class MusicCore method getList.

public static MusicList getList(String name, String keyPart, String funcPart) {
    MusicList list = listTypeMap.get(name);
    if (list != null) {
        return list;
    }
    ObjType type = DataManager.getOrAddType(name, AT_OBJ_TYPE.MUSIC_LIST);
    // DataManager.ge
    String tracks = getTrackStringFromList(funcPart);
    type.setProperty(AT_PROPS.TRACKS, tracks);
    type.setProperty(AT_PROPS.PATH, funcPart);
    type.setProperty(G_PROPS.HOTKEY, keyPart);
    // type, genre?
    list = new MusicList(type);
    listTypeMap.put(name, list);
    return list;
}
Also used : ObjType(main.entity.type.ObjType) MusicList(main.music.entity.MusicList)

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