Skip to content

Commit

Permalink
v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sarbian committed Apr 30, 2015
1 parent 00bf33c commit 004fc55
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
10 changes: 8 additions & 2 deletions Example.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,25 @@ namespace MyFunMod
{
// this is a really simple example of how to use ModularFlightIntegrator
// This one would replace the drag calculation to remove drag whole
// And make stuff hot
// Obviously you would have to uncomment the lines for it to work.

/*
[KSPAddon(KSPAddon.Startup.SpaceCentre, false)]
class Example : MonoBehaviour
{
public void Awake()
{
ModularFI.ModularFlightIntegrator.RegisterCalculateDragValueOverride(IDontLikeDrag);
Debug.Log("Registering our calls in ModularFlightIntegrator");
ModularFlightIntegrator.RegisterCalculateDragValueOverride(IDontLikeDrag);
ModularFlightIntegrator.RegisterUpdateConvectionOverride(ProcessUpdateConvection);
}
private void ProcessUpdateConvection(ModularFlightIntegrator fi, FlightIntegrator.PartThermalData ptd)
{
ptd.part.temperature = 4000;
}
private static double IDontLikeDrag(ModularFlightIntegrator fi, Part part)
{
Expand Down
6 changes: 3 additions & 3 deletions ModularFlightIntegrator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,19 +170,19 @@ protected override void Start()

protected override void OnDestroy()
{
print("OnDestroy");
//print("OnDestroy");
base.OnDestroy();
}

protected override void HookVesselEvents()
{
print("HookVesselEvents");
//print("HookVesselEvents");
base.HookVesselEvents();
}

protected override void UnhookVesselEvents()
{
print("UnhookVesselEvents");
//print("UnhookVesselEvents");
base.UnhookVesselEvents();
}

Expand Down
4 changes: 2 additions & 2 deletions ModularFlightIntegrator/ModularFlightIntegrator.version.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"NAME": "ModularFlightIntegrator",
"URL": "https://ksp.sarbian.com/jenkins/job/GCMonitor/19/artifact/ModularFlightIntegrator/ModularFlightIntegrator.version",
"DOWNLOAD": "http://forum.kerbalspaceprogram.com/threads/92907",
"URL": "https://ksp.sarbian.com/jenkins/job/ModularFlightIntegrator/lastSuccessfulBuild/artifact/ModularFlightIntegrator/ModularFlightIntegrator.version",
"DOWNLOAD": "http://forum.kerbalspaceprogram.com/threads/118088",
"VERSION":{
"MAJOR": @VERSION_MAJOR@,
"MINOR": @VERSION_MINOR@,
Expand Down

0 comments on commit 004fc55

Please sign in to comment.