Makes math helpers defines for performance

This commit is contained in:
kevinz000
2018-12-06 13:13:59 -08:00
committed by VirgoBot
parent 4a27ffb35a
commit fc178c1e04
48 changed files with 1000 additions and 228 deletions

View File

@@ -202,7 +202,7 @@ var/list/mining_overlay_cache = list()
if(severity <= 2) // Now to expose the ore lying under the sand.
spawn(1) // Otherwise most of the ore is lost to the explosion, which makes this rather moot.
for(var/ore in resources)
var/amount_to_give = rand(Ceiling(resources[ore]/2), resources[ore]) // Should result in at least one piece of ore.
var/amount_to_give = rand(CEILING(resources[ore]/2, 1), resources[ore]) // Should result in at least one piece of ore.
for(var/i=1, i <= amount_to_give, i++)
var/oretype = ore_types[ore]
new oretype(src)