Accumulator Wagon Reborn

by OwnlyMe

Adds a train wagon capable of storing and transporting electric power, allowing new means of getting power to remote outposts and power grids. Special circuit signals allow for fine-grained control of charging and discharging priority.

Content
1 year, 2 months ago
2.0
1.31K
Transportation Logistics Trains Power

b Quality

20 days ago
(updated 20 days ago)

Hi,
I noticed that quality raise the capacity but it seems not to change above 25k for me. Would be rly nice if thats working wit higher capacity.

20 days ago
(updated 20 days ago)

Hi again,

I tested a bit locally and found this solution:

in control.lua

      --local mulP = mulP * (1+1*entity.quality.level) Removed quality effect on density
      --Added a quality effect on the capacity (game does this already because of prototype copy)
        local fluid_capacity = 25000 * (1 + (entity.quality and entity.quality.level or 0))

Changed max clamp from 5000000 * mulP to fluid_capacity * 200.0 * mulP:

    -- bound it just in case something crazy happened
    if target_energy < 0 then
      target_energy = 0
        elseif target_energy > fluid_capacity * 200.0 * mulP then
          target_energy = fluid_capacity * 200.0 * mulP
    end

Changed near-full clamp from fixed 24999.999/25000 to fluid_capacity - 0.001 / fluid_capacity:

        -- round it up if it's extremely close to full, to avoid floating point not-quite-full issues
        if new_level >= fluid_capacity - 0.001 then
          new_level = fluid_capacity
        end

If i understood it right now. I removed density quality effect on the fluid and instead allowed higher capacity.

New response