diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm index 4b25d6fd02c..f3ad7db4378 100644 --- a/code/game/objects/items/stacks/rods.dm +++ b/code/game/objects/items/stacks/rods.dm @@ -8,6 +8,7 @@ var/global/list/datum/stack_recipe/rod_recipes = list ( \ desc = "Some rods. Can be used for building, or something." singular_name = "metal rod" icon_state = "rods" + item_state = "rods" flags = CONDUCT w_class = 3.0 force = 9.0 @@ -21,8 +22,15 @@ var/global/list/datum/stack_recipe/rod_recipes = list ( \ /obj/item/stack/rods/New(var/loc, var/amount=null) recipes = rod_recipes + update_icon() return ..() +/obj/item/stack/rods/update_icon() + if(get_amount() <= 5) + icon_state = "rods-[get_amount()]" + else + icon_state = "rods" + /obj/item/stack/rods/attackby(obj/item/W as obj, mob/user as mob) ..() if (istype(W, /obj/item/weapon/weldingtool)) diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 9ab05593915..d1c629f2856 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -177,6 +177,7 @@ if(usr) usr.unEquip(src, 1) qdel(src) + update_icon() return 1 /obj/item/stack/proc/add(var/amount) @@ -184,6 +185,7 @@ source.add_charge(amount * cost) else src.amount += amount + update_icon() /obj/item/stack/proc/add_to_stacks(mob/usr as mob) var/obj/item/stack/oldsrc = src @@ -199,6 +201,7 @@ usr << "You add new [item.singular_name] to the stack. It now contains [item.amount] [item.singular_name]\s." if(oldsrc.amount <= 0) break + update_icon() /obj/item/stack/attack_hand(mob/user as mob) if (user.get_inactive_hand() == src) @@ -240,6 +243,7 @@ src.use(to_transfer) if (src && usr.machine==src) spawn(0) src.interact(usr) + S.update_icon() else ..() diff --git a/icons/obj/items.dmi b/icons/obj/items.dmi index 166062cd3be..bdc82908b0a 100644 Binary files a/icons/obj/items.dmi and b/icons/obj/items.dmi differ