Search in sources :

Example 16 with OBJ_TYPE

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

the class DebugMaster method executeHiddenDebugFunction.

public Object executeHiddenDebugFunction(HIDDEN_DEBUG_FUNCTIONS func) {
    executedFunctions.push(func.toString());
    Unit infoObj;
    try {
        infoObj = (Unit) getObj();
    } catch (Exception e) {
        infoObj = game.getManager().getActiveObj();
    }
    switch(func) {
        case WRITE_GROUP:
            Entity entity = DC_Game.game.getValueHelper().getEntity();
            if (entity == null) {
                break;
            }
            XML_Writer.writeXML_ForTypeGroup(entity.getOBJ_TYPE_ENUM(), entity.getGroupingKey());
        case WRITE:
            if (!(DC_Game.game.getValueHelper().getEntity() instanceof ObjType)) {
                break;
            }
            XML_Writer.writeXML_ForTypeGroup(DC_Game.game.getValueHelper().getEntity().getOBJ_TYPE_ENUM());
            break;
        case WRITE_TYPE:
            if (!(DC_Game.game.getValueHelper().getEntity() instanceof ObjType)) {
                break;
            }
            XML_Writer.writeXML_ForType((ObjType) DC_Game.game.getValueHelper().getEntity());
            break;
        case TOGGLE_AV_MODE:
            CoreEngine.setArcaneVault(!CoreEngine.isArcaneVault());
            CoreEngine.setArcaneVaultMode(true);
            break;
        case RECONSTRUCT:
            {
                for (ActiveObj obj : infoObj.getPassives()) {
                    obj.setConstructed(false);
                }
                for (ActiveObj obj : infoObj.getActives()) {
                    obj.setConstructed(false);
                }
                break;
            }
        case RELOAD_TYPES:
            {
                XML_Reader.readTypes(false, true);
                game.initObjTypes();
                break;
            }
        case RESTART_GAME:
            // TODO     executeDebugFunction(KILL_ALL_UNITS);
            // DC_ObjInitializer.processUnitDataString(game.getPlayer(true),
            // game.getPlayerParty(), game);
            game.getManager().unitActionCompleted(null, false);
            break;
        case BF_RESURRECT_ALL:
            break;
        case DISPLAY_EVENT_LOG:
            break;
        case DISPLAY_REF:
            display(game.getManager().getInfoObj().getName() + "'s REF:", game.getManager().getInfoObj().getRef() + "");
            break;
        case DISPLAY_TRIGGERS:
            // display("Triggers: ", game.getState().getAttachedTriggers());
            displayList("Triggers: ", game.getState().getTriggers(), 1);
            break;
        case DISPLAY_STATE:
            display("State: ", game.getState());
            break;
        case DISPLAY_EFFECTS:
            displayList("Effects ", game.getState().getEffects(), 1);
            break;
        case DISPLAY_OBJECTS:
            for (OBJ_TYPE sub : game.getState().getGame().getState().getObjMaps().keySet()) {
                displayList(sub + ": ", game.getState().getGame().getState().getObjMaps().get(sub).keySet(), 1);
            }
        case DISPLAY_UNITS:
            displayList("Units ", game.getState().getGame().getUnits(), 1);
            break;
        case DISPLAY_UNIT_INFO:
            display("INFO OBJ: ", getUnitInfo(game.getManager().getInfoObj()));
            break;
        case HERO_ADD_ALL_SPELLS:
            for (ObjType type : DataManager.getTypes(DC_TYPE.SPELLS)) {
                Unit hero = (Unit) game.getManager().getInfoObj();
                if (LibraryManager.checkHeroHasSpell(hero, type)) {
                    continue;
                }
                LibraryManager.addVerbatimSpell(hero, type);
                DC_SpellObj spell = new DC_SpellObj(type, hero.getOriginalOwner(), hero.getGame(), hero.getRef());
                hero.getSpells().add(spell);
            }
            break;
        default:
            break;
    }
    return null;
}
Also used : Entity(main.entity.Entity) OBJ_TYPE(main.content.OBJ_TYPE) C_OBJ_TYPE(main.content.C_OBJ_TYPE) ActiveObj(main.entity.obj.ActiveObj) ObjType(main.entity.type.ObjType) DC_SpellObj(eidolons.entity.active.DC_SpellObj) Unit(eidolons.entity.obj.unit.Unit)

Example 17 with OBJ_TYPE

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

the class TextMaster method extractTypeText.

private static void extractTypeText() {
    DC_Engine.fullInit();
    int i = 0;
    for (OBJ_TYPE k : extractedTypes) {
        List<String> value = null;
        if (extractedTypeGroups.length > i) {
            value = StringMaster.openContainer(extractedTypeGroups[i]);
        }
        extractedTypesMap.put(k, value);
        i++;
    }
    for (PROPERTY prop : extract_props) {
        for (OBJ_TYPE t : extractedTypesMap.keySet()) {
            List<String> list = extractedTypesMap.get(t);
            if (list == null) {
                extractTypeText(t, null, prop);
            } else {
                for (String c : list) {
                    extractTypeText(t, c, prop);
                }
            }
        }
    }
}
Also used : OBJ_TYPE(main.content.OBJ_TYPE) PROPERTY(main.content.values.properties.PROPERTY)

