Comments (2)
I guess this could potentially be modelled using different recipes, right? Maybe we can discuss here a bit how you would like to specify optional ingredients and their effects. You would need to specify the optional ingredient along with the desired effect (modifier) I suppose, like
"optionalIngredients" : [
{ "component" : "2*Cooking:salt", "effect" : "..." }
]
This would directly link the recipe to the properties of the resulting item. Can you think of a general way this could be defined?
from cooking.
Hmm, it could be modeled using different recipe prefabs. But, that causes issues when we have several minor variants and combinations of the same base food. For example, according to Wikipedia, Guacamole can have "tomato, onion, garlic, lemon or lime juice, chili or cayenne pepper, coriander (also known as cilantro) or basil, jalapeño, and/or additional seasonings." It gets more complex with things like bread, cookies, and cakes.
I suppose a mix of individual recipes per "base" food and optional ingredients is a good compromise. The above syntax was what I was thinking about for optionalIngredients. Technically, we could apply the same principle of optional ingredients/items to other things like potion, equipment, etc.
We at the very least need the name of the optional item and what effects it should have on the altered base product. We'll have an optionalIngredients list which stores elements of the type OptionalIngredient, a custom class containing the aforementioned two fields (name and effect). Though, we'll need some way to parse the effect.
from cooking.
Related Issues (9)
- Add WorkstationInGameHelp to Cooking Recipes HOT 2
- Cooking should depend on Hunger and Thirst or none of them HOT 2
- Change food/items icons HOT 10
- Adjust item icon padding HOT 4
- Adjust recipes over to new BasicCrafting format HOT 8
- cooking UI changes HOT 9
- Migrate Recipes to BasicCrafting Style HOT 1
- Add comments and documentation to all classes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cooking.