mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Fix for guns eating empty magazines.
This commit is contained in:
@@ -51,6 +51,9 @@
|
|||||||
if(istype(A, /obj/item/ammo_magazine))
|
if(istype(A, /obj/item/ammo_magazine))
|
||||||
if((load_method == MAGAZINE) && loaded.len) return
|
if((load_method == MAGAZINE) && loaded.len) return
|
||||||
var/obj/item/ammo_magazine/AM = A
|
var/obj/item/ammo_magazine/AM = A
|
||||||
|
if(AM.stored_ammo.len <= 0)
|
||||||
|
user << "<span class='warning'>The magazine is empty!</span>"
|
||||||
|
return
|
||||||
for(var/obj/item/ammo_casing/AC in AM.stored_ammo)
|
for(var/obj/item/ammo_casing/AC in AM.stored_ammo)
|
||||||
if(loaded.len >= max_shells)
|
if(loaded.len >= max_shells)
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user