Added Furnance and smelting
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using UnityEngine;
|
||||
|
||||
[CreateAssetMenu(fileName = "SmeltingRecipe", menuName = "FORT-BO/Workstations/Smelting Recipe")]
|
||||
public sealed class SmeltingRecipe : ScriptableObject
|
||||
{
|
||||
[SerializeField] private string recipeId;
|
||||
[SerializeField] private string displayName;
|
||||
[SerializeField] private ItemDefinition outputItem;
|
||||
[SerializeField, Min(1)] private int outputAmount = 1;
|
||||
[SerializeField, Min(0.01f)] private float metalCost = 25f;
|
||||
[SerializeField, Min(0.05f)] private float processingDuration = 3f;
|
||||
|
||||
public string RecipeId => recipeId;
|
||||
public string DisplayName => string.IsNullOrWhiteSpace(displayName) ? name : displayName;
|
||||
public ItemDefinition OutputItem => outputItem;
|
||||
public int OutputAmount => outputAmount;
|
||||
public float MetalCost => metalCost;
|
||||
public float ProcessingDuration => processingDuration;
|
||||
|
||||
private void OnValidate()
|
||||
{
|
||||
recipeId = recipeId?.Trim().ToLowerInvariant();
|
||||
displayName = displayName?.Trim();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user