use of main.content.OBJ_TYPE in project Eidolons by IDemiurge.
the class AE_Manager method saveTreesIntoXML.
public static void saveTreesIntoXML() {
OBJ_TYPE TYPE = C_OBJ_TYPE.XML_TYPES;
PROPERTY XML_PROP = null;
// }
for (String typeName : cacheMap.keySet()) {
ObjType type = DataManager.getType(typeName, TYPE);
if (type == null) {
continue;
}
if (type.getOBJ_TYPE_ENUM() == DC_TYPE.ABILS) {
XML_PROP = G_PROPS.ABILITIES;
} else {
XML_PROP = PROPS.DIALOGUE_DATA;
}
saveTreeIntoXML(TYPE, XML_PROP, type);
// dirty flag can help
// XML_Writer.writeXML_ForType(type, TYPE);
}
}
use of main.content.OBJ_TYPE in project Eidolons by IDemiurge.
the class ReportView method init.
public void init() {
PROPERTY prop = AT_PROPS.COMPLETED_TASKS;
OBJ_TYPE TYPE = AT_OBJ_TYPE.TASK;
List<ObjType> workedTasks = getTypeList(prop, TYPE);
List<Task> completedTasks = new ArrayList<>();
List<Task> failedTasks = new ArrayList<>();
// new ListMaster<>().toList(string)
// task comps? group by goals
// time spent,
// new G_ScrolledPanel<E>() {
// @Override
// protected G_Panel createComponent(E d) {
// // TODO Auto-generated method stub
// return null;
// }
// };
// state
// style
}
use of main.content.OBJ_TYPE in project Eidolons by IDemiurge.
the class ArcaneTower method genericInit.
public static void genericInit(boolean av) {
EnumMaster.getAdditionalEnumClasses().add(StatEnums.class);
ContentManager.setTypeMaster(new TypeMaster() {
public OBJ_TYPE getOBJ_TYPE(String typeName) {
// AT_OBJ_TYPE.valueOf(typeName);
return new EnumMaster<AT_OBJ_TYPE>().retrieveEnumConst(AT_OBJ_TYPE.class, typeName);
}
});
XML_Reader.setCustomTypesPath(getTypesPath());
contentManager = new AT_ContentManager(dcSync);
if (av) {
launchAV();
}
// launchBackground();
initSimulation();
if (!av) {
contentManager.contentInit();
CoreEngine.systemInit();
XML_Reader.loadXml(getTypesPath());
}
sim.initObjTypes();
ContentManager.setInstance(contentManager);
}
use of main.content.OBJ_TYPE in project Eidolons by IDemiurge.
the class XML_Converter method getXMLFromTypeList.
public static String getXMLFromTypeList(List<ObjType> typeList) {
Map<OBJ_TYPE, String> subStringMap = new XMap<>();
String xml = "";
for (ObjType type : typeList) {
String typeString = subStringMap.get(type.getOBJ_TYPE_ENUM());
if (typeString == null) {
typeString = "";
}
typeString += wrap(XML_Formatter.formatStringForXmlNodeName(type.getName()), "");
subStringMap.put(type.getOBJ_TYPE_ENUM(), typeString);
}
for (OBJ_TYPE type : subStringMap.keySet()) {
xml += wrap(type.getName(), subStringMap.get(type));
}
xml = wrap(TYPES_NODE, xml);
return xml;
}
use of main.content.OBJ_TYPE in project Eidolons by IDemiurge.
the class TestLauncher method getRandomizedParty.
protected String getRandomizedParty(int heroesCount, int unitCount, Integer maxLevel, Integer minLevel) {
ObjType mainHero = null;
Loop.startLoop(100);
while (Loop.loopContinues()) {
ObjType type = RandomWizard.getRandomType(DC_TYPE.CHARS);
if (maxLevel != null) {
if (type.getLevel() > maxLevel) {
continue;
}
}
if (minLevel != null) {
if (type.getLevel() < minLevel) {
continue;
}
}
mainHero = type;
}
String party = mainHero.getName() + ";";
Loop.startLoop(100);
while (unitCount > 0 && Loop.loopContinues()) {
OBJ_TYPE TYPE = DC_TYPE.UNITS;
boolean subgroup = true;
String property = mainHero.getProperty(G_PROPS.DEITY);
if (!DataManager.isTypeName(property)) {
property = mainHero.getProperty(G_PROPS.ASPECT);
subgroup = false;
}
if (addRandomUnit(TYPE, property, subgroup, party, minLevel, maxLevel)) {
unitCount--;
}
}
Loop.startLoop(100);
while (heroesCount > 0 && Loop.loopContinues()) {
// ";";
if (addRandomUnit(DC_TYPE.CHARS, null, false, party, minLevel, maxLevel)) {
heroesCount--;
}
}
return party;
}
Aggregations