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
This commit is contained in:
committed by
CitadelStationBot
parent
d8e3200d6c
commit
4e74f63147
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user