mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-11-14 08:14:52 +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
|
||||
local function handle_energy_interfaces()
|
||||
local update_mega = * mega * update_tick_energy / 60
|
||||
for s_index, prop in pairs(vlayer_data) do
|
||||
local storage = prop.storage
|
||||
local properties = prop.properties
|
||||
local production = properties.production * mega * update_tick_energy / 60
|
||||
storage.energy = storage.energy + floor(min(properties.input_limit, production * get_production_multiplier(s_index)))
|
||||
local production = properties.production * update_mega
|
||||
storage.energy = storage.energy + floor(min(properties.input_limit * update_mega, production * get_production_multiplier(s_index)))
|
||||
|
||||
local interfaces = prop.interfaces.energy
|
||||
prune_interfaces(interfaces)
|
||||
|
||||
Reference in new issue
Block a user