Changed the way smg & toy icon updates.

Switched from using math to fit the icon's name to having the icon's
name fit the math, also changed the normal SMG's mag so it can also
updates properly.
This commit is contained in:
shazbot194
2016-09-25 01:45:38 -08:00
parent 47912cfd43
commit b6fef2185c
2 changed files with 3 additions and 3 deletions
@@ -269,7 +269,7 @@
/obj/item/ammo_box/magazine/smgm9mm/update_icon()
..()
icon_state = "[initial(icon_state)]-[round(ammo_count(),6)]"
icon_state = "[initial(icon_state)]-[round(ammo_count()+1,4)]"
/obj/item/ammo_box/magazine/pistolm9mm
name = "pistol magazine (9mm)"
@@ -373,12 +373,12 @@
/obj/item/ammo_box/magazine/toy/smg
name = "foam force SMG magazine"
icon_state = "smg9mm-30"
icon_state = "smg9mm-20"
max_ammo = 20
/obj/item/ammo_box/magazine/toy/smg/update_icon()
..()
icon_state = "smg9mm-[round(ammo_count()+1,4)*6/4]"
icon_state = "smg9mm-[round(ammo_count()+1,4)]"
/obj/item/ammo_box/magazine/toy/smg/riot
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot