bones and dismemberment

This commit is contained in:
Tastyfish
2012-01-08 20:05:54 -05:00
parent ffe6ac7935
commit ce9042ae20
18 changed files with 527 additions and 98 deletions

View File

@@ -294,7 +294,6 @@
var/icon_old = null // For when weapons get bloodied this saves their old icon.
var/abstract = 0
var/force = 0
var/slash = 0
var/item_state = null
var/damtype = "brute"
var/r_speed = 1.0

View File

@@ -208,7 +208,6 @@
throw_speed = 1
throw_range = 5
w_class = 3.0
slash = 1
flags = FPRINT | CONDUCT | NOSHIELD | TABLEPASS
origin_tech = "combat=3"
@@ -244,7 +243,6 @@
throw_speed = 1
throw_range = 1
w_class = 4.0//So you can't hide it in your pocket or some such.
slash = 1
flags = FPRINT | TABLEPASS | NOSHIELD
var/datum/effect/effect/system/spark_spread/spark_system
@@ -624,7 +622,6 @@
desc = "A tool for breaking down those obstructions that stop you from fighting that fire." //Less ROBUST. --SkyMarshal
force = 5
w_class = 4.0
slash = 1
flags = ONBACK
twohanded = 1
force_unwielded = 5
@@ -967,7 +964,6 @@
flags = FPRINT | TABLEPASS| CONDUCT
force = 5.0
w_class = 1.0
slash = 1
throwforce = 5.0
throw_speed = 3
throw_range = 5
@@ -981,7 +977,6 @@
desc = "Could probably be used as ... a throwing weapon?"
w_class = 1.0
force = 5.0
slash = 1
throwforce = 15.0
item_state = "shard-glass"
g_amt = 3750
@@ -1358,7 +1353,6 @@
icon_state = "knife"
force = 10.0
throwforce = 10.0
slash = 1
/obj/item/weapon/kitchen/utensil/spoon
name = "spoon"
@@ -1373,7 +1367,6 @@
flags = FPRINT | TABLEPASS | CONDUCT
force = 10.0
w_class = 1.0
slash = 1
throwforce = 5.0
throw_speed = 3
throw_range = 5
@@ -1415,7 +1408,6 @@
icon_state = "drill"
flags = FPRINT | TABLEPASS | CONDUCT
w_class = 1.0
slash = 1
origin_tech = "materials=1;biotech=1"
/obj/item/weapon/circular_saw

View File

@@ -6,7 +6,6 @@
flags = FPRINT | ONBELT | TABLEPASS
force = 40
throwforce = 10
slash = 1
/obj/item/clothing/head/culthood

View File

@@ -133,6 +133,8 @@
user.l_hand = src
else
user << "\blue You pick \the [src] up with your ha- wait a minute."
if(loc == user)
user.drop_from_slot(src)
return
else
user.l_hand = src
@@ -143,6 +145,8 @@
user.r_hand = src
else
user << "\blue You pick \the [src] up with your ha- wait a minute."
if(loc == user)
user.drop_from_slot(src)
return
else
user.r_hand = src

View File

