-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
power multiplication fix #655
power multiplication fix #655
Conversation
… of the bug was that machines can be a part of multiple networks and generate power for each of the networks. This was fixed by checking if machine is already part of an other network and not making it a part of the current one. When network times out the network meta string value is cleared and the clear_networks function is used to try to connect the machine to a different network.
…mproved clear_networks function fixed network not being cleared in some cases. Moved new network finding for machines to when network is cleared instead of on timeout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works well so far. Connected and disconnected a few cables. The machines are updated correctly.
…esarily checking technic.network[network_id] for nil, moved network_id nil checking inside clear_network function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the update.
Works. Will merge in a few days unless there are objections.
Fixed power multiplication bug. Resolves #277. The cause of the bug was that machines can be a part of multiple networks and generate power for each of the networks. This was fixed by checking if machine is already part of an other network and not making it a part of the current one. When network times out the network meta string value is cleared and the clear_networks function is used to try to connect the machine to a different network.