mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-01 03:32:38 +00:00
move messages to chat, add noise
This commit is contained in:
parent
8f317512a4
commit
57dec490be
@ -1,5 +1,6 @@
|
||||
using Mirror;
|
||||
using QSB.ClientServerStateSync;
|
||||
using QSB.HUD;
|
||||
using QSB.Messaging;
|
||||
using QSB.Player;
|
||||
using QSB.RespawnSync;
|
||||
@ -40,7 +41,7 @@ public class PlayerDeathMessage : QSBMessage<DeathType>
|
||||
var deathMessage = Necronomicon.GetPhrase(Data, NecronomiconIndex);
|
||||
if (deathMessage != null)
|
||||
{
|
||||
DebugLog.ToAll(string.Format(deathMessage, playerName));
|
||||
MultiplayerHUDManager.Instance.WriteMessage($"<color=brown>{string.Format(deathMessage, playerName)}</color>");
|
||||
}
|
||||
|
||||
RespawnManager.Instance.OnPlayerDeath(player);
|
||||
|
@ -139,6 +139,13 @@ internal class MultiplayerHUDManager : MonoBehaviour, IAddComponentOnStart
|
||||
}
|
||||
|
||||
_textChat.Find("Messages").Find("Message").GetComponent<Text>().text = finalText;
|
||||
|
||||
if (Locator.GetPlayerSuit().IsWearingHelmet())
|
||||
{
|
||||
var audioController = Locator.GetPlayerAudioController();
|
||||
audioController.PlayNotificationTextScrolling();
|
||||
Delay.RunFramesLater(10, () => audioController.StopNotificationTextScrolling());
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
|
@ -1,6 +1,7 @@
|
||||
using HarmonyLib;
|
||||
using Mirror;
|
||||
using OWML.Common;
|
||||
using QSB.HUD;
|
||||
using QSB.Localization;
|
||||
using QSB.Messaging;
|
||||
using QSB.Utility;
|
||||
@ -125,7 +126,7 @@ public class PlayerJoinMessage : QSBMessage
|
||||
|
||||
var player = QSBPlayerManager.GetPlayer(From);
|
||||
player.Name = PlayerName;
|
||||
DebugLog.ToAll(string.Format(QSBLocalization.Current.PlayerJoinedTheGame, player.Name), MessageType.Info);
|
||||
MultiplayerHUDManager.Instance.WriteMessage($"<color=green>{string.Format(QSBLocalization.Current.PlayerJoinedTheGame, player.Name)}</color>");
|
||||
DebugLog.DebugWrite($"{player} joined. qsbVersion:{QSBVersion}, gameVersion:{GameVersion}, dlcInstalled:{DlcInstalled}", MessageType.Info);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
using Mirror;
|
||||
using QSB.HUD;
|
||||
using QSB.Localization;
|
||||
using QSB.Menus;
|
||||
using QSB.Messaging;
|
||||
@ -34,15 +35,15 @@ internal class PlayerKickMessage : QSBMessage<string>
|
||||
{
|
||||
if (QSBPlayerManager.PlayerExists(PlayerId))
|
||||
{
|
||||
DebugLog.ToAll(string.Format(QSBLocalization.Current.PlayerWasKicked, QSBPlayerManager.GetPlayer(PlayerId).Name));
|
||||
MultiplayerHUDManager.Instance.WriteMessage($"<color=red>{string.Format(QSBLocalization.Current.PlayerWasKicked, QSBPlayerManager.GetPlayer(PlayerId).Name)}</color>");
|
||||
return;
|
||||
}
|
||||
|
||||
DebugLog.ToAll(string.Format(QSBLocalization.Current.PlayerWasKicked, PlayerId));
|
||||
MultiplayerHUDManager.Instance.WriteMessage($"<color=red>{string.Format(QSBLocalization.Current.PlayerWasKicked, PlayerId)}</color>");
|
||||
return;
|
||||
}
|
||||
|
||||
DebugLog.ToAll(string.Format(QSBLocalization.Current.KickedFromServer, Data));
|
||||
MultiplayerHUDManager.Instance.WriteMessage($"<color=red>{string.Format(QSBLocalization.Current.KickedFromServer, Data)}</color>");
|
||||
MenuManager.Instance.OnKicked(Data);
|
||||
|
||||
NetworkClient.Disconnect();
|
||||
|
Loading…
Reference in New Issue
Block a user