Skip to content
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

Fix vehicle heater consuming too much energy #66504

Merged
merged 1 commit into from
Jun 29, 2023

Conversation

SurFlurer
Copy link
Contributor

@SurFlurer SurFlurer commented Jun 28, 2023

Summary

none

Purpose of change

Fix #66237

Describe the solution

Apply irwiss's suggestion, move emitter handling code to vehicle::idle(), after on_map check. That's because the emitters must be on map to generate fields. This avoids the hassle of dealing with emitters' battery drain separately.

Describe alternatives you've considered

none

Testing

Emitter's power drain returned to normal.

Additional context

@github-actions github-actions bot added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Vehicles Vehicles, parts, mechanics & interactions json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Jun 28, 2023
@SurFlurer SurFlurer marked this pull request as ready for review June 28, 2023 03:02
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jun 28, 2023
@SurFlurer SurFlurer marked this pull request as draft June 28, 2023 14:13
src/vehicle.cpp Outdated Show resolved Hide resolved
src/vehicle.cpp Outdated Show resolved Hide resolved
src/vehicle.cpp Outdated Show resolved Hide resolved
@SurFlurer SurFlurer marked this pull request as ready for review June 28, 2023 14:26
@github-actions github-actions bot removed the astyled astyled PR, label is assigned by github actions label Jun 28, 2023
@SurFlurer SurFlurer changed the title Update vehicle's last_update timepoint every turn Fix vehicle heater consuming too much energy Jun 28, 2023
@github-actions github-actions bot added the astyled astyled PR, label is assigned by github actions label Jun 28, 2023
@dseguin dseguin merged commit 9176ffb into CleverRaven:master Jun 29, 2023
@SurFlurer SurFlurer deleted the patch-1 branch June 30, 2023 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
2 participants