Refunding is not working on 1.12.x!!!!
Lisias opened this issue · 14 comments
Fellow Kerbonaut by_HOY_ complained about the pricing of scaled parts being wrong:
Problem: The costs I'm getting are not exactly the same!
So I created this Untitled Space Craft, costing 44680F (from a budget of 50.000F):
Launched it, and recovered it:
And voilá, funds are screwed. 😢
The special resource I use to recover the loses from the crappy KSP recovering funds calculation is missing!!
This is the most unsettling...
It looks like Refunding
is being killed on the OnLoad
. Look the StealBackMyFunds
log sequence, it Refunding
should be having a similar sequence.
[LOG 16:00:09.819] [KSP-Recall.FundsKeeper] TRACE: OnAwake <NO VESSEL>-probeCoreOcto.v2(Clone):FFF9352A
[LOG 16:00:09.819] [KSP-Recall.StealBackMyFunds] TRACE: OnAwake <NO VESSEL>-probeCoreOcto.v2(Clone):FFF9352A
[LOG 16:00:09.823] [KSP-Recall.FundsKeeper] TRACE: OnLoad <NO VESSEL>-probeCoreOcto.v2:FFF9352A True
[LOG 16:00:09.823] [KSP-Recall.StealBackMyFunds] TRACE: OnLoad <NO VESSEL>-probeCoreOcto.v2:FFF9352A True
[LOG 16:00:09.823] [KSP-Recall.StealBackMyFunds] TRACE: HighLogic.LoadedScene FLIGHT
[LOG 16:00:09.823] [KSP-Recall.StealBackMyFunds] TRACE: Resetting StealBackMyFunds on part <NO VESSEL>-probeCoreOcto.v2:FFF9352A
[LOG 16:00:09.831] [KSP-Recall.FundsKeeper] TRACE: OnAwake <NO VESSEL>-solidBooster.sm.v2(Clone):FFF934E2
[LOG 16:00:09.832] [KSP-Recall.StealBackMyFunds] TRACE: OnAwake <NO VESSEL>-solidBooster.sm.v2(Clone):FFF934E2
[LOG 16:00:09.834] [KSP-Recall.FundsKeeper] TRACE: OnLoad <NO VESSEL>-solidBooster.sm.v2:FFF934E2 True
[LOG 16:00:09.834] [KSP-Recall.StealBackMyFunds] TRACE: OnLoad <NO VESSEL>-solidBooster.sm.v2:FFF934E2 True
[LOG 16:00:09.834] [KSP-Recall.StealBackMyFunds] TRACE: HighLogic.LoadedScene FLIGHT
[LOG 16:00:09.834] [KSP-Recall.StealBackMyFunds] TRACE: Resetting StealBackMyFunds on part <NO VESSEL>-solidBooster.sm.v2:FFF934E2
I quit trying to understand this crap 💩 for now. RealLife™ is bitting.
I rolled back the codebase to the point where the problem didn't happened, backported some fixes, and will publish the damned thing based on branch https://github.com/net-lisias-ksp/KSP-Recall/tree/emergencial/0.5.0.0 .
kraken knows what in hell is happening here.
Once I have some time available (what will be a fight by itself for while), I will try to add back the changes that caused the problem in 1.12.x (and only on 1.12.x) one by one to see if I figure out exactly what happened.
Things are borking from KSP 1.12.x and newer, bothered to check from 1.12.2 to 1.12.5 . 💩
Now... Why this is being detected just now? I remember testing Refunding on KSP 1.12.2
https://forum.kerbalspaceprogram.com/topic/192048-143/?do=findComment&comment=4202573
Crap. O think I found the reason. Aparently OnEditorShipModified
is not being called by Editor.
Nope. I misconfigured the Log level on Refunding. I'm too tired, time to give this a break.
Humm... I think I found it this time. FundsKeeper.UpdateResource
is not being called by Refunding
. 😞
Interesting, StealBacoMyFunds
is working as expected...
[LOG 07:47:50.671] [KSP-Recall.StealBackMyFunds] TRACE: UpdateResource solidBooster.sm.v2:FFF925F2
Why just Refunding
is getting screwed?
Jesus Christ! It's because Refunding
is not being applied into the part!!!!
savegame: bug.zip
KSP.log
: KSP.log
ConfigCache
: ConfigCache.cfg.zip
On the Untitled Craft
craft file on VAB's Ship's directory, you will find that the craft is being saved without the Refunding
module!
FundsKeeper
and TweakScale
are there, just Refunding
is missing. But the KSP.log
says the patch was applied, and the thing is there on the ConfigCache
...
It's odd. StealBackMyFunds
is working, and it uses essentially the same mechanisms.
I managed to make the damned Refunding
to be loaded by renaming it, besides it didn't recovered any funds. It's like the name "Refunding
" became cursed somehow.
DayJob© is calling now, but I will go back to this issue ASAP. I think I need to do some regression tests using previous KSP-Recall releases to see what I find.
Humm, ok. It's a self infringed problem: Refunding
is working on KSP-Recall 0.3.0.12 .
This is the exact commit that triggered the problem. I don't have the slightest idea on how in hell this caused so much damaged.