KSP-RO / TestFlight

KSP Mod that provides a part research and reliability system
42 stars 31 forks source link

Alt-cloning an engine confuses PAW testflight stats #265

Closed lpgagnon closed 11 months ago

lpgagnon commented 1 year ago

Original is fine; cloned is... confused. In this example: shows rated continuous time on an engine that has no such value; shows the wrong earned DU; doesn't update values when switching configs.

Loading a .craft is a necessary step; doesn't occur when alt-clicking a part newly-placed from parts catalog. Haven't tried loading without Craft Manager.

wat.craft.zip

screenshot98

Falki-git commented 1 year ago

I tried to troubleshoot this, but have limited knowledge and couldn't reverse engineer it fully.

Yes, it only happens when cloning engines that are already attached to the loaded vessel. Testflight config nodes are taken from the saved .craft file which doesn't contain all the needed nodes to populate the PAW correctly. When cloning a newly placed part, it works ok cause the original has all the needed nodes taken from the persistent save file.

Solution that I see is detecting when passed config doesn't contain the needed nodes and load a new config from the save file, but that feels like a patch, not a real solution. Someone with more knowledge should look at this.

For now, I can only offer a workaround:

siimav commented 11 months ago

Same as #247