Przeglądaj źródła

Fix forest editor failing to load forest because of space after object ID

Justin Knight 7 lat temu
rodzic
commit
38a10e032b

+ 1 - 1
Templates/BaseGame/game/tools/forestEditor/forestEditorGui.cs

@@ -50,7 +50,7 @@ function ForestEditorGui::onActiveForestUpdated( %this, %forest, %createNew )
 /// Called from a message box when a forest is not found.
 function ForestEditorGui::createForest( %this )
 {
-   %forestObject = parseMissionGroupForIds("Forest", "");
+   %forestObject = trim(parseMissionGroupForIds("Forest", ""));
  
    if ( isObject( %forestObject ) )
    {

+ 2 - 2
Templates/BaseGame/game/tools/forestEditor/main.cs

@@ -144,7 +144,7 @@ function ForestEditorPlugin::onActivated( %this )
    //ForestEditToolbar.setVisible( true );
 
    //Get our existing forest object in our current mission if we have one
-   %forestObject = parseMissionGroupForIds("Forest", "");
+   %forestObject = trim(parseMissionGroupForIds("Forest", ""));
    if(isObject(%forestObject))
    {
       ForestEditorGui.setActiveForest(%forestObject.getName());
@@ -242,7 +242,7 @@ function ForestEditorPlugin::onSaveMission( %this, %missionFile )
    ForestDataManager.saveDirty();
 
    //First, find out if we have an existing forest object
-   %forestObject = parseMissionGroupForIds("Forest", "");
+   %forestObject = trim(parseMissionGroupForIds("Forest", ""));
  
    if ( isObject( %forestObject ) )
    {

+ 1 - 1
Templates/Full/game/tools/forestEditor/forestEditorGui.cs

@@ -50,7 +50,7 @@ function ForestEditorGui::onActiveForestUpdated( %this, %forest, %createNew )
 /// Called from a message box when a forest is not found.
 function ForestEditorGui::createForest( %this )
 {
-   %forestObject = parseMissionGroupForIds("Forest", "");
+   %forestObject = trim(parseMissionGroupForIds("Forest", ""));
  
    if ( isObject( %forestObject ) )
    {

+ 2 - 2
Templates/Full/game/tools/forestEditor/main.cs

@@ -143,7 +143,7 @@ function ForestEditorPlugin::onActivated( %this )
    //ForestEditToolbar.setVisible( true );
 
    //Get our existing forest object in our current mission if we have one
-   %forestObject = parseMissionGroupForIds("Forest", "");
+   %forestObject = trim(parseMissionGroupForIds("Forest", ""));
    if(isObject(%forestObject))
    {
       ForestEditorGui.setActiveForest(%forestObject.getName());
@@ -241,7 +241,7 @@ function ForestEditorPlugin::onSaveMission( %this, %missionFile )
    ForestDataManager.saveDirty();
 
    //First, find out if we have an existing forest object
-   %forestObject = parseMissionGroupForIds("Forest", "");
+   %forestObject = trim(parseMissionGroupForIds("Forest", ""));
  
    if ( isObject( %forestObject ) )
    {