14 lines
377 B
GDScript
14 lines
377 B
GDScript
class_name RecipeBook
|
|
|
|
static var RECIPES_KNOWN:Array[Recipe.Id] = []
|
|
|
|
static func learnRecipe(recipeId:Recipe.Id) -> void:
|
|
if recipeId in RECIPES_KNOWN:
|
|
return
|
|
RECIPES_KNOWN.append(recipeId)
|
|
|
|
static func isRecipeKnown(recipeId:Recipe.Id) -> bool:
|
|
return recipeId in RECIPES_KNOWN
|
|
|
|
static func getKnownRecipes() -> Array[Recipe.Id]:
|
|
return RECIPES_KNOWN.duplicate() |