diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm
index 848bb0a29b5..e154f155e1b 100644
--- a/code/modules/mob/living/simple_animal/bot/bot.dm
+++ b/code/modules/mob/living/simple_animal/bot/bot.dm
@@ -709,12 +709,12 @@ Pass a positive integer as an argument to override a bot's default speed.
//No ..() to prevent strip panel showing up - Todo: make that saner
if(topic_denied(usr))
usr << "[src]'s interface is not responding!"
- return
+ return 1
add_fingerprint(usr)
if(href_list["close"])// HUE HUE
if(usr in users)
users.Remove(usr)
- return
+ return 1
if((href_list["power"]) && (bot_core.allowed(usr) || !locked))
if (on)
turn_off()
diff --git a/code/modules/mob/living/simple_animal/bot/cleanbot.dm b/code/modules/mob/living/simple_animal/bot/cleanbot.dm
index cb99f07ed06..39a2336d9fd 100644
--- a/code/modules/mob/living/simple_animal/bot/cleanbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/cleanbot.dm
@@ -231,7 +231,8 @@ text("[on ? "On" : "Off"]"))
return dat
/mob/living/simple_animal/bot/cleanbot/Topic(href, href_list)
- ..()
+ if(..())
+ return 1
switch(href_list["operation"])
if("blood")
blood =!blood
diff --git a/code/modules/mob/living/simple_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm
index bf23cfa994e..75639bb205f 100644
--- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm
+++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm
@@ -130,7 +130,8 @@ Auto Patrol[]"},
return
else if((lasercolor == "r") && (istype(H.wear_suit, /obj/item/clothing/suit/bluetag)))
return
- ..()
+ if(..())
+ return 1
switch(href_list["operation"])
if ("idcheck")
@@ -149,13 +150,16 @@ Auto Patrol[]"},
declare_arrests = !declare_arrests
update_controls()
-/mob/living/simple_animal/bot/ed209/attack_hand(mob/living/carbon/human/M)
- if(M.a_intent == "harm")
- threatlevel = M.assess_threat(src)
- threatlevel += 6
- if(threatlevel >= 4)
- target = M
- mode = BOT_HUNT
+/mob/living/simple_animal/bot/ed209/proc/retaliate(mob/living/carbon/human/H)
+ threatlevel = H.assess_threat(src)
+ threatlevel += 6
+ if(threatlevel >= 4)
+ target = H
+ mode = BOT_HUNT
+
+/mob/living/simple_animal/bot/ed209/attack_hand(mob/living/carbon/human/H)
+ if(H.a_intent == "harm")
+ retaliate(H)
return ..()
/mob/living/simple_animal/bot/ed209/attackby(obj/item/weapon/W, mob/user, params)
@@ -164,13 +168,9 @@ Auto Patrol[]"},
return
if (!istype(W, /obj/item/weapon/screwdriver) && (!target)) // Added check for welding tool to fix #2432. Welding tool behavior is handled in superclass.
if(W.force && W.damtype != STAMINA)//If force is non-zero and damage type isn't stamina.
- threatlevel = user.assess_threat(src)
- threatlevel += 6
- if(threatlevel >= 4)
- target = user
- if(lasercolor)//To make up for the fact that lasertag bots don't hunt
- shootAt(user)
- mode = BOT_HUNT
+ retaliate(user)
+ if(lasercolor)//To make up for the fact that lasertag bots don't hunt
+ shootAt(user)
/mob/living/simple_animal/bot/ed209/Emag(mob/user)
..()
@@ -187,11 +187,7 @@ Auto Patrol[]"},
if(istype(Proj ,/obj/item/projectile/beam)||istype(Proj,/obj/item/projectile/bullet))
if((Proj.damage_type == BURN) || (Proj.damage_type == BRUTE))
if (!Proj.nodamage && Proj.damage < src.health)
- threatlevel = Proj.firer.assess_threat(src)
- threatlevel += 6
- if(threatlevel >= 4)
- target = Proj.firer
- mode = BOT_HUNT
+ retaliate(Proj.firer)
..()
/mob/living/simple_animal/bot/ed209/handle_automated_action()
diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm
index 25d8436e2e3..823579b3b96 100644
--- a/code/modules/mob/living/simple_animal/bot/floorbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm
@@ -118,7 +118,9 @@
user << "[src] buzzes and beeps."
/mob/living/simple_animal/bot/floorbot/Topic(href, href_list)
- ..()
+ if(..())
+ return 1
+
switch(href_list["operation"])
if("replace")
replacetiles = !replacetiles
diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm
index c38a3279817..a4e76f5ed73 100644
--- a/code/modules/mob/living/simple_animal/bot/medbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/medbot.dm
@@ -157,7 +157,8 @@
return dat
/mob/living/simple_animal/bot/medbot/Topic(href, href_list)
- ..()
+ if(..())
+ return 1
if(href_list["adj_threshold"])
var/adjust_num = text2num(href_list["adj_threshold"])
diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm
index 27f2ea40493..833dae0eacb 100644
--- a/code/modules/mob/living/simple_animal/bot/secbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/secbot.dm
@@ -106,8 +106,8 @@ Auto Patrol: []"},
return dat
/mob/living/simple_animal/bot/secbot/Topic(href, href_list)
-
- ..()
+ if(..())
+ return 1
switch(href_list["operation"])
if("idcheck")
@@ -126,13 +126,16 @@ Auto Patrol: []"},
declare_arrests = !declare_arrests
update_controls()
-/mob/living/simple_animal/bot/secbot/attack_hand(mob/living/carbon/human/M)
- if(M.a_intent == "harm")
- threatlevel = M.assess_threat(src)
- threatlevel += 6
- if(threatlevel >= 4)
- target = M
- mode = BOT_HUNT
+/mob/living/simple_animal/bot/secbot/proc/retaliate(mob/living/carbon/human/H)
+ threatlevel = H.assess_threat(src)
+ threatlevel += 6
+ if(threatlevel >= 4)
+ target = H
+ mode = BOT_HUNT
+
+/mob/living/simple_animal/bot/secbot/attack_hand(mob/living/carbon/human/H)
+ if(H.a_intent == "harm")
+ retaliate(H)
return ..()
/mob/living/simple_animal/bot/secbot/attackby(obj/item/weapon/W, mob/user, params)
@@ -140,11 +143,7 @@ Auto Patrol: []"},
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != "harm") // Any intent but harm will heal, so we shouldn't get angry.
return
if(!istype(W, /obj/item/weapon/screwdriver) && (W.force) && (!target) && (W.damtype != STAMINA) ) // Added check for welding tool to fix #2432. Welding tool behavior is handled in superclass.
- threatlevel = user.assess_threat(src)
- threatlevel += 6
- if(threatlevel >= 4)
- target = user
- mode = BOT_HUNT
+ retaliate(user)
/mob/living/simple_animal/bot/secbot/Emag(mob/user)
..()
@@ -161,11 +160,7 @@ Auto Patrol: []"},
if(istype(Proj ,/obj/item/projectile/beam)||istype(Proj,/obj/item/projectile/bullet))
if((Proj.damage_type == BURN) || (Proj.damage_type == BRUTE))
if (!Proj.nodamage && Proj.damage < src.health)
- threatlevel = Proj.firer.assess_threat(src)
- threatlevel += 6
- if(threatlevel >= 4)
- target = Proj.firer
- mode = BOT_HUNT
+ retaliate(Proj.firer)
..()