From ad7909cb82527ee9c622ba01683ceec5a88fd74e Mon Sep 17 00:00:00 2001 From: Cerebulon Date: Sat, 16 Apr 2022 16:45:00 +0100 Subject: [PATCH] Adjusts sheet storage loss to consistent rate --- code/modules/persistence/storage/smartfridge.dm | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/code/modules/persistence/storage/smartfridge.dm b/code/modules/persistence/storage/smartfridge.dm index a9e47602c8..9174e58fde 100644 --- a/code/modules/persistence/storage/smartfridge.dm +++ b/code/modules/persistence/storage/smartfridge.dm @@ -48,14 +48,8 @@ // Delete some stacks if we want if(stacks_go_missing) - var/fuzzy = rand(-5,5) - switch(count / max_amount) - if(0 to 1) - count -= 10+fuzzy // 1 stack or less, lose 10 - if(1 to 10) - count -= max_amount+fuzzy // 1 to 10 stacks, lose a stack - if(10 to INFINITY) - count -= max_amount*3+fuzzy // 10+ stacks, lose 3 stacks + var/fuzzy = rand(55,65) + count = round(count*0.01*fuzzy) // loss of 35-45% with rounding down if(count <= 0) continue