Fixed saving of named objects that have names that are not supposed to change

This commit is contained in:
Ragora 2013-03-17 19:38:40 -04:00
parent f5a6cfce9b
commit c29fd89a29

View file

@ -229,6 +229,7 @@ function writeBuildingComponent(%obj) {
echo("Saving: " @ %obj @ " Name: " @ %dataBlockName);
%buildingPiece = "%building = new (" @ %obj.getClassName() @ ") () {";
%buildingPiece = %buildingPiece @ "datablock = \"" @ %dataBlockName @ "\";";
if (%obj.nameTag !$= "") %buildingPiece = %buildingPiece @ "nameTag = \"" @ %obj.nameTag @ "\";";
if (%obj.position !$= "") %buildingPiece = %buildingPiece @ "position = \"" @ %obj.position @ "\";";
if (%obj.rotation !$= "") %buildingPiece = %buildingPiece @ "rotation = \"" @ %obj.rotation @ "\";";
if (%obj.realScale !$= "") %buildingPiece = %buildingPiece @ "scale = \"" @ %obj.realScale @ "\";";