updating old teleprods.

This commit is contained in:
Ghommie
2019-05-26 06:49:58 +02:00
parent 288f97dd13
commit cfa53d53f1
2 changed files with 24 additions and 23 deletions
+9 -4
View File
@@ -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("<span class='danger'>[user] accidentally hits [user.p_them()]self with [src]!</span>", \
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
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("<span class='danger'>[user] accidentally hits [user.p_them()]self with [src]!</span>", \
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
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
+15 -19
View File
@@ -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("<span class='danger'>[user] accidentally hits [user.p_them()]self with [src]!</span>", \
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
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("<span class='danger'>[user] accidentally hits [user.p_them()]self with [src]!</span>", \
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
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))