Skip to content

Commit

Permalink
show name in buff tip
Browse files Browse the repository at this point in the history
  • Loading branch information
direwolf420 committed Apr 27, 2019
1 parent 04c7f28 commit ad2af4b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
21 changes: 21 additions & 0 deletions PRBuff.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using Terraria;
using Terraria.ModLoader;

namespace PetRenamer
{
class PRBuff : GlobalBuff
{
public override void ModifyBuffTip(int type, ref string tip, ref int rare)
{
PRPlayer petPlayer = Main.LocalPlayer.GetModPlayer<PRPlayer>();
if (Main.vanityPet[type] && petPlayer.petNameVanity != "")
{
tip += "\nName: " + petPlayer.petNameVanity;
}
else if(Main.lightPet[type] && petPlayer.petNameLight != "")
{
tip += "\nName: " + petPlayer.petNameLight;
}
}
}
}
1 change: 1 addition & 0 deletions PetRenamer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="PRBuff.cs" />
<Compile Include="PRCommand.cs" />
<Compile Include="PRMouseUI.cs" />
<Compile Include="PRPlayer.cs" />
Expand Down
5 changes: 4 additions & 1 deletion description.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ Changelog:

v1.0.0.2: Narrowed down detection of pet summoning items, if you had any previous items set to a name that weren't a pet, they will be reset upon game quit

v1.0 and 1.0.0.1: Initial release and added icon
v1.0 and 1.0.0.1: Initial release and added icon

Mod recommendations:
AssortedCrazyThings = Adds alot of pets mostly fit around vanilla

0 comments on commit ad2af4b

Please sign in to comment.