better saving
This commit is contained in:
@@ -340,11 +340,22 @@ class CharacterEditor extends UIState {
|
||||
}
|
||||
|
||||
function buildCharacter():String {
|
||||
return "<!DOCTYPE codename-engine-character>\n" + Printer.print(character.buildXML(), true);
|
||||
var charXML:Xml = character.buildXML();
|
||||
|
||||
// clean
|
||||
if (charXML.exists("gameOverChar") && character.gameOverCharacter == "bf-dead") charXML.remove("gameOverChar");
|
||||
if (charXML.exists("camx") && character.cameraOffset.x == 0) charXML.remove("camx");
|
||||
if (charXML.exists("camy") && character.cameraOffset.y == 0) charXML.remove("camy");
|
||||
if (charXML.exists("holdTime") && character.holdTime == 4) charXML.remove("holdTime");
|
||||
if (charXML.exists("flipX") && !character.flipX) charXML.remove("flipX");
|
||||
if (charXML.exists("scale") && character.scale.x == 1) charXML.remove("scale");
|
||||
if (charXML.exists("antialiasing") && character.antialiasing) charXML.remove("antialiasing");
|
||||
|
||||
return "<!DOCTYPE codename-engine-character>\n" + Printer.print(charXML, true);
|
||||
}
|
||||
|
||||
function _edit_undo(_) {
|
||||
var v = undoList.shift();
|
||||
var v = undoList.shift();s
|
||||
switch (v) {
|
||||
case null:
|
||||
// do nothing
|
||||
|
||||
Reference in New Issue
Block a user