Search in sources :

Example 71 with ObjType

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

the class SessionMaster method generateSessionTypes.

public static void generateSessionTypes() {
    for (ObjType type : DataManager.getTypes(AT_OBJ_TYPE.DIRECTION)) {
        String name = type.getName() + " Session";
        ObjType e = DataManager.getType(name, AT_OBJ_TYPE.DIRECTION);
        if (e != null) {
            continue;
        }
        e = new ObjType(name, AT_OBJ_TYPE.SESSION);
        e.setProperty(AT_PROPS.SESSION_TYPE, TEMPLATE);
        DataManager.addType(e);
    }
}
Also used : ObjType(main.entity.type.ObjType)

Example 72 with ObjType

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

the class SessionMaster method newSession.

private static Session newSession(int option) {
    ObjType type;
    switch(option) {
        case 0:
            return createSessionFromText();
        case 1:
            ObjType directionType = ListChooser.chooseType_(AT_OBJ_TYPE.DIRECTION);
            type = new ObjType(directionType.getName() + " Session", AT_OBJ_TYPE.SESSION);
            type.setGame(ArcaneTower.getSimulation());
            type.setProperty(AT_PROPS.DIRECTION, directionType.getName());
            return newSession(type, true);
        case 2:
            return continueSession(false);
        case 3:
            return continueSession(true);
    }
    return null;
}
Also used : ObjType(main.entity.type.ObjType)

Example 73 with ObjType

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

the class ZeitMaster method checkCreateTimeTypes.

public static void checkCreateTimeTypes() {
    // getOrCreate last day, week, month...
    Entity era = getLatest(DataManager.getTypes(AT_OBJ_TYPE.ERA));
    boolean create = era == null;
    if (!create) {
        create = era.checkProperty(AT_PROPS.ERA_STATUS, "Concluded");
    }
    if (create) {
        int n = DataManager.getTypes(AT_OBJ_TYPE.ERA).size() + 1;
        String name = DialogMaster.inputText("New Era's Name?", "The " + n + StringMaster.getOrdinalEnding(n) + " Era");
        era = new ObjType(name, AT_OBJ_TYPE.ERA);
        DataManager.addType((ObjType) era);
    }
    createPeriod(era, AT_OBJ_TYPE.DAY);
    createPeriod(era, AT_OBJ_TYPE.WEEK);
    createPeriod(era, AT_OBJ_TYPE.MONTH);
    ArcaneTower.saveAll();
// for (t t : DataManager.getTypes(AT_OBJ_TYPE.DAY)){
// }
}
Also used : ArcaneEntity(main.logic.ArcaneEntity) Entity(main.entity.Entity) ObjType(main.entity.type.ObjType)

Example 74 with ObjType

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

the class ZeitMaster method createPeriod.

/*
     * markTime()
	 * paused()
	 * getTotalTime()
	 */
private static void createPeriod(Entity era, AT_OBJ_TYPE T) {
    boolean create;
    List<? extends Entity> list = DataManager.getTypes(T);
    Entity last = getLatest(list);
    create = last == null;
    if (!create) {
        create = checkCreateNeeded(last, T);
    }
    if (create) {
        ObjType type = new ObjType(getNameForPeriod(era, T), T);
        initTimeOfCreation(type);
        DataManager.addType(type);
    }
}
Also used : ArcaneEntity(main.logic.ArcaneEntity) Entity(main.entity.Entity) ObjType(main.entity.type.ObjType)

Example 75 with ObjType

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

the class AV_DataManager method back.

public void back(ObjType type) {
    Stack<ObjType> stack = stackMap.get(type);
    if (stack != null) {
        if (stack.isEmpty()) {
            return;
        }
        ObjType prev = stack.pop();
        type.getGame().initType(prev);
        type.cloneMaps(prev);
    }
}
Also used : ObjType(main.entity.type.ObjType)

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