Esempio n. 1
0
        protected sealed override void PrepareProto()
        {
            var inputItems  = new InputItems();
            var outputItems = new OutputItems();

            this.SetupRecipe(out var craftDuration, inputItems, outputItems);

            if (this.RecipeType != RecipeType.ManufacturingByproduct &&
                this.RecipeType != RecipeType.Manufacturing)
            {
                Api.Assert(inputItems.Count > 0, "Crafting recipe requires at least one input item.");
            }

            Api.Assert(outputItems.Count > 0, "Crafting recipe requires at least one output item.");

            this.OriginalDuration = craftDuration.TotalSeconds;
            this.InputItems       = inputItems.AsReadOnly();
            this.OutputItems      = outputItems.AsReadOnly();
        }
Esempio n. 2
0
 protected abstract void SetupRecipe(
     out TimeSpan craftDuration,
     out IProtoItem protoItemFuel,
     OutputItems outputItems);
Esempio n. 3
0
 protected abstract void SetupRecipe(
     out TimeSpan duration,
     InputItems inputItems,
     OutputItems outputItems,
     StationsList optionalStations);
Esempio n. 4
0
 protected abstract void SetupRecipe(
     StationsList stations,
     out TimeSpan duration,
     InputItems inputItems,
     OutputItems outputItems);