Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add part upgrade for engine configs proof of concept #1654

Closed
wants to merge 3 commits into from

Conversation

NathanKell
Copy link
Member

Hope it works.

@NathanKell
Copy link
Member Author

Note that it is currently targeted for a TestFlight config but you can move the *@PARTUPGRADE line to the appropriate CONFIG block in the engine configger rather than in the testflight patches section (some engines may not have testflight configs yet). I.e.
CONFIG
{
name = LMDE-J
*@PARTUPGRADE....
....
}

@pap1723
Copy link
Contributor

pap1723 commented Jun 11, 2017

@NathanKell
Alright, I have done a TON of testing on this over the last few hours. I have tried a lot of different approaches and I cannot get this to work the right way. I was obviously working in the RD-100 config as it was early enough in the Tree for me to see the changes most easily.

First, MM did not like the syntax for this code: *@PARTUPGRADE[RFUpgrade_LMDE-J]/deleteme -= 1 Not a big deal, I changed it to this and it works correctly:

@PARTUPGRADE[RFUpgrade_RD-103]
{
    %deleteme -= 1
}

The place that we keep running into problems is with this area:

-PARTUPGRADE:HAS[#deleteme[>0]]
{
}

I know that this is the whole point of this attempt is to only show if the different configs are loaded. From what I can tell from the log, what is happening is that the PARTUPGRADE is correctly running, and then immediately being deleted by this set of code. I attempted to modify if to this to get it to run later:

-PARTUPGRADE:HAS[#deleteme[>0]]:FOR[zzzzROEngines]
{
}

However, that seems to not accomplish what we are going for. What we need to have happen is to have that run after all of the configs have been analyzed and determined to exist, and then the deleteme will change over to 0 and should work.

Any ideas?

@NathanKell
Copy link
Member Author

This should be OK now.

I dunno why MM didn't like that syntax; it's crucial to making this work, and on my end it did like it. So I'm confused. Anyway I tested this in a standalone KSP install with just MM using this cfg and it created the correct confignodes in configcache. The syntax is crucial because it needs to only decrement deleteme if an engine config is applied. Well, technically we're doing it when the TF config is applied, for clarity, but eh, you could put that line in the CONFIG above if you like.

The idea is every time the engine configs are applied, then and only then is deleteme decremented (to show that the config is in use), and at the end of the day any partupgrades with deleteme >0 (i.e. never touched) are deleted.

@NathanKell
Copy link
Member Author

@pap1723 This stuff is all on the new branch, right? I should close this?

@pap1723
Copy link
Contributor

pap1723 commented Jun 18, 2017 via email

@pap1723
Copy link
Contributor

pap1723 commented Jun 18, 2017

This is completed

@pap1723 pap1723 closed this Jun 18, 2017
@NathanKell NathanKell deleted the PartUpgradeEngineConfigs branch June 23, 2017 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants