use of main.content.OBJ_TYPE in project Eidolons by IDemiurge.
the class SaveMaster method save.
public static boolean save() {
// BACKUP
// TODO SAVE DYNAMIC VALUES - DISCOVERY STATUS, TIME, COORDINATES,
// PROGRESS, ...
builders = new HashMap<>();
for (Obj obj : MacroGame.getGame().getObjects()) {
// same format as WE?
// every object?
StringBuilder builder = builders.get(obj.getOBJ_TYPE_ENUM());
if (builder == null) {
continue;
}
XML_Writer.getTypeXML_Builder(obj, builder, obj.getType());
builders.put(obj.getOBJ_TYPE_ENUM(), builder);
// both macro and micro types...
// dynamics should be initialized
// if (?!)
// return false;
}
String content = "";
for (OBJ_TYPE TYPE : builders.keySet()) {
content += XML_Converter.wrap(TYPE.getName(), builders.get(TYPE).toString());
}
XML_Writer.write(content, getSavePath(), getSaveFileName());
return true;
}
Aggregations