From f5cd0f08fd8f8a40eac4bdc6fff8e89070e3f2ef Mon Sep 17 00:00:00 2001 From: ScuffedNewt Date: Sun, 6 Oct 2024 17:11:56 +0100 Subject: [PATCH] fix(limits): bracket nonsense --- app/Services/LimitManager.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Services/LimitManager.php b/app/Services/LimitManager.php index d8f47eec2..e4f97df1c 100644 --- a/app/Services/LimitManager.php +++ b/app/Services/LimitManager.php @@ -54,8 +54,8 @@ public function checkLimits($object) { } break; case 'item': - if (!$user->items()->where('item_id', $limit->limit_id)->sum('count') >= $limit->quantity) { - throw new \Exception('You do not have enough of the item '.$limit->object->name.' to complete this action.'); + if (!($user->items()->where('item_id', $limit->limit_id)->sum('count') >= $limit->quantity)) { + throw new \Exception('You do not have enough of the item '.$limit->limit->displayName.' to complete this action.'); } if ($limit->debit) { @@ -97,7 +97,7 @@ public function checkLimits($object) { $inventoryManager = new InventoryManager; $type = 'Limit Requirements'; $data = [ - 'data' => 'Used in '.$limit->object->displayName ?? $limit->object->name.'\'s limit requirements.', + 'data' => 'Used in '.($limit->object->displayName ?? $limit->object->name).'\'s limit requirements.', ]; foreach ($plucked_stacks as $id=>$quantity) {