-
Notifications
You must be signed in to change notification settings - Fork 32
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
[QUESTION] Is there a way to set the starting DU for an engine config? #212
Comments
If I understand you properly, then I think you just want the |
Probably, as I said, but I don't understand why |
I apologize for not taking the time to click on your link which showed you were already looking at that method. In hindsight that probably won't work for what you want to do anyway because there are a lot of assumptions made about the context of that call. Plus, I think you just want to set a flat value not actually modify an existing value. Ideally you really need to be interacting with the scenario store directly I think, though none of that is exposed if I recall correctly. Would probably need to add a new method to the API class for this. |
Ultimately what you want to be hitting is this: https://github.com/KSP-RO/TestFlight/blob/master/TestFlightCore/TestFlightCore/TestFlight.cs#L1022 But I don't think that is currently accessible through reflection. |
Yeah, that seems pretty much what I need. Would it be possible to expose it? I'd make a PR myself, but reflection makes my head spin every time I look at something beyond the basics. Is making the method static enough? |
Probably. I'll try to find the time to look at it but I'm in the middle of
a big push at work right now.
- John Vanderbeck
- http://www.johnvanderbeck.com
…On Tue, Sep 8, 2020 at 3:24 PM Standecco ***@***.***> wrote:
Yeah, that seems pretty much what I need. Would it be possible to expose
it? I'd make a PR myself, but reflection makes my head spin every time I
look at something beyond the basics. Is making the method static enough?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#212 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABHKZXML7SBNDIRUAZ44XDSE2VJ5ANCNFSM4Q63A6GQ>
.
|
Can confirm that Closing since the feature works. Thanks for the help @jwvanderbeck! |
This isn't really an issue for TestFlight, it's actually an issue for me. I'm trying to add a way for my CustomScenarioManager mod to set the DU amount for an arbitrary config.
The idea is that you'd have a
tfStartingDU
field that you could populate with a comma-separated list ofEngineConfig@DU
. My mod would then check if TF is installed, find that engine config and set its DU amount so that the player will find that specific engine with the specified data amount.My question therefore is: how do I do that? I read through TF's documentation and code, but it hasn't occurred to me exactly what would the outcome of that method be (check the "code" link), and how how I would call it from the KSC.
I preemptively ask for forgiveness if this is addressed 15 lines further than what I've linked, but I wasn't able to figure it out myself. @jwvanderbeck would you be available to give some directions?
The text was updated successfully, but these errors were encountered: