diff --git a/code/game/mecha/mecha_construction_paths.dm b/code/game/mecha/mecha_construction_paths.dm
index d5349ceae69..1063c910156 100644
--- a/code/game/mecha/mecha_construction_paths.dm
+++ b/code/game/mecha/mecha_construction_paths.dm
@@ -571,6 +571,7 @@
custom_action(step, atom/used_atom, mob/user)
user.visible_message("[user] has connected [used_atom] to [holder].", "You connect [used_atom] to [holder]")
holder.overlays += used_atom.icon_state+"+o"
+ user.drop_item()
del used_atom
return 1
diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm
index b3911d7c9f5..d15e17033f7 100644
--- a/code/game/objects/items/robot/robot_parts.dm
+++ b/code/game/objects/items/robot/robot_parts.dm
@@ -8,6 +8,7 @@
var/construction_time = 100
var/list/construction_cost = list("metal"=20000,"glass"=5000)
var/list/part = null
+ var/sabotaged = 0 //Emagging limbs can have repercussions when installed as prosthetics.
/obj/item/robot_parts/l_arm
name = "robot left arm"
@@ -278,3 +279,13 @@
del(src)
return
return
+
+/obj/item/robot_parts/attackby(obj/item/W as obj, mob/user as mob)
+ if(istype(W,/obj/item/weapon/card/emag))
+ if(sabotaged)
+ user << "\red [src] is already sabotaged!"
+ else
+ user << "\red You slide [W] into the dataport on [src] and short out the safeties."
+ sabotaged = 1
+ return
+ ..()
\ No newline at end of file
diff --git a/code/game/objects/storage/coat.dm b/code/game/objects/storage/coat.dm
index c01a3087105..e5151ae5ded 100644
--- a/code/game/objects/storage/coat.dm
+++ b/code/game/objects/storage/coat.dm
@@ -211,8 +211,14 @@
orient2hud()
return
-/obj/item/weapon/storage/emp_act(severity)
+/obj/item/clothing/suit/emp_act(severity)
if(!istype(src.loc, /mob/living))
for(var/obj/O in contents)
O.emp_act(severity)
- ..()
\ No newline at end of file
+ ..()
+
+/obj/item/clothing/suit/hear_talk(mob/M, var/msg)
+ for (var/atom/A in src)
+ if(istype(A,/obj/))
+ var/obj/O = A
+ O.hear_talk(M, msg)
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index a0d9749744c..8e92cf653d9 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -380,7 +380,7 @@
u_equip(item)
update_icons()
- if (istype(usr, /mob/living/carbon/monkey)) //Check if a monkey is throwing. Modify/remove this line as required.
+ if (istype(usr, /mob/living/carbon)) //Check if a carbon mob is throwing. Modify/remove this line as required.
item.loc = src.loc
if(src.client)
src.client.screen -= item
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index 7aa3103f174..e22bbf47467 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -161,6 +161,17 @@ emp_act
if((user != src) && check_shields(I.force, "the [I.name]"))
return 0
+ if(istype(I,/obj/item/weapon/card/emag))
+ if(!(affecting.status & ORGAN_ROBOT))
+ user << "\red That limb isn't robotic."
+ return
+ if(affecting.sabotaged)
+ user << "\red [src]'s [affecting.display_name] is already sabotaged!"
+ else
+ user << "\red You sneakily slide [I] into the dataport on [src]'s [affecting.display_name] and short out the safeties."
+ affecting.sabotaged = 1
+ return
+
if(I.attack_verb.len)
visible_message("\red [src] has been [pick(I.attack_verb)] in the [hit_area] with [I.name] by [user]!")
else
diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm
index 5e1fba994c7..17f5ea05fb6 100644
--- a/code/modules/organs/organ_external.dm
+++ b/code/modules/organs/organ_external.dm
@@ -35,6 +35,7 @@
var/open = 0
var/stage = 0
var/cavity = 0
+ var/sabotaged = 0 //If a prosthetic limb is emagged, it will detonate when it fails.
var/obj/item/hidden = null
var/list/implants = list()
@@ -482,8 +483,8 @@
owner.u_equip(owner.shoes)
if(organ)
destspawn = 1
- //Robotic limbs explode until specified otherwise
- if(status & ORGAN_ROBOT && !no_explode)
+ //Robotic limbs explode if sabotaged.
+ if(status & ORGAN_ROBOT && !no_explode && sabotaged)
owner.visible_message("\red \The [owner]'s [display_name] explodes violently!",\
"\red Your [display_name] explodes!",\
"You hear an explosion followed by a scream!")
@@ -494,10 +495,10 @@
spark_system.start()
spawn(10)
del(spark_system)
- else
- owner.visible_message("\red [owner.name]'s [display_name] flies off in an arc.",\
- "Your [display_name] goes flying off!",\
- "You hear a terrible sound of ripping tendons and flesh.")
+
+ owner.visible_message("\red [owner.name]'s [display_name] flies off in an arc.",\
+ "Your [display_name] goes flying off!",\
+ "You hear a terrible sound of ripping tendons and flesh.")
//Throw organs around
var/lol = pick(cardinal)
diff --git a/code/modules/surgery/generic.dm b/code/modules/surgery/generic.dm
index 7d7de430bfd..e46bff882d4 100644
--- a/code/modules/surgery/generic.dm
+++ b/code/modules/surgery/generic.dm
@@ -190,7 +190,16 @@
max_duration = 160
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
- return ..() && target_zone != "chest" && target_zone != "groin" && target_zone != "head"
+ if (target_zone == "eyes") //there are specific steps for eye surgery
+ return 0
+ if (!hasorgans(target))
+ return 0
+ var/datum/organ/external/affected = target.get_organ(target_zone)
+ if (affected == null)
+ return 0
+ if (affected.status & ORGAN_DESTROYED)
+ return 0
+ return target_zone != "chest" && target_zone != "groin" && target_zone != "head"
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
@@ -203,11 +212,11 @@
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] cuts off [target]'s [affected.display_name] with \the [tool].", \
"\blue You cut off [target]'s [affected.display_name] with \the [tool].")
- affected.droplimb(1,1)
+ affected.droplimb(1,0)
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, sawwing through the bone in [target]'s [affected.display_name] with \the [tool]!", \
"\red Your hand slips, sawwing through the bone in [target]'s [affected.display_name] with \the [tool]!")
affected.createwound(CUT, 30)
- affected.fracture()
+ affected.fracture()
\ No newline at end of file
diff --git a/code/modules/surgery/robolimbs.dm b/code/modules/surgery/robolimbs.dm
index 9b8f42e4d76..97db2846220 100644
--- a/code/modules/surgery/robolimbs.dm
+++ b/code/modules/surgery/robolimbs.dm
@@ -144,10 +144,15 @@
"You start attaching [tool] where [target]'s [affected.display_name] used to be.")
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+ var/obj/item/robot_parts/L = tool
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has attached [tool] where [target]'s [affected.display_name] used to be.", \
"\blue You have attached [tool] where [target]'s [affected.display_name] used to be.")
affected.robotize()
+ if(L.sabotaged)
+ affected.sabotaged = 1
+ else
+ affected.sabotaged = 0
target.update_body()
target.updatehealth()
target.UpdateDamageIcon()
diff --git a/icons/mob/human_races/r_def_lizard.dmi b/icons/mob/human_races/r_def_lizard.dmi
index 6d7f8128ce3..ccb9736ddff 100644
Binary files a/icons/mob/human_races/r_def_lizard.dmi and b/icons/mob/human_races/r_def_lizard.dmi differ
diff --git a/icons/mob/human_races/r_lizard.dmi b/icons/mob/human_races/r_lizard.dmi
index e8fb53fdac0..8f8615d44e1 100644
Binary files a/icons/mob/human_races/r_lizard.dmi and b/icons/mob/human_races/r_lizard.dmi differ