Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
JohnCorby 2022-08-16 16:20:14 -07:00
commit bdb6ccfa4f
4 changed files with 31 additions and 12 deletions

View File

@ -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);
}
}
}

View File

@ -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<DeathType, string[]> DeathMessages;
}

View File

@ -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" + " <CMD>", ScreenPrompt.MultiCommandType.HOLD_ONE_AND_PRESS_2ND);
private static readonly ScreenPrompt _detachPrompt = new(InputLibrary.cancel, "Detach from ship" + " <CMD>");
private static readonly ScreenPrompt _attachPrompt = new(
InputLibrary.interactSecondary,
InputLibrary.interact,
QSBLocalization.Current.AttachToShip + " <CMD>",
ScreenPrompt.MultiCommandType.HOLD_ONE_AND_PRESS_2ND);
private static readonly ScreenPrompt _detachPrompt = new(
InputLibrary.cancel,
QSBLocalization.Current.DetachFromShip + " <CMD>");
private PlayerAttachPoint _playerAttachPoint;
private void Awake()

View File

@ -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",