|
|
@ -250,6 +250,7 @@ namespace ConformalDecals {
|
|
|
|
if (HighLogic.LoadedSceneIsEditor) {
|
|
|
|
if (HighLogic.LoadedSceneIsEditor) {
|
|
|
|
GameEvents.onEditorPartEvent.Add(OnEditorEvent);
|
|
|
|
GameEvents.onEditorPartEvent.Add(OnEditorEvent);
|
|
|
|
GameEvents.onVariantApplied.Add(OnVariantApplied);
|
|
|
|
GameEvents.onVariantApplied.Add(OnVariantApplied);
|
|
|
|
|
|
|
|
GameEvents.onEditorUndo.Add(OnEditorUndo);
|
|
|
|
|
|
|
|
|
|
|
|
UpdateTweakables();
|
|
|
|
UpdateTweakables();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -287,6 +288,7 @@ namespace ConformalDecals {
|
|
|
|
if (HighLogic.LoadedSceneIsEditor) {
|
|
|
|
if (HighLogic.LoadedSceneIsEditor) {
|
|
|
|
GameEvents.onEditorPartEvent.Remove(OnEditorEvent);
|
|
|
|
GameEvents.onEditorPartEvent.Remove(OnEditorEvent);
|
|
|
|
GameEvents.onVariantApplied.Remove(OnVariantApplied);
|
|
|
|
GameEvents.onVariantApplied.Remove(OnVariantApplied);
|
|
|
|
|
|
|
|
GameEvents.onEditorUndo.Remove(OnEditorUndo);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (HighLogic.LoadedSceneIsFlight) {
|
|
|
|
if (HighLogic.LoadedSceneIsFlight) {
|
|
|
@ -350,6 +352,10 @@ namespace ConformalDecals {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected void OnEditorUndo(ShipConstruct sc) {
|
|
|
|
|
|
|
|
UpdateTargets();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected void OnPartWillDie(Part willDie) {
|
|
|
|
protected void OnPartWillDie(Part willDie) {
|
|
|
|
if (willDie == part.parent) {
|
|
|
|
if (willDie == part.parent) {
|
|
|
|
this.Log("Parent part about to be destroyed! Killing decal part.");
|
|
|
|
this.Log("Parent part about to be destroyed! Killing decal part.");
|
|
|
|