Merge branch 'main' of https://github.com/FNF-CNE-Devs/CodenameEngine-Dev
This commit is contained in:
@@ -361,8 +361,19 @@ class CharacterEditor extends UIState {
|
||||
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");
|
||||
if (charXML.exists("sprite") && character.sprite == character.curCharacter) charXML.remove("sprite");
|
||||
if (charXML.exists("icon") && character.icon == character.curCharacter) charXML.remove("icon");
|
||||
|
||||
return "<!DOCTYPE codename-engine-character>\n" + Printer.print(charXML, true);
|
||||
for (a in charXML.elements())
|
||||
if (a.nodeName == "anim") {
|
||||
if (a.exists("x") && a.get("x") == "0") a.remove("x");
|
||||
if (a.exists("y") && a.get("y") == "0") a.remove("y");
|
||||
if (a.exists("fps") && a.get("fps") == "24") a.remove("fps");
|
||||
if (a.exists("loop") && a.get("loop") == "false") a.remove("loop");
|
||||
}
|
||||
|
||||
var xmlThingYea:String = "<!DOCTYPE codename-engine-character>\n" + Printer.print(charXML, Options.editorPrettyPrint);
|
||||
return Options.editorPrettyPrint ? xmlThingYea : xmlThingYea.replace("\n", "");
|
||||
}
|
||||
|
||||
function _edit_undo(_) {
|
||||
@@ -654,4 +665,4 @@ enum CharacterChange {
|
||||
CDeleteAnim(animID:Int, animData:AnimData);
|
||||
CChangeOffset(name:String, change:FlxPoint);
|
||||
CResetOffsets(oldOffsets:Map<String, FlxPoint>);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user