Exemplo n.º 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);
            }
        }
Exemplo n.º 2
0
 public bool IsProducing(Recipe recipe) =>
 recipe && ProductionRoutines.ContainsKey(recipe) && ProductionRoutines[recipe] != null;
Exemplo n.º 3
0
 public bool IsRegistered(Recipe recipe) =>
 Recipes.Contains(recipe) && ProductionRoutines.ContainsKey(recipe) && ProductionPercentages.ContainsKey(recipe);