Пример #1
0
 /*********
 ** Private methods
 *********/
 /// <summary>The method to call before <see cref="NPC.receiveGift"/>.</summary>
 /// <returns>Returns whether to run the original method.</returns>
 private static bool Before_ReceiveGift(NPC __instance, SObject o, Farmer giver, bool updateGiftLimitInfo, float friendshipChangeMultiplier, bool showResponse)
 {
     if (o is CustomObject customObj)
     {
         NpcPatcher.DoReceiveGift(__instance, customObj, giver, updateGiftLimitInfo, friendshipChangeMultiplier, showResponse);
         SpaceEvents.InvokeAfterGiftGiven(__instance, o, giver);
         return(false);
     }
     return(true);
 }
Пример #2
0
 /// <summary>The method to call after <see cref="NPC.receiveGift"/>.</summary>
 private static void After_ReceiveGift(NPC __instance, SObject o, Farmer giver, bool updateGiftLimitInfo = true, float friendshipChangeMultiplier = 1f, bool showResponse = true)
 {
     SpaceEvents.InvokeAfterGiftGiven(__instance, o, giver);
 }
Пример #3
0
 public static void Postfix(NPC __instance, StardewValley.Object o, Farmer giver, bool updateGiftLimitInfo = true, float friendshipChangeMultiplier = 1f, bool showResponse = true)
 {
     SpaceEvents.InvokeAfterGiftGiven(__instance, o, giver);
 }