@@ -83,12 +83,12 @@ CIRCULAR SAW
if(1.0)
if(M != user)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [M] is having his eyes retracted by [user].", 1)
O.show_message("\red [M] is having \his eyes retracted by [user].", 1)
M << "\red [user] begins to seperate your eyes with [src]!"
user << "\red You seperate [M]'s eyes with [src]!"
else
user.visible_message( \
"\red [user] begins to have his eyes retracted.", \
"\red [user] begins to have \his eyes retracted.", \
"\red You begin to pry open your eyes with [src]!" \
)
if(M == user && prob(25))
@@ -102,10 +102,56 @@ CIRCULAR SAW
M:eye_op_stage = 2.0
else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
return ..()
else
// bone surgery doable?
if(!try_bone_surgery(M, user))
return ..()
return
/obj/item/weapon/retractor/proc/try_bone_surgery(mob/living/carbon/human/H as mob, mob/living/user as mob)
if(!istype(H))
return 0
var/datum/organ/external/S = H.organs[user.zone_sel.selecting]
if(!S || !istype(S))
return 0
if(S.destroyed)
user << "What [S.display_name]?"
if(!S.open)
user << "\red There is skin in the way!"
return 0
if(S.bleeding)
user << "\red [H] is profusely bleeding in \his [S.display_name]!"
return 0
if(H != user)
H.visible_message( \
"\red [user] is beginning to retract the flap in the wound in [H]'s [S.display_name] with [src].", \
"\red [user] begins to retract the flap in the wound in your [S.display_name] with [src]!")
else
H.visible_message( \
"\red [user] begins to retract the flap in the wound in \his [S.display_name] with [src]!", \
"\red You begin to retract the flap in the wound in your [S.display_name] with [src]!")
if(do_mob(user, H, 30))
if(H != user)
H.visible_message( \
"\red [user] retracts the flap in the wound in [H]'s [S.display_name] with [src]!", \
"\red [user] retracts the flap in the wound in your [S.display_name] with [src]!")
else
H.visible_message( \
"\red [user] retracts the flap in the wound in \his [S.display_name] with [src]!", \
"\red You retract the flap in the wound in your [S.display_name] with [src]!")
if(H == user && prob(25))
user << "\red You mess up!"
S.take_damage(15)
S.open = 2
H.updatehealth()
H.UpdateDamageIcon()
return 1
////////////
//Hemostat//
@@ -189,12 +235,12 @@ CIRCULAR SAW
if(2.0)
if(M != user)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [M] is having his eyes mended by [user].", 1)
O.show_message("\red [M] is having \his eyes mended by [user].", 1)
M << "\red [user] begins to mend your eyes with [src]!"
user << "\red You mend [M]'s eyes with [src]!"
else
user.visible_message( \
"\red [user] begins to have his eyes mended.", \
"\red [user] begins to have \his eyes mended.", \
"\red You begin to mend your eyes with [src]!" \
)
if(M == user && prob(25))
@@ -206,11 +252,68 @@ CIRCULAR SAW
else
M.take_organ_damage(15)
M:eye_op_stage = 3.0
else if(user.zone_sel.selecting == "head")
if(istype(M, /mob/living/carbon/human) && M:brain_op_stage == 1)
M:brain_op_stage = 0
var/datum/organ/external/S = M:organs["head"]
if(!S || !istype(S))
return ..()
M:brain_op_stage = 0
S.open = 1
if(!try_bone_surgery(M, user))
return ..()
else
return ..()
else
// bone surgery doable?
if(!try_bone_surgery(M, user))
return ..()
else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
return ..()
/obj/item/weapon/hemostat/proc/try_bone_surgery(mob/living/carbon/human/H as mob, mob/living/user as mob)
if(!istype(H))
return 0
var/datum/organ/external/S = H.organs[user.zone_sel.selecting]
if(!S || !istype(S))
return 0
return
if(S.destroyed)
user << "What [S.display_name]?"
if(!S.open)
user << "\red There is skin in the way!"
return 0
if(!S.bleeding)
user << "\red [H] is not bleeding in \his [S.display_name]!"
return 0
if(H != user)
H.visible_message( \
"\red [user] is beginning to clamp bleeders in the wound in [H]'s [S.display_name] with [src].", \
"\red [user] begins to clamp bleeders in the wound in your [S.display_name] with [src]!")
else
H.visible_message( \
"\red [user] begins to clamp bleeders in the wound in \his [S.display_name] with [src]!", \
"\red You begin to clamp bleeders in the wound in your [S.display_name] with [src]!")
if(do_mob(user, H, 50))
if(H != user)
H.visible_message( \
"\red [user] clamps bleeders in the wound in [H]'s [S.display_name] with [src]!", \
"\red [user] clamps bleeders in the wound in your [S.display_name] with [src]!")
else
H.visible_message( \
"\red [user] clamps bleeders in the wound in \his [S.display_name] with [src]!", \
"\red You clamp bleeders in the wound in your [S.display_name] with [src]!")
if(H == user && prob(25))
user << "\red You mess up!"
S.take_damage(15)
S.bleeding = 0
H.updatehealth()
H.UpdateDamageIcon()
return 1
///////////
//Cautery//
@@ -233,6 +336,8 @@ CIRCULAR SAW
user << "\red You cauterize the incision in [M]'s torso with [src]!"
M:embryo_op_stage = 0.0
return
else
try_bone_surgery(M, user)
if(user.zone_sel.selecting == "groin")
if(istype(M, /mob/living/carbon/human))
@@ -247,6 +352,8 @@ CIRCULAR SAW
for(var/datum/disease/appendicitis in M.viruses)
appendicitis.cure()
M.resistances += appendicitis
else
try_bone_surgery(M, user)
return
if (user.zone_sel.selecting == "eyes")
@@ -275,12 +382,12 @@ CIRCULAR SAW
if(3.0)
if(M != user)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [M] is having his eyes cauterized by [user].", 1)
O.show_message("\red [M] is having \his eyes cauterized by [user].", 1)
M << "\red [user] begins to cauterize your eyes!"
user << "\red You cauterize [M]'s eyes with [src]!"
else
user.visible_message( \
"\red [user] begins to have his eyes cauterized.", \
"\red [user] begins to have \his eyes cauterized.", \
"\red You begin to cauterize your eyes!" \
)
if(M == user && prob(25))
@@ -294,11 +401,53 @@ CIRCULAR SAW
M.sdisabilities &= ~1
M:eye_op_stage = 0.0
else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
return ..()
else
// bone surgery doable?
if(!try_bone_surgery(M, user))
return ..()
return
/obj/item/weapon/cautery/proc/try_bone_surgery(mob/living/carbon/human/H as mob, mob/living/user as mob)
if(!istype(H))
return 0
var/datum/organ/external/S = H.organs[user.zone_sel.selecting]
if(!S || !istype(S))
return 0
if(S.destroyed)
user << "What [S.display_name]?"
if(!S.open)
user << "\red There is no wound to close up!"
return 0
if(H != user)
H.visible_message( \
"\red [user] is beginning to cauterize the incision in [H]'s [S.display_name] with [src].", \
"\red [user] begins to cut open the wound in your [S.display_name] with [src]!")
else
H.visible_message( \
"\red [user] begins to cauterize the incision in \his [S.display_name] with [src]!", \
"\red You begin to cauterize the incision in your [S.display_name] with [src]!")
if(do_mob(user, H, 100))
if(H != user)
H.visible_message( \
"\red [user] cauterizes the incision in [H]'s [S.display_name] with [src]!", \
"\red [user] cauterizes the incision in your [S.display_name] with [src]!")
else
H.visible_message( \
"\red [user] cauterizes the incision in \his [S.display_name] with [src]!", \
"\red You cauterize the incision in your [S.display_name] with [src]!")
if(H == user && prob(25))
user << "\red You mess up!"
S.take_damage(15)
S.open = 0
H.updatehealth()
H.UpdateDamageIcon()
return 1
//obj/item/weapon/surgicaldrill
@@ -327,7 +476,7 @@ CIRCULAR SAW
if(0.0)
if(M != user)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [M] is beginning to have his torso cut open with [src] by [user].", 1)
O.show_message("\red [M] is beginning to have \his torso cut open with [src] by [user].", 1)
M << "\red [user] begins to cut open your torso with [src]!"
user << "\red You cut [M]'s torso open with [src]!"
M:embryo_op_stage = 1.0
@@ -335,7 +484,7 @@ CIRCULAR SAW
if(3.0)
if(M != user)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [M] is beginning to have his stomach cut open with [src] by [user].", 1)
O.show_message("\red [M] is beginning to have \his stomach cut open with [src] by [user].", 1)
M << "\red [user] begins to cut open your stomach with [src]!"
user << "\red You cut [M]'s stomach open with [src]!"
for(var/datum/disease/D in M.viruses)
@@ -352,14 +501,14 @@ CIRCULAR SAW
if(0.0)
if(M != user)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [M] is beginning to have his abdomen cut open with [src] by [user].", 1)
O.show_message("\red [M] is beginning to have \his abdomen cut open with [src] by [user].", 1)
M << "\red [user] begins to cut open your abdomen with [src]!"
user << "\red You cut [M]'s abdomen open with [src]!"
M:appendix_op_stage = 1.0
if(3.0)
if(M != user)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [M] is beginning to have his appendix seperated with [src] by [user].", 1)
O.show_message("\red [M] is beginning to have \his appendix seperated with [src] by [user].", 1)
M << "\red [user] begins to seperate your appendix with [src]!"
user << "\red You seperate [M]'s appendix with [src]!"
M:appendix_op_stage = 4.0
@@ -397,12 +546,12 @@ CIRCULAR SAW
if(M != user)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [M] is beginning to have his head cut open with [src] by [user].", 1)
O.show_message("\red [M] is beginning to have \his head cut open with [src] by [user].", 1)
M << "\red [user] begins to cut open your head with [src]!"
user << "\red You cut [M]'s head open with [src]!"
else
user.visible_message( \
"\red [user] begins to cut open his skull with [src]!", \
"\red [user] begins to cut open \his skull with [src]!", \
"\red You begin to cut open your head with [src]!" \
)
@@ -443,12 +592,12 @@ CIRCULAR SAW
if(M != user)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [M] is having his connections to the brain delicately severed with [src] by [user].", 1)
O.show_message("\red [M] is having \his connections to the brain delicately severed with [src] by [user].", 1)
M << "\red [user] begins to cut open your head with [src]!"
user << "\red You cut [M]'s head open with [src]!"
else
user.visible_message( \
"\red [user] begin to delicately remove the connections to his brain with [src]!", \
"\red [user] begin to delicately remove the connections to \his brain with [src]!", \
"\red You begin to cut open your head with [src]!" \
)
if(M == user && prob(25))
@@ -498,12 +647,12 @@ CIRCULAR SAW
if(0.0)
if(M != user)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [M] is beginning to have his eyes incised with [src] by [user].", 1)
O.show_message("\red [M] is beginning to have \his eyes incised with [src] by [user].", 1)
M << "\red [user] begins to cut open your eyes with [src]!"
user << "\red You make an incision around [M]'s eyes with [src]!"
else
user.visible_message( \
"\red [user] begins to cut around his eyes with [src]!", \
"\red [user] begins to cut around \his eyes with [src]!", \
"\red You begin to cut open your eyes with [src]!" \
)
if(M == user && prob(25))
@@ -519,13 +668,78 @@ CIRCULAR SAW
M:eye_op_stage = 1.0
user << "\blue So far so good after."
else
return ..()
// bone surgery doable?
if(!try_bone_surgery(M, user))
return ..()
/* wat
else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
return ..()
*/
return
/obj/item/weapon/scalpel/proc/try_bone_surgery(mob/living/carbon/human/H as mob, mob/living/user as mob)
if(!istype(H))
return 0
var/datum/organ/external/S = H.organs[user.zone_sel.selecting]
if(!S || !istype(S))
return 0
if(S.destroyed)
user << "What [S.display_name]?"
if(S.open)
user << "\red The wound is already open!"
return 0
if(H != user)
H.visible_message( \
"\red [user] is beginning to cut open the wound in [H]'s [S.display_name] with [src].", \
"\red [user] begins to cut open the wound in your [S.display_name] with [src]!")
else
H.visible_message( \
"\red [user] begins to cut open the wound in \his [S.display_name] with [src]!", \
"\red You begin to cut open the wound in your [S.display_name] with [src]!")
if(do_mob(user, H, 100))
if(H != user)
H.visible_message( \
"\red [user] cuts open the wound in [H]'s [S.display_name] with [src]!", \
"\red [user] cuts open the wound in your [S.display_name] with [src]!")
else
H.visible_message( \
"\red [user] cuts open the wound in \his [S.display_name] with [src]!", \
"\red You cut open the wound in your [S.display_name] with [src]!")
if(H == user && prob(25))
user << "\red You mess up!"
S.take_damage(15)
S.open = 1
S.bleeding = 1
H.updatehealth()
H.UpdateDamageIcon()
else
var/a = pick(1,2,3)
var/msg
if(a == 1)
msg = "\red [user]'s move slices open [H]'s wound, causing massive bleeding"
S.brute_dam += 35
S.createwound(rand(1,3))
else if(a == 2)
msg = "\red [user]'s move slices open [H]'s wound, and causes \him to accidentally stab himself"
S.brute_dam += 35
var/datum/organ/external/userorgan = user:organs["chest"]
if(userorgan)
userorgan.brute_dam += 35
else
user.take_organ_damage(35)
else if(a == 3)
msg = "\red [user] quickly stops the surgery"
for(var/mob/O in viewers(H))
O.show_message(msg, 1)
return 1
////////////////
//CIRCULAR SAW//
@@ -567,12 +781,12 @@ CIRCULAR SAW
return
if(M != user)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [M] has his skull sawed open with [src] by [user].", 1)
O.show_message("\red [M] has \his skull sawed open with [src] by [user].", 1)
M << "\red [user] begins to saw open your head with [src]!"
user << "\red You saw [M]'s head open with [src]!"
else
user.visible_message( \
"\red [user] saws open his skull with [src]!", \
"\red [user] saws open \his skull with [src]!", \
"\red You begin to saw open your head with [src]!" \
)
if(M == user && prob(25))
@@ -615,12 +829,12 @@ CIRCULAR SAW
if(3.0)
if(M != user)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [M] has his spine's connection to the brain severed with [src] by [user].", 1)
O.show_message("\red [M] has \his spine's connection to the brain severed with [src] by [user].", 1)
M << "\red [user] severs your brain's connection to the spine with [src]!"
user << "\red You sever [M]'s brain's connection to the spine with [src]!"
else
user.visible_message( \
"\red [user] severs his brain's connection to the spine with [src]!", \
"\red [user] severs \his brain's connection to the spine with [src]!", \
"\red You sever your brain's connection to the spine with [src]!" \
)
@@ -645,6 +859,7 @@ CIRCULAR SAW
for(var/mob/O in viewers(H, null))
O.show_message(text("\red [H] gets \his [S.display_name] sawed off with [src] by [user]."), 1)
S.destroyed = 1
S.droplimb()
H.update_body()
else
return ..()
@@ -653,3 +868,135 @@ CIRCULAR SAW
return ..()
*/
return
/obj/item/weapon/surgical_tool
name = "surgical tool"
var/list/stage = list() //Stage to act on
var/time = 50 //Time it takes to use
var/wound //Wound type to act on
proc/get_message(var/mnumber,var/M,var/user,var/datum/organ/external/organ)//=Start,2=finish,3=walk away,4=screw up, 5 = closed wound
proc/screw_up(mob/living/carbon/M as mob,mob/living/carbon/user as mob,var/datum/organ/external/organ)
organ.brute_dam += 30
/obj/item/weapon/surgical_tool/proc/IsFinalStage(var/stage)
var/a
switch(wound)
if("broken") //Basic broken bone
a=3
if("blood")
a=3
return stage == a
/obj/item/weapon/surgical_tool/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob)
if(!istype(M, /mob))
return
if((usr.mutations & 16) && prob(50))
M << "\red You stab yourself in the eye."
M.disabilities |= 128
M.weakened += 4
M.bruteloss += 10
src.add_fingerprint(user)
if(!(locate(/obj/machinery/optable, M.loc) && M.resting))
return ..()
var/zone = user.zone_sel.selecting
if (istype(M.organs[zone], /datum/organ/external))
var/datum/organ/external/temp = M.organs[zone]
var/msg
// quickly convert embryo removal to bone surgery
if(zone == "chest" && M.embryo_op_stage == 3)
M.embryo_op_stage = 0
temp.open = 2
temp.bleeding = 0
// quickly convert appendectomy to bone surgery
if(zone == "groin" && M.appendix_op_stage == 3)
M.appendix_op_stage = 0
temp.open = 2
temp.bleeding = 0
msg = get_message(1,M,user,temp)
for(var/mob/O in viewers(M,null))
O.show_message("\red [msg]",1)
if(do_mob(user,M,time))
if(temp.open == 2 && !temp.bleeding)
if(temp.wound == wound)
if(temp.stage in stage)
temp.stage += 1
if(IsFinalStage(temp.stage))
temp.broken = 0
temp.stage = 0
temp.perma_injury = 0
temp.brute_dam = temp.min_broken_damage -1
msg = get_message(2,M,user,temp)
else
msg = get_message(4,M,user,temp)
screw_up(M,user,temp)
else
msg = get_message(5,M,user,temp)
else
msg = get_message(3,M,user,temp)
for(var/mob/O in viewers(M,null))
O.show_message("\red [msg]",1)
//Broken bone
//Basic
//Open -> Clean -> Bone-gel -> pop-into-place -> Bone-gel -> close -> glue -> clean
//Split
//Open -> Clean -> Tweasers -> bone-glue -> close -> glue -> clean
//
/obj/item/weapon/surgical_tool/bonegel
name = "Bone-gel"
icon = 'janitor.dmi'
icon_state = "cleaner"
/obj/item/weapon/surgical_tool/bonegel/New()
stage += 0
stage += 2
wound = "broken"
/obj/item/weapon/surgical_tool/bonegel/get_message(var/n,var/m,var/usr,var/datum/organ/external/organ)
var/z
switch(n)
if(1)
z="[usr] starts applying bone-gel to [m]'s [organ.display_name]"
if(2)
z="[usr] finishes applying bone-gel to [m]'s [organ.display_name]"
if(3)
z="[usr] stops applying bone-gel to [m]'s [organ.display_name]"
if(4)
z="[usr] applies bone-gel incorrectly to [m]'s [organ.display_name]"
if(5)
z="[usr] lubricates [m]'s [organ.display_name]"
return z
/obj/item/weapon/surgical_tool/bonecracker
name = "Bone-cracker"
icon = 'items.dmi'
icon_state = "wrench"
/obj/item/weapon/surgical_tool/bonecracker/New()
stage += 1
wound = "broken"
/obj/item/weapon/surgical_tool/bonecracker/get_message(var/n,var/m,var/usr,var/datum/organ/external/organ)
var/z
switch(n)
if(1)
z="[usr] starts popping [m]'s [organ.display_name] bone into place"
if(2)
z="[usr] finishes popping [m]'s [organ.display_name] bone into place"
if(3)
z="[usr] stops popping [m]'s [organ.display_name] bone into place"
if(4)
z="[usr] pops [m]'s [organ.display_name] bone into the wrong place"
if(5)
z="[usr] performs chiropractice on [m]'s [organ.display_name]"
return z

