Class ChemistryStationRecipeBuilder
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
WithCalculationMethod(QualityCalculationMethod)
Sets the quality calculation method.
public ChemistryStationRecipeBuilder WithCalculationMethod(QualityCalculationMethod method)
Parameters
methodQualityCalculationMethod
Returns
WithCookTimeMinutes(int)
Sets the cook time (minutes).
public ChemistryStationRecipeBuilder WithCookTimeMinutes(int minutes)
Parameters
minutesint
Returns
WithFinalLiquidColor(Color)
Sets the final liquid UI color.
public ChemistryStationRecipeBuilder WithFinalLiquidColor(Color color)
Parameters
colorColor
Returns
WithIngredient(string, int)
Adds a single ingredient requirement.
public ChemistryStationRecipeBuilder WithIngredient(string itemId, int quantity)
Parameters
Returns
WithIngredientOptions(IEnumerable<string>, int)
Adds an ingredient requirement with multiple acceptable item IDs (variants).
public ChemistryStationRecipeBuilder WithIngredientOptions(IEnumerable<string> itemIds, int quantity)
Parameters
itemIdsIEnumerable<string>quantityint
Returns
WithInitialAvailability(bool, bool)
Sets whether the recipe is discovered and unlocked when it is first registered.
public ChemistryStationRecipeBuilder WithInitialAvailability(bool isDiscovered, bool isUnlocked)
Parameters
isDiscoveredboolWhether the recipe is visible to the player.
isUnlockedboolWhether 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
Returns
WithRecipeId(string)
Sets the stable, mod-namespaced recipe identifier.
public ChemistryStationRecipeBuilder WithRecipeId(string recipeId)
Parameters
recipeIdstringA 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
Returns
WithTitle(string)
Sets the UI title for the recipe.
public ChemistryStationRecipeBuilder WithTitle(string title)
Parameters
titlestring