Skip to content

Commit bfda7e1

Browse files
committed
1.32
KSP 1.0 Update
1 parent 86399a3 commit bfda7e1

File tree

4 files changed

+35
-15
lines changed

4 files changed

+35
-15
lines changed

AGExt/AGExt.csproj

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,29 @@
2525
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
2626
<DebugType>pdbonly</DebugType>
2727
<Optimize>true</Optimize>
28-
<OutputPath>..\..\..\0.90 Dev\GameData\Diazo\AGExt\</OutputPath>
28+
<OutputPath>..\..\..\1.0 Dev\GameData\Diazo\AGExt\</OutputPath>
2929
<DefineConstants>TRACE</DefineConstants>
3030
<ErrorReport>prompt</ErrorReport>
3131
<WarningLevel>4</WarningLevel>
3232
</PropertyGroup>
3333
<ItemGroup>
34-
<Reference Include="Assembly-CSharp">
35-
<HintPath>..\..\..\0.90 Dev\KSP_Data\Managed\Assembly-CSharp.dll</HintPath>
34+
<Reference Include="Assembly-CSharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
35+
<SpecificVersion>False</SpecificVersion>
36+
<HintPath>..\..\..\1.0 dev\KSP_Data\Managed\Assembly-CSharp.dll</HintPath>
3637
</Reference>
37-
<Reference Include="Assembly-CSharp-firstpass">
38-
<HintPath>..\..\..\0.90 Dev\KSP_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
38+
<Reference Include="Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
39+
<SpecificVersion>False</SpecificVersion>
40+
<HintPath>..\..\..\1.0 dev\KSP_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
3941
</Reference>
4042
<Reference Include="System" />
4143
<Reference Include="System.Core" />
4244
<Reference Include="System.Xml.Linq" />
4345
<Reference Include="System.Data.DataSetExtensions" />
4446
<Reference Include="System.Data" />
4547
<Reference Include="System.Xml" />
46-
<Reference Include="UnityEngine">
47-
<HintPath>..\..\..\0.90 Dev\KSP_Data\Managed\UnityEngine.dll</HintPath>
48+
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
49+
<SpecificVersion>False</SpecificVersion>
50+
<HintPath>..\..\..\1.0 dev\KSP_Data\Managed\UnityEngine.dll</HintPath>
4851
</Reference>
4952
</ItemGroup>
5053
<ItemGroup>

AGExt/Editor.cs

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public Vector2 Draw(Vector2 position)
159159
public void DrawSettingsWinEditor(int WindowID)
160160
{
161161

162-
if (GUI.Button(new Rect(10, 25, 130, 25), "Reset Windows",AGXBtnStyle))
162+
if (GUI.Button(new Rect(10, 25, 130, 25), "Reset Windows", AGXBtnStyle))
163163
{
164164
KeySetWin.x = 250;
165165
KeySetWin.y = 250;
@@ -546,6 +546,7 @@ public void Start()
546546
GameEvents.onPartAttach.Add(PartAttaching);// this game event only fires for part removed, not child parts
547547
GameEvents.onPartRemove.Add(PartRemove);
548548
GameEvents.onEditorShipModified.Add(VesselChanged);
549+
GameEvents.onEditorLoad.Add(OnShipLoad);
549550
isDirectAction = new Dictionary<int, bool>();
550551
CurrentVesselActions.Clear();
551552
EditorLoadFromFile();
@@ -555,7 +556,7 @@ public void Start()
555556
//print("Loading now");
556557
//EditorActionGroups.Instance.groupActionsList.AddValueChangedDelegate(OnGroupActionsListChange);
557558
LoadFinished = true;
558-
Debug.Log("AGX Editor Start Okay");
559+
//Debug.Log("AGX Editor Start Okay");
559560
}
560561
catch (Exception e)
561562
{
@@ -564,6 +565,21 @@ public void Start()
564565
}
565566
}
566567

568+
public void OnShipLoad(ShipConstruct ship ,CraftBrowser.LoadType loadType)
569+
{
570+
if (loadType == CraftBrowser.LoadType.Normal)
571+
{
572+
CurrentVesselActions.Clear();
573+
//EditorLoadFromFile();
574+
EditorLoadFromNode();
575+
//Debug.Log("AGX Ship Load of type NORMAL detected");
576+
}
577+
else
578+
{
579+
Debug.Log("AGX Ship Load of type MERGE detected");
580+
}
581+
}
582+
567583
//public void OnGroupActionsListChange(IUIObject obj)
568584
//{
569585
// print("List change " + obj.GetType());
@@ -1155,6 +1171,7 @@ public void OnDisable()
11551171
GameEvents.onPartAttach.Remove(PartAttaching);
11561172
GameEvents.onPartRemove.Remove(PartRemove);
11571173
GameEvents.onEditorShipModified.Remove(VesselChanged);
1174+
GameEvents.onEditorLoad.Remove(OnShipLoad);
11581175
//GameEvents.onGameSceneLoadRequested.Remove(LeavingEditor);
11591176

11601177

@@ -2374,7 +2391,7 @@ public void SelParts(int WindowID)
23742391

23752392

23762393
//if (Checking.Count == 0)
2377-
if(!CurrentVesselActions.Contains(ToAdd))
2394+
if (!CurrentVesselActions.Contains(ToAdd))
23782395
{
23792396

23802397
CurrentVesselActions.Add(ToAdd);
@@ -2726,7 +2743,7 @@ public void RefreshDefaultActionsList()
27262743
}
27272744
}
27282745
}
2729-
catch(Exception e)
2746+
catch (Exception e)
27302747
{
27312748
Debug.Log("AGX RefDefActsList Error " + errLine + " " + e);
27322749
}
@@ -2751,7 +2768,7 @@ public void RefreshDefaultActionsListType()
27512768
}
27522769
}
27532770
}
2754-
catch(Exception e)
2771+
catch (Exception e)
27552772
{
27562773
Debug.Log("AGX RefDefActsListType Error " + errLine + " " + e);
27572774
}
@@ -3960,7 +3977,7 @@ public void MonitorDefaultActions()
39603977
}
39613978
}
39623979
}
3963-
catch(Exception e)
3980+
catch (Exception e)
39643981
{
39653982
Debug.Log("AGX Monitor Default Actions Error " + errLine + " " + e);
39663983
}

AGExt/Flight.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5832,7 +5832,7 @@ public static List<AGXAction> CheckActionsActiveActualCode(List<AGXAction> actsL
58325832
{
58335833
if (agAct.ba.name == "OnAction")
58345834
{
5835-
//print((string)agAct.ba.listParent.module.Fields.GetValue("storedGearState"));
5835+
//print((string)agAct.ba.listParent.module.Fields.GetValue("gearState") + " gear test");
58365836
if ((string)agAct.ba.listParent.module.Fields.GetValue("storedGearState") == "DEPLOYED")
58375837
{
58385838
agAct.activated = true;

AGExt/Instantly.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class AGXMainMenu :PartModule
1313
//abandoned module, no longer needed for key rebinding
1414
public void Start()
1515
{
16-
print("AGExt Ver. 1.31h loaded");
16+
print("AGExt Ver. 1.32 loaded");
1717

1818

1919
}

0 commit comments

Comments
 (0)