Skip to content

Commit

Permalink
fix(limits): bracket nonsense
Browse files Browse the repository at this point in the history
  • Loading branch information
ScuffedNewt committed Oct 6, 2024
1 parent 5826ebf commit f5cd0f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Services/LimitManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit f5cd0f0

Please sign in to comment.