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

Prevent blocking from shocking Flockdrones #114

Merged
merged 1 commit into from
Apr 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -359,14 +359,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