Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/v7' into v7
Browse files Browse the repository at this point in the history
  • Loading branch information
buthed010203 committed Aug 20, 2023
2 parents 25e8b0c + fb1015f commit a1062e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/src/mindustry/client/utils/AutoTransfer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class AutoTransfer {

Time.run(delay/2F) {
if (item != null && core != null && player.within(core, itemTransferRange) && ratelimitRemaining > 1) {
if (held > 0 && item != player.unit().stack.item) Call.transferInventory(player, core)
if (held > 0 && item != player.unit().stack.item && (!net.server() || player.unit().stack.amount > 0)) Call.transferInventory(player, core)
else if (held == 0 || item != player.unit().stack.item || counts[maxID] > held) Call.requestItem(player, core, item, Int.MAX_VALUE)
else ratelimitRemaining++ // Yes im this lazy
item = null
Expand Down
2 changes: 1 addition & 1 deletion core/src/mindustry/client/utils/ProcessorPatcher.kt
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ object ProcessorPatcher {
if(player == null) return false
if(!Server.current.whisper.canRun()) return false
if(!whisperRatelimit.allow(player.id,
5000, 1, //Max 1 message per player per 5 seconds
15000, 1, //Max 1 message per player per 15 seconds
5000, 5 //Max 5 messages per 5 seconds over all players
)) return false
Server.current.whisper(player, whisperText)
Expand Down

0 comments on commit a1062e9

Please sign in to comment.