Optimize a couple things

This commit is contained in:
Chompstation Bot
2021-07-20 21:30:20 +00:00
parent 4a6c523aa6
commit 15cafbe65b
262 changed files with 9437 additions and 934 deletions

View File

@@ -183,9 +183,8 @@
//Check if we still have the materials.
var/coeff = (making.no_scale ? 1 : mat_efficiency) //stacks are unaffected by production coefficient
for(var/MAT in making.resources)
var/datum/material/used_material = MAT
var/amount_needed = making.resources[MAT] * coeff * multiplier
for(var/datum/material/used_material as anything in making.resources)
var/amount_needed = making.resources[used_material] * coeff * multiplier
materials_used[used_material] = amount_needed
if(LAZYLEN(materials_used))