static bool NPCCheckForAction_Prefix(NPC __instance, Farmer who, ref bool __result) { if (who.ActiveObject?.ParentSheetIndex == giftID) { temp = who.ActiveObject; var fd = who.friendshipData; if (fd.ContainsKey(__instance.Name) && fd[__instance.Name].GiftsToday != 0) { who.ActiveObject = null; } else { // ok, we gave somebody a gift, let's see what we got for them givingGift = getGift(__instance); if (givingGift == null) { // TODO: message here return(false); } var giveObj = new StardewValley.Object(givingGift.Obj.ParentSheetIndex, 1, quality: givingGift.Obj.Quality); who.ActiveObject = giveObj; Bubbles.Add(__instance, giveObj.ParentSheetIndex); } } return(true); }
private void RenderBubbles(object sender, RenderedEventArgs e) { Bubbles.Render(e.SpriteBatch); }
private void Tick(object sender, UpdateTickedEventArgs e) { Bubbles.Tick(); }