Parametrize script extension, default to 'tscript'

This commit is contained in:
Lukas Aldershaab 2020-12-12 16:54:16 +01:00
parent b8b62292bd
commit 099dd4f1f3
542 changed files with 774 additions and 783 deletions

View file

@ -206,7 +206,7 @@ function ForestEditorGui::newMesh( %this )
ForestEditMeshTree.scrollVisible( %item );
ForestEditMeshTree.addSelection( %item );
ForestDataManager.setDirty( %name, "art/forest/managedItemData.cs" );
ForestDataManager.setDirty( %name, "art/forest/managedItemData.tscript" );
%element = new ForestBrushElement()
{
@ -255,7 +255,7 @@ function ForestEditorGui::deleteMesh( %this )
function ForestEditorGui::okDeleteMesh( %this, %mesh )
{
// Remove mesh from file
ForestDataManager.removeObjectFromFile( %mesh, "art/forest/managedItemData.cs" );
ForestDataManager.removeObjectFromFile( %mesh, "art/forest/managedItemData.tscript" );
// Submitting undo actions is handled in code.
%this.deleteMeshSafe( %mesh );
@ -371,7 +371,7 @@ function ForestEditMeshTree::onDoubleClick( %this )
parentGroup = ForestBrushGroup;
};
//ForestDataManager.setDirty( %element, "art/forest/brushes.cs" );
//ForestDataManager.setDirty( %element, "art/forest/brushes.tscript" );
ForestEditBrushTree.clearSelection();
ForestEditBrushTree.buildVisibleTree( true );

View file

@ -24,12 +24,12 @@ function initializeForestEditor()
{
echo(" % - Initializing Forest Editor");
exec( "./forestEditor.cs" );
exec( "./forestEditor.tscript" );
exec( "./forestEditorGui.gui" );
exec( "./forestEditToolbar.ed.gui" );
exec( "./forestEditorGui.cs" );
exec( "./tools.cs" );
exec( "./forestEditorGui.tscript" );
exec( "./tools.tscript" );
ForestEditorGui.setVisible( false );
ForestEditorPalleteWindow.setVisible( false );
@ -84,16 +84,16 @@ function destroyForestEditor()
// NOTE: debugging helper.
function reinitForest()
{
exec( "./main.cs" );
exec( "./forestEditorGui.cs" );
exec( "./tools.cs" );
exec( "./main.tscript" );
exec( "./forestEditorGui.tscript" );
exec( "./tools.tscript" );
}
function ForestEditorPlugin::onWorldEditorStartup( %this )
{
new PersistenceManager( ForestDataManager );
%brushPath = "tools/forestEditor/brushes.cs";
%brushPath = "tools/forestEditor/brushes.tscript";
if ( !isFile( %brushPath ) )
%successfulFile = createPath( %brushPath );
@ -205,7 +205,7 @@ function ForestEditorPlugin::onActivated( %this )
}
if ( %this.showError )
toolsMessageBoxOK( "Error", "Your tools/forestEditor folder does not contain a valid brushes.cs. Brushes you create will not be saved!" );
toolsMessageBoxOK( "Error", "Your tools/forestEditor folder does not contain a valid brushes.tscript. Brushes you create will not be saved!" );
}
function ForestEditorPlugin::onDeactivated( %this )
@ -262,7 +262,7 @@ function ForestEditorPlugin::onSaveMission( %this, %missionFile )
}
}
ForestBrushGroup.save( "tools/forestEditor/brushes.cs" );
ForestBrushGroup.save( "tools/forestEditor/brushes.tscript" );
}
function ForestEditorPlugin::onEditorSleep( %this )