Skip to content

Commit

Permalink
- Try to be nice to people
Browse files Browse the repository at this point in the history
  • Loading branch information
agilbert1412 committed Apr 1, 2024
1 parent 527886d commit 78670cf
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static void AddItemToInventory_Position_PrankDay_Postfix(Farmer __instanc
return;
}

DoZeldaAnimation(__instance, item, true);
DoPrankZeldaAnimation(__instance, item, true);
}
catch (Exception ex)
{
Expand All @@ -66,7 +66,7 @@ public static void AddItemToInventory_AffectedItems_PrankDay_Postfix(Farmer __in
return;
}

DoZeldaAnimation(__instance, item, true);
DoPrankZeldaAnimation(__instance, item, true);
}
catch (Exception ex)
{
Expand All @@ -75,8 +75,13 @@ public static void AddItemToInventory_AffectedItems_PrankDay_Postfix(Farmer __in
}
}

private static void DoZeldaAnimation(Farmer farmer, Item item, bool showMessage)
private static void DoPrankZeldaAnimation(Farmer farmer, Item item, bool showMessage)
{
if (Game1.random.NextDouble() > 0.05)
{
return;
}

farmer.completelyStopAnimatingOrDoingAction();
if (showMessage)
{
Expand All @@ -94,9 +99,10 @@ private static void DoZeldaAnimation(Farmer farmer, Item item, bool showMessage)
});
farmer.mostRecentlyGrabbedItem = item;
farmer.canMove = false;
if (Game1.random.NextDouble() < 0.05)

if (Game1.random.NextDouble() < 0.2)
{
Game1.chatBox.addMessage("April's Fool!", Color.Gold);
Game1.chatBox.addMessage("April's Fool! use !!fool to disable", Color.Gold);
}
}

Expand Down

0 comments on commit 78670cf

Please sign in to comment.