[boskid][2.0.35] active electric network uses network_id == 0
Posted: Sun Feb 23, 2025 11:41 pm
[This is a 1.1 save, migrated to 2.0. Using elevated rails & quality but not space age]
I have a compound entity which embeds a power switch which in turn is connected using a copper cable to a power network. When I inspect this in the debugger, the wire connection shows up like this:
The reported network id is "0". The API docs state: Index of a CircuitNetwork or ElectricSubNetwork which is going through this wire connector. Returns 0 if there is no network associated with this wire connector right now.
But there is a network associated with it (it is my main electrical network and if I click on the big electric pole, it will show me all the stats for the network).
Is the documentation wrong? I have connections where network id is > 0. Or should I use different information to determine whether the wire connector is actually connected (e.g. real_connection_count)?
I have a compound entity which embeds a power switch which in turn is connected using a copper cable to a power network. When I inspect this in the debugger, the wire connection shows up like this:
The reported network id is "0". The API docs state: Index of a CircuitNetwork or ElectricSubNetwork which is going through this wire connector. Returns 0 if there is no network associated with this wire connector right now.
But there is a network associated with it (it is my main electrical network and if I click on the big electric pole, it will show me all the stats for the network).
Is the documentation wrong? I have connections where network id is > 0. Or should I use different information to determine whether the wire connector is actually connected (e.g. real_connection_count)?