Renamed IgnoreActionsForClearingTrashCan to conform w/ changes
This just changes IgnoreActionsForClearingTrashCan to meet the same naming scheme for the rest of the old ignore checks. For consistency. Consistency is nice.
This commit is contained in:
parent
4e186e7375
commit
8e5ee7d286
5 changed files with 11 additions and 10 deletions
|
|
@ -863,7 +863,7 @@ namespace TShockAPI
|
|||
{
|
||||
args.Player.SendErrorMessage("Please /register or /login to play!");
|
||||
}
|
||||
else if (args.Player.IgnoreActionsForClearingTrashCan)
|
||||
else if (args.Player.IsDisabledPendingTrashRemoval)
|
||||
{
|
||||
args.Player.SendErrorMessage("You need to rejoin to ensure your trash can is cleared!");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1636,7 +1636,7 @@ namespace TShockAPI
|
|||
args.Player.SendSuccessMessage("SSC has been saved.");
|
||||
foreach (TSPlayer player in TShock.Players)
|
||||
{
|
||||
if (player != null && player.IsLoggedIn && !player.IgnoreActionsForClearingTrashCan)
|
||||
if (player != null && player.IsLoggedIn && !player.IsDisabledPendingTrashRemoval)
|
||||
{
|
||||
TShock.CharacterDB.InsertPlayerData(player, true);
|
||||
}
|
||||
|
|
@ -1681,7 +1681,7 @@ namespace TShockAPI
|
|||
args.Player.SendErrorMessage("Player \"{0}\" has to perform a /login attempt first.", matchedPlayer.Name);
|
||||
return;
|
||||
}
|
||||
if (matchedPlayer.IgnoreActionsForClearingTrashCan)
|
||||
if (matchedPlayer.IsDisabledPendingTrashRemoval)
|
||||
{
|
||||
args.Player.SendErrorMessage("Player \"{0}\" has to reconnect first.", matchedPlayer.Name);
|
||||
return;
|
||||
|
|
@ -1887,7 +1887,7 @@ namespace TShockAPI
|
|||
{
|
||||
foreach (TSPlayer player in TShock.Players)
|
||||
{
|
||||
if (player != null && player.IsLoggedIn && !player.IgnoreActionsForClearingTrashCan)
|
||||
if (player != null && player.IsLoggedIn && !player.IsDisabledPendingTrashRemoval)
|
||||
{
|
||||
player.SaveServerCharacter();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1612,7 +1612,7 @@ namespace TShockAPI
|
|||
args.Player.HasSentInventory && !args.Player.HasPermission(Permissions.bypassssc))
|
||||
{
|
||||
// The player might have moved an item to their trash can before they performed a single login attempt yet.
|
||||
args.Player.IgnoreActionsForClearingTrashCan = true;
|
||||
args.Player.IsDisabledPendingTrashRemoval = true;
|
||||
}
|
||||
|
||||
if (slot == 58) //this is the hand
|
||||
|
|
|
|||
|
|
@ -286,7 +286,8 @@ namespace TShockAPI
|
|||
/// <summary>Determines if the player is disabled by the item bans system for having banned wearables on the server.</summary>
|
||||
public bool IsDisabledForBannedWearable = false;
|
||||
|
||||
public bool IgnoreActionsForClearingTrashCan;
|
||||
/// <summary>Determines if the player is disabled for not clearing their trash. A re-login is the only way to reset this.</summary>
|
||||
public bool IsDisabledPendingTrashRemoval;
|
||||
|
||||
/// <summary>Checks to see if active throttling is happening on events by Bouncer. Rejects repeated events by malicious clients in a short window.</summary>
|
||||
/// <returns>If the player is currently being throttled by Bouncer, or not.</returns>
|
||||
|
|
@ -300,7 +301,7 @@ namespace TShockAPI
|
|||
/// <returns>bool - True if any ignore is not none, false, or login state differs from the required state.</returns>
|
||||
public bool CheckIgnores()
|
||||
{
|
||||
return IsDisabledForSSC || IsDisabledForStackDetection || IsDisabledForBannedWearable || IgnoreActionsForClearingTrashCan || !IsLoggedIn && TShock.Config.RequireLogin;
|
||||
return IsDisabledForSSC || IsDisabledForStackDetection || IsDisabledForBannedWearable || IsDisabledPendingTrashRemoval || !IsLoggedIn && TShock.Config.RequireLogin;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -660,7 +661,7 @@ namespace TShockAPI
|
|||
if (Main.ServerSideCharacter)
|
||||
{
|
||||
IsDisabledForSSC = true;
|
||||
if (!IgnoreActionsForClearingTrashCan && (!Dead || TPlayer.difficulty != 2))
|
||||
if (!IsDisabledPendingTrashRemoval && (!Dead || TPlayer.difficulty != 2))
|
||||
{
|
||||
PlayerData.CopyCharacter(this);
|
||||
TShock.CharacterDB.InsertPlayerData(this);
|
||||
|
|
|
|||
|
|
@ -945,7 +945,7 @@ namespace TShockAPI
|
|||
foreach (TSPlayer player in Players)
|
||||
{
|
||||
// prevent null point exceptions
|
||||
if (player != null && player.IsLoggedIn && !player.IgnoreActionsForClearingTrashCan)
|
||||
if (player != null && player.IsLoggedIn && !player.IsDisabledPendingTrashRemoval)
|
||||
{
|
||||
|
||||
CharacterDB.InsertPlayerData(player);
|
||||
|
|
@ -1409,7 +1409,7 @@ namespace TShockAPI
|
|||
Utils.Broadcast(tsplr.Name + " has left.", Color.Yellow);
|
||||
Log.Info("{0} disconnected.", tsplr.Name);
|
||||
|
||||
if (tsplr.IsLoggedIn && !tsplr.IgnoreActionsForClearingTrashCan && Main.ServerSideCharacter && (!tsplr.Dead || tsplr.TPlayer.difficulty != 2))
|
||||
if (tsplr.IsLoggedIn && !tsplr.IsDisabledPendingTrashRemoval && Main.ServerSideCharacter && (!tsplr.Dead || tsplr.TPlayer.difficulty != 2))
|
||||
{
|
||||
tsplr.PlayerData.CopyCharacter(tsplr);
|
||||
CharacterDB.InsertPlayerData(tsplr);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue