This commit is contained in:
Zuhayr
2013-06-21 18:00:25 -07:00
parent cffb7a40bd
commit a16c8e0595
5 changed files with 46 additions and 9 deletions
+12 -3
View File
@@ -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()
+5
View File
@@ -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()