View File

@@ -33,7 +33,6 @@ STUN BATON
else
icon_state = "sword[color]"
w_class = 4
slash = 1
playsound(user, 'saberon.ogg', 50, 1)
user << "\blue [src] is now active."
else
@@ -43,7 +42,6 @@ STUN BATON
else
icon_state = "sword0"
w_class = 2
slash = 0
playsound(user, 'saberoff.ogg', 50, 1)
user << "\blue [src] can now be concealed."
add_fingerprint(user)

View File

@@ -290,7 +290,6 @@ WELDINGTOOOL
icon_state = "cutters"
flags = FPRINT | TABLEPASS| CONDUCT
force = 6.0
slash = 1
throw_speed = 2
throw_range = 9
w_class = 2.0

View File

@@ -494,6 +494,24 @@ Traitors and the like can also be revived with the previous role mostly intact.
//M.updatehealth()
M.buckled = initial(M.buckled)
M.handcuffed = initial(M.handcuffed)
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M
for(var/name in H.organs)
var/datum/organ/external/e = H.organs[name]
e.brute_dam = 0.0
e.burn_dam = 0.0
e.bandaged = 0.0
e.wound_size = 0.0
e.max_damage = initial(e.max_damage)
e.bleeding = 0
e.open = 0
e.broken = 0
e.destroyed = 0
e.perma_injury = 0
e.update_icon()
H.update_body()
H.update_face()
H.UpdateDamageIcon()
if (M.stat > 1)
M.stat=0
..()

