Search in sources :

Example 1 with FACTION

use of main.content.CONTENT_CONSTS2.FACTION in project Eidolons by IDemiurge.

the class UnitGroupMaster method modifyFactions.

public static void modifyFactions() {
    for (FACTION f : FACTION.values()) {
        DEITY deity = f.getDeity();
        ObjType faction = DataManager.getType(f.toString(), MACRO_OBJ_TYPES.FACTIONS);
        if (faction == null) {
            continue;
        }
        if (deity != null) {
            ObjType deityType = DataManager.getType(deity.name(), DC_TYPE.DEITIES);
            for (ObjType unit : DataManager.getTypes(DC_TYPE.UNITS)) {
                if (unit.getProperty(G_PROPS.DEITY).equals(deityType.getName())) {
                    faction.addProperty(PROPS.UNIT_POOL, unit.getName(), true);
                }
            }
        }
    // List<String> list =
    // StringMaster.openContainer(faction.getProperty(PROPS.UNIT_POOL));
    // SortMaster.sortByValue(list, PARAMS.POWER, OBJ_TYPES.FACTIONS,
    // false);
    }
}
Also used : DEITY(main.content.CONTENT_CONSTS.DEITY) ObjType(main.entity.type.ObjType) FACTION(main.content.CONTENT_CONSTS2.FACTION)

Example 2 with FACTION

use of main.content.CONTENT_CONSTS2.FACTION in project Eidolons by IDemiurge.

the class ModelManager method generateFactions.

public static void generateFactions() {
    for (FACTION u : FACTION.values()) {
        ObjType newType = new ObjType();
        ArcaneVault.getGame().initType(newType);
        newType.setProperty(PROPS.UNIT_POOL, u.getUnits());
        newType.setProperty(PROPS.UNIT_TYPES, u.getUnits());
        newType.setProperty(G_PROPS.NAME, u.toString());
        newType.setProperty(G_PROPS.TYPE, MACRO_OBJ_TYPES.FACTIONS.toString());
        newType.setImage(u.getImage());
        // newType.setProperty(PROPS.ALLY_FACTIONS, u.getAllyFactions());
        newType.setProperty(G_PROPS.FACTION_GROUP, u.getGroup());
        newType.setProperty(G_PROPS.GROUP, u.getGroup());
        DataManager.addType(u.toString(), MACRO_OBJ_TYPES.FACTIONS, newType);
    }
}
Also used : ObjType(main.entity.type.ObjType) FACTION(main.content.CONTENT_CONSTS2.FACTION)

Aggregations

FACTION (main.content.CONTENT_CONSTS2.FACTION)2 ObjType (main.entity.type.ObjType)2 DEITY (main.content.CONTENT_CONSTS.DEITY)1