From 4429598658d08605f405438947fd2f3e00aeff91 Mon Sep 17 00:00:00 2001 From: Chev Date: Thu, 22 May 2025 01:47:49 -0700 Subject: [PATCH] Update config localization to use newer tModLoader standards --- LifeSourcesLight/LifeSourcesLightConfig.cs | 9 ++++----- .../en-US_Mods.LifeSourcesLight.hjson | 18 +++++++++--------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/LifeSourcesLight/LifeSourcesLightConfig.cs b/LifeSourcesLight/LifeSourcesLightConfig.cs index 0363ce3..b8d9aa8 100644 --- a/LifeSourcesLight/LifeSourcesLightConfig.cs +++ b/LifeSourcesLight/LifeSourcesLightConfig.cs @@ -4,19 +4,18 @@ using Terraria.ModLoader.Config; namespace LifeSourcesLight { - [Label("Config")] public class LifeSourcesLightConfig : ModConfig { public override ConfigScope Mode => ConfigScope.ClientSide; + [LabelKey("$Mods.LifeSourcesLight.Configs.Common.EnableHeartCrystalLight.Label")] + [TooltipKey("$Mods.LifeSourcesLight.Configs.Common.EnableHeartCrystalLight.Tooltip")] [DefaultValue(true)] - [Label("Enable Lighting for Heart Crystal")] - [Tooltip("Whether or not to enable lighting for the Heart Crystal.")] public bool EnableHeartCrystalLight { get; set; } + [LabelKey("$Mods.LifeSourcesLight.Configs.Common.EnableLifeFruitLight.Label")] + [TooltipKey("$Mods.LifeSourcesLight.Configs.Common.EnableLifeFruitLight.Tooltip")] [DefaultValue(true)] - [Label("Enable Lighting for Life Fruit")] - [Tooltip("Whether or not to enable lighting for the Life Fruit.")] public bool EnableLifeFruitLight { get; set; } public override void OnChanged() diff --git a/LifeSourcesLight/Localization/en-US_Mods.LifeSourcesLight.hjson b/LifeSourcesLight/Localization/en-US_Mods.LifeSourcesLight.hjson index ab9bbee..b6260bd 100644 --- a/LifeSourcesLight/Localization/en-US_Mods.LifeSourcesLight.hjson +++ b/LifeSourcesLight/Localization/en-US_Mods.LifeSourcesLight.hjson @@ -1,15 +1,15 @@ Configs: { - LifeSourcesLightConfig: { - DisplayName: Config + Common: { + EnableLifeFruitLight: { + Tooltip: Whether or not to enable lighting for the Life Fruit. + Label: Enable Lighting for Life Fruit + } EnableHeartCrystalLight: { - Label: Enable Lighting for Heart Crystal Tooltip: Whether or not to enable lighting for the Heart Crystal. - } - - EnableLifeFruitLight: { - Label: Enable Lighting for Life Fruit - Tooltip: Whether or not to enable lighting for the Life Fruit. + Label: Enable Lighting for Heart Crystal } } -} \ No newline at end of file + + LifeSourcesLightConfig.DisplayName: Config +}