View File

@@ -131,7 +131,6 @@ proc/move_mining_shuttle()
throwforce = 4.0
item_state = "pickaxe"
w_class = 4.0
slash = 1
m_amt = 3750 //one sheet, but where can you make them?
var/digspeed = 40 //moving the delay to an item var so R&D can make improved picks. --NEO
origin_tech = "materials=1;engineering=1"

View File

@@ -891,17 +891,33 @@
//because theyre located on the 'other' inventory bar.
// Gloves
if (gloves)
var/t1 = gloves.item_state
if (!t1)
t1 = gloves.icon_state
overlays += image("icon" = 'hands.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
if (gloves.blood_DNA)
var/datum/organ/external/lo = organs["l_hand"]
var/datum/organ/external/ro = organs["r_hand"]
if (!lo.destroyed || !ro.destroyed)
if (gloves)
var/t1 = gloves.item_state
if (!t1)
t1 = gloves.icon_state
var/icon/gloves_icon = new /icon("icon" = 'hands.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")))
if(lo.destroyed)
gloves_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY)
else if(ro.destroyed)
gloves_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY)
overlays += image(gloves_icon, "layer" = MOB_LAYER)
if (gloves.blood_DNA)
var/icon/stain_icon = icon('blood.dmi', "bloodyhands[!lying ? "" : "2"]")
if(lo.destroyed)
stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY)
else if(ro.destroyed)
stain_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY)
overlays += image("icon" = stain_icon, "layer" = MOB_LAYER)
else if (blood_DNA)
var/icon/stain_icon = icon('blood.dmi', "bloodyhands[!lying ? "" : "2"]")
if(lo.destroyed)
stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY)
else if(ro.destroyed)
stain_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY)
overlays += image("icon" = stain_icon, "layer" = MOB_LAYER)
else if (blood_DNA)
var/icon/stain_icon = icon('blood.dmi', "bloodyhands[!lying ? "" : "2"]")
overlays += image("icon" = stain_icon, "layer" = MOB_LAYER)
// Glasses
if (glasses)
var/t1 = glasses.icon_state
@@ -914,11 +930,22 @@
var/t1 = r_ear.icon_state
overlays += image("icon" = 'ears.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
// Shoes
if (shoes)
lo = organs["l_foot"]
ro = organs["r_foot"]
if ((!lo.destroyed || !ro.destroyed) && shoes)
var/t1 = shoes.icon_state
overlays += image("icon" = 'feet.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
var/icon/shoes_icon = new /icon("icon" = 'feet.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")))
if(lo.destroyed && !lying)
shoes_icon.Blend(new /icon('limb_mask.dmi', "right[lying?"_l":""]"), ICON_MULTIPLY)
else if(ro.destroyed && !lying)
shoes_icon.Blend(new /icon('limb_mask.dmi', "left[lying?"_l":""]"), ICON_MULTIPLY)
overlays += image(shoes_icon, "layer" = MOB_LAYER)
if (shoes.blood_DNA)
var/icon/stain_icon = icon('blood.dmi', "shoesblood[!lying ? "" : "2"]")
if(lo.destroyed)
stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY)
else if(ro.destroyed)
stain_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY)
overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) // Radio
/* if (w_radio)
overlays += image("icon" = 'ears.dmi', "icon_state" = "headset[!lying ? "" : "2"]", "layer" = MOB_LAYER) */
@@ -1248,26 +1275,50 @@
else if (gender == FEMALE)
g = "f"
stand_icon = new /icon('human.dmi', "body_[g]_s")
lying_icon = new /icon('human.dmi', "body_[g]_l")
stand_icon = new /icon('human.dmi', "torso_s")
lying_icon = new /icon('human.dmi', "torso_l")
var/husk = (mutations & HUSK)
//var/obese = (mutations & FAT)
stand_icon.Blend(new /icon('human.dmi', "chest_[g]_s"), ICON_OVERLAY)
lying_icon.Blend(new /icon('human.dmi', "chest_[g]_l"), ICON_OVERLAY)
var/datum/organ/external/head = organs["head"]
if(!head.destroyed)
stand_icon.Blend(new /icon('human.dmi', "head_[g]_s"), ICON_OVERLAY)
lying_icon.Blend(new /icon('human.dmi', "head_[g]_l"), ICON_OVERLAY)
for(var/name in organs)
var/datum/organ/external/part = organs[name]
if(!istype(part, /datum/organ/external/groin) \
&& !istype(part, /datum/organ/external/chest) \
&& !istype(part, /datum/organ/external/head) \
&& !part.destroyed)
stand_icon.Blend(new /icon('human.dmi', "[part.icon_name]_s"), ICON_OVERLAY)
lying_icon.Blend(new /icon('human.dmi', "[part.icon_name]_l"), ICON_OVERLAY)
stand_icon.Blend(new /icon('human.dmi', "groin_[g]_s"), ICON_OVERLAY)
lying_icon.Blend(new /icon('human.dmi', "groin_[g]_l"), ICON_OVERLAY)
if (husk)
stand_icon.Blend(new /icon('human.dmi', "husk_s"), ICON_OVERLAY)
lying_icon.Blend(new /icon('human.dmi', "husk_l"), ICON_OVERLAY)
/*else if(obese)
stand_icon.Blend(new /icon('human.dmi', "fatbody_s"), ICON_OVERLAY)
lying_icon.Blend(new /icon('human.dmi', "fatbody_l"), ICON_OVERLAY)*/
else
var/icon/husk_s = new /icon('human.dmi', "husk_s")
var/icon/husk_l = new /icon('human.dmi', "husk_l")
for(var/name in organs)
var/datum/organ/external/part = organs[name]
if(!istype(part, /datum/organ/external/groin) \
&& !istype(part, /datum/organ/external/chest) \
&& !istype(part, /datum/organ/external/head) \
&& part.destroyed)
stand_icon.Blend(new /icon('dam_mask.dmi', "[part.icon_name]"), ICON_OVERLAY)
lying_icon.Blend(new /icon('dam_mask.dmi', "[part.icon_name]2"), ICON_OVERLAY)
husk_s.Blend(new /icon('dam_mask.dmi', "[part.icon_name]"), ICON_SUBTRACT)
husk_l.Blend(new /icon('dam_mask.dmi', "[part.icon_name]2"), ICON_SUBTRACT)
stand_icon.Blend(husk_s, ICON_OVERLAY)
lying_icon.Blend(husk_l, ICON_OVERLAY)
/*else if(obese)
stand_icon.Blend(new /icon('human.dmi', "fatbody_s"), ICON_OVERLAY)
lying_icon.Blend(new /icon('human.dmi', "fatbody_l"), ICON_OVERLAY)*/
// Skin tone
if (s_tone >= 0)

