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);
}
Aggregations