Rewrote BaseQuestFish's location implementation

This commit changes the way BaseQuestFish class renders its location text in both tooltip and quest description. Now the location text is written without quotation marks, and there is instead a "LocationTooltip" localization key which handles putting the location text into quotation marks for fish's description.
This change is mostly for easing up the localization work, as it is easier to do this than removing every single quotation marks possible via code.
This commit is contained in:
ZavarskiTheRealOne committed 2026-01-20 13:17:33 +08:00
1 parent 8b8373d0e9
commit 40abe6f014
3 files changed
+11 -10

No files matched your search

+2 -2
View File
@@ -152,8 +152,8 @@ namespace CalamityMod.Items
WhipAutomaticTooltips(item, tooltips, ref lastTooltipIndex);
// In GFB, replace all instances of "rogue" with "rouge".
string[] rogueKey = new string[] { CalamityUtils.GetTextValue($"Misc.GFBRogueUppercase"), CalamityUtils.GetTextValue($"Misc.GFBRogueLowercase") };
string[] rougeKey = new string[] { CalamityUtils.GetTextValue($"Misc.GFBRougeUppercase"), CalamityUtils.GetTextValue($"Misc.GFBRougeLowercase") };
string[] rogueKey = [CalamityUtils.GetTextValue($"Misc.GFBRogueUppercase"), CalamityUtils.GetTextValue($"Misc.GFBRogueLowercase")];
string[] rougeKey = [CalamityUtils.GetTextValue($"Misc.GFBRougeUppercase"), CalamityUtils.GetTextValue($"Misc.GFBRougeLowercase")];
for (int n = 0; n < rogueKey.Length; n++)
{
if (Main.zenithWorld && rogueKey[n] != "")
+2 -2
View File
@@ -14,7 +14,7 @@ namespace CalamityMod.Items.Fishing
public virtual LocalizedText Location => LocalizedText.Empty;
public new string LocalizationCategory => "Items.Fishing";
public override LocalizedText Tooltip => Location;
public override LocalizedText Tooltip => CalamityUtils.GetText($"Items.Fishing.LocationTooltip").WithFormatArgs(Location);
public override void SetStaticDefaults()
{
@@ -33,7 +33,7 @@ namespace CalamityMod.Items.Fishing
public override void AnglerQuestChat(ref string description, ref string catchLocation)
{
description = this.GetLocalizedValue("QuestDescription");
catchLocation = Location.ToString().Replace("'", string.Empty);
catchLocation = Location.ToString();
}
}
}
@@ -1,9 +1,10 @@
// Quest fish tooltips
CaughtInAstral: "'Caught in the Astral Infection'"
CaughtInBrimstoneCrag: "'Caught in the Brimstone Crag'"
CaughtInSnow: "'Caught in Tundra'"
CaughtInSpace: "'Caught in Sky Lakes'"
CaughtInSunkenSea: "'Caught in the Sunken Sea'"
// Quest fish tooltips
CaughtInAstral: Caught in the Astral Infection
CaughtInBrimstoneCrag: Caught in the Brimstone Crag
CaughtInSnow: Caught in Tundra
CaughtInSpace: Caught in Sky Lakes
CaughtInSunkenSea: Caught in the Sunken Sea
LocationTooltip: "'{0}'"
// Astral Infection Catches
AldebaranAlewife: {