Added debug logging for erroneous rate limit

I still don't know what causes this and I can't reproduce it locally
This commit is contained in:
Anuken 2020-09-05 11:51:50 -04:00
parent bc74208c8c
commit ad7692b110
2 changed files with 13 additions and 0 deletions

View file

@ -93,6 +93,13 @@ public class Administration{
if(rate.occurences > Config.interactRateKick.num()){
action.player.kick("You are interacting with too many blocks.", 1000 * 30);
}else if(action.player.getInfo().messageTimer.get(60f * 2f)){
//I don't know what causes this so I'll make it log an error instead
new Exception("!!REPORT TO ANUKE: " + action.player.name + " was (likely) incorrectly ratelimited. " +
"action=" + action.type +
" player=" + action.player.name + "#" + action.player.id +
" tile=" + action.tile).printStackTrace();
action.player.sendMessage("[scarlet]You are interacting with blocks too quickly.");
}

View file

@ -180,6 +180,12 @@ public class CoreBlock extends StorageBlock{
}
}
@Override
public boolean canPickup(){
//cores can never be picked up
return false;
}
@Override
public void drawLight(){
Drawf.light(team, x, y, 30f * size, Pal.accent, 0.5f + Mathf.absin(20f, 0.1f));