Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions scripts/RmAdjustStorageCapacity.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down