Skip to content

Commit

Permalink
Fixed panel selection for KSP 1.7, now required to wait until panel i…
Browse files Browse the repository at this point in the history
…s displayed, the internal flags in KSP are now being set slightly differently
  • Loading branch information
linuxgurugamer committed Apr 12, 2019
1 parent c6b1c9d commit 6f8a56a
Show file tree
Hide file tree
Showing 10 changed files with 124 additions and 69 deletions.
Binary file modified .vs/AGExt/v15/sqlite3/storage.ide
Binary file not shown.
13 changes: 4 additions & 9 deletions AGExt.version
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,12 @@
"VERSION": {
"MAJOR": 2,
"MINOR": 3,
"PATCH": 3,
"BUILD": 8
},
"KSP_VERSION": {
"MAJOR": 1,
"MINOR": 5,
"PATCH": 1
"PATCH": 4,
"BUILD": 0
},
"KSP_VERSION_MIN": {
"MAJOR": 1,
"MINOR": 5,
"PATCH": 1
"MINOR": 7,
"PATCH": 0
}
}
25 changes: 0 additions & 25 deletions AGExt.version.new

This file was deleted.

12 changes: 6 additions & 6 deletions AGExt/AGExt.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -64,27 +64,27 @@
<ItemGroup>
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>R:\KSP_1.5.1_dev\KSP_x64_Data\Managed\Assembly-CSharp.dll</HintPath>
<HintPath>R:\KSP_1.7.0_dev\KSP_x64_Data\Managed\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>R:\KSP_1.5.1_dev\KSP_x64_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
<HintPath>R:\KSP_1.7.0_dev\KSP_x64_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
</Reference>
<Reference Include="ClickThroughBlocker, Version=0.1.6.2, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>R:\KSP_1.5.1_dev\GameData\000_ClickThroughBlocker\Plugins\ClickThroughBlocker.dll</HintPath>
<HintPath>R:\KSP_1.7.0_dev\GameData\000_ClickThroughBlocker\Plugins\ClickThroughBlocker.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="ToolbarControl">
<HintPath>R:\KSP_1.5.1_dev\GameData\001_ToolbarControl\Plugins\ToolbarControl.dll</HintPath>
<HintPath>R:\KSP_1.7.0_dev\GameData\001_ToolbarControl\Plugins\ToolbarControl.dll</HintPath>
</Reference>
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>R:\KSP_1.5.1_dev\KSP_x64_Data\Managed\UnityEngine.dll</HintPath>
<HintPath>R:\KSP_1.7.0_dev\KSP_x64_Data\Managed\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UI, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>R:\KSP_1.5.1_dev\KSP_x64_Data\Managed\UnityEngine.UI.dll</HintPath>
<HintPath>R:\KSP_1.7.0_dev\KSP_x64_Data\Managed\UnityEngine.UI.dll</HintPath>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
2 changes: 1 addition & 1 deletion AGExt/AssemblyVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

using System.Reflection;

