Skip to content

Commit

Permalink
Version 1.24a
Browse files Browse the repository at this point in the history
Force activate engine part so gimbal activates
  • Loading branch information
SirDiazo committed Nov 29, 2014
1 parent 73865c8 commit 6dca315
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
29 changes: 26 additions & 3 deletions AGExt/Flight.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,20 @@ public static void ActivateActionGroup(int group, bool force, bool forceDir)
}

}

if(agAct.ba.listParent.module.moduleName == "ModuleEngines" && agAct.ba.name == "ActivateAction" || agAct.ba.listParent.module.moduleName == "ModuleEngines" && agAct.ba.name == "OnAction")
{
//overide to activate part when activating an engine so gimbals come on
agAct.ba.listParent.part.force_activate();
//print("Force act");

}
if (agAct.ba.listParent.module.moduleName == "ModuleEnginesFX" && agAct.ba.name == "ActivateAction" || agAct.ba.listParent.module.moduleName == "ModuleEnginesFX" && agAct.ba.name == "OnAction")
{
//overide to activate part when activating an engine so gimbals come on
agAct.ba.listParent.part.force_activate();
//print("Force act");

}
}
//ModuleAGExtData pmAgx = agAct.ba.listParent.part.Modules.OfType<ModuleAGExtData>().First<ModuleAGExtData>();
//pmAgx.partAGActions.Clear();
Expand Down Expand Up @@ -4302,9 +4315,19 @@ public void PrintPartActs()
try
{
//print("crew " + FlightGlobals.ActiveVessel.GetVesselCrew().Count);
foreach (AGXCooldown agCD in groupCooldowns)
foreach (Part p in FlightGlobals.ActiveVessel.parts)
{
print("action " + agCD.vslFlightID + " " + agCD.actGroup + " " + agCD.delayLeft);
foreach (ModuleEnginesFX eng in p.Modules.OfType<ModuleEnginesFX>())
{
foreach (BaseAction ba in eng.Actions)
{
print(p.ConstructID + " " + ba.name + " " + ba.guiName);
}
}
foreach (ModuleGimbal gim in p.Modules.OfType<ModuleGimbal>())
{
print(p.ConstructID + " " + gim.gimbalLock);
}
}


Expand Down
2 changes: 1 addition & 1 deletion AGExt/Instantly.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class AGXMainMenu :PartModule

public void Start()
{
print("AGExt Ver. 1.24 loaded");
print("AGExt Ver. 1.24a loaded");
//below no longer needed with InputLockManager
//AGXguiKeys = new Dictionary<int, KeyCode>();
//AGExtNode = ConfigNode.Load(KSPUtil.ApplicationRootPath + "GameData/Diazo/AGExt/AGExt.cfg");
Expand Down

0 comments on commit 6dca315

Please sign in to comment.