Merge branch 'master' of github.com:Baystation12/Baystation12 into dev

This commit is contained in:
Mloc-Argent
2013-11-14 12:03:59 +00:00
13 changed files with 82 additions and 105 deletions
+9 -34
View File
@@ -91,7 +91,7 @@
I.take_damage(rand(3,5))
//Special effects for limbs.
if(E.name in list("l_hand","l_arm","r_hand","r_arm"))
if(E.name in list("l_hand","l_arm","r_hand","r_arm") && (broken||malfunction))
var/obj/item/c_hand //Getting what's in this hand
if(E.name == "l_hand" || E.name == "l_arm")
c_hand = l_hand
@@ -99,8 +99,7 @@
c_hand = r_hand
if (c_hand)
if (broken||malfunction)
u_equip(c_hand)
u_equip(c_hand)
if(broken)
emote("me", 1, "screams in pain and drops what they were holding in their [E.display_name?"[E.display_name]":"[E]"]!")
@@ -124,35 +123,11 @@
paralysis = 10
//Check arms and legs for existence
var/canstand_l = 1 //Can stand on left leg
var/canstand_r = 1 //Can stand on right leg
var/hasleg_l = 1 //Have left leg
var/hasleg_r = 1 //Have right leg
var/hasarm_l = 1 //Have left arm
var/hasarm_r = 1 //Have right arm
var/datum/organ/external/E
E = get_organ("l_leg")
if(E.status & ORGAN_DESTROYED && !(E.status & ORGAN_SPLINTED))
canstand_l = 0
hasleg_l = 0
E = get_organ("r_leg")
if(E.status & ORGAN_DESTROYED && !(E.status & ORGAN_SPLINTED))
canstand_r = 0
hasleg_r = 0
E = get_organ("l_foot")
if(E.status & ORGAN_DESTROYED && !(E.status & ORGAN_SPLINTED))
canstand_l = 0
E = get_organ("r_foot")
if(E.status & ORGAN_DESTROYED && !(E.status & ORGAN_SPLINTED))
canstand_r = 0
E = get_organ("l_arm")
if(E.status & ORGAN_DESTROYED && !(E.status & ORGAN_SPLINTED))
hasarm_l = 0
E = get_organ("r_arm")
if(E.status & ORGAN_DESTROYED && !(E.status & ORGAN_SPLINTED))
hasarm_r = 0
can_stand = 2 //can stand on both legs
var/datum/organ/external/E = organs_by_name["l_foot"]
if(E.status & ORGAN_DESTROYED)
can_stand--
// Can stand if have at least one full leg (with leg and foot parts present)
// Has limbs to move around if at least one arm or leg is at least partially there
can_stand = canstand_l||canstand_r
has_limbs = hasleg_l||hasleg_r||hasarm_l||hasarm_r
E = organs_by_name["r_foot"]
if(E.status & ORGAN_DESTROYED)
can_stand--
+3 -7
View File
@@ -203,7 +203,6 @@ This function completely restores a damaged organ to perfect condition.
implants -= implanted_object
owner.updatehealth()
update_icon()
/datum/organ/external/proc/createwound(var/type = CUT, var/damage)
@@ -290,7 +289,6 @@ This function completely restores a damaged organ to perfect condition.
perma_injury = 0
update_germs()
update_icon()
return
//Updating germ levels. Handles organ germ levels and necrosis.
@@ -383,6 +381,8 @@ This function completely restores a damaged organ to perfect condition.
// sync the organ's damage with its wounds
src.update_damages()
if (update_icon())
owner.UpdateDamageIcon(1)
//Updates brute_damn and burn_damn from wound damages. Updates BLEEDING status.
/datum/organ/external/proc/update_damages()
@@ -415,10 +415,6 @@ This function completely restores a damaged organ to perfect condition.
var/n_is = damage_state_text()
if (n_is != damage_state)
damage_state = n_is
if(status & ORGAN_DESTROYED)
owner.update_body(1)
else
owner.UpdateDamageIcon(1)
return 1
return 0
@@ -550,7 +546,7 @@ This function completely restores a damaged organ to perfect condition.
var/lol = pick(cardinal)
step(organ,lol)
owner.regenerate_icons()
owner.update_body(1)
/****************************************************
+2 -2
View File
@@ -31,8 +31,8 @@
return ..() && target.op_stage.appendix == 0
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts to separating [target]'s appendix from the abdominal wall with \the [tool].", \
"You start to separating [target]'s appendix from the abdominal wall with \the [tool]." )
user.visible_message("[user] starts to separate [target]'s appendix from the abdominal wall with \the [tool].", \
"You start to separate [target]'s appendix from the abdominal wall with \the [tool]." )
target.custom_pain("The pain in your abdomen is living hell!",1)
..()
+2 -2
View File
@@ -88,8 +88,8 @@
return affected.name == "head" && affected.open == 2 && affected.stage == 1
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] is beginning piece together [target]'s skull with \the [tool]." , \
"You are beginning piece together [target]'s skull with \the [tool].")
user.visible_message("[user] is beginning to piece together [target]'s skull with \the [tool]." , \
"You are beginning to piece together [target]'s skull with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+14 -14
View File
@@ -27,8 +27,8 @@
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] has cut through [target]'s skull open with \the [tool].", \
"\blue You have cut through [target]'s skull open with \the [tool].")
user.visible_message("\blue [user] has cut [target]'s skull open with \the [tool].", \
"\blue You have cut [target]'s skull open with \the [tool].")
target.brain_op_stage = 2
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
@@ -122,13 +122,13 @@
return ..() && target.brain_op_stage == 2
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts taking out bone chips out of [target]'s brain with \the [tool].", \
"You start taking out bone chips out of [target]'s brain with \the [tool].")
user.visible_message("[user] starts taking bone chips out of [target]'s brain with \the [tool].", \
"You start taking bone chips out of [target]'s brain with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] takes out all bone chips out of [target]'s brain with \the [tool].", \
"\blue You take out all bone chips out of [target]'s brain with \the [tool].")
user.visible_message("\blue [user] takes out all the bone chips in [target]'s brain with \the [tool].", \
"\blue You take out all the bone chips in [target]'s brain with \the [tool].")
target.brain_op_stage = 3
@@ -189,12 +189,12 @@
return ..() && target.brain_op_stage == 0
begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("[user] starts cutting [target]'s flesh with \the [tool].", \
"You start cutting [target]'s flesh with \the [tool].")
user.visible_message("[user] starts cutting through [target]'s flesh with \the [tool].", \
"You start cutting through [target]'s flesh with \the [tool].")
end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] cuts [target]'s flesh with \the [tool].", \
"\blue You cut [target]'s flesh with \the [tool], exposing the cores")
user.visible_message("\blue [user] cuts through [target]'s flesh with \the [tool].", \
"\blue You cut through [target]'s flesh with \the [tool], exposing the cores.")
target.brain_op_stage = 1
fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
@@ -219,8 +219,8 @@
"You start cutting [target]'s silky innards apart with \the [tool].")
end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] cuts [target]'s innards apart with \the [tool], exposing the cores", \
"\blue You cut [target]'s innards apart with \the [tool], exposing the cores")
user.visible_message("\blue [user] cuts [target]'s innards apart with \the [tool], exposing the cores.", \
"\blue You cut [target]'s innards apart with \the [tool], exposing the cores.")
target.brain_op_stage = 2
fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
@@ -256,5 +256,5 @@
fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("\red [user]'s hand slips, failing to cut core out!", \
"\red Your hand slips, failing to cut core out!")
user.visible_message("\red [user]'s hand slips, causing \him to miss the core!", \
"\red Your hand slips, causing you to miss the core!")
+4 -4
View File
@@ -85,13 +85,13 @@
return ..() && target.op_stage.face == 2
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts pulling skin on [target]'s face back in place with \the [tool].", \
"You start pulling skin on [target]'s face back in place with \the [tool].")
user.visible_message("[user] starts pulling the skin on [target]'s face back in place with \the [tool].", \
"You start pulling the skin on [target]'s face back in place with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] pulls skin on [target]'s face back in place with \the [tool].", \
"\blue You pull skin on [target]'s face back in place with \the [tool].")
user.visible_message("\blue [user] pulls the skin on [target]'s face back in place with \the [tool].", \
"\blue You pull the skin on [target]'s face back in place with \the [tool].")
target.op_stage.face = 3
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+8 -8
View File
@@ -52,8 +52,8 @@
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, slicing open [target]'s [affected.display_name] in a wrong spot with \the [tool]!", \
"\red Your hand slips, slicing open [target]'s [affected.display_name] in a wrong spot with \the [tool]!")
user.visible_message("\red [user]'s hand slips, slicing open [target]'s [affected.display_name] in the wrong place with \the [tool]!", \
"\red Your hand slips, slicing open [target]'s [affected.display_name] in the wrong place with \the [tool]!")
affected.createwound(CUT, 10)
/datum/surgery_step/generic/clamp_bleeders
@@ -133,14 +133,14 @@
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)
var/msg = "\red [user]'s hand slips, tearing the edges of incision on [target]'s [affected.display_name] with \the [tool]!"
var/self_msg = "\red Your hand slips, tearing the edges of incision on [target]'s [affected.display_name] with \the [tool]!"
var/msg = "\red [user]'s hand slips, tearing the edges of the incision on [target]'s [affected.display_name] with \the [tool]!"
var/self_msg = "\red Your hand slips, tearing the edges of the incision on [target]'s [affected.display_name] with \the [tool]!"
if (target_zone == "chest")
msg = "\red [user]'s hand slips, damaging several organs [target]'s torso with \the [tool]!"
self_msg = "\red Your hand slips, damaging several organs [target]'s torso with \the [tool]!"
msg = "\red [user]'s hand slips, damaging several organs in [target]'s torso with \the [tool]!"
self_msg = "\red Your hand slips, damaging several organs in [target]'s torso with \the [tool]!"
if (target_zone == "groin")
msg = "\red [user]'s hand slips, damaging several organs [target]'s lower abdomen with \the [tool]"
self_msg = "\red Your hand slips, damaging several organs [target]'s lower abdomen with \the [tool]!"
msg = "\red [user]'s hand slips, damaging several organs in [target]'s lower abdomen with \the [tool]"
self_msg = "\red Your hand slips, damaging several organs in [target]'s lower abdomen with \the [tool]!"
user.visible_message(msg, self_msg)
target.apply_damage(12, BRUTE, affected)
+1 -1
View File
@@ -123,7 +123,7 @@
user.visible_message("\blue [user] puts \the [tool] inside [target]'s [get_cavity(affected)] cavity.", \
"\blue You put \the [tool] inside [target]'s [get_cavity(affected)] cavity." )
if (tool.w_class > get_max_wclass(affected)/2 && prob(50))
user << "\red You tear some vessels trying to fit such big object in this cavity."
user << "\red You tear some blood vessels trying to fit such a big object in this cavity."
var/datum/wound/internal_bleeding/I = new (15)
affected.wounds += I
affected.owner.custom_pain("You feel something rip in your [affected.display_name]!", 1)
+5 -5
View File
@@ -31,8 +31,8 @@
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] has cut through [target]'s ribcage open with \the [tool].", \
"\blue You have cut through [target]'s ribcage open with \the [tool].")
user.visible_message("\blue [user] has cut [target]'s ribcage open with \the [tool].", \
"\blue You have cut [target]'s ribcage open with \the [tool].")
target.op_stage.ribcage = 1
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
@@ -111,14 +111,14 @@
target.op_stage.ribcage = 1
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/msg = "\red [user]'s hand slips, bending [target]'s ribcage in a wrong shape!"
var/self_msg = "\red Your hand slips, bending [target]'s ribcage in a wrong shape!"
var/msg = "\red [user]'s hand slips, bending [target]'s ribs the wrong way!"
var/self_msg = "\red Your hand slips, bending [target]'s ribs the wrong way!"
user.visible_message(msg, self_msg)
var/datum/organ/external/chest/affected = target.get_organ("chest")
affected.createwound(BRUISE, 20)
affected.fracture()
if (prob(40))
user.visible_message("\red Rib pierces the lung!")
user.visible_message("\red A rib pierces the lung!")
target.rupture_lung()
/datum/surgery_step/ribcage/mend_ribcage
+9 -9
View File
@@ -46,7 +46,7 @@
if (affected.parent)
affected = affected.parent
user.visible_message("\red [user]'s hand slips, cutting [target]'s [affected.display_name] open!", \
"\red Your hand slips, cutting [target]'s [affected.display_name] open!")
"\red Your hand slips, cutting [target]'s [affected.display_name] open!")
affected.createwound(CUT, 10)
@@ -65,8 +65,8 @@
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] is beginning reposition flesh and nerve endings where where [target]'s [affected.display_name] used to be with [tool].", \
"You start repositioning flesh and nerve endings where where [target]'s [affected.display_name] used to be with [tool].")
user.visible_message("[user] is beginning to reposition flesh and nerve endings where where [target]'s [affected.display_name] used to be with [tool].", \
"You start repositioning flesh and nerve endings where [target]'s [affected.display_name] used to be with [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
@@ -101,8 +101,8 @@
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts adjusting area around [target]'s [affected.display_name] with \the [tool].", \
"You start adjusting area around [target]'s [affected.display_name] with \the [tool]..")
user.visible_message("[user] starts adjusting the area around [target]'s [affected.display_name] with \the [tool].", \
"You start adjusting the area around [target]'s [affected.display_name] with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
@@ -140,14 +140,14 @@
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts attaching [tool] where [target]'s [affected.display_name] used to be.", \
"You start attaching [tool] where [target]'s [affected.display_name] used to be.")
user.visible_message("[user] starts attaching \the [tool] where [target]'s [affected.display_name] used to be.", \
"You start attaching \the [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.")
user.visible_message("\blue [user] has attached \the [tool] where [target]'s [affected.display_name] used to be.", \
"\blue You have attached \the [tool] where [target]'s [affected.display_name] used to be.")
affected.robotize()
if(L.sabotaged)
affected.sabotaged = 1