public static void Postfix(StardewValley.Objects.IndoorPot __instance, GameLocation location) { if (__instance.hoeDirt.Value?.crop == null && crop != null && crop.currentPhase.Value == crop.phaseDays.Count - 1) { location.debris.Add(new Debris(new SObject(crop.indexOfHarvest.Value, 1), __instance.TileLocation * 64f + new Vector2(32f, 32f))); } }
public static void Postfix(StardewValley.Objects.IndoorPot __instance, ref bool __result, Item dropInItem, bool probe, Farmer who) { if (__result || dropInItem == null || dropInItem.ParentSheetIndex != 499) { return; } if (who == null || !__instance.hoeDirt.Value.canPlantThisSeedHere( dropInItem.ParentSheetIndex, (int)__instance.TileLocation.X, (int)__instance.TileLocation.Y, dropInItem.Category == -19)) { return; } if (!probe) { __instance.hoeDirt.Value.plant(dropInItem.ParentSheetIndex, (int)__instance.TileLocation.X, (int)__instance.TileLocation.Y, who, dropInItem.Category == -19, who.currentLocation); Game1.hudMessages.Remove(Game1.hudMessages.FirstOrDefault(item => item.Message == Game1.parseText(Game1.content.LoadString("Strings\\Objects:AncientFruitPot"), Game1.dialogueFont, 384))); } else { __instance.heldObject.Value = new StardewValley.Object(); } __result = true; }
public static void Postfix(StardewValley.Objects.IndoorPot __instance, GameLocation location) { location.IsOutdoors = wasOutdoors; if (Game1.isRaining && location.IsOutdoors) { __instance.hoeDirt.Value.state.Value = 1; } __instance.showNextIndex.Value = __instance.hoeDirt.Value.state.Value == 1; }
public static void Prefix(StardewValley.Objects.IndoorPot __instance) { crop = __instance.hoeDirt.Value?.crop; }