float CookingTemperature(BaseOven.TemperatureType temperature)
        {
            switch (temperature)
            {
            case BaseOven.TemperatureType.Warming:
                return(50f);

            case BaseOven.TemperatureType.Cooking:
                if (cookInFurnaces)
                {
                    return(1000f);
                }
                else
                {
                    return(200f);
                }

            case BaseOven.TemperatureType.Smelting:
                return(1000f);

            case BaseOven.TemperatureType.Fractioning:
                return(1500f);

            default:
                return(15f);
            }
        }
Exemple #2
0
 public virtual void StartCooking()
 {
     if (this.FindBurnable() == null)
     {
         return;
     }
     this.inventory.temperature = this.cookingTemperature;
     this.UpdateAttachmentTemperature();
     this.InvokeRepeating(new Action(this.Cook), 0.5f, 0.5f);
     this.SetFlag(BaseEntity.Flags.On, true, false, true);
 }
Exemple #3
0
 public virtual void StopCooking()
 {
     this.UpdateAttachmentTemperature();
     if (this.inventory != null)
     {
         this.inventory.temperature = 15f;
         foreach (Item obj in this.inventory.itemList)
         {
             if (obj.HasFlag(Item.Flag.OnFire))
             {
                 obj.SetFlag(Item.Flag.OnFire, false);
                 obj.MarkDirty();
             }
         }
     }
     this.CancelInvoke(new Action(this.Cook));
     this.SetFlag(BaseEntity.Flags.On, false, false, true);
 }