/// <inheritdoc/> public bool Manual_PerformObjectDropInAction(SObject machine, SObject input, bool probe, Farmer who, MassProductionMachineDefinition mpm) { if (!probe && mpm != null) { try { InputInfo inputInfo = InputInfo.ConvertInput(input, 1); int inputQuantity = mpm.Settings.CalculateInputRequired(inputInfo); if (IsValidCrop(input) && input.Stack >= inputQuantity) { input.Stack -= inputQuantity; int seedID = SEED_LOOKUP[input.ParentSheetIndex]; Random random = new Random((int)Game1.stats.DaysPlayed + (int)Game1.uniqueIDForThisGame / 2 + (int)machine.TileLocation.X + (int)machine.TileLocation.Y * 77 + Game1.timeOfDay); int outputID = seedID; int outputQuantity = mpm.Settings.CalculateOutputProduced(random.Next(1, 4), inputInfo); if (random.NextDouble() < 0.005) { outputID = 499; outputQuantity = mpm.Settings.CalculateOutputProduced(1, inputInfo); } else if (random.NextDouble() < 0.02) { outputID = 770; outputQuantity = mpm.Settings.CalculateOutputProduced(random.Next(1, 5), inputInfo); } machine.heldObject.Value = new SObject(outputID, outputQuantity); machine.MinutesUntilReady = mpm.Settings.CalculateTimeRequired(20); return(true); } } catch (Exception e) { ModEntry.Instance.Monitor.Log($"{e}", StardewModdingAPI.LogLevel.Error); } } return(false); }