Ejemplo n.º 1
0
 void StartCooking(BaseOven oven, BaseEntity entity, float ovenMultiplier)
 {
     if (FindBurnable(oven) == null)
     {
         return;
     }
     oven.inventory.temperature = CookingTemperature(oven.temperature);
     oven.UpdateAttachmentTemperature();
     entity.CancelInvoke("Cook");
     entity.InvokeRepeating("Cook", 0.5f / ovenMultiplier, 0.5f / ovenMultiplier);
     entity.SetFlag(BaseEntity.Flags.On, true, false);
 }
Ejemplo n.º 2
0
 void StartCooking(BaseOven oven, BaseEntity entity, float ovenMultiplier)
 {
     if (FindBurnable(oven) == null)
     {
         return;
     }
     oven.inventory.temperature = CookingTemperature(oven.temperature);
     oven.UpdateAttachmentTemperature();
     InvokeHandler.CancelInvoke(entity.GetComponent <MonoBehaviour>(), new Action(oven.Cook));
     InvokeHandler.InvokeRepeating(entity.GetComponent <MonoBehaviour>(), new Action(oven.Cook), 0.5f / ovenMultiplier, 0.5f / ovenMultiplier);
     entity.SetFlag(BaseEntity.Flags.On, true, false);
 }
Ejemplo n.º 3
0
        //Overwriting Oven.StartCooking
		void StartCooking(BaseOven oven)
		{
            if ((Settings.UsePermissions && !permission.UserHasPermission(oven.OwnerID.ToString(), permAllow)))
            {
                oven.StartCooking();
                return;
            }
            if (FindBurnable(oven) == null)
            {
                return;
            }
            oven.UpdateAttachmentTemperature();
            var data = oven.transform.GetOrAddComponent<FurnaceData>();
            oven.CancelInvoke(oven.Cook);
            oven.InvokeRepeating(data.CookOverride, 0.5f, 0.5f);
            oven.SetFlag(BaseEntity.Flags.On, true, false);
        }