Fixes #13070 - cyborg energy guns breaking (#13071)

Co-authored-by: Kyep <Kyep@users.noreply.github.com>
This commit is contained in:
Kyep
2020-03-06 05:35:02 +00:00
committed by GitHub
parent adf908e855
commit 49bdfbf3f0
+6 -1
View File
@@ -98,7 +98,7 @@
return
if(!chambered)
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
if(cell.charge >= shot.e_cost) //if there's enough power in the cell cell...
if(cell.charge >= shot.e_cost) //if there's enough power in the WEAPON'S cell...
chambered = shot //...prepare a new shot based on the current ammo type selected
if(!chambered.BB)
chambered.newshot()
@@ -111,6 +111,11 @@
chambered = null //either way, released the prepared shot
newshot()
/obj/item/gun/energy/process_fire(atom/target, mob/living/user, message = 1, params, zone_override, bonus_spread = 0)
if(!chambered && can_shoot())
process_chamber()
return ..()
/obj/item/gun/energy/proc/select_fire(mob/living/user)
select++
if(select > ammo_type.len)