View File

@@ -39,7 +39,7 @@
return null
/mob/living/carbon/human/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/slash = 0)
/mob/living/carbon/human/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = 0)
if((damagetype != BRUTE) && (damagetype != BURN))
..(damage, damagetype, def_zone, blocked)
return 1
@@ -58,9 +58,9 @@
switch(damagetype)
if(BRUTE)
organ.take_damage(damage, 0, slash)
organ.take_damage(damage, 0, sharp)
if(BURN)
organ.take_damage(0, damage, slash)
organ.take_damage(0, damage, sharp)
UpdateDamageIcon()
updatehealth()
return 1

View File

@@ -96,7 +96,7 @@ emp_act
var/armor = run_armor_check(affecting, "melee", "Your armor has protected you from a hit to the [hit_area].", "Your armor has softened hit to your [hit_area].")
if(armor >= 2) return 0
if(!I.force) return 0
apply_damage(I.force, I.damtype, affecting, armor, I.slash)
apply_damage(I.force, I.damtype, affecting, armor, is_cut(I))
var/bloody = 0
if((I.damtype == BRUTE) && prob(25 + (I.force * 2)))

View File

@@ -669,10 +669,11 @@
return //TODO: DEFERRED
handle_regular_status_updates()
var/leg_tally = 2
for(var/name in organs)
var/datum/organ/external/E = organs[name]
E.process()
if(E.broken)
if(E.broken || E.destroyed)
if(E.name == "l_hand" || E.name == "l_arm")
if(hand && equipped())
drop_item()
@@ -681,12 +682,21 @@
if(!hand && equipped())
drop_item()
emote("scream")
else if(E.name == "l_leg" || E.name == "l_foot" \
|| E.name == "r_leg" || E.name == "r_foot" && !lying)
leg_tally-- // let it fail even if just foot&leg
if(E.open && (!resting) && (!sleeping))
emote("scream")
E.take_damage(20,0)
emote("collapse")
paralysis = 10
// can't stand
if(leg_tally == 0)
emote("scream")
emote("collapse")
paralysis = 10
updatehealth()
// health = 100 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())

