From 41d34db38aba0e61ddefb9a2f8181a0f75c6166c Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Thu, 16 Nov 2023 23:59:24 +0100 Subject: [PATCH] [MIRROR] CRAB-17 will round down the credit amount it steals [MDB IGNORE] (#25052) * CRAB-17 will round down the credit amount it steals (#79761) ## About The Pull Request When stealing credits, the CRAB-17 takes a between 5 and 15 percent of your current credit balance. Due to how numbers work, this almost always ends up with a fractional amount being taken (ie 10% of 1015 is 101.5) There is, as far as I'm aware, no way to get rid of this fractional amount, as you can only pull whole credits from your ID. ## Why It's Good For The Game CRAB-17 will now take between 5 and 15 percent of your current credits, rounded down. No more 1/3 of a credit to stare at in abject horror. ## Changelog :cl: fix: The CRAB-17 will now only take whole credits, as fractional credits were found to be worth less. :cl: * CRAB-17 will round down the credit amount it steals --------- Co-authored-by: Shadow-Quill <44811257+Shadow-Quill@users.noreply.github.com> --- code/game/objects/items/crab17.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/crab17.dm b/code/game/objects/items/crab17.dm index a20fcce5db8..1e43197c47e 100644 --- a/code/game/objects/items/crab17.dm +++ b/code/game/objects/items/crab17.dm @@ -197,7 +197,7 @@ if(!(B?.being_dumped)) accounts_to_rob -= B continue - var/amount = B.account_balance * percentage_lost + var/amount = round(B.account_balance * percentage_lost) // We don't want fractions of a credit stolen. That's just agony for everyone. var/datum/bank_account/account = bogdanoff?.get_bank_account() if (account) // get_bank_account() may return FALSE account.transfer_money(B, amount, "?VIVA¿: !LA CRABBE¡")