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

Extracts and Concentrates pt 3 #37942

Merged

Conversation

NastyNate2612
Copy link
Contributor

@NastyNate2612 NastyNate2612 commented Feb 12, 2020

adds textbook extraction, small and large closed loop extractor on/off, and a buchner flask

Summary

SUMMARY: Content "2nd installment of my extracts and concentrates mod into mainline"

Describe the solution

-Buchner flask: required for vacuum assisted filtration
-small and large closed loop extractors on/off: used for extracting essential oils from organic material. must be on to operate
-textbook_extraction: all recipes are learned from this book
-makeshift ethanol extractor: another extraction method but this one using ethanol instead of butane

Testing

Crafted all items and ran all equipment. when batteries run out on the extractors the crafting is paused and can be resumed when more battery charges are available {i tried like 3 or 4 different ways of using this equipment and this seems to be the best way to simulate real time power usage without giving the user a chance to cheat the end result)

adds textbook extraction, small and large closed loop extractor on/off, and a buchner flask
@curstwist curstwist added [JSON] Changes (can be) made in JSON Items / Item Actions / Item Qualities Items and how they work and interact labels Feb 12, 2020
@wapcaplet
Copy link
Contributor

This is looking great, and nicely detailed! One small thing I’d suggest to help it pass the style checkers is to be sure there are two spaces between sentences in the item descriptions. You can see the ones it doesn’t like by using the “details” link next to any failed checks listed at the bottom of your PR.

Copy link
Member

@I-am-Erk I-am-Erk left a comment

Choose a reason for hiding this comment

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

Similarly, mostly just string fixes. I think the biggest one is buchner funnels. While they are different from glass flasks, I'm not sure they're different enough to merit being their own item. For one thing, it's possible to use a glass flask and a two-holed stopper to get the same vacuum trap function without a buchner (or any of several other designs). For another, anywhere you can find glass flasks you're also going to be finding buchner flasks, so I don't know that it helps much to track one specific subtype. There's a lot of potential creep there, and messiness with multiple recipes for items that could do the same job.

data/json/items/book/fabrication.json Outdated Show resolved Hide resolved
data/json/items/book/fabrication.json Outdated Show resolved Hide resolved
data/json/items/containers.json Outdated Show resolved Hide resolved
data/json/items/containers.json Outdated Show resolved Hide resolved
data/json/items/tool/science.json Outdated Show resolved Hide resolved
data/json/items/tool/science.json Outdated Show resolved Hide resolved
data/json/items/tool/science.json Outdated Show resolved Hide resolved
data/json/items/tool/science.json Outdated Show resolved Hide resolved
data/json/items/tool/science.json Outdated Show resolved Hide resolved
data/json/items/tool/science.json Outdated Show resolved Hide resolved
@NastyNate2612
Copy link
Contributor Author

Similarly, mostly just string fixes. I think the biggest one is buchner funnels. While they are different from glass flasks, I'm not sure they're different enough to merit being their own item. For one thing, it's possible to use a glass flask and a two-holed stopper to get the same vacuum trap function without a buchner (or any of several other designs). For another, anywhere you can find glass flasks you're also going to be finding buchner flasks, so I don't know that it helps much to track one specific subtype. There's a lot of potential creep there, and messiness with multiple recipes for items that could do the same job.

Ive never used 2 hole stoppers before. can you put a funnel on one of those and it still function the same as a buchner flask? i think the funnel that goes with it is called a buchner funnel too but ive never referred to it as that, just a funnel that can hold filter paper.

@NastyNate2612
Copy link
Contributor Author

i didnt add seperatory funnels because u could make a metal funnel work in a pinch, but it would be super messy and no fun to clean up. i might need to add another funnel type

@I-am-Erk
Copy link
Member

Separatory funnels, funnel_separation are already in game. Not sure if you're referring to those or not.

For a vacuum flask, any system with two sealed ports will work. In medicine we use these regularly and I'm pretty confident you could rig one up as a vacuum funnel system pretty easily. Rigs along these lines in various ways are common setups for a vacuum flask without a side adaptor.

Buchner flasks are great and useful but they're not a necessity.

@NastyNate2612
Copy link
Contributor Author

Ok fair enough, no i wasnt talking about an actual seperatory funnel like what you would use with a hexane wash, just the ceramic funnels with the slotted bottom in it to so the filter paper doesnt get sucked into the flask

NastyNate2612 and others added 5 commits February 12, 2020 22:52
Co-Authored-By: I-am-Erk <45136638+I-am-Erk@users.noreply.github.com>
Co-Authored-By: I-am-Erk <45136638+I-am-Erk@users.noreply.github.com>
@I-am-Erk
Copy link
Member

Ah, gotcha. You're talking about something like a Hirsch funnel. That falls under the same category as Buchner flasks: convenient if you have it, but by no means necessary. I don't think you need to model that. I can get just as nice a filter set up in a plain conical funnel or a flat-bottom funnel for example.

@NastyNate2612
Copy link
Contributor Author

Ah, gotcha. You're talking about something like a Hirsch funnel. That falls under the same category as Buchner flasks: convenient if you have it, but by no means necessary. I don't think you need to model that. I can get just as nice a filter set up in a plain conical funnel or a flat-bottom funnel for example.

If we're gonna get rid of the buchner flask then one thing i could do is make the crafting time longer for the filtered product since without the proper equipment your most likely gonna have to filter it 3 or 4 times to get the same result as a once or twice pass through. Also we can add the 2-hole stopper item if we want to get technical. which eventually i believe technical is the end result we're trying to achieve with systems like this one.

@I-am-Erk
Copy link
Member

I-am-Erk commented Feb 13, 2020

