diff --git a/scripts/RmAdjustStorageCapacity.lua b/scripts/RmAdjustStorageCapacity.lua index c2350a8..0583d15 100644 --- a/scripts/RmAdjustStorageCapacity.lua +++ b/scripts/RmAdjustStorageCapacity.lua @@ -1940,11 +1940,15 @@ function RmAdjustStorageCapacity:applyVehicleCapacity(vehicle, fillUnitIndex, ca -- Apply proportional discharge speed local spec = vehicle[RmVehicleStorageCapacity.SPEC_TABLE_NAME] - if spec ~= nil and spec.applyProportionalDischargeSpeed ~= nil then - -- Call via method on the vehicle/spec + if spec ~= nil then RmVehicleStorageCapacity.applyProportionalDischargeSpeed(vehicle, fillUnitIndex, capacity) end + -- Capacity affects the additional-mass calculation, so discard the cached value. + if vehicle.setMassDirty ~= nil then + vehicle:setMassDirty() + end + -- Update FillVolume cached capacity for visual representation self:updateVehicleFillVolumeCapacity(vehicle, fillUnitIndex, capacity) end