Revert "Update EditorGui.ed.tscript"

This reverts commit 0f819a3af4.
This commit is contained in:
marauder2k7 2025-05-12 12:50:31 +01:00
parent 0f819a3af4
commit 04fa9d87f4

View file

@ -317,11 +317,8 @@ function EditorGui::shutdown( %this )
%this.setEditor( "" ); %this.setEditor( "" );
// Call the shutdown callback on the editor plugins. // Call the shutdown callback on the editor plugins.
for ( %i = 0; %i < EditorPluginSet.getCount(); %i++ ) foreach( %plugin in EditorPluginSet )
{ %plugin.onWorldEditorShutdown();
%obj = EditorPluginSet.getObject(%i);
%obj.onWorldEditorShutdown();
}
} }
/// This is used to add an editor to the Editors menu which /// This is used to add an editor to the Editors menu which
@ -578,11 +575,9 @@ function EditorGui::onWake( %this )
EHWorldEditor.setStateOn( 1 ); EHWorldEditor.setStateOn( 1 );
// Notify the editor plugins that the editor has started. // Notify the editor plugins that the editor has started.
for ( %i = 0; %i < EditorPluginSet.getCount(); %i++ )
{ foreach( %plugin in EditorPluginSet )
%obj = EditorPluginSet.getObject( %i ); %plugin.onEditorWake();
%obj.onEditorWake();
}
// Push the ActionMaps in the order that we want to have them // Push the ActionMaps in the order that we want to have them
// before activating an editor plugin, so that if the plugin // before activating an editor plugin, so that if the plugin
@ -621,11 +616,9 @@ function EditorGui::onSleep( %this )
MoveMap.pop(); MoveMap.pop();
// Notify the editor plugins that the editor will be closing. // Notify the editor plugins that the editor will be closing.
for ( %i = 0; %i < EditorPluginSet.getCount(); %i++ )
{ foreach( %plugin in EditorPluginSet )
%obj = EditorPluginSet.getObject(%i); %plugin.onEditorSleep();
%obj.onEditorSleep();
}
if(isObject($Server::CurrentScene)) if(isObject($Server::CurrentScene))
$Server::CurrentScene.open(); $Server::CurrentScene.open();
@ -722,12 +715,8 @@ function EditorGui::onNewLevelLoaded( %this, %levelName )
function EditorMissionCleanup::onRemove( %this ) function EditorMissionCleanup::onRemove( %this )
{ {
EditorGui.levelName = ""; EditorGui.levelName = "";
foreach( %plugin in EditorPluginSet )
for ( %i = 0; %i < EditorPluginSet.getCount(); %i++ ) %plugin.onExitMission();
{
%obj = EditorPluginSet.getObject(%i);
%obj.onExitMission();
}
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------