diff --git a/exp_scenario/module/control/vlayer.lua b/exp_scenario/module/control/vlayer.lua index 2d29b774..1405383f 100644 --- a/exp_scenario/module/control/vlayer.lua +++ b/exp_scenario/module/control/vlayer.lua @@ -707,8 +707,8 @@ local function handle_energy_interfaces() for s_index, prop in pairs(vlayer_data) do local storage = prop.storage local properties = prop.properties - local production = properties.production * (update_tick_energy / 60) - storage.energy = storage.energy + min(properties.input_limit, floor(production * get_production_multiplier(s_index))) * mega + local min_input = min(properties.input_limit, properties.production * get_production_multiplier(s_index)) + storage.energy = storage.energy + floor(min_input * mega * update_tick_energy / 60) local interfaces = prop.interfaces.energy prune_interfaces(interfaces)