Update targets on an undo

main
Andrew Cassidy 1 year ago
parent 36732ed4d4
commit c0d20f847d

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

Loading…
Cancel
Save