diff --git a/code/game/objects/items/stunbaton.dm b/code/game/objects/items/stunbaton.dm index 9260b1bc6f..df59b924fe 100644 --- a/code/game/objects/items/stunbaton.dm +++ b/code/game/objects/items/stunbaton.dm @@ -130,10 +130,7 @@ /obj/item/melee/baton/attack(mob/M, mob/living/carbon/human/user) if(status && user.has_trait(TRAIT_CLUMSY) && prob(50)) - user.visible_message("[user] accidentally hits [user.p_them()]self with [src]!", \ - "You accidentally hit yourself with [src]!") - user.Knockdown(stunforce*3) - deductcharge(hitcost) + clowning_around(user) return if(user.getStaminaLoss() >= STAMINA_SOFTCRIT)//CIT CHANGE - makes it impossible to baton in stamina softcrit @@ -203,6 +200,12 @@ return TRUE +/obj/item/melee/baton/proc/clowning_around(mob/living/user) + user.visible_message("[user] accidentally hits [user.p_them()]self with [src]!", \ + "You accidentally hit yourself with [src]!") + user.Knockdown(stunforce*3) + deductcharge(hitcost) + /obj/item/melee/baton/emp_act(severity) . = ..() if (!(. & EMP_PROTECT_SELF)) @@ -238,3 +241,5 @@ /obj/item/melee/baton/cattleprod/baton_stun() if(sparkler.activate()) ..() + +#undef STUNBATON_CHARGE_LENIENCY diff --git a/code/game/objects/items/teleprod.dm b/code/game/objects/items/teleprod.dm index fd9972f427..c514e5e926 100644 --- a/code/game/objects/items/teleprod.dm +++ b/code/game/objects/items/teleprod.dm @@ -6,27 +6,23 @@ item_state = "teleprod" slot_flags = null -/obj/item/melee/baton/cattleprod/teleprod/attack(mob/living/carbon/M, mob/living/carbon/user)//handles making things teleport when hit - ..() - if(status && user.has_trait(TRAIT_CLUMSY) && prob(50)) - user.visible_message("[user] accidentally hits [user.p_them()]self with [src]!", \ - "You accidentally hit yourself with [src]!") - if(do_teleport(user, get_turf(user), 50))//honk honk - SEND_SIGNAL(user, COMSIG_LIVING_MINOR_SHOCK) - user.Knockdown(stunforce*3) - deductcharge(hitcost) - else - SEND_SIGNAL(user, COMSIG_LIVING_MINOR_SHOCK) - user.Knockdown(stunforce*3) - deductcharge(hitcost/4) +/obj/item/melee/baton/cattleprod/teleprod/baton_stun(mob/living/carbon/M, mob/living/carbon/user)//handles making things teleport when hit + . = ..() + if(!. || !istype(M) || M.anchored) return else - if(status) - if(!istype(M) && M.anchored) - return . - else - SEND_SIGNAL(M, COMSIG_LIVING_MINOR_SHOCK) - do_teleport(M, get_turf(M), 15) + SEND_SIGNAL(M, COMSIG_LIVING_MINOR_SHOCK) + do_teleport(M, get_turf(M), 15) + +/obj/item/melee/baton/cattleprod/teleprod/clowning_around(mob/living/user) + user.visible_message("[user] accidentally hits [user.p_them()]self with [src]!", \ + "You accidentally hit yourself with [src]!") + SEND_SIGNAL(user, COMSIG_LIVING_MINOR_SHOCK) + user.Knockdown(stunforce*3) + if(do_teleport(user, get_turf(user), 50)) + deductcharge(hitcost) + else + deductcharge(hitcost * 0.25) /obj/item/melee/baton/cattleprod/attackby(obj/item/I, mob/user, params)//handles sticking a crystal onto a stunprod to make a teleprod if(istype(I, /obj/item/stack/ore/bluespace_crystal))