Sniper Ammo Count Fix (#11339)

This commit is contained in:
Geeves
2021-03-01 17:40:02 +02:00
committed by GitHub
parent a4de5aad8f
commit eb01c2e747
2 changed files with 14 additions and 5 deletions

View File

@@ -31,6 +31,14 @@
recoil_wielded = 2
accuracy_wielded = -1
/obj/item/gun/projectile/heavysniper/get_ammo()
var/ammo_count = 0
for(var/thing in loaded)
var/obj/item/ammo_casing/AC = thing
if(AC.BB) // my favourite band - geeves
ammo_count++
return ammo_count
/obj/item/gun/projectile/heavysniper/update_icon()
..()
if(bolt_open)
@@ -131,11 +139,6 @@
else
RH.take_damage(30)
/obj/item/gun/projectile/heavysniper/unathi/get_ammo()
if(chambered)
return TRUE
return FALSE
/obj/item/gun/projectile/heavysniper/tranq
name = "tranquilizer rifle"
desc = "A nonlethal modification to the PTR-7 anti-materiel rifle meant for sedation and capture of the most dangerous of game. Fires .50 cal PPS shells that deploy a torpor inducing drug payload."

View File

@@ -0,0 +1,6 @@
author: Geeves
delete-after: True
changes:
- bugfix: "AMRs, tranq rifles, and Hegemony Sluggers will now report their ammo counts correctly."