Example 18 with OBJ_TYPE

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

the class TreeViewBuilder method getEmptyType.

private ObjType getEmptyType(String TYPE, String newName) {
    ObjType type = new ObjType(newName);
    OBJ_TYPE t = DC_TYPE.getType(TYPE);
    if (ArcaneVault.isMacroMode()) {
        t = MACRO_OBJ_TYPES.getType(TYPE);
    }
    // type.setObjType(t);
    Simulation.getGame().initType(type);
    return type;
}
Also used : OBJ_TYPE(main.content.OBJ_TYPE) ObjType(main.entity.type.ObjType)

Example 19 with OBJ_TYPE

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

the class FilterMaster method newFilter.

public static void newFilter() {
    Conditions conditions = new Conditions();
    OBJ_TYPE TYPE = ArcaneVault.getSelectedOBJ_TYPE();
    CONDITION_TEMPLATES[] templates = CONDITION_TEMPLATES.values();
    while (true) {
        // CHOOSE TYPE? OR USE SELECTED TAB!
        int i = DialogMaster.optionChoice(templates, "choose filter template");
        if (i == -1) {
            break;
        }
        CONDITION_TEMPLATES template = CONDITION_TEMPLATES.values()[i];
        String value = DialogMaster.inputText("Enter filter's value name");
        if (StringMaster.isEmpty(value)) {
            break;
        }
        VALUE val = ContentManager.findValue(value);
        value = DialogMaster.inputText("Enter filtering value");
        if (StringMaster.isEmpty(value)) {
            break;
        }
        conditions.add(new ConditionMaster().getConditionFromTemplate(template, StringMaster.getValueRef(KEYS.MATCH, val), value));
    }
    if (conditions.isEmpty()) {
        return;
    }
    if (TYPE == null) {
    }
    // Document node = XML_Converter.getDoc(XML_Converter.openXml("conditions")
    // + XML_Converter.closeXml("conditions"));
    // String conditionString = XML_Converter.getStringFromXML(node);
    TypeFilter filter = new TypeFilter(conditions, TYPE);
    // save!
    filters.add(filter);
    ArcaneVault.getMainBuilder().getTabBuilder().addFilter(filter);
}
Also used : OBJ_TYPE(main.content.OBJ_TYPE) VALUE(main.content.VALUE) CONDITION_TEMPLATES(main.system.entity.ConditionMaster.CONDITION_TEMPLATES) ConditionMaster(main.system.entity.ConditionMaster) Conditions(main.elements.conditions.Conditions)

Example 20 with OBJ_TYPE

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

the class TypeFinder method findTypes.

public static List<ObjType> findTypes(String typeName, OBJ_TYPE... TYPES) {
    lastSearch = typeName;
    List<ObjType> list = new ArrayList<>();
    for (OBJ_TYPE TYPE : TYPES) {
        List<ObjType> foundTypes = DataManager.findTypes(typeName, false, TYPE);
        list.addAll(foundTypes);
    }
    return list;
}
Also used : OBJ_TYPE(main.content.OBJ_TYPE) ObjType(main.entity.type.ObjType) ArrayList(java.util.ArrayList)

Aggregations

OBJ_TYPE (main.content.OBJ_TYPE)31 ObjType (main.entity.type.ObjType)16 C_OBJ_TYPE (main.content.C_OBJ_TYPE)7 ArrayList (java.util.ArrayList)5 PROPERTY (main.content.values.properties.PROPERTY)5 Obj (main.entity.obj.Obj)5 Entity (main.entity.Entity)3 DC_SpellObj (eidolons.entity.active.DC_SpellObj)2 Unit (eidolons.entity.obj.unit.Unit)2 File (java.io.File)2 VALUE (main.content.VALUE)2 TextureRegion (com.badlogic.gdx.graphics.g2d.TextureRegion)1 Actor (com.badlogic.gdx.scenes.scene2d.Actor)1 InputEvent (com.badlogic.gdx.scenes.scene2d.InputEvent)1 ClickListener (com.badlogic.gdx.scenes.scene2d.utils.ClickListener)1 NinePatchDrawable (com.badlogic.gdx.scenes.scene2d.utils.NinePatchDrawable)1 ChoiceSequence (eidolons.client.cc.gui.neo.choice.ChoiceSequence)1 EntityChoiceView (eidolons.client.cc.gui.neo.choice.EntityChoiceView)1 HC_PagedListPanel (eidolons.client.cc.gui.pages.HC_PagedListPanel)1 SequenceManager (eidolons.client.dc.SequenceManager)1