If we're gonna get rid of the buchner flask then one thing i could do is make the crafting time longer for the filtered product since without the proper equipment your most likely gonna have to filter it 3 or 4 times to get the same result as a once or twice pass through. Also we can add the 2-hole stopper item if we want to get technical. which eventually i believe technical is the end result we're trying to achieve with systems like this one.

We're actually aiming for a sweet spot between "technical" and "representative", leaning a little more on the technical side.

Removing Buchner flasks and using regular funnels instead of Hirsch funnels doesn't mean we assume the player doesn't have them. It's just that they're easily jury rigged (I guarantee, a properly folded filter paper in a conical funnel is no worse than a hirsch funnel and in some ways better), so the exact item ID requirement isn't fair, and the items you need can all largely be looted in the same place, so it doesn't add a lot of difficulty.

There is the option to add a number of sub-items representing, for example, a vacuum flask setup. You could make an item like a "vacuum trap flask" instead of a buchner flask, and have it craftable with a glass_flask, two-hole stopper, and two glass tubes, for example, if you feel very strongly that you need to model the specific setup of the flask. For the funnel, I have too many years of filter paper origami experience to believe any argument that's going to end with "hirsch funnels are more efficient".

@NastyNate2612
Copy link
Contributor Author

NastyNate2612 commented Feb 13, 2020

lol filter paper origami experience omg that would drive me crazy. i would never want to attempt that unless absolutely necessary, which in the zombie apocalypse it will be absolutely necessary. I dont really feel the need to make some kind of variation because in actuality in an apocalypse i would just shove somethin in the bottom of the funnel to keep the paper from sucking in. As long as the vacuum pump and a funnel is a required item i think that gets the point across what it is ur actually doing with it. I was going for more realism because of the lack of graphical animations, when theres just text for some people i try to be as descriptive and realistic as possible. It feels a little weird substituting/using different equipment than what you would normally use in this type of lab setup but im down for swapping out stuff for the sake of cleaning up too many crafting recipes and too many similar id items.

@NastyNate2612
Copy link
Contributor Author

what am i missing here to get this to pass the c++ check? we got pt 1 to clear that check after clearing up all the string names and added spacing after periods and such, so not sure what i missed on this one.

@wapcaplet
Copy link
Contributor

wapcaplet commented Feb 13, 2020

what am i missing here to get this to pass the c++ check?

From the errors, it looks like the EXTRACT quality is undefined:

09:27:34.759 ERROR : src/generic_factory.h:356 [const T& generic_factory<T>::obj(const string_id<T>&) const [with T = quality]] invalid tool quality id "EXTRACT"
09:27:39.974 ERROR : src/item_factory.cpp:1193 [void Item_factory::check_definitions() const] warnings for type closed_loop_extractor_large_on:
item closed_loop_extractor_large_on has unknown quality EXTRACT
09:27:40.001 ERROR : src/item_factory.cpp:1193 [void Item_factory::check_definitions() const] warnings for type closed_loop_extractor_small_on:
item closed_loop_extractor_small_on has unknown quality EXTRACT

I think maybe data/json/tool_qualities.json needs an entry for it as well? This PR doesn't appear to include that.

Sorry to butt in, hope this helps :-)

@NastyNate2612
Copy link
Contributor Author

The tool qualities is in the next PR I think. Do tool qualities need to be added in with c++ coding as well? If so then that makes sense why my crafting recipes didnt acknowledge the tool quality requirements for EXTRACT, CONCENTRATE, or FINE_DISTILL, had to add the tool as a requirement to make up for it

@I-am-Erk
Copy link
Member

Tool qualities are straight JSON. You might want to migrate them into this PR though, since these tools require them. Or label this one pt3 and the other one pt2.

@NastyNate2612
Copy link
Contributor Author

Tool qualities are straight JSON. You might want to migrate them into this PR though, since these tools require them. Or label this one pt3 and the other one pt2.

Ok gotcha, Tool qualities for the items is in pt 3 so ill just rename the PR's. On a side note that doesn't really explain why my recipes didn't require the lab_still even though they had the quality requirement for FINE_DISTILL on the recipe, i had to add the still as a tool in order for the recipe to acknowledge it. ill run another test to see but that is a bit weird. i was working on it super late multiple nights though so i could have just been really tired.

@NastyNate2612 NastyNate2612 changed the title Extracts and Concentrates pt 2 Extracts and Concentrates pt 3 Feb 14, 2020
@NastyNate2612
Copy link
Contributor Author

Soooo yeah I must have just been super tired because I put "qualitities" down for like 20 lines of recipe code. Oops... fixed it though, works good now

@ZhilkinSerg ZhilkinSerg changed the base branch from master to dev March 16, 2020 12:03
@ZhilkinSerg ZhilkinSerg force-pushed the dev branch 3 times, most recently from 924f105 to 39e00e3 Compare March 18, 2020 07:00
@ZhilkinSerg ZhilkinSerg force-pushed the dev branch 3 times, most recently from ad63e77 to 8e68539 Compare April 1, 2020 12:18
@kevingranade kevingranade force-pushed the dev branch 4 times, most recently from 621a68e to b7106d0 Compare April 2, 2020 07:42
@ZhilkinSerg ZhilkinSerg force-pushed the dev branch 3 times, most recently from 0f30a43 to d432807 Compare April 2, 2020 12:55
@ZhilkinSerg ZhilkinSerg changed the base branch from dev to master April 2, 2020 21:46
@kevingranade kevingranade merged commit efb865c into CleverRaven:master Apr 26, 2020
Drewscriver pushed a commit to Drewscriver/Cataclysm-DDA that referenced this pull request Apr 30, 2020
adds textbook extraction, small and large closed loop extractor on/off, and a crude oil extractor.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Items / Item Actions / Item Qualities Items and how they work and interact [JSON] Changes (can be) made in JSON
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants