Ejemplo n.º 1
0
        public CraftingTime GetRawCraftingTimePerUnit(double amount = 1)
        {
            var result = new CraftingTime();

            result.AddTime(MaterialType, Converter.GetCraftingTime(MaterialType) * OneUnitFactor * amount);
            return(result);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///     TODO to define different timer
        /// </summary>
        /// <returns></returns>
        public CraftingTime GetTotalCraftingTime(double amount = 1)
        {
            Tabs += "   ";
            var time = new CraftingTime();

            time.AddTime(GetRawCraftingTimePerUnit(amount));

            // total time for one output unit
            foreach (var item in Converter.GetRequiredItemPerCrafting(MaterialType))
            {
                SimpleDebugger.PrintLine(Tabs + "Create Material: " + item.Value + " of " + item.Key);
                var material = new Material(item.Key);
                // reduce time for one output unit and add total time
                time.AddTime(material.GetTotalCraftingTime(item.Value * OneUnitFactor));
            }
            Tabs = Tabs.Remove(0, 3);
            return(time);
        }