Search in sources :

Example 31 with OBJ_TYPE

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;
}
Also used : OBJ_TYPE(main.content.OBJ_TYPE) Obj(main.entity.obj.Obj)

Aggregations

OBJ_TYPE (main.content.OBJ_TYPE)31 ObjType (main.entity.type.ObjType)16 C_OBJ_TYPE (main.content.C_OBJ_TYPE)7 ArrayList (java.util.ArrayList)5 PROPERTY (main.content.values.properties.PROPERTY)5 Obj (main.entity.obj.Obj)5 Entity (main.entity.Entity)3 DC_SpellObj (eidolons.entity.active.DC_SpellObj)2 Unit (eidolons.entity.obj.unit.Unit)2 File (java.io.File)2 VALUE (main.content.VALUE)2 TextureRegion (com.badlogic.gdx.graphics.g2d.TextureRegion)1 Actor (com.badlogic.gdx.scenes.scene2d.Actor)1 InputEvent (com.badlogic.gdx.scenes.scene2d.InputEvent)1 ClickListener (com.badlogic.gdx.scenes.scene2d.utils.ClickListener)1 NinePatchDrawable (com.badlogic.gdx.scenes.scene2d.utils.NinePatchDrawable)1 ChoiceSequence (eidolons.client.cc.gui.neo.choice.ChoiceSequence)1 EntityChoiceView (eidolons.client.cc.gui.neo.choice.EntityChoiceView)1 HC_PagedListPanel (eidolons.client.cc.gui.pages.HC_PagedListPanel)1 SequenceManager (eidolons.client.dc.SequenceManager)1