Skip to content

Commit

Permalink
Update EventPreferenceTrait.cs to use mood module method
Browse files Browse the repository at this point in the history
  • Loading branch information
MutantWafflez committed Jul 5, 2024
1 parent 3dc50cf commit 71340ae
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 1,6 @@
using System.Collections.Generic;
using LivingWorldMod.Content.TownNPCRevitalization.Globals.NPCs;
using LivingWorldMod.Utilities;
using Terraria.GameContent;
using Terraria.GameContent.Events;
using Terraria.GameContent.Personalities;
Expand All @@ -20,7 22,9 @@ public record struct EventPreference(AffectionLevel AffectionLevel, string Event

public void ModifyShopPrice(HelperInfo info, ShopHelper shopHelperInstance) {
if (ActiveEventFunctions[preference.EventName](info)) {
shopHelperInstance.AddHappinessReportText($"{preference.AffectionLevel}Event_{preference.EventName}");
// shopHelperInstance.AddHappinessReportText($"{preference.AffectionLevel}Event_{preference.EventName}");
info.npc.GetGlobalNPC<TownGlobalNPC>()
.MoodModule.ConvertReportTextToStaticModifier($"TownNPCMoodFlavorText.{info.npc.TypeName}".PrependModKey(), $"{preference.AffectionLevel}Event_{preference.EventName}");
}
}
}

0 comments on commit 71340ae

Please sign in to comment.