Remove period from exception messages

This commit is contained in:
AeonLucid committed 2020-10-24 02:37:59 +02:00
1 parent 4dc12ceff5
commit 7d803e76f4
7 files changed
+64 -64

No files matched your search

@@ -90,12 +90,12 @@ namespace Impostor.Api.Innersloth.Net.Objects.Components
{
if (!sender.IsOwner(this))
{
throw new ImpostorCheatException($"Client attempted to send unowned {nameof(InnerCustomNetworkTransform)} data.");
throw new ImpostorCheatException($"Client attempted to send unowned {nameof(InnerCustomNetworkTransform)} data");
}
if (target != null)
{
throw new ImpostorCheatException($"Client attempted to send {nameof(InnerCustomNetworkTransform)} data to a specific player, must be broadcast.");
throw new ImpostorCheatException($"Client attempted to send {nameof(InnerCustomNetworkTransform)} data to a specific player, must be broadcast");
}
if (!SidGreaterThan(sequenceId, _lastSequenceId))
@@ -24,17 +24,17 @@ namespace Impostor.Api.Innersloth.Net.Objects.Components
if (!sender.IsOwner(this))
{
throw new ImpostorCheatException($"Client sent {call} to an unowned {nameof(InnerPlayerControl)}.");
throw new ImpostorCheatException($"Client sent {call} to an unowned {nameof(InnerPlayerControl)}");
}
if (target != null)
{
throw new ImpostorCheatException($"Client sent {call} to a specific player instead of broadcast.");
throw new ImpostorCheatException($"Client sent {call} to a specific player instead of broadcast");
}
if (!sender.Character.PlayerInfo.IsImpostor)
{
throw new ImpostorCheatException($"Client sent {call} as crewmate.");
throw new ImpostorCheatException($"Client sent {call} as crewmate");
}
var ventId = reader.ReadPackedUInt32();
@@ -28,12 +28,12 @@ namespace Impostor.Api.Innersloth.Net.Objects.Components
var clientId = reader.ReadInt32();
if (clientId != sender.Client.Id)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.AddVote)} as other client.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.AddVote)} as other client");
}
if (target != null)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.CastVote)} to wrong destinition, must be broadcast.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.CastVote)} to wrong destinition, must be broadcast");
}
var targetClientId = reader.ReadInt32();
@@ -50,7 +50,7 @@ namespace Impostor.Api.Innersloth.Net.Objects.Components
{
if (!sender.IsHost)
{
throw new ImpostorCheatException($"Client attempted to send data for {nameof(InnerShipStatus)} as non-host.");
throw new ImpostorCheatException($"Client attempted to send data for {nameof(InnerShipStatus)} as non-host");
}
var votes = _votes;
@@ -48,12 +48,12 @@ namespace Impostor.Api.Innersloth.Net.Objects
{
if (!sender.IsHost)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetTasks)} but was not a host.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetTasks)} but was not a host");
}
if (target != null)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetTasks)} to a specific player instead of broadcast.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetTasks)} to a specific player instead of broadcast");
}
var playerId = reader.ReadByte();
@@ -67,12 +67,12 @@ namespace Impostor.Api.Innersloth.Net.Objects
{
if (!sender.IsHost)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetTasks)} but was not a host.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetTasks)} but was not a host");
}
if (target != null)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetTasks)} to a specific player instead of broadcast.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetTasks)} to a specific player instead of broadcast");
}
while (reader.Position < reader.Length)
@@ -116,7 +116,7 @@ namespace Impostor.Api.Innersloth.Net.Objects
{
if (!sender.IsHost)
{
throw new ImpostorCheatException($"Client attempted to send data for {nameof(InnerGameData)} as non-host.");
throw new ImpostorCheatException($"Client attempted to send data for {nameof(InnerGameData)} as non-host");
}
if (initialState)
@@ -46,12 +46,12 @@ namespace Impostor.Api.Innersloth.Net.Objects
{
if (!sender.IsHost)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.Close)} but was not a host.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.Close)} but was not a host");
}
if (target != null)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.Close)} to a specific player instead of broadcast.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.Close)} to a specific player instead of broadcast");
}
break;
@@ -61,12 +61,12 @@ namespace Impostor.Api.Innersloth.Net.Objects
{
if (!sender.IsHost)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.VotingComplete)} but was not a host.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.VotingComplete)} but was not a host");
}
if (target != null)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.VotingComplete)} to a specific player instead of broadcast.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.VotingComplete)} to a specific player instead of broadcast");
}
var states = reader.ReadBytesAndSize();
@@ -80,19 +80,19 @@ namespace Impostor.Api.Innersloth.Net.Objects
var srcPlayerId = reader.ReadByte();
if (srcPlayerId != sender.Character.PlayerId)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.CastVote)} to an unowned {nameof(InnerPlayerControl)}.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.CastVote)} to an unowned {nameof(InnerPlayerControl)}");
}
// Host broadcasts vote to others.
if (sender.IsHost && target != null)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.CastVote)} to a specific player instead of broadcast.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.CastVote)} to a specific player instead of broadcast");
}
// Player sends vote to host.
if (target == null || !target.IsHost)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.CastVote)} to wrong destinition, must be host.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.CastVote)} to wrong destinition, must be host");
}
var targetPlayerId = reader.ReadByte();
@@ -116,12 +116,12 @@ namespace Impostor.Api.Innersloth.Net.Objects
{
if (!sender.IsHost)
{
throw new ImpostorCheatException($"Client attempted to send data for {nameof(InnerMeetingHud)} as non-host.");
throw new ImpostorCheatException($"Client attempted to send data for {nameof(InnerMeetingHud)} as non-host");
}
if (target != null)
{
throw new ImpostorCheatException($"Client attempted to send {nameof(InnerMeetingHud)} data to a specific player, must be broadcast.");
throw new ImpostorCheatException($"Client attempted to send {nameof(InnerMeetingHud)} data to a specific player, must be broadcast");
}
if (initialState)
@@ -41,12 +41,12 @@ namespace Impostor.Api.Innersloth.Net.Objects
{
if (!sender.IsOwner(this))
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.PlayAnimation)} to an unowned {nameof(InnerPlayerControl)}.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.PlayAnimation)} to an unowned {nameof(InnerPlayerControl)}");
}
if (target != null)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.PlayAnimation)} to a specific player instead of broadcast.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.PlayAnimation)} to a specific player instead of broadcast");
}
var animation = reader.ReadByte();
@@ -58,12 +58,12 @@ namespace Impostor.Api.Innersloth.Net.Objects
{
if (!sender.IsOwner(this))
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.CompleteTask)} to an unowned {nameof(InnerPlayerControl)}.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.CompleteTask)} to an unowned {nameof(InnerPlayerControl)}");
}
if (target != null)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.CompleteTask)} to a specific player instead of broadcast.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.CompleteTask)} to a specific player instead of broadcast");
}
var index = reader.ReadPackedUInt32();
@@ -75,7 +75,7 @@ namespace Impostor.Api.Innersloth.Net.Objects
{
if (!sender.IsHost)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SyncSettings)} but was not a host.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SyncSettings)} but was not a host");
}
_game.Options.Deserialize(reader.ReadBytesAndSize());
@@ -87,7 +87,7 @@ namespace Impostor.Api.Innersloth.Net.Objects
{
if (!sender.IsHost)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetInfected)} but was not a host.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetInfected)} but was not a host");
}
var length = reader.ReadPackedInt32();
@@ -108,12 +108,12 @@ namespace Impostor.Api.Innersloth.Net.Objects
{
if (!sender.IsHost)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.Exiled)} but was not a host.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.Exiled)} but was not a host");
}
if (target != null)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.Exiled)} to a specific player instead of broadcast.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.Exiled)} to a specific player instead of broadcast");
}
// TODO: Not hit?
@@ -126,7 +126,7 @@ namespace Impostor.Api.Innersloth.Net.Objects
{
if (target == null || !target.IsHost)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.CheckName)} to the wrong player.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.CheckName)} to the wrong player");
}
var name = reader.ReadString();
@@ -138,12 +138,12 @@ namespace Impostor.Api.Innersloth.Net.Objects
{
if (!sender.IsHost)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetName)} but was not a host.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetName)} but was not a host");
}
if (target != null)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetName)} to a specific player instead of broadcast.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetName)} to a specific player instead of broadcast");
}
PlayerInfo.PlayerName = reader.ReadString();
@@ -155,7 +155,7 @@ namespace Impostor.Api.Innersloth.Net.Objects
{
if (target == null || !target.IsHost)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.CheckColor)} to the wrong player.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.CheckColor)} to the wrong player");
}
var color = reader.ReadByte();
@@ -167,12 +167,12 @@ namespace Impostor.Api.Innersloth.Net.Objects
{
if (!sender.IsHost)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetColor)} but was not a host.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetColor)} but was not a host");
}
if (target != null)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetColor)} to a specific player instead of broadcast.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetColor)} to a specific player instead of broadcast");
}
PlayerInfo.ColorId = reader.ReadByte();
@@ -184,12 +184,12 @@ namespace Impostor.Api.Innersloth.Net.Objects
{
if (!sender.IsOwner(this))
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetHat)} to an unowned {nameof(InnerPlayerControl)}.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetHat)} to an unowned {nameof(InnerPlayerControl)}");
}
if (target != null)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetHat)} to a specific player instead of broadcast.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetHat)} to a specific player instead of broadcast");
}
PlayerInfo.HatId = reader.ReadPackedUInt32();
@@ -200,12 +200,12 @@ namespace Impostor.Api.Innersloth.Net.Objects
{
if (!sender.IsOwner(this))
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetSkin)} to an unowned {nameof(InnerPlayerControl)}.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetSkin)} to an unowned {nameof(InnerPlayerControl)}");
}
if (target != null)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetHat)} to a specific player instead of broadcast.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetHat)} to a specific player instead of broadcast");
}
PlayerInfo.SkinId = reader.ReadPackedUInt32();
@@ -217,12 +217,12 @@ namespace Impostor.Api.Innersloth.Net.Objects
{
if (!sender.IsOwner(this))
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.ReportDeadBody)} to an unowned {nameof(InnerPlayerControl)}.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.ReportDeadBody)} to an unowned {nameof(InnerPlayerControl)}");
}
if (target != null)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.ReportDeadBody)} to a specific player instead of broadcast.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.ReportDeadBody)} to a specific player instead of broadcast");
}
var deadBodyPlayerId = reader.ReadByte();
@@ -234,17 +234,17 @@ namespace Impostor.Api.Innersloth.Net.Objects
{
if (!sender.IsOwner(this))
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.MurderPlayer)} to an unowned {nameof(InnerPlayerControl)}.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.MurderPlayer)} to an unowned {nameof(InnerPlayerControl)}");
}
if (target != null)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.MurderPlayer)} to a specific player instead of broadcast.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.MurderPlayer)} to a specific player instead of broadcast");
}
if (!sender.Character.PlayerInfo.IsImpostor)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.MurderPlayer)} as crewmate.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.MurderPlayer)} as crewmate");
}
var player = reader.ReadNetObject<InnerPlayerControl>(_game);
@@ -260,12 +260,12 @@ namespace Impostor.Api.Innersloth.Net.Objects
{
if (!sender.IsOwner(this))
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SendChat)} to an unowned {nameof(InnerPlayerControl)}.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SendChat)} to an unowned {nameof(InnerPlayerControl)}");
}
if (target != null)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SendChat)} to a specific player instead of broadcast.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SendChat)} to a specific player instead of broadcast");
}
var chat = reader.ReadString();
@@ -276,12 +276,12 @@ namespace Impostor.Api.Innersloth.Net.Objects
{
if (!sender.IsHost)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.StartMeeting)} but was not a host.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.StartMeeting)} but was not a host");
}
if (target != null)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.StartMeeting)} to a specific player instead of broadcast.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.StartMeeting)} to a specific player instead of broadcast");
}
var playerId = reader.ReadByte();
@@ -295,12 +295,12 @@ namespace Impostor.Api.Innersloth.Net.Objects
{
if (!sender.IsOwner(this))
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetScanner)} to an unowned {nameof(InnerPlayerControl)}.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetScanner)} to an unowned {nameof(InnerPlayerControl)}");
}
if (target != null)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetScanner)} to a specific player instead of broadcast.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetScanner)} to a specific player instead of broadcast");
}
var on = reader.ReadBoolean();
@@ -312,12 +312,12 @@ namespace Impostor.Api.Innersloth.Net.Objects
{
if (!sender.IsOwner(this))
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SendChatNote)} to an unowned {nameof(InnerPlayerControl)}.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SendChatNote)} to an unowned {nameof(InnerPlayerControl)}");
}
if (target != null)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SendChatNote)} to a specific player instead of broadcast.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SendChatNote)} to a specific player instead of broadcast");
}
var playerId = reader.ReadByte();
@@ -329,12 +329,12 @@ namespace Impostor.Api.Innersloth.Net.Objects
{
if (!sender.IsOwner(this))
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetPet)} to an unowned {nameof(InnerPlayerControl)}.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetPet)} to an unowned {nameof(InnerPlayerControl)}");
}
if (target != null)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetPet)} to a specific player instead of broadcast.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetPet)} to a specific player instead of broadcast");
}
PlayerInfo.PetId = reader.ReadPackedUInt32();
@@ -346,12 +346,12 @@ namespace Impostor.Api.Innersloth.Net.Objects
{
if (!sender.IsOwner(this))
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetStartCounter)} to an unowned {nameof(InnerPlayerControl)}.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetStartCounter)} to an unowned {nameof(InnerPlayerControl)}");
}
if (target != null)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetStartCounter)} to a specific player instead of broadcast.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.SetStartCounter)} to a specific player instead of broadcast");
}
// Used to compare with LastStartCounter.
@@ -379,7 +379,7 @@ namespace Impostor.Api.Innersloth.Net.Objects
{
if (!sender.IsHost)
{
throw new ImpostorCheatException($"Client attempted to send data for {nameof(InnerPlayerControl)} as non-host.");
throw new ImpostorCheatException($"Client attempted to send data for {nameof(InnerPlayerControl)} as non-host");
}
if (initialState)
@@ -50,12 +50,12 @@ namespace Impostor.Api.Innersloth.Net.Objects
{
if (target == null || !target.IsHost)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.CloseDoorsOfType)} to wrong destinition, must be host.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.CloseDoorsOfType)} to wrong destinition, must be host");
}
if (!sender.Character.PlayerInfo.IsImpostor)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.CloseDoorsOfType)} as crewmate.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.CloseDoorsOfType)} as crewmate");
}
var systemType = (SystemTypes)reader.ReadByte();
@@ -67,12 +67,12 @@ namespace Impostor.Api.Innersloth.Net.Objects
{
if (target == null || !target.IsHost)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.RepairSystem)} to wrong destinition, must be host.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.RepairSystem)} to wrong destinition, must be host");
}
if (!sender.Character.PlayerInfo.IsImpostor)
{
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.RepairSystem)} as crewmate.");
throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.RepairSystem)} as crewmate");
}
var systemType = (SystemTypes)reader.ReadByte();
@@ -101,12 +101,12 @@ namespace Impostor.Api.Innersloth.Net.Objects
{
if (!sender.IsHost)
{
throw new ImpostorCheatException($"Client attempted to send data for {nameof(InnerShipStatus)} as non-host.");
throw new ImpostorCheatException($"Client attempted to send data for {nameof(InnerShipStatus)} as non-host");
}
if (target != null)
{
throw new ImpostorCheatException($"Client attempted to send {nameof(InnerShipStatus)} data to a specific player, must be broadcast.");
throw new ImpostorCheatException($"Client attempted to send {nameof(InnerShipStatus)} data to a specific player, must be broadcast");
}
if (initialState)