From d67e339980717735ddfdcbf7522c78f97085e67a Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Mon, 14 Oct 2019 22:10:03 +0200 Subject: [PATCH 1/3] teleprods works on non-carbons too now and minor stunbaton tweak. --- code/game/objects/items/stunbaton.dm | 6 ++++-- code/game/objects/items/teleprod.dm | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/code/game/objects/items/stunbaton.dm b/code/game/objects/items/stunbaton.dm index bfe630ba01..a7524f9445 100644 --- a/code/game/objects/items/stunbaton.dm +++ b/code/game/objects/items/stunbaton.dm @@ -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 \ No newline at end of file +#undef STUNBATON_CHARGE_LENIENCY +#undef STUNBATON_DEPLETION_RATE \ No newline at end of file diff --git a/code/game/objects/items/teleprod.dm b/code/game/objects/items/teleprod.dm index 40392c19c3..8d2a4dcf18 100644 --- a/code/game/objects/items/teleprod.dm +++ b/code/game/objects/items/teleprod.dm @@ -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("[user] accidentally hits [user.p_them()]self with [src]!", \ From 80b91a56a816ddb5a7381ee62d87b340e579077a Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Mon, 14 Oct 2019 23:58:39 +0200 Subject: [PATCH 2/3] undefined var fix --- code/game/objects/items/teleprod.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/teleprod.dm b/code/game/objects/items/teleprod.dm index 8d2a4dcf18..f427bf6c4c 100644 --- a/code/game/objects/items/teleprod.dm +++ b/code/game/objects/items/teleprod.dm @@ -10,7 +10,7 @@ . = ..() if(!. || L.anchored) return - do_teleport(M, get_turf(L), 15, channel = TELEPORT_CHANNEL_BLUESPACE) + do_teleport(L, get_turf(L), 15, channel = TELEPORT_CHANNEL_BLUESPACE) /obj/item/melee/baton/cattleprod/teleprod/clowning_around(mob/living/user) user.visible_message("[user] accidentally hits [user.p_them()]self with [src]!", \ From 2ca246d2ebc101bd93b641b9ce28f5c06c0cc031 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Fri, 18 Oct 2019 18:33:02 +0200 Subject: [PATCH 3/3] fine-o --- code/game/objects/items/stunbaton.dm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/code/game/objects/items/stunbaton.dm b/code/game/objects/items/stunbaton.dm index a7524f9445..bfe630ba01 100644 --- a/code/game/objects/items/stunbaton.dm +++ b/code/game/objects/items/stunbaton.dm @@ -1,5 +1,4 @@ #define STUNBATON_CHARGE_LENIENCY 0.3 -#define STUNBATON_DEPLETION_RATE 0.006 /obj/item/melee/baton name = "stunbaton" @@ -77,7 +76,7 @@ update_icon() /obj/item/melee/baton/process() - deductcharge(round(hitcost * STUNBATON_DEPLETION_RATE), FALSE, FALSE) + deductcharge(hitcost * 0.004, FALSE, FALSE) /obj/item/melee/baton/update_icon() if(status) @@ -251,5 +250,4 @@ sparkler?.activate() . = ..() -#undef STUNBATON_CHARGE_LENIENCY -#undef STUNBATON_DEPLETION_RATE \ No newline at end of file +#undef STUNBATON_CHARGE_LENIENCY \ No newline at end of file