Skip to content

Commit 557c3af

Browse files
committed
decouple actionsThisSecond and actionsThisTick setters
1 parent a0ad9b0 commit 557c3af

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/main/kotlin/com/lambda/interaction/request/inventory/InventoryManager.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@ object InventoryManager : RequestHandler<InventoryRequest>(
4646
private var actionsThisSecond = 0
4747
private var secondCounter = 0
4848
private var actionsThisTick = 0
49-
set(value) {
50-
field += value
51-
actionsThisSecond+= value
52-
}
5349

5450
override val logger = inventoryManagerLogger
5551

@@ -91,6 +87,7 @@ object InventoryManager : RequestHandler<InventoryRequest>(
9187
if (actionsThisSecond + 1 > maxActionsThisSecond && !request.mustPerform) break
9288
iterator.next()()
9389
actionsThisTick++
90+
actionsThisSecond++
9491
iterator.remove()
9592
}
9693

0 commit comments

Comments
 (0)