Porting further material datum features and improvements.

This commit is contained in:
Ghommie
2020-06-24 20:45:17 +02:00
parent 07c7432f43
commit c5cbfa64e5
66 changed files with 945 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)