mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 02:24:11 +01:00
Fix: stop magic staff recharging while already at max charge (#21692)
* Fix for staffs recharging while at max charge * Update code/modules/projectiles/guns/magic.dm Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * Update code/modules/projectiles/guns/magic.dm Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * Update code/modules/projectiles/guns/magic.dm Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * Update code/modules/projectiles/guns/magic.dm Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> --------- Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
This commit is contained in:
@@ -65,12 +65,18 @@
|
||||
|
||||
|
||||
/obj/item/gun/magic/process()
|
||||
// Don't start recharging until we lose a charge
|
||||
if(charges >= max_charges)
|
||||
charge_tick = 0
|
||||
return FALSE
|
||||
|
||||
charge_tick++
|
||||
if(charge_tick < recharge_rate || charges >= max_charges)
|
||||
return 0
|
||||
charge_tick = 0
|
||||
charges++
|
||||
return 1
|
||||
if(charge_tick >= recharge_rate)
|
||||
charge_tick = 0
|
||||
charges++
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
|
||||
/obj/item/gun/magic/update_icon_state()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user