A better way to add color to legendary item flavor tooltips

This commit is contained in:
CongratsIsTrash committed 2024-11-08 14:47:21 -05:00
1 parent c3c1e297f4
commit 1d1e23b0ed
3 files changed
+8 -5

No files matched your search

+2 -1
View File
@@ -12,7 +12,8 @@ namespace CalamityMod.Items
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.
// Flavor tooltip color defaults to none, but can be overriden as desired for each item.
public string TooltipExtensionKey => "LegendaryText";
public virtual Color? TooltipExtensionColor => null;
}
}
+2
View File
@@ -33,6 +33,8 @@ namespace CalamityMod.Items.Weapons.Magic
public const float SightHomingRange = 288f; // Range of homing for Sight bombs, in pixels
public const int FrightFlatDamage = 20;
public override Color? TooltipExtensionColor => new Color(31, 251, 255);
public override void SetStaticDefaults() => ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true;
public override void SetDefaults()
@@ -786,10 +786,10 @@ SHPC: {
'''
LegendaryText:
'''
[c/1FFBFF:'Though soul-powered machines were a near failure, potential remained in souls as a form of fuel.]
[c/1FFBFF:To avoid my last experiments' main flaw, the Soul-Harnessing Plasma Cannon was designed to expel souls as projectiles before they exert control over the weapon.]
[c/1FFBFF:Each soul type appears to react differently to the base plasma. Yet, lacking volunteers, obtaining potential ammunition is currently too difficult to undergo further testing.]
[c/1FFBFF:A shame, for a weapon that could have practically unlimited ammunition in the battlefield. Perhaps some day, its potential can be truly tested.']
'Though soul-powered machines were a near failure, potential remained in souls as a form of fuel.
To avoid my last experiments' main flaw, the Soul-Harnessing Plasma Cannon was designed to expel souls as projectiles before they exert control over the weapon.
Each soul type appears to react differently to the base plasma. Yet, lacking volunteers, obtaining potential ammunition is currently too difficult to undergo further testing.
A shame, for a weapon that could have practically unlimited ammunition in the battlefield. Perhaps some day, its potential can be truly tested.'
'''
TooltipGFB: It scales again :)
}