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

make it possible for cbms to be fueled by non-fuel items #49499

Merged
merged 3 commits into from
Jun 30, 2021

Conversation

KorGgenT
Copy link
Member

@KorGgenT KorGgenT commented Jun 30, 2021

Summary

Features "make it possible for cbms to be fueled by non-fuel items"

Purpose of change

This is basically the opposite of, and reverts #45537
Fixes #49478
Closes #49479
Closes #49352

Describe the solution

first, reverts the change that makes it impossible to burn comestibles. Then, goes to the logic that picks exactly what happens when you consume an item and makes it so the item tries to fill up the appropriate CBM if you aren't at your max power and the CBM is full. otherwise it attempts to eat it instead.
This is technically a feature and a bugfix both, but it's fairly small and low-impact, in such a way as it can easily be bugtested.

Describe alternatives you've considered

Removing the blood powered CBM
Adding UI information, making this stay broken in this stable cycle.

Testing

see attached issue this PR closes. butcher a mi-go for tainted blood.

also, with the ethanol burner cbm, try Eating vodka til your power's full. you'll find you end up drinking it.

Additional context

A good follow-up for this PR in experimental is to add the ability to fill the appropriate CBMs directly from the menus, rather than using the Eat menu as a sort of workaround for the whole feature.

@KorGgenT KorGgenT added <Enhancement / Feature> New features, or enhancements on existing Bionics CBM (Compact Bionic Modules) <Bugfix> This is a fix for a bug (or closes open issue) Mods: Magiclysm Anything to do with the Magiclysm mod labels Jun 30, 2021
@KorGgenT KorGgenT requested a review from Fris0uman June 30, 2021 00:31
@KorGgenT KorGgenT marked this pull request as ready for review June 30, 2021 00:37
@kevingranade kevingranade merged commit a4cf9e7 into CleverRaven:master Jun 30, 2021
@@ -2267,10 +2267,6 @@ bionic_id Character::get_remote_fueled_bionic() const

bool Character::can_fuel_bionic_with( const item &it ) const
{
if( ( !it.is_fuel() && !it.type->magazine && !it.flammable() ) || it.is_comestible() ) {
Copy link
Contributor

@Fris0uman Fris0uman Jun 30, 2021

Choose a reason for hiding this comment

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

Are you sure that removing the check for is_fuel() is not going to cause issues? I think the code for fuel consumption expects to find fuel data further down the line. That check comes from #45196

Copy link
Member Author

Choose a reason for hiding this comment

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

hm, i see. that could end up being bad if anyone does any hinky json...

Copy link
Member

Choose a reason for hiding this comment

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

Would this change be the problem battery and ethanol CBMs are having now?

Copy link
Member Author

Choose a reason for hiding this comment

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

which would be...?

Copy link
Contributor

Choose a reason for hiding this comment

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

Battery CBM doesn't work: #49509

Copy link
Contributor

@Xpyder Xpyder left a comment

Choose a reason for hiding this comment

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

Not sure that review was the right choice here, first time trying to enter a code comment

@@ -5,7 +5,7 @@
"name": { "str": "Blood Power Generator CBM" },
"description": "Embedded into your back and connected to your bionic power supply is a powerfull spell focus able to consume blood from dead creatures to produce bionic power. It can store up to 100 mL of blood.",
"occupied_bodyparts": [ [ "torso", 8 ] ],
"fuel_options": [ "blood", "dragon_blood", "tainted_blood" ],
"fuel_options": [ "blood", "dragon_blood", "tainted_blood", "hblood" ],
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't "tainted_blood" here be replaced with "blood_tainted" as is set elsewhere in this PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

well drat. that means we have to make another PR.

@KorGgenT KorGgenT deleted the fix-blood-powered-cbm branch July 1, 2021 21:17
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) <Enhancement / Feature> New features, or enhancements on existing Mods: Magiclysm Anything to do with the Magiclysm mod
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Magiclysm] Blood Power Generator CBM not working
6 participants