Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing NREs on KSP's Startup. #110

Merged
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ https://github.com/ScottPaladin/DeepFreeze
Refer to the KSP forum thread or the wiki here on GitHub for information.
For support please refer to the KSP forum thread and raise an issue here on GitHub.

Source code for Background resources and other utilities that this mod uses can be found here:
https://github.com/JPLRepo/REPOSoftTechKSPUtils

License
==========
DeepFreeze is licensed under a Creative Commons 4.0 Share-Alike Attribution Non-Commercial license.
Expand Down
18 changes: 9 additions & 9 deletions Source/APIs/DFGameEvents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,46 +11,46 @@ class DFGameEvents
/// Fires when DeepFreeze Starts the Freezing process on a Kerbal.
/// Part is the DeepFreeze Freezer Part and the string is the Kerbal name.
/// </summary>
public static EventData<Part, string> onKerbalFreezing;
public static readonly EventData<Part, string> onKerbalFreezing = new EventData<Part, string>("onKerbalFreezing");
/// <summary>
/// Fires when DeepFreeze Starts the Thawing process on a Kerbal.
/// Part is the DeepFreeze Freezer Part and the string is the Kerbal name.
/// </summary>
public static EventData<Part, string> onKerbalThawing;
public static readonly EventData<Part, string> onKerbalThawing = new EventData<Part, string>("onKerbalThawing");
/// <summary>
/// Fires when DeepFreeze Aborts a Thawing process on a Kerbal.
/// Part is the DeepFreeze Freezer Part and the string is the Kerbal name.
/// </summary>
public static EventData<Part, string> onKerbalThawAbort;
public static readonly EventData<Part, string> onKerbalThawAbort = new EventData<Part, string>("onKerbalThawAbort");
/// <summary>
/// Fires when DeepFreeze Aborts a Freezing process on a Kerbal.
/// Part is the DeepFreeze Freezer Part and the string is the Kerbal name.
/// </summary>
public static EventData<Part, string> onKerbalFreezeAbort;
public static readonly EventData<Part, string> onKerbalFreezeAbort = new EventData<Part, string>("onKerbalFreezeAbort");
/// <summary>
/// Fires when DeepFreeze Completes the Freezing process on a Kerbal.
/// Part is the DeepFreeze Freezer Part and ProtoCrewMember is the Kerbal.
/// </summary>
public static EventData<Part, ProtoCrewMember> onKerbalFrozen;
public static readonly EventData<Part, ProtoCrewMember> onKerbalFrozen = new EventData<Part, ProtoCrewMember>("onKerbalFrozen");
/// <summary>
/// Fires when DeepFreeze Completes the Thawing process on a Kerbal.
/// Part is the DeepFreeze Freezer Part and ProtoCrewMember is the Kerbal.
/// </summary>
public static EventData<Part, ProtoCrewMember> onKerbalThaw;
public static readonly EventData<Part, ProtoCrewMember> onKerbalThaw = new EventData<Part, ProtoCrewMember>("onKerbalThaw");
/// <summary>
/// Fires when DeepFreeze sets a Kerbal to Comatose Status.
/// Part is the DeepFreeze Freezer Part and ProtoCrewMember is the Kerbal.
/// </summary>
public static EventData<Part, ProtoCrewMember> onKerbalSetComatose;
public static readonly EventData<Part, ProtoCrewMember> onKerbalSetComatose = new EventData<Part, ProtoCrewMember>("onKerbalSetComatose");
/// <summary>
/// Fires when DeepFreeze Unsets a Kerbal from Comatose Status.
/// Part is the DeepFreeze Freezer Part and ProtoCrewMember is the Kerbal.
/// </summary>
public static EventData<Part, ProtoCrewMember> onKerbalUnSetComatose;
public static readonly EventData<Part, ProtoCrewMember> onKerbalUnSetComatose = new EventData<Part, ProtoCrewMember>("onKerbalUnSetComatose");
/// <summary>
/// Fires when DeepFreeze has to Kill a Frozen Kerbal.
/// </summary>
public static EventData<ProtoCrewMember> onFrozenKerbalDied;
public static readonly EventData<ProtoCrewMember> onFrozenKerbalDied = new EventData<ProtoCrewMember>("onFrozenKerbalDied");

}
}
2 changes: 1 addition & 1 deletion Source/DeepFreezerPart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1813,7 +1813,7 @@ public override void OnSave(ConfigNode node)
private void OnDestroy()
{
//Remove GameEvent callbacks.
Debug.Log("DeepFreezer OnDestroy");
Debug.Log("DeepFreezerPart OnDestroy");

GameEvents.onCrewTransferPartListCreated.Remove(onCrewTransferPartListCreated);
GameEvents.onCrewTransferred.Remove(onCrewTransferred);
Expand Down
9 changes: 0 additions & 9 deletions Source/Textures.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,6 @@ public void Awake()
public void Start()
{
//GameEvents.onGameSceneSwitchRequested.Add(onGameSceneSwitchRequested);
DFGameEvents.onKerbalFrozen = new EventData<Part, ProtoCrewMember>("onKerbalFrozen");
DFGameEvents.onKerbalThaw = new EventData<Part, ProtoCrewMember>("onKerbalThaw");
DFGameEvents.onKerbalFreezing = new EventData<Part, string>("onKerbalFreezing");
DFGameEvents.onKerbalThawing = new EventData<Part, string>("onKerbalThawing");
DFGameEvents.onKerbalFreezeAbort = new EventData<Part, string>("onKerbalFreezeAbort");
DFGameEvents.onKerbalThawAbort = new EventData<Part, string>("onKerbalThawAbort");
DFGameEvents.onKerbalSetComatose = new EventData<Part, ProtoCrewMember>("onKerbalSetComatose");
DFGameEvents.onKerbalUnSetComatose = new EventData<Part, ProtoCrewMember>("onKerbalUnSetComatose");
DFGameEvents.onFrozenKerbalDied = new EventData<ProtoCrewMember>("onFrozenKerbalDied");
}

public void OnDestroy()
Expand Down