From 99e987cb9ea474e6222d9d138d51db596c5a2ddc Mon Sep 17 00:00:00 2001 From: TuanAnh2901 Date: Sun, 28 Dec 2025 07:58:37 +0700 Subject: [PATCH] cost fix again (I'm so suck to commit things) --- BepInEx/Patches/GameObjects/AlmanacPlantWindow_Patch.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/BepInEx/Patches/GameObjects/AlmanacPlantWindow_Patch.cs b/BepInEx/Patches/GameObjects/AlmanacPlantWindow_Patch.cs index 347fdc0..5dc2db1 100644 --- a/BepInEx/Patches/GameObjects/AlmanacPlantWindow_Patch.cs +++ b/BepInEx/Patches/GameObjects/AlmanacPlantWindow_Patch.cs @@ -87,7 +87,8 @@ namespace PvZ_Fusion_Translator__BepInEx_.Patches.GameObjects { string info = plantInfo.info ?? ""; string introduce = plantInfo.introduce ?? ""; - __instance.showedPlantIntroduce.text = Utils.RemoveSizeTags(info) + "\n\n" + Utils.RemoveSizeTags(introduce) + "\n\n"; + char[] toTrim = Environment.NewLine.ToCharArray(); + __instance.showedPlantIntroduce.text = Utils.RemoveSizeTags(plantInfo.info) + "\n\n" + Utils.RemoveSizeTags(plantInfo.introduce) + "\n\n" + Utils.RemoveSizeTags(plantInfo.cost).TrimStart(toTrim) + "\n\n"; __instance.showedPlantIntroduce.font = fontAsset; __instance.showedPlantIntroduce.margin = new Vector4(6, 2, 12, 0); __instance.showedPlantIntroduce.enableWordWrapping = true; @@ -145,7 +146,8 @@ namespace PvZ_Fusion_Translator__BepInEx_.Patches.GameObjects { string info = plantInfo.info ?? ""; string introduce = plantInfo.introduce ?? ""; - __instance.showedPlantIntroduce.text = Utils.RemoveSizeTags(info) + "\n\n" + Utils.RemoveSizeTags(introduce) + "\n\n"; + char[] toTrim = Environment.NewLine.ToCharArray(); + __instance.showedPlantIntroduce.text = Utils.RemoveSizeTags(plantInfo.info) + "\n\n" + Utils.RemoveSizeTags(plantInfo.introduce) + "\n\n" + Utils.RemoveSizeTags(plantInfo.cost).TrimStart(toTrim) + "\n\n"; __instance.showedPlantIntroduce.font = fontAsset; __instance.showedPlantIntroduce.margin = new Vector4(6, 2, 12, 0); __instance.showedPlantIntroduce.enableWordWrapping = true;