blowfishpro / B9PartSwitch

A Kerbal Space Program plugin designed to implement switching of part meshes, resources, and nodes
GNU Lesser General Public License v3.0
50 stars 33 forks source link

ResourceUnitCost not correctly calculated #10

Closed Kerbas-ad-astra closed 8 years ago

Kerbas-ad-astra commented 8 years ago

It needs to take into account the unitsPerVolume of each resource as well, so line 61 should be:

public float ResourceUnitCost => resources.Sum(r => (r.resourceDefinition.unitCost) * (r.unitsPerVolume) );
blowfishpro commented 8 years ago

Nice catch! Fix released.