Skip to content

Commit

Permalink
1.32
Browse files Browse the repository at this point in the history
KSP 1.0 Update
  • Loading branch information
SirDiazo committed Apr 28, 2015
1 parent 86399a3 commit bfda7e1
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 15 deletions.
17 changes: 10 additions & 7 deletions AGExt/AGExt.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,29 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\..\0.90 Dev\GameData\Diazo\AGExt\</OutputPath>
<OutputPath>..\..\..\1.0 Dev\GameData\Diazo\AGExt\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Assembly-CSharp">
<HintPath>..\..\..\0.90 Dev\KSP_Data\Managed\Assembly-CSharp.dll</HintPath>
<Reference Include="Assembly-CSharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\1.0 dev\KSP_Data\Managed\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp-firstpass">
<HintPath>..\..\..\0.90 Dev\KSP_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
<Reference Include="Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\1.0 dev\KSP_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="UnityEngine">
<HintPath>..\..\..\0.90 Dev\KSP_Data\Managed\UnityEngine.dll</HintPath>
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\1.0 dev\KSP_Data\Managed\UnityEngine.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
29 changes: 23 additions & 6 deletions AGExt/Editor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public Vector2 Draw(Vector2 position)
public void DrawSettingsWinEditor(int WindowID)
{

if (GUI.Button(new Rect(10, 25, 130, 25), "Reset Windows",AGXBtnStyle))
if (GUI.Button(new Rect(10, 25, 130, 25), "Reset Windows", AGXBtnStyle))
{
KeySetWin.x = 250;
KeySetWin.y = 250;
Expand Down Expand Up @@ -546,6 +546,7 @@ public void Start()
GameEvents.onPartAttach.Add(PartAttaching);// this game event only fires for part removed, not child parts
GameEvents.onPartRemove.Add(PartRemove);
GameEvents.onEditorShipModified.Add(VesselChanged);
GameEvents.onEditorLoad.Add(OnShipLoad);
isDirectAction = new Dictionary<int, bool>();
CurrentVesselActions.Clear();
EditorLoadFromFile();
Expand All @@ -555,7 +556,7 @@ public void Start()
//print("Loading now");
//EditorActionGroups.Instance.groupActionsList.AddValueChangedDelegate(OnGroupActionsListChange);
LoadFinished = true;
Debug.Log("AGX Editor Start Okay");
//Debug.Log("AGX Editor Start Okay");
}
catch (Exception e)
{
Expand All @@ -564,6 +565,21 @@ public void Start()
}
}

public void OnShipLoad(ShipConstruct ship ,CraftBrowser.LoadType loadType)
{
if (loadType == CraftBrowser.LoadType.Normal)
{
CurrentVesselActions.Clear();
//EditorLoadFromFile();
EditorLoadFromNode();
//Debug.Log("AGX Ship Load of type NORMAL detected");
}
else
{
Debug.Log("AGX Ship Load of type MERGE detected");
}
}

//public void OnGroupActionsListChange(IUIObject obj)
//{
// print("List change " + obj.GetType());
Expand Down Expand Up @@ -1155,6 +1171,7 @@ public void OnDisable()
GameEvents.onPartAttach.Remove(PartAttaching);
GameEvents.onPartRemove.Remove(PartRemove);
GameEvents.onEditorShipModified.Remove(VesselChanged);
GameEvents.onEditorLoad.Remove(OnShipLoad);
//GameEvents.onGameSceneLoadRequested.Remove(LeavingEditor);


Expand Down Expand Up @@ -2374,7 +2391,7 @@ public void SelParts(int WindowID)


//if (Checking.Count == 0)
if(!CurrentVesselActions.Contains(ToAdd))
if (!CurrentVesselActions.Contains(ToAdd))
{

CurrentVesselActions.Add(ToAdd);
Expand Down Expand Up @@ -2726,7 +2743,7 @@ public void RefreshDefaultActionsList()
}
}
}
catch(Exception e)
catch (Exception e)
{
Debug.Log("AGX RefDefActsList Error " + errLine + " " + e);
}
Expand All @@ -2751,7 +2768,7 @@ public void RefreshDefaultActionsListType()
}
}
}
catch(Exception e)
catch (Exception e)
{
Debug.Log("AGX RefDefActsListType Error " + errLine + " " + e);
}
Expand Down Expand Up @@ -3960,7 +3977,7 @@ public void MonitorDefaultActions()
}
}
}
catch(Exception e)
catch (Exception e)
{
Debug.Log("AGX Monitor Default Actions Error " + errLine + " " + e);
}
Expand Down
2 changes: 1 addition & 1 deletion AGExt/Flight.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5832,7 +5832,7 @@ public static List<AGXAction> CheckActionsActiveActualCode(List<AGXAction> actsL
{
if (agAct.ba.name == "OnAction")
{
//print((string)agAct.ba.listParent.module.Fields.GetValue("storedGearState"));
//print((string)agAct.ba.listParent.module.Fields.GetValue("gearState") + " gear test");
if ((string)agAct.ba.listParent.module.Fields.GetValue("storedGearState") == "DEPLOYED")
{
agAct.activated = true;
Expand Down
2 changes: 1 addition & 1 deletion AGExt/Instantly.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class AGXMainMenu :PartModule
//abandoned module, no longer needed for key rebinding
public void Start()
{
print("AGExt Ver. 1.31h loaded");
print("AGExt Ver. 1.32 loaded");


}
Expand Down

0 comments on commit bfda7e1

Please sign in to comment.