View File

@@ -41,10 +41,8 @@
damage_msg = "\red You feel a intense pain"
var/open = 0
var/clean = 1
var/stage = 0
var/wound = 0
var/split = 0
New(mob/living/carbon/human/H)
..(H)
@@ -54,14 +52,14 @@
owner = H
H.organs[name] = src
proc/take_damage(brute, burn, slash)
proc/take_damage(brute, burn, sharp)
if((brute <= 0) && (burn <= 0))
return 0
if(destroyed)
return 0
if(owner) owner.pain(display_name, (brute+burn)*3, 1)
if(slash)
if(sharp)
var/chance = rand(1,5)
var/nux = brute * chance
if(brute_dam >= max_damage)
@@ -190,19 +188,25 @@
switch(body_part)
if(UPPER_TORSO)
owner.gib()
if(LOWER_TORSO)
owner << "\red You are now sterile."
if(HEAD)
var/obj/item/weapon/organ/head/H = new(owner.loc)
var/obj/item/weapon/organ/head/H = new(owner.loc, owner)
if(owner.gender == FEMALE)
H.icon_state = "head_f_l"
H.overlays += owner.face_lying
var/lol = pick(cardinal)
step(H,lol)
owner:update_face()
owner:update_body()
return
owner.update_face()
owner.update_body()
owner.death()
if(ARM_RIGHT)
var/obj/item/weapon/organ/r_arm/H = new(owner.loc)
if(owner:organs["r_hand"])
var/datum/organ/external/S = owner:organs["r_hand"]
if(!S.destroyed)
var/obj/item/weapon/organ/r_hand/X = new(owner.loc)
var/obj/item/weapon/organ/r_hand/X = new(owner.loc, owner)
for(var/mob/M in viewers(owner))
M.show_message("\red [owner.name]'s [X.name] flies off.")
var/lol2 = pick(cardinal)
@@ -210,13 +214,12 @@
var/lol = pick(cardinal)
step(H,lol)
destroyed = 1
return
if(ARM_LEFT)
var/obj/item/weapon/organ/l_arm/H = new(owner.loc)
if(owner:organs["l_hand"])
var/datum/organ/external/S = owner:organs["l_hand"]
if(!S.destroyed)
var/obj/item/weapon/organ/l_hand/X = new(owner.loc)
var/obj/item/weapon/organ/l_hand/X = new(owner.loc, owner)
for(var/mob/M in viewers(owner))
M.show_message("\red [owner.name]'s [X.name] flies off in arc.")
var/lol2 = pick(cardinal)
@@ -224,13 +227,12 @@
var/lol = pick(cardinal)
step(H,lol)
destroyed = 1
return
if(LEG_RIGHT)
var/obj/item/weapon/organ/r_leg/H = new(owner.loc)
if(owner:organs["r_foot"])
var/datum/organ/external/S = owner:organs["r_foot"]
if(!S.destroyed)
var/obj/item/weapon/organ/l_foot/X = new(owner.loc)
var/obj/item/weapon/organ/l_foot/X = new(owner.loc, owner)
for(var/mob/M in viewers(owner))
M.show_message("\red [owner.name]'s [X.name] flies off flies off in arc.")
var/lol2 = pick(cardinal)
@@ -238,13 +240,12 @@
var/lol = pick(cardinal)
step(H,lol)
destroyed = 1
return
if(LEG_LEFT)
var/obj/item/weapon/organ/l_leg/H = new(owner.loc)
if(owner:organs["l_foot"])
var/datum/organ/external/S = owner:organs["l_foot"]
if(!S.destroyed)
var/obj/item/weapon/organ/l_foot/X = new(owner.loc)
var/obj/item/weapon/organ/l_foot/X = new(owner.loc, owner)
for(var/mob/M in viewers(owner))
M.show_message("\red [owner.name]'s [X.name] flies off.")
var/lol2 = pick(cardinal)
@@ -252,7 +253,6 @@
var/lol = pick(cardinal)
step(H,lol)
destroyed = 1
return
proc/createwound(var/size = 1)
if(ishuman(src.owner))

