mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-11-23 23:33:12 +09:00
.
This commit is contained in:
1 parent
dd0504a5dd
commit
a0ef9686ed
1 file changed
+3
-2
@@ -713,11 +713,12 @@ end
|
|||||||
|
|
||||||
--- Produce energy, share it between the energy interfaces, and burn fuel when storage runs low
|
--- Produce energy, share it between the energy interfaces, and burn fuel when storage runs low
|
||||||
local function handle_energy_interfaces()
|
local function handle_energy_interfaces()
|
||||||
|
local update_mega = * mega * update_tick_energy / 60
|
||||||
for s_index, prop in pairs(vlayer_data) do
|
for s_index, prop in pairs(vlayer_data) do
|
||||||
local storage = prop.storage
|
local storage = prop.storage
|
||||||
local properties = prop.properties
|
local properties = prop.properties
|
||||||
local production = properties.production * mega * update_tick_energy / 60
|
local production = properties.production * update_mega
|
||||||
storage.energy = storage.energy + floor(min(properties.input_limit, production * get_production_multiplier(s_index)))
|
storage.energy = storage.energy + floor(min(properties.input_limit * update_mega, production * get_production_multiplier(s_index)))
|
||||||
|
|
||||||
local interfaces = prop.interfaces.energy
|
local interfaces = prop.interfaces.energy
|
||||||
prune_interfaces(interfaces)
|
prune_interfaces(interfaces)
|
||||||
|
|||||||
Reference in new issue
Block a user