コード例 #1
0
ファイル: Recipe.cs プロジェクト: erraticengineer/CryoFall
        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();
        }
コード例 #2
0
ファイル: Recipe.cs プロジェクト: erraticengineer/CryoFall
 protected abstract void SetupRecipe(
     out TimeSpan craftDuration,
     out IProtoItem protoItemFuel,
     OutputItems outputItems);
コード例 #3
0
ファイル: Recipe.cs プロジェクト: erraticengineer/CryoFall
 protected abstract void SetupRecipe(
     out TimeSpan duration,
     InputItems inputItems,
     OutputItems outputItems,
     StationsList optionalStations);
コード例 #4
0
ファイル: Recipe.cs プロジェクト: erraticengineer/CryoFall
 protected abstract void SetupRecipe(
     StationsList stations,
     out TimeSpan duration,
     InputItems inputItems,
     OutputItems outputItems);