Misunderstanding (?) on how `PartModule.OnLoad(ConfigNode)` really works.
Lisias opened this issue ยท 1 comments
Oukey, I was caught with my pants down. AGAIN.
I had the understanding that PartModule.OnLoad(ConfigNode)
code was in charge of, well, loading the fscking dada into the PartModule
in a very similar way the OnSave
does - I can interfere with what is being written into the ConfigNode
on OnSave
. I thought that OnLoad
would behave similarly.
Apparently I was wrong.
I don't have the slightest idea how this ExecuteMyUpgradePipeline
of mine was working before - and I want to stress out that IT WAS WORKING AT THE TIME I RELEASED IT. See this Forum post.
But, right now, it's not working. And the reason is that whatever I do on the ConfigNode
in the OnLoad
code, it's being ignored by the caller.
So, or the damned thing is being passed by value, or the base.OnLoad
is not really loading the values from ConfigNode
into the PartModule
(and on both cases I don't have an explanation why my stunt was working before), or I had somehow wrote a nonworking code that ended up working by accident (and then, what changed?). Or something else.
In a way or another, I need to have this fixed somehow. Right now.
Problem fixed on commit: f04ff01
Added "Not My Fault" as I have registered that this damned feature was working on March, 2022. I don't have the slightest clue about what changed, but I could only fully restore the feature by workaround the OnLoad
callback - and since I have records of the thing working last year, at that time the OnLoad
must had been behaving differently.
How KSP 1.4.3 changed its behaviour in the mean time is something that I'm very, very interested on understand.
Anyway, closed.