Search in sources :

Example 1 with ConcurrentMap

use of main.data.ConcurrentMap in project Eidolons by IDemiurge.

the class ItemGenerator method init.

public void init() {
    // if (!basicMode)
    ContentGenerator.initMaterials();
    if (!isGenerationOn()) {
        return;
    }
    for (QUALITY_LEVEL q : ItemEnums.QUALITY_LEVEL.values()) {
        ConcurrentMap qMap = new ConcurrentMap<>();
        itemMaps.put(q, qMap);
        for (MATERIAL m : ItemEnums.MATERIAL.values()) {
            qMap.put(m, new ConcurrentMap<>());
        }
    }
    baseWeaponTypes.addAll(DataManager.getTypes(DC_TYPE.WEAPONS));
    baseArmorTypes.addAll(DataManager.getTypes(DC_TYPE.ARMOR));
    baseJewelryTypes.addAll(DataManager.getTypes(DC_TYPE.JEWELRY));
    baseItemTypes.addAll(DataManager.getTypes(DC_TYPE.ITEMS));
    // baseGarmentTypes.addAll(DataManager.getTypes(OBJ_TYPES.GARMENT));
    DataManager.setBaseGarmentTypes(baseGarmentTypes.toArray(new ObjType[baseGarmentTypes.size()]));
    DataManager.setBaseWeaponTypes(baseWeaponTypes.toArray(new ObjType[baseWeaponTypes.size()]));
    DataManager.setBaseArmorTypes(baseArmorTypes.toArray(new ObjType[baseArmorTypes.size()]));
    DataManager.setBaseJewelryTypes(baseJewelryTypes.toArray(new ObjType[baseJewelryTypes.size()]));
    DataManager.setBaseItemTypes(baseItemTypes.toArray(new ObjType[baseItemTypes.size()]));
    // basicGenerator = new ItemGenerator(true);
    try {
        // (isBasicMode() ? basicGenerator : defaultGenerator).
        generateItemObjTypes();
    } catch (Exception e) {
        main.system.ExceptionMaster.printStackTrace(e);
    }
    DataManager.setItemMaps(itemMaps);
}
Also used : ObjType(main.entity.type.ObjType) QUALITY_LEVEL(main.content.enums.entity.ItemEnums.QUALITY_LEVEL) ConcurrentMap(main.data.ConcurrentMap) MATERIAL(main.content.enums.entity.ItemEnums.MATERIAL)

Aggregations

MATERIAL (main.content.enums.entity.ItemEnums.MATERIAL)1 QUALITY_LEVEL (main.content.enums.entity.ItemEnums.QUALITY_LEVEL)1 ConcurrentMap (main.data.ConcurrentMap)1 ObjType (main.entity.type.ObjType)1