Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: net-lisias-ksp/KSP-Recall
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: RELEASE/0.4.0.5
Choose a base ref
...
head repository: net-lisias-ksp/KSP-Recall
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 11 commits
  • 41 files changed
  • 1 contributor

Commits on May 6, 2024

  1. Purely cosmetic change

    Lisias committed May 6, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3883a79 View commit details
  2. Copy the full SHA
    8b39b91 View commit details
  3. Debugging code

    Lisias committed May 6, 2024
    Copy the full SHA
    d1575dc View commit details
  4. Stupid mistake on patching

    Lisias committed May 6, 2024
    Copy the full SHA
    62855d9 View commit details
  5. Catching up with dev branch

    Lisias committed May 6, 2024
    Copy the full SHA
    ffab554 View commit details
  6. Copy the full SHA
    b6083e8 View commit details
  7. Release 0.5.0.0 (LisiasT) for KSP >= 1.4.1

    Lisias committed May 6, 2024
    Copy the full SHA
    abb9630 View commit details
  8. Copy the full SHA
    a4b54b5 View commit details

Commits on May 19, 2024

  1. Fixes #80

    Lisias committed May 19, 2024
    Copy the full SHA
    3335e38 View commit details
  2. Release 0.5.0.1 (LisiasT) for KSP >= 1.4.1

    Lisias committed May 19, 2024
    Copy the full SHA
    40ab8fd View commit details

Commits on May 21, 2024

  1. Release 0.5.0.2 (LisiasT) for KSP >= 1.4.1

    Lisias committed May 21, 2024
    Copy the full SHA
    363d976 View commit details
Showing with 127 additions and 66 deletions.
  1. +11 −15 CHANGES.md
  2. +31 −0 CHANGE_LOG.md
  3. BIN GameData/666_ModuleManagerWatchDog.dll
  4. +1 −1 GameData/999_KSP-Recall/KSP-Recall.cfg
  5. +2 −0 GameData/999_KSP-Recall/patches/100_Interventions.cfg
  6. +14 −3 GameData/ModuleManagerWatchDog/CHANGE_LOG.md
  7. +6 −5 GameData/ModuleManagerWatchDog/ModuleManagerWatchDog.version
  8. +1 −1 GameData/ModuleManagerWatchDog/NOTICE
  9. BIN GameData/ModuleManagerWatchDog/Plugins/PluginData/ModuleManagerWatchDog.dll
  10. BIN GameData/ModuleManagerWatchDog/Plugins/WatchDogForInterstellarRedist.dll
  11. BIN GameData/ModuleManagerWatchDog/Plugins/WatchDogForScaleRedist.dll
  12. BIN GameData/ModuleManagerWatchDog/Plugins/WatchDogInstallChecker.dll
  13. +13 −11 GameData/ModuleManagerWatchDog/README.md
  14. +1 −1 KSP_Recall.version
  15. +1 −1 NOTICE
  16. +1 −1 Source/Attached/EditorHelper.cs
  17. +1 −1 Source/Attached/PartModule.cs
  18. +1 −1 Source/Attached/PartPool.cs
  19. +13 −1 Source/AttachedOnEditor/PartModule.cs
  20. +1 −1 Source/ChillingOut/PartModule.cs
  21. +1 −1 Source/Driftless/PartModule.cs
  22. +1 −1 Source/KSP-Recall/GUI/FatalAlertBox.cs
  23. +1 −1 Source/KSP-Recall/GUI/NonFatalAlertBox.cs
  24. +1 −1 Source/KSP-Recall/GUI/ShowStopperAlertBox.cs
  25. +1 −1 Source/KSP-Recall/Globals.cs
  26. +1 −1 Source/KSP-Recall/ModuleManagerSupport.cs
  27. +2 −2 Source/KSP-Recall/Properties/LegalMamboJambo.cs
  28. +1 −1 Source/KSP-Recall/SanityCheck.cs
  29. +1 −1 Source/KSP-Recall/Startup.cs
  30. +1 −1 Source/Refunding/EditorHelper.cs
  31. +1 −1 Source/Refunding/FlightHelper.cs
  32. +1 −1 Source/Refunding/PartCostHelper.cs
  33. +2 −1 Source/Refunding/PartModules/Abstract.cs
  34. +1 −1 Source/Refunding/PartModules/FundsKeeper.cs
  35. +7 −2 Source/Refunding/PartModules/Refunding.cs
  36. +1 −1 Source/Refunding/PartModules/StealBackMyFunds.cs
  37. +1 −1 Source/Resourceful/EditorHelper.cs
  38. +1 −1 Source/Resourceful/PartModule.cs
  39. +1 −1 Source/Resourceful/PartResourcePool.cs
  40. +1 −1 Source/TestPersistentId/PartModule.cs
  41. +1 −1 Source/TestPersistentId/PersistentIdHelper.cs
