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 bio_solar producing power in the dark #35755

Merged
merged 6 commits into from
Nov 28, 2019

Conversation

Fris0uman
Copy link
Contributor

Summary

SUMMARY: Bugfixes "Fix bio_solar producing power in the dark"

Purpose of change

Fixes #35753

Describe the solution

check is_in_sunlight() befor producing power
Re-use code from vehicle.cpp to compute power production

Describe alternatives you've considered

Testing

Go in basement turn on solar panel
Power goes up
Apply fix en re peat
Power doesn't go up and sunlight is not listed an available fuel

Additional context

@ZhilkinSerg ZhilkinSerg added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Items: Battery / UPS Electric power management Bionics CBM (Compact Bionic Modules) labels Nov 28, 2019
@ZhilkinSerg ZhilkinSerg merged commit c3982c9 into CleverRaven:master Nov 28, 2019
@Fris0uman Fris0uman deleted the fix_solar branch November 28, 2019 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bionics CBM (Compact Bionic Modules) <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Items: Battery / UPS Electric power management
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Aftershock Solar Panels CBM seems to always generate power, even without sunlight
2 participants