mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-11-21 15:33:12 +09:00
missing param
This commit is contained in:
1 parent
b34a183410
commit
7155ea21d4
1 file changed
+8
-1
@@ -117,6 +117,7 @@ for _, name in pairs(items.allowed_categories["production"]) do
|
|||||||
}
|
}
|
||||||
|
|
||||||
for l, n in pairs(quality_level_to_name) do
|
for l, n in pairs(quality_level_to_name) do
|
||||||
|
---@diagnostic disable-next-line: need-check-nil
|
||||||
allowed_items[item_name]["production"][l] = item.get_max_energy_production(n) / mega -- W -> MW
|
allowed_items[item_name]["production"][l] = item.get_max_energy_production(n) / mega -- W -> MW
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -138,8 +139,11 @@ for _, name in pairs(items.allowed_categories["storage"]) do
|
|||||||
|
|
||||||
if item.electric_energy_source_prototype then
|
if item.electric_energy_source_prototype then
|
||||||
for l, n in pairs(quality_level_to_name) do
|
for l, n in pairs(quality_level_to_name) do
|
||||||
|
---@diagnostic disable-next-line: need-check-nil
|
||||||
allowed_items[item_name]["input_limit"][l] = item.electric_energy_source_prototype.get_input_flow_limit(n) / mega -- W -> MW
|
allowed_items[item_name]["input_limit"][l] = item.electric_energy_source_prototype.get_input_flow_limit(n) / mega -- W -> MW
|
||||||
|
---@diagnostic disable-next-line: need-check-nil
|
||||||
allowed_items[item_name]["output_limit"][l] = item.electric_energy_source_prototype.get_output_flow_limit(n) / mega -- W -> MW
|
allowed_items[item_name]["output_limit"][l] = item.electric_energy_source_prototype.get_output_flow_limit(n) / mega -- W -> MW
|
||||||
|
---@diagnostic disable-next-line: need-check-nil
|
||||||
allowed_items[item_name]["capacity"][l] = item.electric_energy_source_prototype.buffer_capacity * prototypes.quality[n].accumulator_capacity_multiplier / mega -- J -> MJ
|
allowed_items[item_name]["capacity"][l] = item.electric_energy_source_prototype.buffer_capacity * prototypes.quality[n].accumulator_capacity_multiplier / mega -- J -> MJ
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -147,6 +151,7 @@ for _, name in pairs(items.allowed_categories["storage"]) do
|
|||||||
end
|
end
|
||||||
|
|
||||||
allowed_items["landfill"] = {
|
allowed_items["landfill"] = {
|
||||||
|
required_area = 0,
|
||||||
surface_area = config.landfill_area
|
surface_area = config.landfill_area
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -251,6 +256,7 @@ end
|
|||||||
--- @return number
|
--- @return number
|
||||||
local function get_production_multiplier(s_index)
|
local function get_production_multiplier(s_index)
|
||||||
local surface = game.surfaces[s_index]
|
local surface = game.surfaces[s_index]
|
||||||
|
if not surface then return end
|
||||||
local multiplier = surface.solar_power_multiplier
|
local multiplier = surface.solar_power_multiplier
|
||||||
if surface.always_day then
|
if surface.always_day then
|
||||||
return multiplier
|
return multiplier
|
||||||
@@ -283,6 +289,7 @@ end
|
|||||||
--- @return number
|
--- @return number
|
||||||
local function get_sustained_multiplier(s_index)
|
local function get_sustained_multiplier(s_index)
|
||||||
local surface = game.surfaces[s_index]
|
local surface = game.surfaces[s_index]
|
||||||
|
if not surface then return end
|
||||||
local multiplier = surface.solar_power_multiplier
|
local multiplier = surface.solar_power_multiplier
|
||||||
if surface.always_day then
|
if surface.always_day then
|
||||||
return multiplier
|
return multiplier
|
||||||
@@ -619,7 +626,7 @@ local function handle_circuit_interfaces()
|
|||||||
prune_interfaces(interfaces)
|
prune_interfaces(interfaces)
|
||||||
if #interfaces == 0 then return end
|
if #interfaces == 0 then return end
|
||||||
|
|
||||||
local stats = Vlayer.get_statistics()
|
local stats = Vlayer.get_statistics(s_index)
|
||||||
for _, interface in ipairs(interfaces) do
|
for _, interface in ipairs(interfaces) do
|
||||||
local control = interface.get_or_create_control_behavior() --[[@as LuaConstantCombinatorControlBehavior]]
|
local control = interface.get_or_create_control_behavior() --[[@as LuaConstantCombinatorControlBehavior]]
|
||||||
if control.sections_count == 0 then
|
if control.sections_count == 0 then
|
||||||
|
|||||||
Reference in new issue
Block a user