View File

@@ -15,8 +15,8 @@
/datum/organ/external/head
name = "head"
icon_name = "head"
max_damage = 125
min_broken_damage = 70
max_damage = 75
min_broken_damage = 40
body_part = HEAD
var/disfigured = 0
@@ -84,32 +84,41 @@
min_broken_damage = 15
body_part = HAND_LEFT
obj/item/weapon/organ/
obj/item/weapon/organ
icon = 'human.dmi'
obj/item/weapon/organ/New(loc, mob/living/carbon/human/H)
..(loc)
if(!istype(H))
return
if(H.dna)
blood_DNA = H.dna.unique_enzymes
blood_type = H.b_type
obj/item/weapon/organ/head
name = "head"
icon_state = "head_l"
icon_state = "head_m_l"
obj/item/weapon/organ/l_arm
name = "left arm"
icon_state = "arm_left_l"
icon_state = "l_arm_l"
obj/item/weapon/organ/l_foot
name = "left foot"
icon_state = "foot_left_l"
icon_state = "l_foot_l"
obj/item/weapon/organ/l_hand
name = "left hand"
icon_state = "hand_left_l"
icon_state = "l_hand_l"
obj/item/weapon/organ/l_leg
name = "left leg"
icon_state = "leg_left_l"
icon_state = "l_leg_l"
obj/item/weapon/organ/r_arm
name = "right arm"
icon_state = "arm_right_l"
icon_state = "r_arm_l"
obj/item/weapon/organ/r_foot
name = "right foot"
icon_state = "foot_right_l"
icon_state = "r_foot_l"
obj/item/weapon/organ/r_hand
name = "right hand"
icon_state = "hand_right_l"
icon_state = "r_hand_l"
obj/item/weapon/organ/r_leg
name = "right leg"
icon_state = "leg_right_l"
icon_state = "r_leg_l"

View File

@@ -486,9 +486,13 @@ Doing this because FindTurfs() isn't even used
e.bandaged = 0.0
e.wound_size = 0.0
e.max_damage = initial(e.max_damage)
e.broken = 0
e.destroyed = 0
e.perma_injury = 0
e.update_icon()
if(src.type == /mob/living/carbon/human)
var/mob/living/carbon/human/H = src
H.update_body()
H.UpdateDamageIcon()
else
alert("Debugging off")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 18 KiB

BIN
icons/mob/limb_mask.dmi Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB