-
Notifications
You must be signed in to change notification settings - Fork 290
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
Overhaul sterilizing of CBMs, grid autoclaves #1550
Overhaul sterilizing of CBMs, grid autoclaves #1550
Conversation
Note to self: will conflict with #1532 depending on which is merged first. |
I don't see anything regarding save compatibility. You should detect the case when an item is a bionic and has those 2 flags, remove them, then add the new fault. Usage of the 'm'end menu is arcane, since it's a rarely used menu. I don't have a good solution here, but giving autoclave an examine action that opens an inventory menu to select a bionic to mend, would make the whole thing much more intuitive. Doesn't even have to limit this mending to autoclave mending, it's enough if it still asks for "sterilize using autoclave/chemicals" after that, as long as it can be done from examine action. |
"name": "autoclave", | ||
"description": "This thing is basically an extremely high tech laundry machine or dishwasher. It steams things at temperatures that will kill almost anything.", | ||
"name": "laboratory autoclave", | ||
"description": "This thing is basically an extremely high tech laundry machine or dishwasher. It steams things at temperatures that will kill almost anything. It could be used help to 'm'end bionics that need sterilization.", |
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.
Descriptions generally don't name default keybinds.
"time": "80 m", | ||
"skills": [ { "id": "electronics", "level": 1 }, { "id": "firstaid", "level": 3 } ], | ||
"requirements": { | ||
"tools": [ [ [ "autoclave", 5000 ], [ "fake_autoclave", -1 ] ] ], |
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.
That second bit shouldn't be needed.
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.
The fake autoclave is what the laboratory ones use, which don't have grid connections and therefore can't be set to use charges.
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.
Alright, as long as they aren't movable and you have to get down to the lab to use them, it's tolerable.
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.
It's basically just replicating their previous infinite usage under the current format, yeah. Fun fact, you COULD drag the autoclaves around, this PR makes them not draggable among other changes.
src/map.cpp
Outdated
@@ -5069,6 +5046,24 @@ std::list<item> map::use_charges( const tripoint &origin, const int range, | |||
} | |||
} | |||
|
|||
if( autoclavepart ) { // we have a veh_forge, now to see what to drain |
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.
You forgot to edit the comment when CTRL+C+V-ing.
I'd have to look into how to add that I guess, though it would be odd bringing up the menu from examine action if you then selected An alternative might be to instead set it so trying to activate a faulty bionic instead brings up the mend menu? Maybe with an added side note saying "you can't self-install this, but want to at least mend it?" if Manual Bionic Installation isn't enabled. |
Split off the fix for deconstructing furniture autoclaves as its own PR so that can hopefully get fixed sooner. Now to tinker with the proposed menu/UI ideas sometime today. |
[ "chem_hydrogen_peroxide", 50 ], | ||
[ "chem_ethanol", 500 ], | ||
[ "denat_alcohol", 500 ], | ||
[ "bleach", 10 ] |
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.
Bleach is very common. Denaturated alcohol isn't allowed for bandages and so is rather low value.
I'd drop those two from the list or bump their numbers to be more comparable to how valuable they are.
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.
Given the large amount of dilute hydrogen peroxide required, the latter seems acceptable to me, sure.
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.
Bleach comes in gallon jugs of 30 and is not useful for most stuff. Hydrogen peroxide is a wound disinfectant (maybe shouldn't be, because muh realism) and a small bottle of it could easily be more valuable than a gallon jug of bleach. Especially at the point when you don't have an autoclave yet.
Looks like there is no good way of balancing bleach while keeping its usage reasonable here.
Ethanol is not cheap, it can be used to craft meds. But looks like I was wrong about denaturated alcohol, it only differs from ethanol in that it is not usable for food, but still is for meds.
With 500 alcohol, you can craft 6 bandages or 20 antiseptic.
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.
Ah, I can go ahead and remove bleach from the options then. I'd since bumped ethanol and denatured alcohol usage to 1000, should I keep it like that, or bump it up to 1250 (enough to make 50 antiseptic, thus matching amount of hydrogen peroxide used)?
EDIT: Had since then remembered to remove the bleach, doh.
Oh nice, the UI for selecting sterilizable bionics already exists, it only needs to be modified to use the new faults. The simplest hack would be to call the above function to pick an item, then call avatar &u = get_avatar();
item_location bionic = game_menus::inv::sterilize_cbm( u );
avatar_action::mend( u, bionic ); This will be imperfect because it will just open the mend menu and not preselect "sterilize with autoclave", but it would suffice for now. |
I'll need to work on it either later today or tomorrow, yes. Along with fixing the merge conflict. |
Crap, merged too fast because I mistook it for another PR. I'll revert for now, because UI is important. |
This reverts commit 19693cf.
Just mentioned that on the discord, I saw the merge and was a bit caught off guard by it. I still hadn't made any progress in fixing up the menu. |
* Overhaul sterilizing of CBMs, grid autoclaves * Update mods * Update game_inventory.cpp * Update game_inventory.cpp * Misc feedback updates * Couple more bits of feedback * Remembered to remove bleach * Update item.cpp
…m#1550)" (cataclysmbnteam#1664) This reverts commit 19693cf.
Summary
SUMMARY: Features "Sterilizing autoclaves now works via mending fault, allows use of autoclaves as tools and thus grid-powered autoclaves, alternative sterilization method"
Purpose of change
A while back, I realized that the bionic fault system could be used to give us ways to define how to sterilize bionics in JSON via mending. The key thing this enables is being able to implement grid autoclaves literally right this instant, instead of having to wait for however we'd end up implementing #937.
Describe the solution
C++ changes:
JSON changes:
PACK_CBM
use action from autoclave pouches.Describe alternatives you've considered
Testing
Additional context
Some concerns:
https://www.cdc.gov/infectioncontrol/guidelines/disinfection/disinfection-methods/chemical.html