Fixes wand recharge

Self-charging wands were able to hold one extra charge by allowing the recharge counter to increase indefinitely when the number of charges reached the maximum number of charges.
This commit is contained in:
JMoldy
2020-01-03 02:31:10 -08:00
parent aa50b85a2f
commit f811603c85

View File

@@ -63,8 +63,11 @@
/obj/item/gun/magic/process() /obj/item/gun/magic/process()
if (charges >= max_charges)
charge_tick = 0
return
charge_tick++ charge_tick++
if(charge_tick < recharge_rate || charges >= max_charges) if(charge_tick < recharge_rate)
return 0 return 0
charge_tick = 0 charge_tick = 0
charges++ charges++