diff --git a/code/modules/vehicles/mecha/equipment/weapons/mecha_ammo.dm b/code/modules/vehicles/mecha/equipment/weapons/mecha_ammo.dm index c939549c928..9dc8ab40867 100644 --- a/code/modules/vehicles/mecha/equipment/weapons/mecha_ammo.dm +++ b/code/modules/vehicles/mecha/equipment/weapons/mecha_ammo.dm @@ -10,6 +10,8 @@ var/direct_load //For weapons where we re-load the weapon itself rather than adding to the ammo storage. var/load_audio = 'sound/weapons/gun/general/mag_bullet_insert.ogg' var/ammo_type + /// whether to qdel this mecha_ammo when it becomes empty + var/qdel_on_empty = FALSE /obj/item/mecha_ammo/update_name() . = ..() @@ -20,7 +22,7 @@ desc = rounds ? initial(desc) : "An exosuit ammuniton box that has since been emptied. It can be safely folded for recycling." /obj/item/mecha_ammo/update_icon_state() - icon_state = rounds ? initial(icon_state) : "empty" + icon_state = rounds ? initial(icon_state) : "[initial(icon_state)]_e" return ..() /obj/item/mecha_ammo/attack_self(mob/user) diff --git a/code/modules/vehicles/mecha/mecha_defense.dm b/code/modules/vehicles/mecha/mecha_defense.dm index 8b859feb2c3..f4ab81b97d0 100644 --- a/code/modules/vehicles/mecha/mecha_defense.dm +++ b/code/modules/vehicles/mecha/mecha_defense.dm @@ -418,6 +418,9 @@ gun.projectiles_cache = gun.projectiles_cache + A.rounds playsound(get_turf(user),A.load_audio,50,TRUE) to_chat(user, span_notice("You add [A.rounds] [A.ammo_type][A.rounds > 1?"s":""] to the [gun.name]")) + if(A.qdel_on_empty) + qdel(A) + return TRUE A.rounds = 0 A.set_custom_materials(list(/datum/material/iron=2000)) A.update_appearance() diff --git a/icons/mecha/mecha_ammo.dmi b/icons/mecha/mecha_ammo.dmi index 63bc38cfa71..c7b92cfade5 100644 Binary files a/icons/mecha/mecha_ammo.dmi and b/icons/mecha/mecha_ammo.dmi differ