void StopCooking(BaseOven oven) { var data = oven.transform.GetOrAddComponent <FurnaceData>(); oven.CancelInvoke(data.CookOverride); oven.StopCooking(); }
//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); }
public void OnDestroy() { entity.CancelInvoke(); }