Skip to content

Commit

Permalink
fix(info): ⭐remove .0 residue on acquire tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
Krutoy242 committed Dec 5, 2024
1 parent c415d7f commit dca7bb6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/do/acquire/forbid.zs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ zenClass Forbidder {
if (!futile)
for stack in stacks {
scripts.do.acquire.data.values[stack] = amount;
stack.addTooltip(`§6+${amount}§e✪`);
val isResidual = amount - amount as int > 0.0;
val amountStr = isResidual ? amount as string : amount as int;
stack.addTooltip(`§6+${amountStr}§e✪`);
utils.log(`Acquire +${amount}: ${stack.commandString}`);
}
return this;
Expand Down

0 comments on commit dca7bb6

Please sign in to comment.