From 4e74f63147204b0337386a2946dd0eb4d07732ce Mon Sep 17 00:00:00 2001 From: Grandmother of 50 <11748095+ExcessiveUseOfCobblestone@users.noreply.github.com> Date: Thu, 12 Apr 2018 06:44:08 -0400 Subject: [PATCH] Changes ore-burning math to avoid decimals (and raise RNG) (#37005) * Update ores_coins.dm * I want that to return watson * Finally a stats course comes in handy... * Update ores_coins.dm * Yay mods :) * pants on head --- code/modules/mining/ores_coins.dm | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm index b517383055..86f25c6b3e 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -49,15 +49,19 @@ return TRUE -/obj/item/stack/ore/burn() - if(!refined_type) - return ..() - var/obj/item/stack/sheet/S = new refined_type(drop_location()) - var/percent = rand(0.3,0.7) - var/amountrefined = round(amount*percent) - S.amount = amountrefined - S.update_icon() - qdel(src) +/obj/item/stack/ore/fire_act(exposed_temperature, exposed_volume) + . = ..() + if(isnull(refined_type)) + return + else + var/probability = (rand(0,100))/100 + var/burn_value = probability*amount + var/amountrefined = round(burn_value, 1) + if(amountrefined < 1) + qdel(src) + else + new refined_type(drop_location(),amountrefined) + qdel(src) /obj/item/stack/ore/uranium name = "uranium ore"