From 354e2876e93bf45ca6b748e9eb23093fe9bffaa6 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Fri, 25 Oct 2024 12:16:44 +0500 Subject: feat: LocalizationManager + removed unused lines and classes --- core/src/kz/ilotterytea/maxon/pets/Pet.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'core/src/kz/ilotterytea/maxon/pets') diff --git a/core/src/kz/ilotterytea/maxon/pets/Pet.java b/core/src/kz/ilotterytea/maxon/pets/Pet.java index 521df0c..0106439 100644 --- a/core/src/kz/ilotterytea/maxon/pets/Pet.java +++ b/core/src/kz/ilotterytea/maxon/pets/Pet.java @@ -7,6 +7,7 @@ import com.badlogic.gdx.utils.GdxRuntimeException; import kz.ilotterytea.maxon.MaxonConstants; import kz.ilotterytea.maxon.MaxonGame; import kz.ilotterytea.maxon.anim.SpriteUtils; +import kz.ilotterytea.maxon.localization.LineId; import kz.ilotterytea.maxon.ui.AnimatedImage; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -52,12 +53,12 @@ public class Pet { AnimatedImage icon = new AnimatedImage(regions, 5); - String name = game.locale.TranslatableText("pet." + id + ".name"); + String name = game.getLocale().getLine(LineId.fromJson("pet." + id + ".name")); if (name == null) { name = "pet." + id + ".name"; } - String description = game.locale.TranslatableText("pet." + id + ".desc"); + String description = game.getLocale().getLine(LineId.fromJson("pet." + id + ".desc")); if (description == null) { description = "pet." + id + ".desc"; } -- cgit v1.2.3