Skip to content

Commit 0c3cf20

Browse files
authored
Fix Pelt Name when Trader says the line
* Essentially fixes the pelt names as the trader would call them.
1 parent 186cd59 commit 0c3cf20

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

InscryptionAPI/Pelts/PeltManager.cs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,21 +210,30 @@ internal static void CreateDialogueEvents()
210210
DialogueManager.GenerateEvent(InscryptionAPIPlugin.ModGUID, dialogueId,
211211
new()
212212
{
213-
name + " pelts..."
213+
if (cardName.Contains("pelt") || cardName.Contains("pelt") {
214+
215+
name + "pelts..."
216+
} else {
217+
name + "..."
214218
});
215219
}
216220
}
217221
}
218222

219223
public static string GetTierNameFromPelt(string cardName)
220224
{
221-
string result = cardName.ToLowerInvariant().Replace("pelt", "").Replace(" ", "");
222-
result = result.Split('_').Last().ToTitleCase();
225+
if (cardName.Contains("pelt") || cardName.Contains("pelt") {
226+
string result = cardName.ToLowerInvariant().Replace("pelt", "").Replace("pelts", "");
227+
result = result.Split('_').Last().ToTitleCase();
228+
} else {
229+
string result = cardName.ToLowerInvarient();
230+
result = result.Split('_').Last().ToTitleCase();
231+
}
223232

224233
return result;
225234
}
226235
public static string GetTierNameFromData(PeltData peltData)
227236
{
228237
return peltData.peltTierName ?? GetTierNameFromPelt(peltData.peltCardName);
229238
}
230-
}
239+
}

0 commit comments

Comments
 (0)