Don't do funny entry name prepend for modded facts

This commit is contained in:
Noah Pilarski 2022-09-02 15:45:01 -04:00
parent 7a457b8bb1
commit af89532c4e

View File

@ -230,5 +230,20 @@ namespace NewHorizons.Patches
AchievementHandler.OnRevealFact();
}
[HarmonyPrefix]
[HarmonyPatch(typeof(ShipLogFact), nameof(ShipLogFact.GetText))]
public static bool ShipLogFact_GetText(ShipLogFact __instance, ref string __result)
{
if (ShipLogHandler.IsModdedFact(__instance.GetID()))
{
__result = TranslationHandler.GetTranslation(__instance._text, TranslationHandler.TextType.SHIPLOG);
return false;
}
else
{
return true;
}
}
}
}