Example #1
0
        public void Register(Recipe recipe)
        {
            this.Log($"Production registry registering {recipe}");

            if (!Recipes.Contains(recipe))
            {
                Recipes.Add(recipe);
            }
            if (!ProductionRoutines.ContainsKey(recipe))
            {
                ProductionRoutines.Add(recipe, null);
            }
            if (!ProductionPercentages.ContainsKey(recipe))
            {
                ProductionPercentages.Add(recipe, 0);
            }
        }
Example #2
0
 public bool IsProducing(Recipe recipe) =>
 recipe && ProductionRoutines.ContainsKey(recipe) && ProductionRoutines[recipe] != null;
Example #3
0
 public bool IsRegistered(Recipe recipe) =>
 Recipes.Contains(recipe) && ProductionRoutines.ContainsKey(recipe) && ProductionPercentages.ContainsKey(recipe);