Kerbal Inventory System (KIS)

Kerbal Inventory System (KIS)

1M Downloads

Volume calculation doesn't work when rescaleFactor != 1

Kerbas-ad-astra opened this issue ยท 4 comments

commented

To confirm, check out the Kontainers from UKS 0.31.4 and try to put them in a KIS inventory. All three Kontainers are listed as taking up the same volume, even though they're different sizes. In UKS 0.31.5, they were changed to use the "scale" variable in the MODEL node (so that rescaleFactor could be 1, to resolve a different problem caused by tinkering with the rescaleFactor), and when I try to put those in a KIS inventory, they get the correct volume.

commented

I just tested it and it work for me? Two parts with 2 differents rescaleFactor, volume are not the same.
Maybe the kontainers are set with a volumeOverride?

commented

Just tried a rescaled FL-T100 fuel tank in 1.0.4 with KIS 1.2.1, and its volume was correctly multiplied. However, the old (0.31.4) UKS tanks were not, so there's something weird about them.

They don't have a volume override set, but they have a MODEL{} node instead of mesh = whatever.mu like the stock tank. I see in KSP's changelog that they've fixed at least one bug with parts that use rescaleFactor and MODEL nodes, so maybe this is another one for them to stomp.

I also saw this issue with a HexCans part that uses a MODEL node and rescaleFactor oher than 1...now that I think about it, that part also had a hologram that was the wrong size when attaching it on EVA, as do the old Kontainers. This might also be why the AES beam had the wrong-sized hologram in issue #53.

commented

More confirmation that this is a stock issue: putting a size 2 old Kontainer in the VAB shows the wrong (size 1) dimensions in the Engineer's Report until I put another part on it.

So, I guess this leaves the question of how to deal with this issue until Squad fixes it. Super-kludgey "solution" I came up with just now: a Module Manager patch to put a "ModuleKISVolumeFixer" or something on parts with a MODEL and with rescaleFactor != 1, and then look for that module when calculating volume or drawing holograms.

commented

Obsolete.