Fractal Softworks Forum

Starsector => Mods => Modding => Topic started by: SirHartley on August 03, 2020, 03:32:12 PM

Title: Carrying over SectorEntityTokens with specific OrbitFocus to new OrbitFocus
Post by: SirHartley on August 03, 2020, 03:32:12 PM
I'm attempting to replace a procgenned planet with another entity.
Since it's possible that the planet has stuff orbiting it, I have to set a new OrbitFocus for the orbit of any entity orbiting the old planet

This is not an issue, except for one thing: RingBand does not seem to have an actual orbit.
They only have a Focus, which is a private variable without a getter.

Generating a copy of the RingBand failed for a similar reason -  bandWidthInEngine, the field responsible for setting band width, is not accessible as well.

I'd use reflection to get these, but it's not allowed - as I found out today, to my chagrin.
Now, I'm looking for a way to fix that, since it's the last thing required to have the script working as intended.
Any ideas?
Title: Re: Carrying over SectorEntityTokens with specific OrbitFocus to new OrbitFocus
Post by: Alex on August 03, 2020, 03:41:01 PM
Hmm, I think you're out of luck here - no getters for the fields, and to add insult to injury, they're final, too. Let me add a bunch of stuff to RingBandAPI, though, so at least this'll be more doable in the future.
Title: Re: Carrying over SectorEntityTokens with specific OrbitFocus to new OrbitFocus
Post by: SirHartley on August 03, 2020, 04:23:50 PM
Not what I was hoping to hear, but good to know it should be possible with the next update.
I'll work around that for now and just forbid application on ringed entities.

Thank you for the support!