Beispiel #1
0
        private void RefreshLiquidType()
        {
            var recipeInputLiquid =
                this.ViewModelManufacturingState.SelectedRecipe?.InputItems[0].ProtoItem as IProtoItemLiquidStorage;
            var liquidType = recipeInputLiquid?.LiquidType
                             ?? this.privateState.LiquidType;

            (this.LiquidColor, this.LiquidIcon) = LiquidColorIconHelper.GetColorAndIcon(liquidType);
        }
        private void RefreshLiquidType()
        {
            IProtoItemLiquidStorage recipeInputLiquid;

            if (!this.ViewModelManufacturingState.ManufacturingState.HasActiveRecipe)
            {
                recipeInputLiquid = null;
            }
            else
            {
                recipeInputLiquid =
                    this.ViewModelManufacturingState.SelectedRecipe?.InputItems[0].ProtoItem as IProtoItemLiquidStorage;
            }

            var liquidType = recipeInputLiquid?.LiquidType
                             ?? this.privateState.LiquidType;

            (this.LiquidColor, this.LiquidIcon) = LiquidColorIconHelper.GetColorAndIcon(liquidType);
            this.LiquidTitle = liquidType?.GetDescription();
        }