From 8ff995223df27ebbd583de4c042299ac42603c6b Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Wed, 8 Jun 2022 14:01:43 -0700 Subject: [PATCH] ShipRecoveryPoint: change respawn text on language change --- QSB/RespawnSync/ShipRecoveryPoint.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/QSB/RespawnSync/ShipRecoveryPoint.cs b/QSB/RespawnSync/ShipRecoveryPoint.cs index 1fec691e..78682aff 100644 --- a/QSB/RespawnSync/ShipRecoveryPoint.cs +++ b/QSB/RespawnSync/ShipRecoveryPoint.cs @@ -16,7 +16,12 @@ internal class ShipRecoveryPoint : MonoBehaviour private int _respawnIndex; private bool _wearingSuit; - private static readonly UITextType _respawnPlayerText = UIHelper.AddToUITable(QSBLocalization.Current.RespawnPlayer); + private static UITextType _respawnPlayerText; + + static ShipRecoveryPoint() => + QSBLocalization.LanguageChanged += () => + // language change clears the table, so we have to add this back + _respawnPlayerText = UIHelper.AddToUITable(QSBLocalization.Current.RespawnPlayer); private void Awake() { @@ -207,4 +212,4 @@ internal class ShipRecoveryPoint : MonoBehaviour enabled = false; } } -} \ No newline at end of file +}