Merge pull request #12596 from Ghommie/Ghommie-cit819
Porting further material datum features and improvements.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user