From 62c0cedc1141149eb4e1dbfbc1dce334e675d344 Mon Sep 17 00:00:00 2001 From: Sebastian Gabl Date: Sat, 24 Mar 2018 10:54:31 +0100 Subject: [PATCH] Add LocalizationManager.exists for custom strings --- mods/base/lua/LocalizationManager.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mods/base/lua/LocalizationManager.lua b/mods/base/lua/LocalizationManager.lua index cdc2381..e2c4790 100644 --- a/mods/base/lua/LocalizationManager.lua +++ b/mods/base/lua/LocalizationManager.lua @@ -9,6 +9,16 @@ function LocalizationManager.init( self ) Hooks:Call( "LocalizationManagerPostInit", self ) end +function LocalizationManager.exists( self, str ) + + if self._custom_localizations[str] then + return true + end + + return self.orig.exists(self, str) + +end + function LocalizationManager.text( self, str, macros ) if self._custom_localizations[str] then