Adds in limb replacement surgery, robolimbs, and all the crap for them. They can take more damage, require wires and welder to repair, but malfunction when they get more damaged, and explode when destroyed.

This commit is contained in:
SkyMarshal
2012-04-11 15:42:54 -07:00
parent cbad550bf1
commit d03228bc6e
23 changed files with 301 additions and 71 deletions
@@ -82,9 +82,9 @@ Deathnettle
/obj/item/weapon/grown/nettle/pickup(mob/living/carbon/human/user as mob)
if(!user.gloves)
user << "\red The nettle burns your bare hand!"
if(istype(user, /mob/living/carbon/human))
if(hasorgans(user))
var/organ = ((user.hand ? "l_":"r_") + "arm")
var/datum/organ/external/affecting = user.get_organ(organ)
var/datum/organ/external/affecting = user:get_organ(organ)
affecting.take_damage(0,force)
else
user.take_organ_damage(0,force)
@@ -101,9 +101,9 @@ Deathnettle
/obj/item/weapon/grown/deathnettle/pickup(mob/living/carbon/human/user as mob)
if(!user.gloves)
if(istype(user, /mob/living/carbon/human))
if(hasorgans(user))
var/organ = ((user.hand ? "l_":"r_") + "arm")
var/datum/organ/external/affecting = user.get_organ(organ)
var/datum/organ/external/affecting = user:get_organ(organ)
affecting.take_damage(0,force)
else
user.take_organ_damage(0,force)
@@ -43,6 +43,10 @@ MEDICAL
use(1)
return
if(affecting.robot)
user << "Medical equipment for a robot arm? Better get a welder..."
return
for(var/datum/organ/wound/W in affecting.wounds)
if(W.bleeding || !W.is_healing)
if(heal_brute && W.wound_type == 2)
@@ -157,6 +161,9 @@ MEDICAL
affecting.gauzed = 1
use(1)
return
if(affecting.robot)
user << "Medical equipment for a robot arm? Better get a welder..."
return
for(var/datum/organ/wound/W in affecting.wounds)
if(W.bleeding || !W.healing_state)
@@ -45,6 +45,7 @@
var/datum/organ/external/T = H.organs["l_hand"]
T.attachable = 0
T.destroyed = 0
T.broken = 0
T.robot = 1
user.drop_item()
M.update_body()
@@ -104,6 +105,7 @@
var/datum/organ/external/T = H.organs["r_hand"]
T.attachable = 0
T.destroyed = 0
T.broken = 0
T.robot = 1
user.drop_item()
M.update_body()
@@ -162,6 +164,7 @@
var/datum/organ/external/T = H.organs["l_foot"]
T.attachable = 0
T.destroyed = 0
T.broken = 0
T.robot = 1
user.drop_item()
M.update_body()
@@ -221,6 +224,7 @@
var/datum/organ/external/T = H.organs["r_foot"]
T.attachable = 0
T.destroyed = 0
T.broken = 0
T.robot = 1
user.drop_item()
M.update_body()
@@ -246,6 +246,10 @@ CIRCULAR SAW
if(S.destroyed)
return ..()
if(S.robot)
user << "Medical equipment for a robot arm? How would that do any good..."
return
if(!S.open)
user << "\red There is skin in the way!"
return 0
@@ -556,6 +560,10 @@ CIRCULAR SAW
if(S.destroyed)
return ..()
if(S.robot)
user << "Medical equipment for a robot arm? How would that do any good..."
return
if(!S.open)
user << "\red There is skin in the way!"
return 0
@@ -764,6 +772,9 @@ CIRCULAR SAW
if(!S.open)
usr << "<b>You have to cut the limb open first!</b>"
return
if(S.robot)
user << "Medical equipment for a robot arm? How would that do any good..."
return
for(var/mob/O in viewers(M))
O.show_message("\red [user.name] scans the wounds on [M.name]'s [S.display_name] with \the [src.name]", 1)
@@ -977,6 +988,10 @@ CIRCULAR SAW
if(S.destroyed)
user << "What [S.display_name]?"
if(S.robot)
user << "Medical equipment for a robot arm? How would that do any good..."
return
if(!S.open)
user << "\red There is no wound to close up!"
return 0
@@ -1366,6 +1381,10 @@ CIRCULAR SAW
if(S.destroyed)
return ..()
if(S.robot)
user << "Medical equipment for a robot arm? How would that do any good..."
return
if(S.open)
user << "\red The wound is already open!"
return 0
@@ -1559,6 +1578,14 @@ CIRCULAR SAW
var/datum/organ/external/S = H:organs[user.zone_sel.selecting]
if(S.destroyed)
return
if(S.robot)
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, M)
spark_system.attach(M)
spark_system.start()
spawn(10)
del(spark_system)
for(var/mob/O in viewers(H, null))
O.show_message(text("\red [H] gets \his [S.display_name] sawed at with [src] by [user]... It looks like [user] is trying to cut it off!"), 1)
if(!do_after(user, rand(20,80)))
@@ -25,4 +25,24 @@ TILES
user << "\blue You are not using this to lay wire..."
return
/obj/item/weapon/wire/attack(mob/M as mob, mob/user as mob)
if(hasorgans(M))
var/datum/organ/external/S = M:organs[user.zone_sel.selecting]
if(!S.robot || user.a_intent != "help")
return ..()
if(S.brute_dam)
S.heal_damage(0,15,0,1)
if(user != M)
user.visible_message("\red You repair some burn damage on \the [M]'s [S.display_name]",\
"\red \The [user] repairs some burn damage on \the [M]'s [S.display_name] with \the [src]",\
"You wires being cut.")
else
user.visible_message("\red You repair some burn damage on your [S.display_name]",\
"\red \The [user] repairs some burn damage on their [S.display_name] with \the [src]",\
"You wires being cut.")
else
user << "Nothing to fix!"
else
return ..()
+20
View File
@@ -260,6 +260,26 @@ WELDINGTOOOL
user.disabilities &= ~1
return
attack(mob/M as mob, mob/user as mob)
if(hasorgans(M))
var/datum/organ/external/S = M:organs[user.zone_sel.selecting]
if(!S.robot || user.a_intent != "help")
return ..()
if(S.brute_dam)
S.heal_damage(15,0,0,1)
if(user != M)
user.visible_message("\red You patch some dents on \the [M]'s [S.display_name]",\
"\red \The [user] patches some dents on \the [M]'s [S.display_name] with \the [src]",\
"You hear a welder.")
else
user.visible_message("\red You patch some dents on your [S.display_name]",\
"\red \The [user] patches some dents on their [S.display_name] with \the [src]",\
"You hear a welder.")
else
user << "Nothing to fix!"
else
return ..()
/obj/item/weapon/weldingtool/largetank
name = "Industrial Welding Tool"
+2
View File
@@ -214,6 +214,8 @@ SHARDS
var/mob/living/carbon/human/H = M
if(!((H.shoes) || (H.wear_suit && H.wear_suit.body_parts_covered & FEET)))
var/datum/organ/external/affecting = H.get_organ(pick("l_foot", "r_foot"))
if(affecting.robot)
return
H.Weaken(3)
affecting.take_damage(5, 0)
H.UpdateDamageIcon()
+3 -3
View File
@@ -132,12 +132,12 @@
if("feet")
if(!H.shoes)
affecting = H.get_organ(pick("l_leg", "r_leg"))
H.Weaken(3)
if(!affecting.robot) H.Weaken(3)
if("l_hand", "r_hand")
if(!H.gloves)
affecting = H.get_organ(type)
H.Stun(3)
if(affecting)
if(!affecting.robot) H.Stun(3)
if(affecting && !affecting.robot)
affecting.take_damage(1, 0)
H.UpdateDamageIcon()
H.updatehealth()