Added LegendaryItem base class for extended tooltips

This commit is contained in:
CongratsIsTrash committed 2024-09-17 01:53:35 -04:00
1 parent c86ab86131
commit f96c3d290a
2 files changed
+23

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
using Microsoft.Xna.Framework;
using Terraria.ModLoader;
namespace CalamityMod.Items
{
// Since all legendary items do not use the same localization category, ILocalizedModType must be placed on each individual item file.
public abstract class LegendaryItem : ModItem, IHoldShiftTooltipItem
{
// All legendary items use the same extension indicator tooltip.
// This is given a null color, as it is colored manually.
public string ExtensionIndicatorKey => "Items.Misc.LegendaryShortTooltip";
public Color? ExtensionIndicatorColor => null;
// All full flavor tooltips use the same localization key.
// Unfortunately, as full tooltip color is different for each item, it must be set manually.
public string TooltipExtensionKey => "LegendaryText";
}
}
@@ -326,6 +326,11 @@ ExhumeShortTooltip:
[c/C61B40:'Ah, are you curious what I saw within this item?']
[c/BABABA:Press "Left Shift" to listen]
'''
LegendaryShortTooltip:
'''
[c/FF6F00:Tales of legends past radiate around you...]
[c/BABABA:Press "Left Shift" to listen closer]
'''
AlicornonaStick: {
DisplayName: Alicorn on a Stick