Replace TSPlayer.IgnoreActionsForCheating w/ boolean
This replaces IgnoreActionsForCheating in TSPlayer with a new IsDisabledForStackDetection field that tracks the same basic data. The previous way we did this was storing a string as the "reason" why a player was disabled for cheating, but it only stored the last hacked item stack that caused the check to fail. Since we already have OnSecondUpdate which notifies on _all_ items, we don't need to store this info in such a useless way anyway. They'll find out in one second what they need to remove in a more alarmist way.
This commit is contained in:
parent
1ef28dfe0d
commit
7efcfd055f
5 changed files with 10 additions and 9 deletions
|
|
@ -280,7 +280,8 @@ namespace TShockAPI
|
|||
/// <summary>Determines if the player is disabled by the SSC subsystem for not being logged in.</summary>
|
||||
public bool IsDisabledForSSC = false;
|
||||
|
||||
public string IgnoreActionsForCheating = "none";
|
||||
/// <summary>Determines if the player is disabled by Bouncer for having hacked item stacks.</summary>
|
||||
public bool IsDisabledForStackDetection = false;
|
||||
|
||||
public string IgnoreActionsForDisabledArmor = "none";
|
||||
|
||||
|
|
@ -298,7 +299,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 || IgnoreActionsForCheating != "none" || IgnoreActionsForDisabledArmor != "none" || IgnoreActionsForClearingTrashCan || !IsLoggedIn && TShock.Config.RequireLogin;
|
||||
return IsDisabledForSSC || IsDisabledForStackDetection || IgnoreActionsForDisabledArmor != "none" || IgnoreActionsForClearingTrashCan || !IsLoggedIn && TShock.Config.RequireLogin;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue