teleprods works on non-carbons too now and minor stunbaton tweak.

This commit is contained in:
Ghommie
2019-10-14 22:10:03 +02:00
parent 304eae3407
commit d67e339980
2 changed files with 7 additions and 5 deletions
+4 -2
View File
@@ -1,4 +1,5 @@
#define STUNBATON_CHARGE_LENIENCY 0.3
#define STUNBATON_DEPLETION_RATE 0.006
/obj/item/melee/baton
name = "stunbaton"
@@ -76,7 +77,7 @@
update_icon()
/obj/item/melee/baton/process()
deductcharge(hitcost * 0.004, FALSE, FALSE)
deductcharge(round(hitcost * STUNBATON_DEPLETION_RATE), FALSE, FALSE)
/obj/item/melee/baton/update_icon()
if(status)
@@ -250,4 +251,5 @@
sparkler?.activate()
. = ..()
#undef STUNBATON_CHARGE_LENIENCY
#undef STUNBATON_CHARGE_LENIENCY
#undef STUNBATON_DEPLETION_RATE
+3 -3
View File
@@ -6,11 +6,11 @@
item_state = "teleprod"
slot_flags = null
/obj/item/melee/baton/cattleprod/teleprod/baton_stun(mob/living/carbon/M, mob/living/carbon/user)//handles making things teleport when hit
/obj/item/melee/baton/cattleprod/teleprod/baton_stun(mob/living/L, mob/living/carbon/user)//handles making things teleport when hit
. = ..()
if(!. || !istype(M) || M.anchored)
if(!. || L.anchored)
return
do_teleport(M, get_turf(M), 15, channel = TELEPORT_CHANNEL_BLUESPACE)
do_teleport(M, get_turf(L), 15, channel = TELEPORT_CHANNEL_BLUESPACE)
/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>", \