Fixes infinite charge stunbaton and stunprod exploit (#16012)

* Fixes infinite baton charge exploit

* moved it to the right proc
This commit is contained in:
S34N
2021-05-11 10:29:00 +01:00
committed by GitHub
parent 1b65d50424
commit 472a05efe9
@@ -76,6 +76,10 @@
if(!cell)
return
cell.use(amount)
if(cell.rigged)
cell = null
turned_on = FALSE
update_icon()
if(cell.charge < (hitcost)) // If after the deduction the baton doesn't have enough charge for a stun hit it turns off.
turned_on = FALSE
update_icon()