[assembly: AssemblyVersion("2.3.3.7")]
[assembly: AssemblyVersion("2.3.4.0")]
105 changes: 98 additions & 7 deletions AGExt/Editor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,7 @@ public void onLeftButtonClick()
{
if (showCareerStockAGs)
{
Log.Info("onLeftButtonClick, EditorLogic.fetch.editorScreen: " + EditorLogic.fetch.editorScreen);
if (EditorLogic.fetch.editorScreen != EditorScreen.Actions)
{
if (EditorLogic.SortedShipList.Count > 0)
Expand Down Expand Up @@ -4081,29 +4082,111 @@ public List<AGXPart> AGXAddSelectedPart(Part p, bool Sym)
// }
//}


static bool transitioning = false;
public void Update()
{
string errLine = "1";
Log.Info("update start " +Time.realtimeSinceStartup);
try
{
//Log.Info("panels current " + EditorPanels.Instance.panelManager.CurrentPanel.ToString());
//Log.Info("EditorLogic.fetch.editorScreen " + EditorLogic.fetch.editorScreen.ToString());

switch (EditorLogic.fetch.editorScreen)
{
case EditorScreen.Parts:
if (EditorPanels.Instance.panelManager == null || EditorPanels.Instance.partsEditor.State != "In")
{

Log.Info("BRING IN PARTS");

if (!transitioning)
{
EditorPanels.Instance.panelManager.BringIn(EditorPanels.Instance.partsEditor);
transitioning = true;
}

}
else
transitioning = false;
break;

case EditorScreen.Crew:
if (EditorPanels.Instance.panelManager == null || EditorPanels.Instance.crew.State != "In")
{

Log.Info("BRING IN CREW");

if (!transitioning)
{
EditorPanels.Instance.panelManager.BringIn(EditorPanels.Instance.crew);
transitioning = true;
}

}
else
transitioning = false;
break;

case EditorScreen.Actions:
if (AGXShow)
{
if (EditorPanels.Instance.panelManager != null)
{
Log.Info("HIDE PANELS");
EditorPanels.Instance.panelManager.Dismiss(EditorPanels.Instance.actions);
}
}
else
{
if (EditorPanels.Instance.panelManager == null || EditorPanels.Instance.actions.State != "In")
{
Log.Info("BRING IN ACTIONS");
if (!transitioning)
{
EditorPanels.Instance.panelManager.BringIn(EditorPanels.Instance.actions);
transitioning = true;
}
}
else
transitioning = false;
}

break;
}
#if false
if (EditorLogic.fetch.editorScreen == EditorScreen.Parts)
{
if (EditorPanels.Instance.panelManager == null || EditorPanels.Instance.partsEditor.State != "In")
{

Log.Info("BRING IN PARTS");
EditorPanels.Instance.panelManager.BringIn(EditorPanels.Instance.partsEditor);

if (!transitioning)
{
EditorPanels.Instance.panelManager.BringIn(EditorPanels.Instance.partsEditor);
transitioning = true;
}

}
else
transitioning = false;
}
else if (EditorLogic.fetch.editorScreen == EditorScreen.Crew)
{
if (EditorPanels.Instance.panelManager == null || EditorPanels.Instance.crew.State != "In")
{

Log.Info("BRING IN CREW");
EditorPanels.Instance.panelManager.BringIn(EditorPanels.Instance.crew);

if (!transitioning)
{
EditorPanels.Instance.panelManager.BringIn(EditorPanels.Instance.crew);
transitioning = true;
}

} else
{
transitioning = false;
}
}
else if (EditorLogic.fetch.editorScreen == EditorScreen.Actions)
Expand All @@ -4121,12 +4204,20 @@ public void Update()
if (EditorPanels.Instance.panelManager == null || EditorPanels.Instance.actions.State != "In")
{
Log.Info("BRING IN ACTIONS");
EditorPanels.Instance.panelManager.BringIn(EditorPanels.Instance.actions);
if (!transitioning)
{
EditorPanels.Instance.panelManager.BringIn(EditorPanels.Instance.actions);
transitioning = true;
}
}
else
transitioning = false;

}
}

EditorLogic ELCur = new EditorLogic();

#endif
EditorLogic ELCur; // = new EditorLogic();
ELCur = EditorLogic.fetch;//get current editor logic instance

errLine = "2";
Expand Down
3 changes: 3 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2.3.4
Fixed panel selection for KSP 1.7, now required to wait until panel is displayed, the internal flags in KSP are now being set slightly differently

2.3.3.7
Version bump for 1.5 rebuild

Expand Down
27 changes: 8 additions & 19 deletions GameData/Diazo/AGExt/AGExt.version
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,19 @@
"NAME": "AGExt",
"URL": "http://ksp.spacetux.net/avc/AGExt",
"DOWNLOAD": "https://github.com/linuxgurugamer/AGExt/releases",
"GITHUB" :
{
"USERNAME" : "linuxgurugamer",
"REPOSITORY" : "AGExt"
"GITHUB": {
"USERNAME": "linuxgurugamer",
"REPOSITORY": "AGExt"
},
"VERSION": {
"MAJOR": 2,
"MINOR": 3,
"PATCH": 3,
"BUILD": 7
},
"KSP_VERSION": {
"MAJOR": 1,
"MINOR": 5,
"PATCH": 1
"PATCH": 4,
"BUILD": 0
},
"KSP_VERSION_MIN": {
"MAJOR": 1,
"MINOR": 5,
"PATCH": 1
},
"KSP_VERSION_MAX": {
"MAJOR": 1,
"MINOR": 5,
"PATCH": 99
"MINOR": 7,
"PATCH": 0
}
}
}
2 changes: 1 addition & 1 deletion deploy.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ rem GAMEDATA is the name of the local GameData
rem VERSIONFILE is the name of the version file, usually the same as GAMEDATA,
rem but not always

set H=R:\KSP_1.5.1_dev
set H=R:\KSP_1.7.0_dev
set GAMEDIR=AGExt
set GAMEDATA="GameData\Diazo"
set VERSIONFILE=%GAMEDIR%.version
Expand Down
4 changes: 3 additions & 1 deletion jenkins.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@

# 8: AdditionalMods to include
# 8:ConnectedLivingSpace

NOT:1.4.5
NOT:1.5.1
NOT:1.6.1
#
# End of file
#

0 comments on commit 6f8a56a

Please sign in to comment.