diff --git a/QSB/DeathSync/RespawnOnDeath.cs b/QSB/DeathSync/RespawnOnDeath.cs index d93c09e3..9968c1f9 100644 --- a/QSB/DeathSync/RespawnOnDeath.cs +++ b/QSB/DeathSync/RespawnOnDeath.cs @@ -1,4 +1,5 @@ using OWML.Common; +using QSB.Localization; using QSB.Player; using QSB.Player.TransformSync; using QSB.RespawnSync; @@ -146,14 +147,14 @@ public class RespawnOnDeath : MonoBehaviour // it is good day to be not dead - if (ShipManager.Instance.IsShipWrecked) - { - GUI.Label(new Rect((Screen.width / 2) - (width / 2), (Screen.height / 2) - (height / 2) + (height * 2), width, height), $"You are dead.\nWaiting for {QSBPlayerManager.PlayerList.Count(x => !x.IsDead)} player(s) to die...", _deadTextStyle); - } - else - { - GUI.Label(new Rect((Screen.width / 2) - (width / 2), (Screen.height / 2) - (height / 2) + (height * 2), width, height), "You are dead.\nWaiting for someone to respawn you...", _deadTextStyle); - } + var secondText = ShipManager.Instance.IsShipWrecked + ? string.Format(QSBLocalization.Current.WaitingForAllToDie, QSBPlayerManager.PlayerList.Count(x => !x.IsDead)) + : QSBLocalization.Current.WaitingForRespawn; + + GUI.Label( + new Rect((Screen.width / 2) - (width / 2), (Screen.height / 2) - (height / 2) + (height * 2), width, height), + $"{QSBLocalization.Current.YouAreDead}\n{secondText}", + _deadTextStyle); } } } \ No newline at end of file diff --git a/QSB/Localization/Translation.cs b/QSB/Localization/Translation.cs index fc77c873..72addba5 100644 --- a/QSB/Localization/Translation.cs +++ b/QSB/Localization/Translation.cs @@ -44,5 +44,10 @@ public class Translation public string TimeSyncWaitForAllToReady; public string TimeSyncWaitForAllToDie; public string GalaxyMapEveryoneNotPresent; + public string YouAreDead; + public string WaitingForRespawn; + public string WaitingForAllToDie; + public string AttachToShip; + public string DetachFromShip; public Dictionary DeathMessages; } diff --git a/QSB/ShipSync/ShipCustomAttach.cs b/QSB/ShipSync/ShipCustomAttach.cs index 6ce9adc2..9d0fa9ef 100644 --- a/QSB/ShipSync/ShipCustomAttach.cs +++ b/QSB/ShipSync/ShipCustomAttach.cs @@ -1,12 +1,20 @@ -using UnityEngine; +using QSB.Localization; +using UnityEngine; namespace QSB.ShipSync; public class ShipCustomAttach : MonoBehaviour { - private static readonly ScreenPrompt _attachPrompt = new(InputLibrary.interactSecondary, InputLibrary.interact, - "Attach to ship" + " ", ScreenPrompt.MultiCommandType.HOLD_ONE_AND_PRESS_2ND); - private static readonly ScreenPrompt _detachPrompt = new(InputLibrary.cancel, "Detach from ship" + " "); + private static readonly ScreenPrompt _attachPrompt = new( + InputLibrary.interactSecondary, + InputLibrary.interact, + QSBLocalization.Current.AttachToShip + " ", + ScreenPrompt.MultiCommandType.HOLD_ONE_AND_PRESS_2ND); + + private static readonly ScreenPrompt _detachPrompt = new( + InputLibrary.cancel, + QSBLocalization.Current.DetachFromShip + " "); + private PlayerAttachPoint _playerAttachPoint; private void Awake() diff --git a/QSB/Translations/en.json b/QSB/Translations/en.json index d8111baf..e0605cfc 100644 --- a/QSB/Translations/en.json +++ b/QSB/Translations/en.json @@ -39,6 +39,11 @@ "TimeSyncWaitForAllToReady": "Waiting for start of loop...", "TimeSyncWaitForAllToDie": "Waiting for end of loop...", "GalaxyMapEveryoneNotPresent": "It's not yet time. Everyone should be here to witness this.", + "YouAreDead": "You are dead.", + "WaitingForRespawn": "Waiting for someone to respawn you...", + "WaitingForAllToDie": "Waiting for {0} player(s) to die...", + "AttachToShip": "Attach to ship", + "DetachFromShip": "Detach from ship", "DeathMessages": { "Default": [ "{0} died",