Biotronic / TweakScale

Forked from Gaius Goodspeed's Goodspeed Aerospace Part & TweakScale plugin
30 stars 58 forks source link

MFT/RF integration should use ChangeVolume when size changes #3

Closed NathanKell closed 10 years ago

NathanKell commented 10 years ago

ModuleFuelTanks.ChangeVolume(double newVolume) - call this rather than directly changing basemass, volume, etc. Everything will be handled automatically based on the volume you pass.

Biotronic commented 10 years ago

That don't sound so stupid. Expect new behavior in 1.21.

btw, is there a way to update the list of tanks with new volumes too?

Currently, I get this behavior with RF and a FL-T400 tank:

  1. Add a 2000 units tank of LiquidOxygen.
  2. Rescale tank to 2.5m.
  3. Notice that the tank still says 2000 units.
  4. Press Update.
  5. Notice tank now has 14000 units of available volume.
  6. Remove tank, then re-add as 16000 units.

I'd kinda like to skip steps 3-6.

Actually, it seems the tanks are scaled correctly, it's just the GUI is not updated. Ideas?

NathanKell commented 10 years ago

If you use ChangeVolume, everything will be handled automatically. That's what it's there for. :)

Sent by my thumbs, slowly. On Jun 25, 2014 9:25 PM, "Simen Kjærås" notifications@github.com wrote:

That don't sound so stupid. Expect new behavior in 1.21.

btw, is there a way to update the list of tanks with new volumes too?

Currently, I get this behavior with RF and a FL-T400 tank:

  1. Add a 2000 units tank of LiquidOxygen.
  2. Rescale tank to 2.5m.
  3. Notice that the tank still says 2000 units.
  4. Press Update.
  5. Notice tank now has 14000 units of available volume.
  6. Remove tank, then re-add as 16000 units.

I'd kinda like to skip steps 3-6.

Actually, it seems the tanks are scaled correctly, it's just the GUI is not updated. Ideas?

— Reply to this email directly or view it on GitHub https://github.com/Biotronic/TweakScale/issues/3#issuecomment-47178703.

Biotronic commented 10 years ago

Interesting, cause that's what I tried, and I got the results described above.

NathanKell commented 10 years ago

That's...super weird. Here's how Stretchy does it: https://github.com/NathanKell/StretchySRB/blob/master/Plugins/StretchyTanks/stretchyTanks.cs#L909 Admittedly via sendmessage rather than directly calling the method, but I don't see why it wouldn't work. Your update method is only doing ChangeVolume(), and not changing anything else before/after?

NathanKell commented 10 years ago

bump I can try messing with it on my end too if you want--all the code in git is up-to-date?

jwvanderbeck commented 10 years ago

I'm assuming this is still an open issue? Is it just a matter of not having free time to address it? Would it help if I looked into it and submitted a PR?

This is kind of important for me since I prefer to use tanks from part packs and not procedural ones, so the ability to TweakScale tanks and have proper volume is vital :)

Biotronic commented 10 years ago

This bug has been fixed, but since MFT and RF are not yet updated for 0.24, no release has been made including these fixes.