Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upAtomic reactor enable/disable + spam fix #26622
Conversation
Josephos
changed the title
On branch atomic_reactor_fix
Atomic reactor enable/disable + spam fix
Nov 10, 2018
Josephos
referenced this pull request
Nov 10, 2018
Closed
Mini-reactor is always on regardless of setting. #26617
This comment has been minimized.
This comment has been minimized.
|
You don't need count, only on/off state. bool reactor_online = false;
for( auto &elem : reactors ) {
reactor_online |= is_part_on( elem );
} |
ZhilkinSerg
added
Vehicles
[C++]
<Bugfix>
labels
Nov 10, 2018
ZhilkinSerg
merged commit 94a20a2
into
CleverRaven:master
Nov 10, 2018
Josephos
deleted the
Josephos:atomic_reactor_fix
branch
Nov 10, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Josephos commentedNov 10, 2018
•
edited
Changes to be committed:
modified: src/vehicle.cpp
Summary
SUMMARY: Bugfixes "Fix for issue #26617 "Purpose of change
Fixes #26617
mini-reactor is always on regardless of setting, reactor with no fuel spams shutdown messages.Describe the solution
Added some code to check whether or not the reactor is actually on. If there are no online reactors, there is nothing to turn off, so we can skip disabling them and spamming in the process.
Describe alternatives you've considered
I've considered leaving this alone and letting someone who knows what the hell is he doing to fix it instead.