Search in sources :

Example 11 with DC_TYPE

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

the class ContentSyncMaster method generateTypesForDC_Content.

public static void generateTypesForDC_Content() {
    // TODO selective?
    XML_Reader.readTypes(false);
    List<DC_TYPE> syncedTypes = new ArrayList<>();
    for (DC_TYPE TYPE : syncedTypes) {
        for (String sub : XML_Reader.getSubGroups(TYPE)) {
            if (!checkGroupInWorkspace(sub)) {
                continue;
            }
        // goal = generateGoal(generic);
        }
    }
    for (DC_TYPE t : DC_TYPE.values()) {
        for (ObjType type : DataManager.getTypes(t)) {
        // XML_Reader.getTypeMaps()
        // by subgroups
        // generateTask()
        }
    }
}
Also used : DC_TYPE(main.content.DC_TYPE) ObjType(main.entity.type.ObjType) ArrayList(java.util.ArrayList)

Example 12 with DC_TYPE

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

the class HC_PagedListPanel method paint.

@Override
public void paint(Graphics g) {
    super.paint(g);
    g.setFont(getFont());
    g.setColor(ColorManager.GOLDEN_WHITE);
    if (TYPE != null) {
        if (list_type == HC_LISTS.VENDOR) {
            if (img == null) {
                PARAMETER mastery = ContentManager.getPARAM(listName);
                if (mastery == null) {
                    mastery = ContentManager.getMastery(listName);
                }
                if (TYPE instanceof C_OBJ_TYPE) {
                } else {
                    switch((DC_TYPE) TYPE) {
                        case SPELLS:
                        case SKILLS:
                            img = ImageManager.getValueIcon(mastery);
                            break;
                        case CLASSES:
                    }
                }
                int y = getTextY() - 5;
                if (img != null) {
                    g.drawImage(img, 12, y, 28, 28, null);
                    g.drawImage(img, getWidth() - img.getWidth(null) - 12, y, 28, 28, null);
                    g.drawImage(img, (getWidth() - img.getWidth(null)) / 2, y, null);
                }
            }
        }
    }
    if (getTextY() >= 0) {
        g.drawString(listName, getTextX(), getTextY());
    } else {
        setToolTipText(listName);
    }
}
Also used : C_OBJ_TYPE(main.content.C_OBJ_TYPE) DC_TYPE(main.content.DC_TYPE) PARAMETER(main.content.values.parameters.PARAMETER)

Example 13 with DC_TYPE

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

the class TypeInitializer method getNewType.

public ObjType getNewType(OBJ_TYPE obj_type) {
    DC_TYPE OBJ_TYPE;
    ObjType type = new ObjType();
    if (obj_type instanceof DC_TYPE) {
        OBJ_TYPE = (DC_TYPE) obj_type;
        switch(OBJ_TYPE) {
            case DIALOGUE:
                type = new DialogueType();
                setXmlTreeValue(true);
                break;
            case ABILS:
                type = new AbilityType();
                setXmlTreeValue(true);
                break;
            case BUFFS:
                type = new BuffType();
                break;
            case ACTIONS:
                type = new ActionType();
                break;
            case SPELLS:
                type = new SpellType();
                break;
            case UNITS:
                type = new UnitType();
                // type.addProp(CLASSIFICATION, UNIT);
                break;
            case CHARS:
                type = new UnitType();
                // type.addProp(CLASSIFICATION, CHAR);
                break;
            default:
                break;
        }
    }
    type.setProperty(G_PROPS.TYPE, obj_type.getName());
    type.setOBJ_TYPE_ENUM(obj_type);
    return type;
}
Also used : DialogueType(main.data.dialogue.DialogueType) DC_TYPE(main.content.DC_TYPE) AbilityType(main.ability.AbilityType)

Example 14 with DC_TYPE

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

the class HqShop method getItems.

// why not return objTypes? strings are fallible...
// why not OBJECTS? is it hard? is it better?
@Override
public List<String> getItems(String groupList) {
    if (isFullRepertoire()) {
    // filters!
    }
    List<String> list = new ArrayList<>();
    for (DC_TYPE TYPE : C_OBJ_TYPE.ITEMS.getTypes()) {
        List<ObjType> items = getItems(TYPE);
        items.removeIf(item -> item == null);
        FilterMaster.filterByPropJ8(items, TYPE.getGroupingKey().getName(), groupList);
        items.forEach(item -> list.add(item.getName()));
    }
    // sort
    return list;
}
Also used : DC_TYPE(main.content.DC_TYPE) ObjType(main.entity.type.ObjType) ArrayList(java.util.ArrayList)

Example 15 with DC_TYPE

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

the class TextMaster method generateMissingDescrTemplate.

public static void generateMissingDescrTemplate() {
    DC_TYPE TYPE = DC_TYPE.SKILLS;
    generateMissingDescrTemplate(TYPE, 1, null, false);
    generateMissingDescrTemplate(TYPE, 1, null, true);
    Map<String, Set<String>> tabGroupMap = XML_Reader.getTabGroupMap();
    for (String sub : tabGroupMap.get(TYPE.getName())) {
        // if (!ContentMaster.basicScope.contains(generic))
        // continue;
        generateMissingDescrTemplate(TYPE, 1, sub, false);
        generateMissingDescrTemplate(TYPE, 1, sub, true);
    }
}
Also used : Set(java.util.Set) DC_TYPE(main.content.DC_TYPE)

Aggregations

DC_TYPE (main.content.DC_TYPE)18 ObjType (main.entity.type.ObjType)9 ArrayList (java.util.ArrayList)5 Ref (main.entity.Ref)4 DC_SpellObj (eidolons.entity.active.DC_SpellObj)2 DC_Game (eidolons.game.core.game.DC_Game)2 PARAMETER (main.content.values.parameters.PARAMETER)2 PROPERTY (main.content.values.properties.PROPERTY)2 Entity (main.entity.Entity)2 Coordinates (main.game.bf.Coordinates)2 ListChooser (main.swing.generic.components.editors.lists.ListChooser)2 Document (org.w3c.dom.Document)2 Node (org.w3c.dom.Node)2 AddBuffEffect (eidolons.ability.effects.attachment.AddBuffEffect)1 ModifyPropertyEffect (eidolons.ability.effects.common.ModifyPropertyEffect)1 PARAMS (eidolons.content.PARAMS)1 DC_IdManager (eidolons.entity.DC_IdManager)1 DC_ArmorObj (eidolons.entity.item.DC_ArmorObj)1 DC_HeroItemObj (eidolons.entity.item.DC_HeroItemObj)1 DC_JewelryObj (eidolons.entity.item.DC_JewelryObj)1