Skip to content
This repository has been archived by the owner on May 30, 2022. It is now read-only.

Commit

Permalink
fix block shocking you (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
FlameArrow57 authored Apr 7, 2022
1 parent 5d5fea8 commit 0ef4d2e
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions code/mob/living/critter/flock/flockdrone.dm
Original file line number Diff line number Diff line change
Expand Up @@ -355,14 +355,17 @@
/mob/living/critter/flock/drone/process_move(keys)
if(keys && length(src.grabbed_by))
// someone is grabbing us, and we want to move
++src.antigrab_counter
if(src.antigrab_counter >= src.antigrab_fires_at)
playsound(src, "sound/effects/electric_shock.ogg", 40, 1, -3)
boutput(src, "<span class='flocksay'><b>\[SYSTEM: Anti-grapple countermeasures deployed.\]</b></span>")
for(var/obj/item/grab/G in src.grabbed_by)
var/mob/living/L = G.assailant
L.shock(src, 5000)
if (length(src.grabbed_by) == 1 && src.find_type_in_hand(/obj/item/grab/block))
src.antigrab_counter = 0
else
++src.antigrab_counter
if(src.antigrab_counter >= src.antigrab_fires_at)
playsound(src, "sound/effects/electric_shock.ogg", 40, 1, -3)
boutput(src, "<span class='flocksay'><b>\[SYSTEM: Anti-grapple countermeasures deployed.\]</b></span>")
for(var/obj/item/grab/G in src.grabbed_by)
var/mob/living/L = G.assailant
L.shock(src, 5000)
src.antigrab_counter = 0
else
src.antigrab_counter = 0
if(keys & KEY_RUN)
Expand Down

0 comments on commit 0ef4d2e

Please sign in to comment.