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

Add Auto start mode to power gen bionics #35620

Merged
merged 4 commits into from
Nov 22, 2019

Conversation

Fris0uman
Copy link
Contributor

@Fris0uman Fris0uman commented Nov 20, 2019

Summary

SUMMARY: Features "Add Auto start mode to power gen bionics"

Purpose of change

Add Auto Start mode if ON the bionic will try to start every hour if your power_level is <=0_mJ
It's OFF by default

image

Describe the solution

Use the flag system set up for fuel saving mode

Describe alternatives you've considered

Testing

Install MI
Turn Auto Start on
Wait
Bionic turn ON
Powers fills
Since Saving fuel is ON it also turns Off automatically

Additional context

This can only work for the player as the activation uses g->u

src/suffer.cpp Outdated Show resolved Hide resolved
src/bionics_ui.cpp Outdated Show resolved Hide resolved
Fris0uman and others added 2 commits November 20, 2019 18:24
Co-Authored-By: Anton Burmistrov <[email protected]>
@ZhilkinSerg ZhilkinSerg added [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON Bionics CBM (Compact Bionic Modules) labels Nov 22, 2019
@ZhilkinSerg ZhilkinSerg merged commit c4ecb35 into CleverRaven:master Nov 22, 2019
@Fris0uman Fris0uman deleted the auto_on branch November 22, 2019 09:57
@@ -972,6 +972,10 @@ static bool attempt_recharge( Character &p, bionic &bio, units::energy &amount,
void Character::process_bionic( int b )
{
bionic &bio = ( *my_bionics )[b];
if( calendar::once_every( 1_hours ) && !bio.id->fuel_opts.empty() &&
bio.has_flag( "AUTO_START_ON" ) && power_level <= 0_mJ ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, but with this conditions this feature is useless. It needs to be at least every minute and somewhere between 66% - 80% of max power.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I'm setting up a menu to choose the threshold, I just need to figure out the time interval thing, because trying to turn on your CBM every minutes when you don't have fuel for it is very spammy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bionics CBM (Compact Bionic Modules) [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants