Merge pull request #12596 from Ghommie/Ghommie-cit819

Porting further material datum features and improvements.
This commit is contained in:
silicons
2020-06-27 14:53:28 -07:00
committed by GitHub
66 changed files with 946 additions and 234 deletions
@@ -114,11 +114,13 @@
/obj/item/ammo_box/update_icon()
. = ..()
desc = "[initial(desc)] There [stored_ammo.len == 1 ? "is" : "are"] [stored_ammo.len] shell\s left!"
for (var/material in bullet_cost)
var/material_amount = bullet_cost[material]
material_amount = (material_amount*stored_ammo.len) + base_cost[material]
custom_materials[material] = material_amount
set_custom_materials(custom_materials)//make sure we setup the correct properties again
if(length(bullet_cost))
var/temp_materials = custom_materials.Copy()
for (var/material in bullet_cost)
var/material_amount = bullet_cost[material]
material_amount = (material_amount*stored_ammo.len) + base_cost[material]
temp_materials[material] = material_amount
set_custom_materials(temp_materials)
/obj/item/ammo_box/update_icon_state()
switch(multiple_sprites)