Exemplo n.º 1
0
        void StopCooking(BaseOven oven)
        {
            var data = oven.transform.GetOrAddComponent <FurnaceData>();

            oven.CancelInvoke(data.CookOverride);
            oven.StopCooking();
        }
Exemplo n.º 2
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);
        }
Exemplo n.º 3
0
 public void OnDestroy()
 {
     entity.CancelInvoke();
 }