Advanced Question Propelant vanishing between loadstate and postcreation

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,891
Reaction score
2,141
Points
203
Location
between the planets
For several reasons, I'm not using orbiters default PROPLEVEL during loadstate to initialise my propellant resources (major one being that I have to map the resources to fuel types, which is noted in a custom scenario line, together with max mass and current mass of the propellant resource. I call CreatePropellantResource manually when loading this line).

I'm skipping the PROPLEVEL line during loadstate by intercepting it and simply doing nothing, not passing it on to orbiters parser.
When I check out my propellant resources at the very end of loadstate, everything is in order. But when I check them out again at the very beginning of postcreation, the resources are all still there, but they are now empty. Does anybody have any idea what might happen to them between these two functions? I can work around this, of course, but it is a bit of an odd behaviour, and I'm wondering wheather there's anything I can do about it.

If I don't skip PROPLEVEL the resources are full, but it leads to all kinds of weird behavior like duplication and sometimes swaps of my mapped fueltypes.
 

Xyon

Puts the Fun in Dysfunctional
Administrator
Moderator
Orbiter Contributor
Addon Developer
Webmaster
GFX Staff
Beta Tester
Joined
Aug 9, 2009
Messages
6,928
Reaction score
795
Points
203
Location
10.0.0.1
Website
www.orbiter-radio.co.uk
Preferred Pronouns
she/her
Does following through the process in the debugger yield nothing? I'd have suggested throwing a watch on your propellant level variable and breaking when it changes...
 
Top