-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
make it possible for cbms to be fueled by non-fuel items #49499
Conversation
@@ -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() ) { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which would be...?
There was a problem hiding this comment.
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
There was a problem hiding this 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" ], |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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.