Makes abductor baton child of stun baton (#48766)

* Makes abductor baton child of stun baton


- Clarify var names and reorder vars in baton defines
- Slightly simplify active baton wash code

* forget about ()
This commit is contained in:
cacogen
2020-02-07 14:53:14 +01:00
committed by GitHub
parent efb3aed04e
commit 9436ed69a8
9 changed files with 186 additions and 134 deletions
+9 -11
View File
@@ -309,17 +309,15 @@
if(istype(O, /obj/item/melee/baton))
var/obj/item/melee/baton/B = O
if(B.cell)
if(B.cell.charge > 0 && B.turned_on)
flick("baton_active", src)
var/stunforce = B.stunforce
user.Paralyze(stunforce)
user.stuttering = stunforce/20
B.deductcharge(B.hitcost)
user.visible_message("<span class='warning'>[user] shocks [user.p_them()]self while attempting to wash the active [B.name]!</span>", \
"<span class='userdanger'>You unwisely attempt to wash [B] while it's still on.</span>")
playsound(src, "sparks", 50, TRUE)
return
if(B.cell && B.cell.charge && B.turned_on)
flick("baton_active", src)
user.Paralyze(B.stun_time)
user.stuttering = B.stun_time/20
B.deductcharge(B.cell_hit_cost)
user.visible_message("<span class='warning'>[user] shocks [user.p_them()]self while attempting to wash the active [B.name]!</span>", \
"<span class='userdanger'>You unwisely attempt to wash [B] while it's still on.</span>")
playsound(src, B.stun_sound, 50, TRUE)
return
if(istype(O, /obj/item/mop))
O.reagents.add_reagent(dispensedreagent, 5)