Removed old Loc.GetString() use instances (#4155)
Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using Content.Server.Chat.Managers;
|
||||
using Content.Shared;
|
||||
@@ -32,7 +32,7 @@ namespace Content.Server.GameTicking.Rules
|
||||
|
||||
public override void Added()
|
||||
{
|
||||
_chatManager.DispatchServerAnnouncement(Loc.GetString("The game is now a death match. Kill everybody else to win!"));
|
||||
_chatManager.DispatchServerAnnouncement(Loc.GetString("rule-death-match-added-announcement"));
|
||||
|
||||
_entityManager.EventBus.SubscribeEvent<DamageChangedEventArgs>(EventSource.Local, this, OnHealthChanged);
|
||||
_playerManager.PlayerStatusChanged += PlayerManagerOnPlayerStatusChanged;
|
||||
@@ -83,12 +83,12 @@ namespace Content.Server.GameTicking.Rules
|
||||
}
|
||||
|
||||
_chatManager.DispatchServerAnnouncement(winner == null
|
||||
? Loc.GetString("Everybody is dead, it's a stalemate!")
|
||||
: Loc.GetString("{0} wins the death match!", winner));
|
||||
? Loc.GetString("rule-death-match-check-winner-stalemate")
|
||||
: Loc.GetString("rule-death-match-check-winner",("winner", winner)));
|
||||
|
||||
var restartDelay = 10;
|
||||
|
||||
_chatManager.DispatchServerAnnouncement(Loc.GetString("Restarting in {0} seconds.", restartDelay));
|
||||
_chatManager.DispatchServerAnnouncement(Loc.GetString("rule-restarting-in-seconds", ("seconds", restartDelay)));
|
||||
|
||||
Timer.Spawn(TimeSpan.FromSeconds(restartDelay), () => EntitySystem.Get<GameTicker>().RestartRound());
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#nullable enable
|
||||
#nullable enable
|
||||
using System;
|
||||
using System.Threading;
|
||||
using Content.Server.Chat.Managers;
|
||||
@@ -54,9 +54,9 @@ namespace Content.Server.GameTicking.Rules
|
||||
private void TimerFired()
|
||||
{
|
||||
var gameticker = EntitySystem.Get<GameTicker>();
|
||||
gameticker.EndRound(Loc.GetString("Time has run out!"));
|
||||
gameticker.EndRound(Loc.GetString("rule-time-has-run-out"));
|
||||
|
||||
_chatManager.DispatchServerAnnouncement(Loc.GetString("Restarting in {0} seconds.", (int) RoundEndDelay.TotalSeconds));
|
||||
_chatManager.DispatchServerAnnouncement(Loc.GetString("rule-restarting-in-seconds", ("seconds",(int) RoundEndDelay.TotalSeconds)));
|
||||
|
||||
Timer.Spawn(RoundEndDelay, () => gameticker.RestartRound());
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using Content.Server.Chat.Managers;
|
||||
using Robust.Shared.GameObjects;
|
||||
@@ -47,9 +47,9 @@ namespace Content.Server.GameTicking.Rules
|
||||
|
||||
private void TimerFired()
|
||||
{
|
||||
EntitySystem.Get<GameTicker>().EndRound(Loc.GetString("Time has run out!"));
|
||||
EntitySystem.Get<GameTicker>().EndRound(Loc.GetString("rule-time-has-run-out"));
|
||||
|
||||
_chatManager.DispatchServerAnnouncement(Loc.GetString("Restarting in {0} seconds.", (int) RoundEndDelay.TotalSeconds));
|
||||
_chatManager.DispatchServerAnnouncement(Loc.GetString("rule-restarting-in-seconds",("seconds", (int) RoundEndDelay.TotalSeconds)));
|
||||
|
||||
Timer.Spawn(RoundEndDelay, () => EntitySystem.Get<GameTicker>().RestartRound());
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Content.Server.GameTicking.Rules
|
||||
|
||||
_endTime = _timing.CurTime + RoundMaxTime;
|
||||
|
||||
_chatManager.DispatchServerAnnouncement(Loc.GetString("There are traitors on the station! Find them, and kill them!"));
|
||||
_chatManager.DispatchServerAnnouncement(Loc.GetString("rule-suspicion-added-announcement"));
|
||||
|
||||
var filter = Filter.Empty()
|
||||
.AddWhere(session => ((IPlayerSession)session).ContentData()?.Mind?.HasRole<SuspicionTraitorRole>() ?? false);
|
||||
@@ -69,7 +69,7 @@ namespace Content.Server.GameTicking.Rules
|
||||
|
||||
private void Timeout()
|
||||
{
|
||||
_chatManager.DispatchServerAnnouncement(Loc.GetString("Time has run out for the traitors!"));
|
||||
_chatManager.DispatchServerAnnouncement(Loc.GetString("rule-suspicion-traitor-time-has-run-out"));
|
||||
|
||||
EndRound(Victory.Innocents);
|
||||
}
|
||||
@@ -106,23 +106,23 @@ namespace Content.Server.GameTicking.Rules
|
||||
|
||||
if (innocentsAlive + traitorsAlive == 0)
|
||||
{
|
||||
_chatManager.DispatchServerAnnouncement(Loc.GetString("Everybody is dead, it's a stalemate!"));
|
||||
_chatManager.DispatchServerAnnouncement(Loc.GetString("rule-suspicion-check-winner-stalemate"));
|
||||
EndRound(Victory.Stalemate);
|
||||
}
|
||||
|
||||
else if (traitorsAlive == 0)
|
||||
{
|
||||
_chatManager.DispatchServerAnnouncement(Loc.GetString("The traitors are dead! The innocents win."));
|
||||
_chatManager.DispatchServerAnnouncement(Loc.GetString("rule-suspicion-check-winner-station-win"));
|
||||
EndRound(Victory.Innocents);
|
||||
}
|
||||
else if (innocentsAlive == 0)
|
||||
{
|
||||
_chatManager.DispatchServerAnnouncement(Loc.GetString("The innocents are dead! The traitors win."));
|
||||
_chatManager.DispatchServerAnnouncement(Loc.GetString("rule-suspicion-check-winner-traitor-win"));
|
||||
EndRound(Victory.Traitors);
|
||||
}
|
||||
else if (_timing.CurTime > _endTime)
|
||||
{
|
||||
_chatManager.DispatchServerAnnouncement(Loc.GetString("Time has run out for the traitors!"));
|
||||
_chatManager.DispatchServerAnnouncement(Loc.GetString("rule-suspicion-traitor-time-has-run-out"));
|
||||
EndRound(Victory.Innocents);
|
||||
}
|
||||
}
|
||||
@@ -141,20 +141,20 @@ namespace Content.Server.GameTicking.Rules
|
||||
switch (victory)
|
||||
{
|
||||
case Victory.Innocents:
|
||||
text = Loc.GetString("The innocents have won!");
|
||||
text = Loc.GetString("rule-suspicion-end-round-innocents-victory");
|
||||
break;
|
||||
case Victory.Traitors:
|
||||
text = Loc.GetString("The traitors have won!");
|
||||
text = Loc.GetString("rule-suspicion-end-round-trators-victory");
|
||||
break;
|
||||
default:
|
||||
text = Loc.GetString("Nobody wins!");
|
||||
text = Loc.GetString("rule-suspicion-end-round-nobody-victory");
|
||||
break;
|
||||
}
|
||||
|
||||
var gameTicker = EntitySystem.Get<GameTicker>();
|
||||
gameTicker.EndRound(text);
|
||||
|
||||
_chatManager.DispatchServerAnnouncement(Loc.GetString("Restarting in {0} seconds.", (int) RoundEndDelay.TotalSeconds));
|
||||
_chatManager.DispatchServerAnnouncement(Loc.GetString("rule-restarting-in-seconds",("seconds", (int) RoundEndDelay.TotalSeconds)));
|
||||
_checkTimerCancel.Cancel();
|
||||
|
||||
Timer.Spawn(RoundEndDelay, () => gameTicker.RestartRound());
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Content.Server.GameTicking.Rules
|
||||
|
||||
public override void Added()
|
||||
{
|
||||
_chatManager.DispatchServerAnnouncement(Loc.GetString("Hello crew! Have a good shift!"));
|
||||
_chatManager.DispatchServerAnnouncement(Loc.GetString("rule-traitor-added-announcement"));
|
||||
|
||||
var filter = Filter.Empty()
|
||||
.AddWhere(session => ((IPlayerSession)session).ContentData()?.Mind?.HasRole<TraitorRole>() ?? false);
|
||||
|
||||
Reference in New Issue
Block a user