[1.1.72][Lua] corrupt defines.circuit_connector_id
Posted: Fri Dec 02, 2022 9:31 pm
Hi team,
I'm not completely sure if this is a bug since the api doesn't provide which values are contained in elements of defines.circuit_connector_id, however I've found something strange while working on a pet mod for myself. Given the test code in data section with no mod other than my own:
Following is being logged:
Please notice that all of elements from these two enums are 1 except entries that match circuit_connector_id.combinator_output and circuit_condition_index.constant_combinator which are equal to 2.
Per my expectation each entry has to have different number, otherwise it is impossible to detect which network an entity has.
Best regards,
Alexandru.
I'm not completely sure if this is a bug since the api doesn't provide which values are contained in elements of defines.circuit_connector_id, however I've found something strange while working on a pet mod for myself. Given the test code in data section with no mod other than my own:
Code: Select all
function dump_test(self)
for ____, e in ipairs({
defines.circuit_connector_id.constant_combinator,
defines.circuit_connector_id.container,
defines.circuit_connector_id.programmable_speaker,
defines.circuit_connector_id.rail_signal,
defines.circuit_connector_id.rail_chain_signal,
defines.circuit_connector_id.roboport,
defines.circuit_connector_id.storage_tank,
defines.circuit_connector_id.wall,
defines.circuit_connector_id.electric_pole,
defines.circuit_connector_id.inserter,
defines.circuit_connector_id.lamp,
defines.circuit_connector_id.combinator_input,
defines.circuit_connector_id.combinator_output,
defines.circuit_connector_id.offshore_pump,
defines.circuit_connector_id.pump
}) do
log((("circuit_connector_id: " .. tostring(e)) .. ": ") .. tostring(true))
end
for ____, e in ipairs({
defines.circuit_condition_index.inserter_circuit,
defines.circuit_condition_index.inserter_logistic,
defines.circuit_condition_index.lamp,
defines.circuit_condition_index.arithmetic_combinator,
defines.circuit_condition_index.decider_combinator,
defines.circuit_condition_index.constant_combinator,
defines.circuit_condition_index.offshore_pump,
defines.circuit_condition_index.pump
}) do
log((("circuit_condition_index: " .. tostring(e)) .. ": ") .. tostring(true))
end
end
dump_test(nil)
Code: Select all
1.617 Script @__factory-combinator__/data.lua:19: circuit_connector_id 1: true
1.617 Script @__factory-combinator__/data.lua:19: circuit_connector_id 1: true
1.617 Script @__factory-combinator__/data.lua:19: circuit_connector_id 1: true
1.617 Script @__factory-combinator__/data.lua:19: circuit_connector_id 1: true
1.617 Script @__factory-combinator__/data.lua:19: circuit_connector_id 1: true
1.617 Script @__factory-combinator__/data.lua:19: circuit_connector_id 1: true
1.617 Script @__factory-combinator__/data.lua:19: circuit_connector_id 1: true
1.617 Script @__factory-combinator__/data.lua:19: circuit_connector_id 1: true
1.617 Script @__factory-combinator__/data.lua:19: circuit_connector_id 1: true
1.617 Script @__factory-combinator__/data.lua:19: circuit_connector_id 1: true
1.617 Script @__factory-combinator__/data.lua:19: circuit_connector_id 1: true
1.617 Script @__factory-combinator__/data.lua:19: circuit_connector_id 1: true
1.617 Script @__factory-combinator__/data.lua:19: circuit_connector_id 2: true
1.617 Script @__factory-combinator__/data.lua:19: circuit_connector_id 1: true
1.617 Script @__factory-combinator__/data.lua:19: circuit_connector_id 1: true
1.617 Script @__factory-combinator__/data.lua:31: circuit_condition_index: 1: true
1.617 Script @__factory-combinator__/data.lua:31: circuit_condition_index: 2: true
1.617 Script @__factory-combinator__/data.lua:31: circuit_condition_index: 1: true
1.617 Script @__factory-combinator__/data.lua:31: circuit_condition_index: 1: true
1.618 Script @__factory-combinator__/data.lua:31: circuit_condition_index: 1: true
1.618 Script @__factory-combinator__/data.lua:31: circuit_condition_index: 1: true
1.618 Script @__factory-combinator__/data.lua:31: circuit_condition_index: 1: true
1.618 Script @__factory-combinator__/data.lua:31: circuit_condition_index: 1: true
Per my expectation each entry has to have different number, otherwise it is impossible to detect which network an entity has.
Best regards,
Alexandru.