Table of Contents

Class ChemistryStationRecipeBuilder

Namespace
S1API.Stations
Assembly
S1API.dll

Builder for creating Chemistry Station recipes at runtime.

public sealed class ChemistryStationRecipeBuilder
Inheritance
ChemistryStationRecipeBuilder
Inherited Members
Extension Methods

Constructors

ChemistryStationRecipeBuilder()

public ChemistryStationRecipeBuilder()

Methods

Build()

Builds and auto-registers the recipe with S1API.

public ChemistryStationRecipe Build()

Returns

ChemistryStationRecipe

WithCalculationMethod(QualityCalculationMethod)

Sets the quality calculation method.

public ChemistryStationRecipeBuilder WithCalculationMethod(QualityCalculationMethod method)

Parameters

method QualityCalculationMethod

Returns

ChemistryStationRecipeBuilder

WithCookTimeMinutes(int)

Sets the cook time (minutes).

public ChemistryStationRecipeBuilder WithCookTimeMinutes(int minutes)

Parameters

minutes int

Returns

ChemistryStationRecipeBuilder

WithFinalLiquidColor(Color)

Sets the final liquid UI color.

public ChemistryStationRecipeBuilder WithFinalLiquidColor(Color color)

Parameters

color Color

Returns

ChemistryStationRecipeBuilder

WithIngredient(string, int)

Adds a single ingredient requirement.

public ChemistryStationRecipeBuilder WithIngredient(string itemId, int quantity)

Parameters

itemId string
quantity int

Returns

ChemistryStationRecipeBuilder

WithIngredientOptions(IEnumerable<string>, int)

Adds an ingredient requirement with multiple acceptable item IDs (variants).

public ChemistryStationRecipeBuilder WithIngredientOptions(IEnumerable<string> itemIds, int quantity)

Parameters

itemIds IEnumerable<string>
quantity int

Returns

ChemistryStationRecipeBuilder

WithInitialAvailability(bool, bool)

Sets whether the recipe is discovered and unlocked when it is first registered.

public ChemistryStationRecipeBuilder WithInitialAvailability(bool isDiscovered, bool isUnlocked)

Parameters

isDiscovered bool

Whether the recipe is visible to the player.

isUnlocked bool

Whether the recipe can be selected and started.

Returns

ChemistryStationRecipeBuilder

This builder for method chaining.

Remarks

Both values default to true to preserve the behavior of recipes created before availability control was added. Use SetAvailability(bool, bool) to change the state later.

WithProduct(string, int)

Sets the product produced by the recipe.

public ChemistryStationRecipeBuilder WithProduct(string itemId, int quantity)

Parameters

itemId string
quantity int

Returns

ChemistryStationRecipeBuilder

WithRecipeId(string)

Sets the stable, mod-namespaced recipe identifier.

public ChemistryStationRecipeBuilder WithRecipeId(string recipeId)

Parameters

recipeId string

A namespaced identifier such as my-mod:alternate-route. IDs are matched case-insensitively, and the first registered recipe wins when IDs conflict.

Returns

ChemistryStationRecipeBuilder

This builder for method chaining.

Remarks

Validation occurs during Build(). When omitted, the legacy "{quantity}x{productId}" identifier is preserved.

WithTemperature(float, float)

Sets the cook temperature and tolerance.

public ChemistryStationRecipeBuilder WithTemperature(float cookTemperature, float tolerance)

Parameters

cookTemperature float
tolerance float

Returns

ChemistryStationRecipeBuilder

WithTitle(string)

Sets the UI title for the recipe.

public ChemistryStationRecipeBuilder WithTitle(string title)

Parameters

title string

Returns

ChemistryStationRecipeBuilder