From 044384d0b1aba4938e3ef4324d4681880b45b988 Mon Sep 17 00:00:00 2001
From: kevinz000 <2003111+kevinz000@users.noreply.github.com>
Date: Sun, 5 Nov 2017 02:28:01 -0800
Subject: [PATCH 1/2] 1# This is a combination of 2 commits. (#32276)
can no longer turn on projectile dampener with buckled mobs
---
code/game/objects/items/robot/robot_items.dm | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm
index c4d86b0800..e4485266b5 100644
--- a/code/game/objects/items/robot/robot_items.dm
+++ b/code/game/objects/items/robot/robot_items.dm
@@ -546,9 +546,11 @@
to_chat(user, "[src] is still recycling its projectors!")
return
cycle_delay = world.time + PKBORG_DAMPEN_CYCLE_DELAY
- active = !active
- if(active)
- activate_field(user)
+ if(!active)
+ if(!user.has_buckled_mobs())
+ activate_field()
+ else
+ to_chat(user, "[src]'s safety cutoff prevents you from activating it due to living beings being ontop of you!")
else
deactivate_field()
update_icon()
@@ -561,16 +563,17 @@
if(istype(dampening_field))
QDEL_NULL(dampening_field)
dampening_field = make_field(/datum/proximity_monitor/advanced/peaceborg_dampener, list("current_range" = field_radius, "host" = src, "projector" = src))
-
var/mob/living/silicon/robot/owner = get_host()
if(owner)
owner.module.allow_riding = FALSE
+ active = TRUE
/obj/item/borg/projectile_dampen/proc/deactivate_field()
QDEL_NULL(dampening_field)
visible_message("\The [src] shuts off!")
for(var/P in tracked)
restore_projectile(P)
+ active = FALSE
var/mob/living/silicon/robot/owner = get_host()
if(owner)