Foods and stations
csharp
Content.Ingredient("tortilla")
.Name("Tortilla")
.Icon("icons/tortilla.png")
.Model("models/tortilla.obj", "textures/tortilla.png")
.PreparedModel("toasted", "models/tortilla.obj", "textures/tortilla-toasted.png")
.Crate()
.Preps("toasted");
Content.Station("comal")
.Name("Comal")
.Icon("icons/comal.png")
.On(StationBase.Hob)
.Prep("toasted", "Toasted")
.Time(6f)
.Model("models/comal.obj", "textures/comal.png", 0.9f)
.Accepts("tortilla");A tortilla from its crate goes on the comal, toasts in six seconds with a progress bar, turns into the toasted model, and goes on a plate.
Ingredients
csharp
public sealed class IngredientBuilder
{
public IngredientBuilder Name(string name);
public IngredientBuilder Category(string category);
public IngredientBuilder Icon(string png);
public IngredientBuilder Model(string obj, string png = null, float scale = 1f);
public IngredientBuilder LooksLike(string builtIn);
public IngredientBuilder Tint(string hex);
public IngredientBuilder Crate(string lidPng = null);
public IngredientBuilder Preps(params string[] preps);
public IngredientBuilder PreparedModel(string prep, string obj, string png = null, float scale = 1f);
}Model: its own OBJ and PNG. OrLooksLike("Tomato")borrows a built-in food's model, withTint("#7fb24a")over it. One of the two is required.Icon: shown in orders, on the plate and in the editor.Crate: the editor can place a crate of it. The lid showslidPng, or the icon.Preps: the preps it takes."chopped"is done on the game's chopping boards in three chops, and the food shows its chopped model from halfway. A food that takes"chopped"and a cooking prep is chopped first: only the chopped food goes on the cooking station. Any prep other than"chopped"needs a station of this addon that gives it. Without preps it goes on a plate as it is.PreparedModel: the model once it has that prep. Without one, a prepared food keeps the model. Models are built with their bottom at y = 0; the core sets them on counters, boards, plates and in a chef's hands, and lowers them into a pot's liquid.- A cooked food left on a cooking station burns: after 1.2 times the station's time (at least 8 seconds), with a warning sound and a red bar from halfway, it turns into a burnt food that matches no recipe. A burnt food shows its cooked model in dark grey.
Stations
csharp
public sealed class StationBuilder
{
public StationBuilder Name(string name);
public StationBuilder Category(string category);
public StationBuilder Icon(string png);
public StationBuilder On(StationBase kind); // Board, Hob (default), Oven, Fryer, Mixer
public StationBuilder Prep(string localPrep, string displayName = null);
public StationBuilder Time(float seconds); // 0.5 to 120, 8 by default
public StationBuilder Model(string obj, string png = null, float scale = 1f);
public StationBuilder Tint(string hex);
public StationBuilder Accepts(params string[] ingredients);
}On(StationBase.Board): a chef works it by hand, like chopping, and must stand at it. Every other kind cooks by itself once an ingredient is on it.Prep: the prep it gives."toasted"becomes"<addon id>/toasted"; recipes andPrepsname it"toasted"inside the addon.Model: drawn on the station's worktop, for a griddle or a pot.Tintcolours the station itself. A station that isn't a board shows a liquid in its model while it holds food, coloured like the food and darker once it's cooked or burnt, with a progress bar that faces the camera.Accepts: only these ingredients go on it. Without it, every ingredient that lists its prep does.
A station is an editor object: placed in a level, it takes the cell of a counter. Only the host changes what is on it, so it stays in step online.