From c29fd89a293cd9becf2bec09e0d1435c97e603c0 Mon Sep 17 00:00:00 2001 From: Ragora Date: Sun, 17 Mar 2013 19:38:40 -0400 Subject: [PATCH] Fixed saving of named objects that have names that are not supposed to change --- Scripts/saveBuilding.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Scripts/saveBuilding.cs b/Scripts/saveBuilding.cs index 436739a..cb2a585 100644 --- a/Scripts/saveBuilding.cs +++ b/Scripts/saveBuilding.cs @@ -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 @ "\";";