26 changes: 11 additions & 15 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
# KSP-Recall :: Changes

* 2023-0716: 0.4.0.2 (LisiasT) for KSP >= 1.4.1
+ Implements a missing use case from TweakScale, `OnPartAttachmentNodesChanged`.
+ Updates MMWD to 1.1.1.1
* 2023-0408: 0.4.0.1 (LisiasT) for KSP >= 1.4.1
+ Fixes a nasty mishap of mine that gone undetected due another yet more nasty mishap of Module Manager (Forum).
* 2024-0521: 0.5.0.2 (LisiasT) for KSP >= 1.4.1
+ Fixes an unexpected misbehaviour on KSP >= 1.9.x that, frankly, I don't know how I had missed for so much time.
+ Closes issues:
- [#65](https://github.com/net-lisias-ksp/KSP-Recall/issues/65) Yet a new batch of displacement problems on KSP
+ Relates to Discussion:
- [#64](https://github.com/net-lisias-ksp/KSP-Recall/issues/65) Yet a new batch of displacement problems on KSP
* 2023-0325: 0.4.0.0 (LisiasT) for KSP >= 1.4.1
+ Reworks `Refunding` (yet again), splitting the `PartModule` into two, the second one (`StealBackMyFunds`) dedicated to the Funds on `float` problem.
+ Reworks the `AttachedOnEditor`, fixing an annoying "gap" when merging crafts (that didn't happens on SubAssemblies!)
+ Updates Module Manager Watch Dog to the latest.
- [#80](https://github.com/net-lisias-ksp/KSP-Recall/issues/80) Merge Craft is getting its surface attachments screwed on 1.9.x and newer
* 2024-0519: 0.5.0.1 (LisiasT) for KSP >= 1.4.1
+ ***WITHDRAWN***
- Because sleepy developers should do more sleeping and less releases! :P
* 2024-0506: 0.5.0.0 (LisiasT) for KSP >= 1.4.1
+ Rollbacks the PAW changes due an absolutely unexpected, unexplainable and crappy KSP behaviour that only manifested itself on KSP 1.12.x
- I don't have the slightest clue about what happened yet.
+ Closes issues:
- [#62](https://github.com/net-lisias-ksp/KSP-Recall/issues/62) Find a way to survive KSPCF's ~~Stupidity~~ *Less Than Smartness*
- [#61](https://github.com/net-lisias-ksp/KSP-Recall/issues/61) AttachedOnEditor is being screwed up when Merging crafts
- [#28](https://github.com/net-lisias-ksp/KSP-Recall/issues/28) Refresh the ModuleManagerWatchDog DLL
- [#77](https://github.com/net-lisias-ksp/KSP-Recall/issues/77)
Refunding is not working on 1.12.x!!!
31 changes: 31 additions & 0 deletions CHANGE_LOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# KSP-Recall :: Change Log

* 2024-0521: 0.5.0.2 (LisiasT) for KSP >= 1.4.1
+ Fixes an unexpected misbehaviour on KSP >= 1.9.x that, frankly, I don't know how I had missed for so much time.
+ Closes issues:
- [#80](https://github.com/net-lisias-ksp/KSP-Recall/issues/80) Merge Craft is getting its surface attachments screwed on 1.9.x and newer
* 2024-0519: 0.5.0.1 (LisiasT) for KSP >= 1.4.1
+ ***WITHDRAWN***
- Because sleepy developers should do more sleeping and less releases! :P
* 2024-0506: 0.5.0.0 (LisiasT) for KSP >= 1.4.1
+ Rollbacks the PAW changes due an absolutely unexpected, unexplainable and crappy KSP behaviour that only manifested itself on KSP 1.12.x
- I don't have the slightest clue about what happened yet.
+ Closes issues:
- [#77](https://github.com/net-lisias-ksp/KSP-Recall/issues/77)
Refunding is not working on 1.12.x!!!
* 2024-0407: 0.4.1.0 (LisiasT) for KSP >= 1.4.1
+ Reworks `AttachedOnEditor` to be resilient a changes made by Monkey Patching inside Editor that changes the order in which some internal Editor events happen.
+ Closes issues:
- [#73](https://github.com/net-lisias-ksp/KSP-Recall/issues/74) Understand why `BetterEditorUndoRedo` ended up screwing `AttachedOnEditor` indirectly
* 2023-0331: 0.4.0.5 (LisiasT) for KSP >= 1.4.1
+ I overreacted while restoring the PAW's entries, and ended up allowing some entries to be shown when they shouldn't. Fixing it.
+ Properly implemented what I intended to be the `DebugMode` at first place.
+ Closes issues:
- [#76](https://github.com/net-lisias-ksp/KSP-Recall/issues/76) Implement the PAW's DebugMode properly
- [#75](https://github.com/net-lisias-ksp/KSP-Recall/issues/75) 0.4.0.4 is screwing PAW
* 2023-0328: 0.4.0.4 (LisiasT) for KSP >= 1.4.1
+ Restores the presence of the PAW's entries, setting them to be shown by default from now on. A patch can turn them off.
+ Closes issues:
- [#74](https://github.com/net-lisias-ksp/KSP-Recall/issues/74) Restore the KSP-Recall buttons on the PAW
* 2023-0323: 0.4.0.3 (LisiasT) for KSP >= 1.4.1
+ Closes issues:
- [#72](https://github.com/net-lisias-ksp/KSP-Recall/issues/72) Fix the Sanity Check report
- [#68](https://github.com/net-lisias-ksp/KSP-Recall/issues/68) Add an option to to not show the KSP-Recall entries on the PAW
* 2023-0716: 0.4.0.2 (LisiasT) for KSP >= 1.4.1
+ Implements a missing use case from TweakScale, `OnPartAttachmentNodesChanged`.
+ Updates MMWD to 1.1.1.1
Binary file modified GameData/666_ModuleManagerWatchDog.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion GameData/999_KSP-Recall/KSP-Recall.cfg
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ KSP-Recall
@AttachedOnEditor:NEEDS[KSPRECALL-ATTACHED-ON-EDITOR] = true
}

INTERVENTIONS
@INTERVENTIONS
{
@ProceduralPartsAttachmentNodes:NEEDS[KSPRECALL-PROCEDURALPARTS-AN] = true
}
2 changes: 2 additions & 0 deletions GameData/999_KSP-Recall/patches/100_Interventions.cfg
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@
moduleName:NEEDS[KSPRECALL-RESOURCEFUL] = Resourceful
moduleName:NEEDS[KSPRECALL-ATTACHED-ON-EDITOR] = AttachedOnEditor
moduleName:NEEDS[KSPRECALL-FUNDSKEEPER] = FundsKeeper
moduleName:NEEDS[KSPRECALL-REFUNDING] = Refunding
moduleName:NEEDS[KSPRECALL-REFUNDING] = RefundingForKSP111x
moduleName:NEEDS[KSPRECALL-STEALBACKFUNDS] = StealBackMyFunds
}
@@ -21,6 +22,7 @@
OHSCRAP_RESOURCE_BLACKLIST:NEEDS[OhScrap]
{
name = FundsKeeper
name = Refunding
name = RefundingForKSP111x
name = StealBackMyFunds
}
17 changes: 14 additions & 3 deletions GameData/ModuleManagerWatchDog/CHANGE_LOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Module Manager Watch Dog :: Change Log

* 2024-0423: 1.1.2.0 (LisiasT) for KSP >= 1.2.2
+ Adds an Option Box asking the user what would be their preferred MM Fork when a conflict is detected.
+ We had moved!
- The Official Repository is now on https://github.com/KSP-ModularManagement/ModuleManagerWatchDog
+ Closes issue:
- [#11](https://github.com/KSP-ModularManagement/ModuleManagerWatchDog/issues/11) Implement a more friendly way to allow the user to select which MM fork it wants.
* 2024-0330: 1.1.1.2 (LisiasT) for KSP >= 1.2.2
+ Implements a "self-cleaning" mechanism intended to prevent the user being forced to manually delete artefacts on `GameData` once they decide to deinstall `Module Manager /L` and/or `Module Manager Watch Dog`.
- Specially necessary for CurseForge users.
+ Closes issue:
- [#10](https://github.com/KSP-ModularManagement/ModuleManagerWatchDog/issues/10) Detects when the host directory (`GameData\ModuleManager`) was removed, and kill `ModuleManager.dll` in response.
* 2023-0703: 1.1.1.1 (LisiasT) for KSP >= 1.2.2
+ More sensible updating mechanism, coping with how Windows handles DLL files once they are loaded.
+ Fixes a bug on the KSPe's Install Checker/Update Tool
@@ -9,11 +20,11 @@
- Safer handling 1.12.x without screwing older KSPs.
+ Implements an "AutoFix", automatically fixing the user's rig when possible (respecting user's preferences).
+ Closes issue:
- [#8](https://github.com/net-lisias-ksp/ModuleManagerWatchDog/issues/8) Automatically fix the Module Manager installation borks when possible.
- [#8](https://github.com/KSP-ModularManagement/ModuleManagerWatchDog/issues/8) Automatically fix the Module Manager installation borks when possible.
* 2023-0313: 1.1.0.4 (LisiasT) for KSP >= 1.2.2
+ Makes the thing survivable if KSP starts with the `pwd` set to anywhere but the `KSPUtil.ApplicationRootPath`.
+ Closes issue:
- [#6](https://github.com/net-lisias-ksp/ModuleManagerWatchDog/issues/6) Resurrect the multiple ModuleManager DLLs check for KSP 1.12.x
- [#6](https://github.com/KSP-ModularManagement/ModuleManagerWatchDog/issues/6) Resurrect the multiple ModuleManager DLLs check for KSP 1.12.x
* 2022-1112: 1.1.0.3 (LisiasT) for KSP >= 1.2.2
+ ***DITCHED***
* 2022-0719: 1.1.0.2 (LisiasT) for KSP >= 1.2.2
@@ -24,7 +35,7 @@
- ModuleManager /L
- TweakScale
+ Closes issue:
- [#5](https://github.com/net-lisias-ksp/ModuleManagerWatchDog/issues/5) Cook a `GameData/*.dll` update tool
- [#5](https://github.com/KSP-ModularManagement/ModuleManagerWatchDog/issues/5) Cook a `GameData/*.dll` update tool
* 2022-0621: 1.1.0.0 (LisiasT) for KSP >= 1.2.2
+ ***DTICHED*** due a stupid mistake on handling pathnames... #facePalm
* 2021-0907: 1.0.1.1 (LisiasT) for KSP >= 1.2.2
11 changes: 6 additions & 5 deletions GameData/ModuleManagerWatchDog/ModuleManagerWatchDog.version
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"NAME" : "Module Manager Watch Dog",
"URL" : "https://raw.githubusercontent.com/net-lisias-ksp/ModuleManagerWatchDog/master/ModuleManagerWatchDog.version",
"DOWNLOAD" : "https://github.com/net-lisias-ksp/ModuleManagerWatchDog/releases",
"CHANGE_LOG_URL": "https://raw.githubusercontent.com/net-lisias-ksp/ModuleManagerWatchDog/master/CHANGES.md",
"URL" : "https://raw.githubusercontent.com/KSP-ModularManagement/ModuleManagerWatchDog/master/ModuleManagerWatchDog.version",
"DOWNLOAD" : "https://github.com/KSP-ModularManagement/ModuleManagerWatchDog/releases",
"CHANGE_LOG" : "https://raw.githubusercontent.com/KSP-ModularManagement/ModuleManagerWatchDog/master/CHANGE_LOG.md",
"CHANGE_LOG_URL": "https://raw.githubusercontent.com/KSP-ModularManagement/ModuleManagerWatchDog/master/CHANGES.md",

"VERSION":{
"MAJOR":1,
"MINOR":1,
"PATCH":1,
"BUILD":1
"PATCH":2,
"BUILD":0
},
"KSP_VERSION_MIN":{
"MAJOR":1,
2 changes: 1 addition & 1 deletion GameData/ModuleManagerWatchDog/NOTICE
Original file line number Diff line number Diff line change
@@ -2,4 +2,4 @@
"ModuleManagerWatchDog", "Module Manager Watch Dog" and "MMWD" are trademarmarks of LisiasT

Other trademarks and registered trademarks are the property of the respective trademark holders.
© 2020-22 LisiasT
© 2020-24 LisiasT
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
24 changes: 13 additions & 11 deletions GameData/ModuleManagerWatchDog/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Module Manager Watch Dog

A Watch Dog for Module Manager.
A Watch Dog for Module Manager - with benefits.


## In a Hurry
@@ -34,7 +34,7 @@ A Watch Dog for Module Manager.

`MMWD` is a Watch Dog to monitor Module Manager, preventing known (and unsolved) bugs on KSP 1.8 and newer that affects it.

Additional services for updating specific DLLs on `GameData.` are now part of the solution, making it useful even for KSP <= 1.7.3 .
Additional services for updating specific DLLs on `GameData` are now part of the solution, and it is's now effective for KSP <= 1.7.3 .

The following services are provided:

@@ -44,11 +44,11 @@ Some 3rd party Add'Ons and this tool itself need critical DLLs to be present dir

Additionally, CurseForge - at least at the moment of this release - doesn't have a mechanism to allow updating files on it, triggering bug reports that will be easily avoided by deploying this tool.

This tool checks for need for installing (or updating) such critical DLLs automatically for selected Add'Ons.
This tool checks for the need of installing (or updating) such critical DLLs automatically for selected Add'Ons.

The feature is implemented on a discrete DLL, `WatchDogInstallChecker.dll`, and can be easily removed from the distribution without colateral effects (other than losing the functionality).

**It's not advisable to use it on installments managed by CKAN**, as it manages itself these DLLs.
**It's _not_ advisable to use it on installments managed by CKAN**, as it manages itself these DLLs.

The following Add'Ons are currently managed:

@@ -64,35 +64,37 @@ Historically, managing multiple Module Manager versions was problematic on KSP -

Before KSP 1.8, duplicated Assemblies were being loaded on dedicated App Domains, and so calling them would incur in marshalling (essentially, RPC but on the same process...) with significantly performance issues.

But on KSP 1.8 (and until 1.12.0), while trying to tackle down the performance problem by short circuiting all the duplicated Assemblies to the first one loaded, Squad inadvertently caused the oldest MM being elected to be used (as DLLs are loaded in alphabetical order), with pretty serious consequences.
But on KSP 1.8 (and until 1.12.0), while trying to tackle down the performance problem by short circuiting all the duplicated Assemblies to the first loaded one, Squad inadvertently caused the oldest MM being elected to be used (as DLLs are loaded in alphabetical order), with pretty serious consequences.

On KSP 1.12.0 things changed again. Now the DLL version is used as criteria, and the highest version found is the one elected to be used. **However**, a new bug was introduced, playing havoc on the system if more than one DLL **has the same filename**.
On KSP 1.12.0 things changed again. Now the DLL version is used as election criteria, and the highest version found is the one elected to be used. **However**, a new bug was introduced, playing havoc on the system if more than one DLL **has the same filename**.

Finally, on KSP 1.12.5 the problem of selecting the first DLL was resurrected, and now that old problem that started to happen on KSP 1.8 is in effect again.

So, different KSP releases will need different MM handling:

* On KSP \< 1.8, the tool complains if MM is not installed.
* On KSP \>= 1.8 and \< 1.12, the tool will yell on any duplicated Module Manager on the rig - *There can be only one!*
* On KSP \>= 1.8 and \< 1.12, as well KSP 1.12.5, the tool will yell on any duplicated Module Manager on the rig - *There can be only one!*
* On KSP \>= 1.12, the tool prevents installing MM/L together Forum's one as an extra safety measure.
+ MM/L behaves and it's 100% compatible, being a drop in replacement - it's safe to switch MM at any time.
+ MM/L behaves and it's 100% compatible, being a drop in replacement - it's absolutely safe to switch MM at any time (even the functional bugs are the same)
+ But yet is advisable to avoid having both installed at the same time.

The Author strongly advises to edit the `WatchDog.cfg` file and select enforcing the "1.8 rules". It's far the safest option - besides risking being a bit annoying sometimes.

### Checking TweakScale

Due the general mess that handling duplicated DLLs are on KSP, it was choose to install the formerly named `Scale_Redist.dll` file into `GameData` as `999_Scale_Redist.dll` . This aims to ensure the canon Redist is the first one to be loaded, as well to avoid eventual naming collisions with the few Add'Ons that used to have it embedded.
Due the general mess that handling duplicated DLLs is on KSP, it was chosen to install the formerly named `Scale_Redist.dll` file into `GameData` as `999_Scale_Redist.dll` . This aims to ensure the canon Redist is the first one to be loaded, as well to avoid eventual naming collisions with the few Add'Ons that used to have it embedded.

This way, we can be ensure the best performance on older KSPs as well a safest environment on newer ones.

The tool checks for known `Scale_Redist` clients and yells if they are present but not the Redist. It also yells if there're more than one copy of `Scale_Redist` are installed, and also enforce that the only one installed are the `GameData/999_Scale_Redist.dll` .
The tool checks for known `Scale_Redist` clients and yells if they are present but not the Redist. It also yells if there're more than one copy of `Scale_Redist` installed, and also enforces that the only one installed are the `GameData/999_Scale_Redist.dll` .

### Checking KSP Interstellar Extended

Similar handling are applied to `Interstellar_Redist.dll` from KSPIE.

### Final Considerations

This tool was originally aimed to be redistributed embedded on Add'Ons that used to redistribute Module Manager themselves in the past, unintentionally triggering the problems this tool aims to detect, but evolved to an Add'On de jure and de facto.
This tool was originally aimed to be redistributed embedded on Add'Ons that used to redistribute Module Manager themselves in the past, unintentionally triggering the problems this tool aims to detect - but evolved to an Add'On *de jure and de facto*.


## Installation
2 changes: 1 addition & 1 deletion KSP_Recall.version
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@

"VERSION":{
"MAJOR":0,
"MINOR":4,
"MINOR":5,
"PATCH":0,
"BUILD":2
},
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -2,4 +2,4 @@
"KSP-Recall" and "KSP-Recall /L" are trademarmarks of LisiasT

Other trademarks and registered trademarks are the property of the respective trademark holders.
© 2020-2023 LisiasT
© 2020-2024 LisiasT
2 changes: 1 addition & 1 deletion Source/Attached/EditorHelper.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
This file is part of Attached, a component of KSP-Recall
© 2020-2023 LisiasT : http://lisias.net <support@lisias.net>
© 2020-2024 LisiasT : http://lisias.net <support@lisias.net>
KSP-Recall is double licensed, as follows:
* SKL 1.0 : https://ksp.lisias.net/SKL-1_0.txt
2 changes: 1 addition & 1 deletion Source/Attached/PartModule.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
This file is part of Attached, a component of KSP-Recall
© 2020-2023 LisiasT : http://lisias.net <support@lisias.net>
© 2020-2024 LisiasT : http://lisias.net <support@lisias.net>
KSP-Recall is double licensed, as follows:
* SKL 1.0 : https://ksp.lisias.net/SKL-1_0.txt
2 changes: 1 addition & 1 deletion Source/Attached/PartPool.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
This file is part of Attached, a component of KSP-Recall
© 2020-2023 LisiasT : http://lisias.net <support@lisias.net>
© 2020-2024 LisiasT : http://lisias.net <support@lisias.net>
KSP-Recall is double licensed, as follows:
* SKL 1.0 : https://ksp.lisias.net/SKL-1_0.txt
14 changes: 13 additions & 1 deletion Source/AttachedOnEditor/PartModule.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
This file is part of Attached, a component of KSP-Recall
© 2020-2023 LisiasT : http://lisias.net <support@lisias.net>
© 2020-2024 LisiasT : http://lisias.net <support@lisias.net>
KSP-Recall is double licensed, as follows:
* SKL 1.0 : https://ksp.lisias.net/SKL-1_0.txt
@@ -232,17 +232,25 @@ private void RestoreCurrentAttachmentNodes()
{
if (!this.initialised) return; // hack to prevent the UpgradePipeline to screw us up when loading crafts still without AttachedOnEditor
Log.dbg("RestoreCurrentAttachmentPoints for {0}", this.PartInstanceId);

Log.dbg("{0} {1} {2} {3}", this.originalAttachNodePos.Count, this.originalAttachNodeSize.Count, this.originalAttachNodeOrientation.Count, this.originalAttachNodeOffset.Count);
Log.dbg("{0}", this.part.attachNodes.Count);

for(int i = 0; i < this.originalAttachNodePos.Count; ++i)
this.part.attachNodes[i].position = this.originalAttachNodePos[i];
Log.dbg("0");

for(int i = 0; i < this.originalAttachNodeSize.Count; ++i)
this.part.attachNodes[i].size = this.originalAttachNodeSize[i];
Log.dbg("1");

for(int i = 0; i < this.originalAttachNodeOrientation.Count; ++i)
this.part.attachNodes[i].orientation = this.originalAttachNodeOrientation[i];
Log.dbg("2");

for(int i = 0; i < this.originalAttachNodeOffset.Count; ++i)
this.part.attachNodes[i].offset = this.originalAttachNodeOffset[i];
Log.dbg("3");
}

private void RestoreCurrentAttachments()
@@ -310,6 +318,7 @@ private void LoadFrom(ConfigNode node)

private void LoadAttachedNodePosFrom(ConfigNode node)
{
this.originalAttachNodePos.Clear();
string[] list = node.GetValues("originalAttachNodePos");
for(int i = 0; i < list.Length; ++i)
{
@@ -320,6 +329,7 @@ private void LoadAttachedNodePosFrom(ConfigNode node)

private void LoadAttachedNodeSizeFrom(ConfigNode node)
{
this.originalAttachNodeSize.Clear();
string[] list = node.GetValues("originalAttachNodeSize");
for(int i = 0; i < list.Length; ++i)
{
@@ -330,6 +340,7 @@ private void LoadAttachedNodeSizeFrom(ConfigNode node)

private void LoadAttachedNodeOrientationFrom(ConfigNode node)
{
this.originalAttachNodeOrientation.Clear();
string[] list = node.GetValues("originalAttachNodeOrientation");
for(int i = 0; i < list.Length; ++i)
{
@@ -340,6 +351,7 @@ private void LoadAttachedNodeOrientationFrom(ConfigNode node)

private void LoadAttachedNodePosOffsetFrom(ConfigNode node)
{
this.originalAttachNodeOffset.Clear();
string[] list = node.GetValues("originalAttachNodeOffset");
for(int i = 0; i < list.Length; ++i)
{
2 changes: 1 addition & 1 deletion Source/ChillingOut/PartModule.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
This file is part of Attached, a component of KSP-Recall
© 2020-2023 LisiasT : http://lisias.net <support@lisias.net>
© 2020-2024 LisiasT : http://lisias.net <support@lisias.net>
KSP-Recall is double licensed, as follows:
* SKL 1.0 : https://ksp.lisias.net/SKL-1_0.txt
2 changes: 1 addition & 1 deletion Source/Driftless/PartModule.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
This file is part of Attached, a component of KSP-Recall
© 2020-2023 LisiasT : http://lisias.net <support@lisias.net>
© 2020-2024 LisiasT : http://lisias.net <support@lisias.net>
KSP-Recall is double licensed, as follows:
* SKL 1.0 : https://ksp.lisias.net/SKL-1_0.txt
Loading