Merge pull request #4051 from Citadel-Station-13/upstream-merge-32773
[MIRROR] Integrated circuit fixes and code improvements
This commit is contained in:
@@ -108,10 +108,7 @@
|
||||
use_power(250 * recharge_coeff)
|
||||
using_power = 1
|
||||
update_icon(using_power)
|
||||
if(istype(charging, /obj/item/gun/energy))
|
||||
var/obj/item/gun/energy/E = charging
|
||||
E.recharge_newshot()
|
||||
return
|
||||
|
||||
if(istype(charging, /obj/item/ammo_box/magazine/recharge))
|
||||
var/obj/item/ammo_box/magazine/recharge/R = charging
|
||||
if(R.stored_ammo.len < R.max_ammo)
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
user.visible_message("[user] starts recharging [A] with [src].","<span class='notice'>You start recharging [A] with [src].</span>")
|
||||
while(C.charge < C.maxcharge)
|
||||
if(E)
|
||||
E.chambered = null // Prevents someone from firing continuously while recharging the gun.
|
||||
E.semicd = TRUE // Prevents someone from firing continuously while recharging the gun.
|
||||
if(do_after(user, 10, target = user) && cell.charge)
|
||||
done_any = TRUE
|
||||
induce(C, coefficient)
|
||||
@@ -130,7 +130,7 @@
|
||||
else
|
||||
break
|
||||
if(E)
|
||||
E.recharge_newshot() //We're done charging, so we'll let someone fire it now.
|
||||
E.reset_semicd() //We're done charging, so we'll let someone fire it now.
|
||||
if(done_any) // Only show a message if we succeeded at least once
|
||||
user.visible_message("[user] recharged [A]!","<span class='notice'>You recharged [A]!</span>")
|
||||
recharging = FALSE
|
||||
|
||||
Reference in New Issue
Block a user