Replaced display_name with name, worked on severing limbs and damage propagation.

This commit is contained in:
Zuhayr
2015-03-25 13:24:28 +10:30
parent f017764e64
commit 97112c8a4c
53 changed files with 420 additions and 389 deletions

View File

@@ -1277,6 +1277,7 @@
#include "code\modules\organs\organ_external.dm" #include "code\modules\organs\organ_external.dm"
#include "code\modules\organs\organ_icon.dm" #include "code\modules\organs\organ_icon.dm"
#include "code\modules\organs\organ_internal.dm" #include "code\modules\organs\organ_internal.dm"
#include "code\modules\organs\organ_stump.dm"
#include "code\modules\organs\pain.dm" #include "code\modules\organs\pain.dm"
#include "code\modules\organs\wound.dm" #include "code\modules\organs\wound.dm"
#include "code\modules\overmap\_defines.dm" #include "code\modules\overmap\_defines.dm"

View File

@@ -28,7 +28,7 @@ var/datum/antagonist/xenos/borer/borers
borer.host_brain.name = host.name borer.host_brain.name = host.name
borer.host_brain.real_name = host.real_name borer.host_brain.real_name = host.real_name
var/obj/item/organ/external/head = host.get_organ("head") var/obj/item/organ/external/head = host.get_organ("head")
head.implants += borer if(head) head.implants += borer
/datum/antagonist/xenos/borer/proc/get_hosts() /datum/antagonist/xenos/borer/proc/get_hosts()
var/list/possible_hosts = list() var/list/possible_hosts = list()

View File

@@ -457,10 +457,14 @@ datum/objective/harm
var/mob/living/carbon/human/H = target.current var/mob/living/carbon/human/H = target.current
for(var/obj/item/organ/external/E in H.organs) for(var/obj/item/organ/external/E in H.organs)
if(E.status & ORGAN_BROKEN) if(E.status & ORGAN_BROKEN)
already_completed = 1
return 1 return 1
if(E.status & ORGAN_DESTROYED && !E.amputated) for(var/limb_type in H.species.has_limbs) //todo check prefs for robotic limbs and amputations.
already_completed = 1 var/found
for(var/obj/item/organ/external/E in H.organs)
if(limb_type == E.type)
found = 1
break
if(!found)
return 1 return 1
var/obj/item/organ/external/head/head = H.get_organ("head") var/obj/item/organ/external/head/head = H.get_organ("head")

View File

@@ -404,9 +404,9 @@
if(!AN && !open && !infected & !imp) if(!AN && !open && !infected & !imp)
AN = "None:" AN = "None:"
if(!(e.status & ORGAN_DESTROYED)) if(!(e.status & ORGAN_DESTROYED))
dat += "<td>[e.display_name]</td><td>[e.burn_dam]</td><td>[e.brute_dam]</td><td>[robot][bled][AN][splint][open][infected][imp][internal_bleeding][lung_ruptured]</td>" dat += "<td>[e.name]</td><td>[e.burn_dam]</td><td>[e.brute_dam]</td><td>[robot][bled][AN][splint][open][infected][imp][internal_bleeding][lung_ruptured]</td>"
else else
dat += "<td>[e.display_name]</td><td>-</td><td>-</td><td>Not Found</td>" dat += "<td>[e.name]</td><td>-</td><td>-</td><td>Not Found</td>"
dat += "</tr>" dat += "</tr>"
for(var/obj/item/organ/i in occ["internal_organs"]) for(var/obj/item/organ/i in occ["internal_organs"])

View File

@@ -124,7 +124,7 @@
if (user.hand) if (user.hand)
temp = H.organs_by_name["l_hand"] temp = H.organs_by_name["l_hand"]
if(temp && !temp.is_usable()) if(temp && !temp.is_usable())
user << "<span class='notice'>You try to move your [temp.display_name], but cannot!" user << "<span class='notice'>You try to move your [temp.name], but cannot!"
return return
if (istype(src.loc, /obj/item/weapon/storage)) if (istype(src.loc, /obj/item/weapon/storage))

View File

@@ -1207,7 +1207,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
user.show_message("\blue Localized Damage, Brute/Burn:",1) user.show_message("\blue Localized Damage, Brute/Burn:",1)
if(length(damaged)>0) if(length(damaged)>0)
for(var/obj/item/organ/external/org in damaged) for(var/obj/item/organ/external/org in damaged)
user.show_message(text("\blue \t []: []\blue-[]",capitalize(org.display_name),(org.brute_dam > 0)?"\red [org.brute_dam]":0,(org.burn_dam > 0)?"\red [org.burn_dam]":0),1) user.show_message(text("\blue \t []: []\blue-[]",capitalize(org.name),(org.brute_dam > 0)?"\red [org.brute_dam]":0,(org.burn_dam > 0)?"\red [org.burn_dam]":0),1)
else else
user.show_message("\blue \t Limbs are OK.",1) user.show_message("\blue \t Limbs are OK.",1)

View File

@@ -125,7 +125,7 @@ REAGENT SCANNER
if(length(damaged)>0) if(length(damaged)>0)
for(var/obj/item/organ/external/org in damaged) for(var/obj/item/organ/external/org in damaged)
user.show_message(text("\blue \t []: [][]\blue - []", \ user.show_message(text("\blue \t []: [][]\blue - []", \
"[capitalize(org.display_name)][org.status & ORGAN_ROBOT ? "(Cybernetic)" : ""]", \ "[capitalize(org.name)][org.status & ORGAN_ROBOT ? "(Cybernetic)" : ""]", \
(org.brute_dam > 0) ? "\red [org.brute_dam]" :0, \ (org.brute_dam > 0) ? "\red [org.brute_dam]" :0, \
(org.status & ORGAN_BLEEDING)?"\red <b>\[Bleeding\]</b>":"\t", \ (org.status & ORGAN_BLEEDING)?"\red <b>\[Bleeding\]</b>":"\t", \
(org.burn_dam > 0) ? "<font color='#FFA500'>[org.burn_dam]</font>" :0),1) (org.burn_dam > 0) ? "<font color='#FFA500'>[org.burn_dam]</font>" :0),1)
@@ -181,7 +181,7 @@ REAGENT SCANNER
var/mob/living/carbon/human/H = M var/mob/living/carbon/human/H = M
for(var/name in H.organs_by_name) for(var/name in H.organs_by_name)
var/obj/item/organ/external/e = H.organs_by_name[name] var/obj/item/organ/external/e = H.organs_by_name[name]
var/limb = e.display_name var/limb = e.name
if(e.status & ORGAN_BROKEN) if(e.status & ORGAN_BROKEN)
if(((e.name == "l_arm") || (e.name == "r_arm") || (e.name == "l_leg") || (e.name == "r_leg")) && (!(e.status & ORGAN_SPLINTED))) if(((e.name == "l_arm") || (e.name == "r_arm") || (e.name == "l_leg") || (e.name == "r_leg")) && (!(e.status & ORGAN_SPLINTED)))
user << "\red Unsecured fracture in subject [limb]. Splinting recommended for transport." user << "\red Unsecured fracture in subject [limb]. Splinting recommended for transport."

View File

@@ -25,7 +25,7 @@
var/mob/living/carbon/human/H = M var/mob/living/carbon/human/H = M
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting) var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
if(affecting.display_name == "head") if(affecting.name == "head")
if(H.head && istype(H.head,/obj/item/clothing/head/helmet/space)) if(H.head && istype(H.head,/obj/item/clothing/head/helmet/space))
user << "\red You can't apply [src] through [H.head]!" user << "\red You can't apply [src] through [H.head]!"
return 1 return 1
@@ -67,29 +67,29 @@
if(affecting.open == 0) if(affecting.open == 0)
if(!affecting.bandage()) if(!affecting.bandage())
user << "\red The wounds on [M]'s [affecting.display_name] have already been bandaged." user << "\red The wounds on [M]'s [affecting.name] have already been bandaged."
return 1 return 1
else else
for (var/datum/wound/W in affecting.wounds) for (var/datum/wound/W in affecting.wounds)
if (W.internal) if (W.internal)
continue continue
if (W.current_stage <= W.max_bleeding_stage) if (W.current_stage <= W.max_bleeding_stage)
user.visible_message( "\blue [user] bandages [W.desc] on [M]'s [affecting.display_name].", \ user.visible_message( "\blue [user] bandages [W.desc] on [M]'s [affecting.name].", \
"\blue You bandage [W.desc] on [M]'s [affecting.display_name]." ) "\blue You bandage [W.desc] on [M]'s [affecting.name]." )
//H.add_side_effect("Itch") //H.add_side_effect("Itch")
else if (istype(W,/datum/wound/bruise)) else if (istype(W,/datum/wound/bruise))
user.visible_message( "\blue [user] places bruise patch over [W.desc] on [M]'s [affecting.display_name].", \ user.visible_message( "\blue [user] places bruise patch over [W.desc] on [M]'s [affecting.name].", \
"\blue You place bruise patch over [W.desc] on [M]'s [affecting.display_name]." ) "\blue You place bruise patch over [W.desc] on [M]'s [affecting.name]." )
else else
user.visible_message( "\blue [user] places bandaid over [W.desc] on [M]'s [affecting.display_name].", \ user.visible_message( "\blue [user] places bandaid over [W.desc] on [M]'s [affecting.name].", \
"\blue You place bandaid over [W.desc] on [M]'s [affecting.display_name]." ) "\blue You place bandaid over [W.desc] on [M]'s [affecting.name]." )
use(1) use(1)
else else
if (can_operate(H)) //Checks if mob is lying down on table for surgery if (can_operate(H)) //Checks if mob is lying down on table for surgery
if (do_surgery(H,user,src)) if (do_surgery(H,user,src))
return return
else else
user << "<span class='notice'>The [affecting.display_name] is cut open, you'll need more than a bandage!</span>" user << "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>"
/obj/item/stack/medical/ointment /obj/item/stack/medical/ointment
name = "ointment" name = "ointment"
@@ -110,18 +110,18 @@
if(affecting.open == 0) if(affecting.open == 0)
if(!affecting.salve()) if(!affecting.salve())
user << "\red The wounds on [M]'s [affecting.display_name] have already been salved." user << "\red The wounds on [M]'s [affecting.name] have already been salved."
return 1 return 1
else else
user.visible_message( "\blue [user] salves wounds on [M]'s [affecting.display_name].", \ user.visible_message( "\blue [user] salves wounds on [M]'s [affecting.name].", \
"\blue You salve wounds on [M]'s [affecting.display_name]." ) "\blue You salve wounds on [M]'s [affecting.name]." )
use(1) use(1)
else else
if (can_operate(H)) //Checks if mob is lying down on table for surgery if (can_operate(H)) //Checks if mob is lying down on table for surgery
if (do_surgery(H,user,src)) if (do_surgery(H,user,src))
return return
else else
user << "<span class='notice'>The [affecting.display_name] is cut open, you'll need more than a bandage!</span>" user << "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>"
/obj/item/stack/medical/advanced/bruise_pack /obj/item/stack/medical/advanced/bruise_pack
name = "advanced trauma kit" name = "advanced trauma kit"
@@ -144,22 +144,22 @@
var/disinfected = affecting.disinfect() var/disinfected = affecting.disinfect()
if(!(bandaged || disinfected)) if(!(bandaged || disinfected))
user << "\red The wounds on [M]'s [affecting.display_name] have already been treated." user << "\red The wounds on [M]'s [affecting.name] have already been treated."
return 1 return 1
else else
for (var/datum/wound/W in affecting.wounds) for (var/datum/wound/W in affecting.wounds)
if (W.internal) if (W.internal)
continue continue
if (W.current_stage <= W.max_bleeding_stage) if (W.current_stage <= W.max_bleeding_stage)
user.visible_message( "\blue [user] cleans [W.desc] on [M]'s [affecting.display_name] and seals edges with bioglue.", \ user.visible_message( "\blue [user] cleans [W.desc] on [M]'s [affecting.name] and seals edges with bioglue.", \
"\blue You clean and seal [W.desc] on [M]'s [affecting.display_name]." ) "\blue You clean and seal [W.desc] on [M]'s [affecting.name]." )
//H.add_side_effect("Itch") //H.add_side_effect("Itch")
else if (istype(W,/datum/wound/bruise)) else if (istype(W,/datum/wound/bruise))
user.visible_message( "\blue [user] places medicine patch over [W.desc] on [M]'s [affecting.display_name].", \ user.visible_message( "\blue [user] places medicine patch over [W.desc] on [M]'s [affecting.name].", \
"\blue You place medicine patch over [W.desc] on [M]'s [affecting.display_name]." ) "\blue You place medicine patch over [W.desc] on [M]'s [affecting.name]." )
else else
user.visible_message( "\blue [user] smears some bioglue over [W.desc] on [M]'s [affecting.display_name].", \ user.visible_message( "\blue [user] smears some bioglue over [W.desc] on [M]'s [affecting.name].", \
"\blue You smear some bioglue over [W.desc] on [M]'s [affecting.display_name]." ) "\blue You smear some bioglue over [W.desc] on [M]'s [affecting.name]." )
if (bandaged) if (bandaged)
affecting.heal_damage(heal_brute,0) affecting.heal_damage(heal_brute,0)
use(1) use(1)
@@ -168,7 +168,7 @@
if (do_surgery(H,user,src)) if (do_surgery(H,user,src))
return return
else else
user << "<span class='notice'>The [affecting.display_name] is cut open, you'll need more than a bandage!</span>" user << "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>"
/obj/item/stack/medical/advanced/ointment /obj/item/stack/medical/advanced/ointment
name = "advanced burn kit" name = "advanced burn kit"
@@ -189,11 +189,11 @@
if(affecting.open == 0) if(affecting.open == 0)
if(!affecting.salve()) if(!affecting.salve())
user << "\red The wounds on [M]'s [affecting.display_name] have already been salved." user << "\red The wounds on [M]'s [affecting.name] have already been salved."
return 1 return 1
else else
user.visible_message( "\blue [user] covers wounds on [M]'s [affecting.display_name] with regenerative membrane.", \ user.visible_message( "\blue [user] covers wounds on [M]'s [affecting.name] with regenerative membrane.", \
"\blue You cover wounds on [M]'s [affecting.display_name] with regenerative membrane." ) "\blue You cover wounds on [M]'s [affecting.name] with regenerative membrane." )
affecting.heal_damage(0,heal_burn) affecting.heal_damage(0,heal_burn)
use(1) use(1)
else else
@@ -201,7 +201,7 @@
if (do_surgery(H,user,src)) if (do_surgery(H,user,src))
return return
else else
user << "<span class='notice'>The [affecting.display_name] is cut open, you'll need more than a bandage!</span>" user << "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>"
/obj/item/stack/medical/splint /obj/item/stack/medical/splint
name = "medical splints" name = "medical splints"
@@ -217,7 +217,7 @@
if (istype(M, /mob/living/carbon/human)) if (istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M var/mob/living/carbon/human/H = M
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting) var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
var/limb = affecting.display_name var/limb = affecting.name
if(!((affecting.name == "l_arm") || (affecting.name == "r_arm") || (affecting.name == "l_leg") || (affecting.name == "r_leg"))) if(!((affecting.name == "l_arm") || (affecting.name == "r_arm") || (affecting.name == "l_leg") || (affecting.name == "r_leg")))
user << "\red You can't apply a splint there!" user << "\red You can't apply a splint there!"
return return

View File

@@ -33,8 +33,8 @@
S.heal_damage(15, 15, robo_repair = 1) S.heal_damage(15, 15, robo_repair = 1)
H.updatehealth() H.updatehealth()
use(1) use(1)
user.visible_message("<span class='notice'>\The [user] applies some nanite paste at[user != M ? " \the [M]'s" : " \the"][S.display_name] with \the [src].</span>",\ user.visible_message("<span class='notice'>\The [user] applies some nanite paste at[user != M ? " \the [M]'s" : " \the"][S.name] with \the [src].</span>",\
"<span class='notice'>You apply some nanite paste at [user == M ? "your" : "[M]'s"] [S.display_name].</span>") "<span class='notice'>You apply some nanite paste at [user == M ? "your" : "[M]'s"] [S.name].</span>")
else else
user << "<span class='notice'>Nothing to fix here.</span>" user << "<span class='notice'>Nothing to fix here.</span>"
else else

View File

@@ -64,9 +64,9 @@
if(!D.organs_scanned[O.name]) if(!D.organs_scanned[O.name])
if(D.organ_names == "") if(D.organ_names == "")
D.organ_names = O.display_name D.organ_names = O.name
else else
D.organ_names += ", [O.display_name]" D.organ_names += ", [O.name]"
del D.organs_scanned[O.name] del D.organs_scanned[O.name]
D.organs_scanned[O.name] = W.copy() D.organs_scanned[O.name] = W.copy()
@@ -199,7 +199,7 @@
usr << "<b>You have to cut the limb open first!</b>" usr << "<b>You have to cut the limb open first!</b>"
return return
for(var/mob/O in viewers(M)) 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) O.show_message("\red [user.name] scans the wounds on [M.name]'s [S.name] with \the [src.name]", 1)
src.add_data(S) src.add_data(S)

View File

@@ -96,8 +96,8 @@ var/last_chew = 0
var/obj/item/organ/external/O = H.organs_by_name[H.hand?"l_hand":"r_hand"] var/obj/item/organ/external/O = H.organs_by_name[H.hand?"l_hand":"r_hand"]
if (!O) return if (!O) return
var/s = "\red [H.name] chews on \his [O.display_name]!" var/s = "\red [H.name] chews on \his [O.name]!"
H.visible_message(s, "\red You chew on your [O.display_name]!") H.visible_message(s, "\red You chew on your [O.name]!")
H.attack_log += text("\[[time_stamp()]\] <font color='red'>[s] ([H.ckey])</font>") H.attack_log += text("\[[time_stamp()]\] <font color='red'>[s] ([H.ckey])</font>")
log_attack("[s] ([H.ckey])") log_attack("[s] ([H.ckey])")

View File

@@ -35,7 +35,7 @@
return 0 return 0
proc/meltdown() //breaks it down, making implant unrecongizible proc/meltdown() //breaks it down, making implant unrecongizible
imp_in << "\red You feel something melting inside [part ? "your [part.display_name]" : "you"]!" imp_in << "\red You feel something melting inside [part ? "your [part.name]" : "you"]!"
if (part) if (part)
part.take_damage(burn = 15, used_weapon = "Electronics meltdown") part.take_damage(burn = 15, used_weapon = "Electronics meltdown")
else else
@@ -171,7 +171,7 @@ Implant Specifics:<BR>"}
if(ishuman(imp_in)) if(ishuman(imp_in))
if (elevel == "Localized Limb") if (elevel == "Localized Limb")
if(part) //For some reason, small_boom() didn't work. So have this bit of working copypaste. if(part) //For some reason, small_boom() didn't work. So have this bit of working copypaste.
imp_in.visible_message("\red Something beeps inside [imp_in][part ? "'s [part.display_name]" : ""]!") imp_in.visible_message("\red Something beeps inside [imp_in][part ? "'s [part.name]" : ""]!")
playsound(loc, 'sound/items/countdown.ogg', 75, 1, -3) playsound(loc, 'sound/items/countdown.ogg', 75, 1, -3)
sleep(25) sleep(25)
if (istype(part,/obj/item/organ/external/chest) || \ if (istype(part,/obj/item/organ/external/chest) || \
@@ -182,7 +182,7 @@ Implant Specifics:<BR>"}
del(src) del(src)
else else
explosion(get_turf(imp_in), -1, -1, 2, 3) explosion(get_turf(imp_in), -1, -1, 2, 3)
part.droplimb(1) part.droplimb()
del(src) del(src)
if (elevel == "Destroy Body") if (elevel == "Destroy Body")
explosion(get_turf(T), -1, 0, 1, 6) explosion(get_turf(T), -1, 0, 1, 6)
@@ -236,7 +236,7 @@ Implant Specifics:<BR>"}
proc/small_boom() proc/small_boom()
if (ishuman(imp_in) && part) if (ishuman(imp_in) && part)
imp_in.visible_message("\red Something beeps inside [imp_in][part ? "'s [part.display_name]" : ""]!") imp_in.visible_message("\red Something beeps inside [imp_in][part ? "'s [part.name]" : ""]!")
playsound(loc, 'sound/items/countdown.ogg', 75, 1, -3) playsound(loc, 'sound/items/countdown.ogg', 75, 1, -3)
spawn(25) spawn(25)
if (ishuman(imp_in) && part) if (ishuman(imp_in) && part)
@@ -247,7 +247,7 @@ Implant Specifics:<BR>"}
istype(part,/obj/item/organ/external/head)) istype(part,/obj/item/organ/external/head))
part.createwound(BRUISE, 60) //mangle them instead part.createwound(BRUISE, 60) //mangle them instead
else else
part.droplimb(1) part.droplimb()
explosion(get_turf(imp_in), -1, -1, 2, 3) explosion(get_turf(imp_in), -1, -1, 2, 3)
del(src) del(src)

View File

@@ -136,10 +136,10 @@
var/obj/item/organ/external/affecting = H.get_organ(target_zone) var/obj/item/organ/external/affecting = H.get_organ(target_zone)
if (affecting) if (affecting)
if(!status) if(!status)
L.visible_message("<span class='warning'>[L] has been prodded in the [affecting.display_name] with [src] by [user]. Luckily it was off.</span>") L.visible_message("<span class='warning'>[L] has been prodded in the [affecting.name] with [src] by [user]. Luckily it was off.</span>")
return 1 return 1
else else
H.visible_message("<span class='danger'>[L] has been prodded in the [affecting.display_name] with [src] by [user]!</span>") H.visible_message("<span class='danger'>[L] has been prodded in the [affecting.name] with [src] by [user]!</span>")
else else
if(!status) if(!status)
L.visible_message("<span class='warning'>[L] has been prodded with [src] by [user]. Luckily it was off.</span>") L.visible_message("<span class='warning'>[L] has been prodded with [src] by [user]. Luckily it was off.</span>")

View File

@@ -472,7 +472,7 @@
if(S.brute_dam) if(S.brute_dam)
S.heal_damage(15,0,0,1) S.heal_damage(15,0,0,1)
user.visible_message("\red \The [user] patches some dents on \the [M]'s [S.display_name] with \the [src].") user.visible_message("\red \The [user] patches some dents on \the [M]'s [S.name] with \the [src].")
return return
else else
user << "Nothing to fix!" user << "Nothing to fix!"

View File

@@ -148,7 +148,7 @@
affecting = H.get_organ("head") affecting = H.get_organ("head")
if(affecting) if(affecting)
M << "<span class='danger'>You land heavily on your [affecting.display_name]!</span>" M << "<span class='danger'>You land heavily on your [affecting.name]!</span>"
affecting.take_damage(damage, 0) affecting.take_damage(damage, 0)
if(affecting.parent) if(affecting.parent)
affecting.parent.add_autopsy_data("Misadventure", damage) affecting.parent.add_autopsy_data("Misadventure", damage)

View File

@@ -37,7 +37,7 @@
if (user.hand) if (user.hand)
temp = H.organs_by_name["l_hand"] temp = H.organs_by_name["l_hand"]
if(temp && !temp.is_usable()) if(temp && !temp.is_usable())
user << "<span class='notice'>You try to move your [temp.display_name], but cannot!" user << "<span class='notice'>You try to move your [temp.name], but cannot!"
return return
if(has_extinguisher) if(has_extinguisher)
user.put_in_hands(has_extinguisher) user.put_in_hands(has_extinguisher)

View File

@@ -352,7 +352,7 @@
if (user.hand) if (user.hand)
temp = user:organs_by_name["l_hand"] temp = user:organs_by_name["l_hand"]
if(temp && !temp.is_usable()) if(temp && !temp.is_usable())
user << "<span class='notice'>You try to move your [temp.display_name], but cannot!" user << "<span class='notice'>You try to move your [temp.name], but cannot!"
return return
if(isrobot(user) || isAI(user)) if(isrobot(user) || isAI(user))

View File

@@ -1693,8 +1693,13 @@ datum/preferences
var/obj/item/organ/external/O = character.organs_by_name[name] var/obj/item/organ/external/O = character.organs_by_name[name]
if(O) if(O)
if(status == "amputated") if(status == "amputated")
O.amputated = 1 character.organs_by_name[O.limb_name] = null
O.status |= ORGAN_DESTROYED character.organs -= O
if(O.children) // This might need to become recursive.
for(var/obj/item/organ/external/child in O.children)
character.organs_by_name[child.limb_name] = null
character.organs -= child
else if(status == "cyborg") else if(status == "cyborg")
O.status |= ORGAN_ROBOT O.status |= ORGAN_ROBOT
else else

View File

@@ -89,5 +89,5 @@
// Otherwise, remove the splints. // Otherwise, remove the splints.
for(var/obj/item/organ/external/E in supporting_limbs) for(var/obj/item/organ/external/E in supporting_limbs)
E.status &= ~ ORGAN_SPLINTED E.status &= ~ ORGAN_SPLINTED
user << "The suit stops supporting your [E.display_name]." user << "The suit stops supporting your [E.name]."
supporting_limbs = list() supporting_limbs = list()

View File

@@ -116,13 +116,13 @@
if(get_trait(TRAIT_CARNIVOROUS)) if(get_trait(TRAIT_CARNIVOROUS))
if(get_trait(TRAIT_CARNIVOROUS) == 2) if(get_trait(TRAIT_CARNIVOROUS) == 2)
if(affecting) if(affecting)
target << "<span class='danger'>\The [fruit]'s thorns pierce your [affecting.display_name] greedily!</span>" target << "<span class='danger'>\The [fruit]'s thorns pierce your [affecting.name] greedily!</span>"
else else
target << "<span class='danger'>\The [fruit]'s thorns pierce your flesh greedily!</span>" target << "<span class='danger'>\The [fruit]'s thorns pierce your flesh greedily!</span>"
damage = get_trait(TRAIT_POTENCY)/2 damage = get_trait(TRAIT_POTENCY)/2
else else
if(affecting) if(affecting)
target << "<span class='danger'>\The [fruit]'s thorns dig deeply into your [affecting.display_name]!</span>" target << "<span class='danger'>\The [fruit]'s thorns dig deeply into your [affecting.name]!</span>"
else else
target << "<span class='danger'>\The [fruit]'s thorns dig deeply into your flesh!</span>" target << "<span class='danger'>\The [fruit]'s thorns dig deeply into your flesh!</span>"
damage = get_trait(TRAIT_POTENCY)/5 damage = get_trait(TRAIT_POTENCY)/5

View File

@@ -44,19 +44,18 @@
else else
user << "This one seems particularly lifeless. Perhaps it will regain some of its luster later.." user << "This one seems particularly lifeless. Perhaps it will regain some of its luster later.."
/obj/item/organ/brain/removed(var/mob/living/target,var/mob/living/user) /obj/item/organ/brain/removed(var/mob/living/user)
..() ..()
var/mob/living/simple_animal/borer/borer = target.has_brain_worms() var/mob/living/simple_animal/borer/borer = owner.has_brain_worms()
if(borer) if(borer)
borer.detatch() //Should remove borer if the brain is removed - RR borer.detatch() //Should remove borer if the brain is removed - RR
var/mob/living/carbon/human/H = target
var/obj/item/organ/brain/B = src var/obj/item/organ/brain/B = src
if(istype(B) && istype(H)) if(istype(B) && istype(owner))
B.transfer_identity(target) B.transfer_identity(owner)
/obj/item/organ/brain/replaced(var/mob/living/target) /obj/item/organ/brain/replaced(var/mob/living/target)

View File

@@ -66,7 +66,7 @@
if (H.hand) if (H.hand)
temp = H.organs_by_name["l_hand"] temp = H.organs_by_name["l_hand"]
if(temp && !temp.is_usable()) if(temp && !temp.is_usable())
H << "\red You can't use your [temp.display_name]" H << "\red You can't use your [temp.name]"
return return
for(var/datum/disease/D in viruses) for(var/datum/disease/D in viruses)
@@ -187,7 +187,7 @@
status = "weirdly shapen." status = "weirdly shapen."
if(status == "") if(status == "")
status = "OK" status = "OK"
src.show_message(text("\t []My [] is [].",status=="OK"?"\blue ":"\red ",org.display_name,status),1) src.show_message(text("\t []My [] is [].",status=="OK"?"\blue ":"\red ",org.name,status),1)
if((SKELETON in H.mutations) && (!H.w_uniform) && (!H.wear_suit)) if((SKELETON in H.mutations) && (!H.w_uniform) && (!H.wear_suit))
H.play_xylophone() H.play_xylophone()
else if (on_fire) else if (on_fire)

View File

@@ -6,12 +6,11 @@
I.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30) I.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30)
for(var/obj/item/organ/external/E in src.organs) for(var/obj/item/organ/external/E in src.organs)
if(istype(E, /obj/item/organ/external/chest)) if(E.cannot_amputate)
E.removed()
del(E)
continue continue
// Only make the limb drop if it's not too damaged E.droplimb()
if(prob(100 - E.get_damage()))
// Override the current limb status and don't cause an explosion
E.droplimb(1,1)
..(species.gibbed_anim) ..(species.gibbed_anim)
gibs(loc, viruses, dna, null, species.flesh_color, species.blood_color) gibs(loc, viruses, dna, null, species.flesh_color, species.blood_color)

View File

@@ -200,7 +200,7 @@
for(var/organ in list("l_leg","r_leg","l_arm","r_arm")) for(var/organ in list("l_leg","r_leg","l_arm","r_arm"))
var/obj/item/organ/external/o = get_organ(organ) var/obj/item/organ/external/o = get_organ(organ)
if(o && o.status & ORGAN_SPLINTED) if(o && o.status & ORGAN_SPLINTED)
msg += "<span class='warning'>[t_He] [t_has] a splint on [t_his] [o.display_name]!</span>\n" msg += "<span class='warning'>[t_He] [t_has] a splint on [t_his] [o.name]!</span>\n"
if(suiciding) if(suiciding)
msg += "<span class='warning'>[t_He] appears to have commited suicide... there is no hope of recovery.</span>\n" msg += "<span class='warning'>[t_He] appears to have commited suicide... there is no hope of recovery.</span>\n"
@@ -254,30 +254,30 @@
for(var/obj/item/organ/external/temp in organs) for(var/obj/item/organ/external/temp in organs)
if(temp) if(temp)
if(temp.status & ORGAN_DESTROYED) if(temp.status & ORGAN_DESTROYED)
is_destroyed["[temp.display_name]"] = 1 is_destroyed["[temp.name]"] = 1
wound_flavor_text["[temp.display_name]"] = "<span class='warning'><b>[t_He] is missing [t_his] [temp.display_name].</b></span>\n" wound_flavor_text["[temp.name]"] = "<span class='warning'><b>[t_He] is missing [t_his] [temp.name].</b></span>\n"
continue continue
if(temp.status & ORGAN_ROBOT) if(temp.status & ORGAN_ROBOT)
if(!(temp.brute_dam + temp.burn_dam)) if(!(temp.brute_dam + temp.burn_dam))
if(!species.flags & IS_SYNTHETIC) if(!species.flags & IS_SYNTHETIC)
wound_flavor_text["[temp.display_name]"] = "<span class='warning'>[t_He] has a robot [temp.display_name]!</span>\n" wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has a robot [temp.name]!</span>\n"
continue continue
else else
wound_flavor_text["[temp.display_name]"] = "<span class='warning'>[t_He] has a robot [temp.display_name]. It has" wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has a robot [temp.name]. It has"
if(temp.brute_dam) switch(temp.brute_dam) if(temp.brute_dam) switch(temp.brute_dam)
if(0 to 20) if(0 to 20)
wound_flavor_text["[temp.display_name]"] += " some dents" wound_flavor_text["[temp.name]"] += " some dents"
if(21 to INFINITY) if(21 to INFINITY)
wound_flavor_text["[temp.display_name]"] += pick(" a lot of dents"," severe denting") wound_flavor_text["[temp.name]"] += pick(" a lot of dents"," severe denting")
if(temp.brute_dam && temp.burn_dam) if(temp.brute_dam && temp.burn_dam)
wound_flavor_text["[temp.display_name]"] += " and" wound_flavor_text["[temp.name]"] += " and"
if(temp.burn_dam) switch(temp.burn_dam) if(temp.burn_dam) switch(temp.burn_dam)
if(0 to 20) if(0 to 20)
wound_flavor_text["[temp.display_name]"] += " some burns" wound_flavor_text["[temp.name]"] += " some burns"
if(21 to INFINITY) if(21 to INFINITY)
wound_flavor_text["[temp.display_name]"] += pick(" a lot of burns"," severe melting") wound_flavor_text["[temp.name]"] += pick(" a lot of burns"," severe melting")
if(wound_flavor_text["[temp.display_name]"]) if(wound_flavor_text["[temp.name]"])
wound_flavor_text["[temp.display_name]"] += "!</span>\n" wound_flavor_text["[temp.name]"] += "!</span>\n"
else if(temp.wounds.len > 0) else if(temp.wounds.len > 0)
var/list/wound_descriptors = list() var/list/wound_descriptors = list()
for(var/datum/wound/W in temp.wounds) for(var/datum/wound/W in temp.wounds)
@@ -325,14 +325,14 @@
else if(flavor_text.len > 1 && text > 1) else if(flavor_text.len > 1 && text > 1)
flavor_text_string += "," flavor_text_string += ","
flavor_text_string += flavor_text[text] flavor_text_string += flavor_text[text]
flavor_text_string += " on [t_his] [temp.display_name].</span><br>" flavor_text_string += " on [t_his] [temp.name].</span><br>"
wound_flavor_text["[temp.display_name]"] = flavor_text_string wound_flavor_text["[temp.name]"] = flavor_text_string
else else
wound_flavor_text["[temp.display_name]"] = "" wound_flavor_text["[temp.name]"] = ""
if(temp.status & ORGAN_BLEEDING) if(temp.status & ORGAN_BLEEDING)
is_bleeding["[temp.display_name]"] = 1 is_bleeding["[temp.name]"] = 1
else else
wound_flavor_text["[temp.display_name]"] = "" wound_flavor_text["[temp.name]"] = ""
//Handles the text strings being added to the actual description. //Handles the text strings being added to the actual description.
//If they have something that covers the limb, and it is not missing, put flavortext. If it is covered but bleeding, add other flavortext. //If they have something that covers the limb, and it is not missing, put flavortext. If it is covered but bleeding, add other flavortext.

View File

@@ -938,8 +938,6 @@
O.status &= ~ORGAN_SPLINTED O.status &= ~ORGAN_SPLINTED
O.status &= ~ORGAN_CUT_AWAY O.status &= ~ORGAN_CUT_AWAY
O.status &= ~ORGAN_ATTACHABLE O.status &= ~ORGAN_ATTACHABLE
if (!O.amputated)
O.status &= ~ORGAN_DESTROYED
O.wounds.Cut() O.wounds.Cut()
O.heal_damage(1000,1000,1,1) O.heal_damage(1000,1000,1,1)
@@ -1060,11 +1058,11 @@
var/msg = null var/msg = null
switch(rand(1,3)) switch(rand(1,3))
if(1) if(1)
msg ="<span class='warning'>A spike of pain jolts your [organ.display_name] as you bump [O] inside.</span>" msg ="<span class='warning'>A spike of pain jolts your [organ.name] as you bump [O] inside.</span>"
if(2) if(2)
msg ="<span class='warning'>Your movement jostles [O] in your [organ.display_name] painfully.</span>" msg ="<span class='warning'>Your movement jostles [O] in your [organ.name] painfully.</span>"
if(3) if(3)
msg ="<span class='warning'>[O] in your [organ.display_name] twists painfully as you move.</span>" msg ="<span class='warning'>[O] in your [organ.name] twists painfully as you move.</span>"
src << msg src << msg
organ.take_damage(rand(1,3), 0, 0) organ.take_damage(rand(1,3), 0, 0)

View File

@@ -5,8 +5,8 @@
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"] var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
if(H.hand) if(H.hand)
temp = H.organs_by_name["l_hand"] temp = H.organs_by_name["l_hand"]
if(temp && !temp.is_usable()) if(!temp || !temp.is_usable())
H << "\red You can't use your [temp.display_name]." H << "\red You can't use your hand."
return return
..() ..()
@@ -100,6 +100,10 @@
var/hit_zone = H.zone_sel.selecting var/hit_zone = H.zone_sel.selecting
var/obj/item/organ/external/affecting = get_organ(hit_zone) var/obj/item/organ/external/affecting = get_organ(hit_zone)
if(!affecting || affecting.status & ORGAN_DESTROYED)
M << "<span class='danger'>They are missing that limb!</span>"
return
switch(src.a_intent) switch(src.a_intent)
if("help") if("help")
// We didn't see this coming, so we get the full blow // We didn't see this coming, so we get the full blow
@@ -157,7 +161,7 @@
miss_type = 1 miss_type = 1
if(!miss_type && block) if(!miss_type && block)
attack_message = "[H] went for [src]'s [affecting.display_name] but was blocked!" attack_message = "[H] went for [src]'s [affecting.name] but was blocked!"
miss_type = 2 miss_type = 2
// See what attack they use // See what attack they use

View File

@@ -170,21 +170,21 @@
if (candidates.len) if (candidates.len)
var/obj/item/organ/external/O = pick(candidates) var/obj/item/organ/external/O = pick(candidates)
O.mutate() O.mutate()
src << "<span class = 'notice'>Something is not right with your [O.display_name]...</span>" src << "<span class = 'notice'>Something is not right with your [O.name]...</span>"
return return
else else
if (prob(heal_prob)) if (prob(heal_prob))
for (var/obj/item/organ/external/O in organs) for (var/obj/item/organ/external/O in organs)
if (O.status & ORGAN_MUTATED) if (O.status & ORGAN_MUTATED)
O.unmutate() O.unmutate()
src << "<span class = 'notice'>Your [O.display_name] is shaped normally again.</span>" src << "<span class = 'notice'>Your [O.name] is shaped normally again.</span>"
return return
if (getCloneLoss() < 1) if (getCloneLoss() < 1)
for (var/obj/item/organ/external/O in organs) for (var/obj/item/organ/external/O in organs)
if (O.status & ORGAN_MUTATED) if (O.status & ORGAN_MUTATED)
O.unmutate() O.unmutate()
src << "<span class = 'notice'>Your [O.display_name] is shaped normally again.</span>" src << "<span class = 'notice'>Your [O.name] is shaped normally again.</span>"
BITSET(hud_updateflag, HEALTH_HUD) BITSET(hud_updateflag, HEALTH_HUD)
// Defined here solely to take species flags into account without having to recast at mob/living level. // Defined here solely to take species flags into account without having to recast at mob/living level.

View File

@@ -70,10 +70,10 @@ emp_act
u_equip(c_hand) u_equip(c_hand)
if (affected.status & ORGAN_ROBOT) if (affected.status & ORGAN_ROBOT)
emote("me", 1, "drops what they were holding, their [affected.display_name] malfunctioning!") emote("me", 1, "drops what they were holding, their [affected.name] malfunctioning!")
else else
var/emote_scream = pick("screams in pain and ", "lets out a sharp cry and ", "cries out and ") var/emote_scream = pick("screams in pain and ", "lets out a sharp cry and ", "cries out and ")
emote("me", 1, "[(species && species.flags & NO_PAIN) ? "" : emote_scream ]drops what they were holding in their [affected.display_name]!") emote("me", 1, "[(species && species.flags & NO_PAIN) ? "" : emote_scream ]drops what they were holding in their [affected.name]!")
..(stun_amount, agony_amount, def_zone) ..(stun_amount, agony_amount, def_zone)
@@ -189,12 +189,12 @@ emp_act
return 0 return 0
var/obj/item/organ/external/affecting = get_organ(target_zone) var/obj/item/organ/external/affecting = get_organ(target_zone)
if (!affecting)
return 0 if (!affecting || affecting.status & ORGAN_DESTROYED || istype(affecting, /obj/item/organ/external/stump))
if(affecting.status & ORGAN_DESTROYED) user << "<span class='danger'>They are missing that limb!</span>"
user << "What [affecting.display_name]?" return
return 0
var/hit_area = affecting.display_name var/hit_area = affecting.name
if((user != src) && check_shields(I.force, "the [I.name]")) if((user != src) && check_shields(I.force, "the [I.name]"))
return 0 return 0
@@ -204,9 +204,9 @@ emp_act
user << "\red That limb isn't robotic." user << "\red That limb isn't robotic."
return return
if(affecting.sabotaged) if(affecting.sabotaged)
user << "\red [src]'s [affecting.display_name] is already sabotaged!" user << "\red [src]'s [affecting.name] is already sabotaged!"
else else
user << "\red You sneakily slide [I] into the dataport on [src]'s [affecting.display_name] and short out the safeties." user << "\red You sneakily slide [I] into the dataport on [src]'s [affecting.name] and short out the safeties."
var/obj/item/weapon/card/emag/emag = I var/obj/item/weapon/card/emag/emag = I
emag.uses-- emag.uses--
affecting.sabotaged = 1 affecting.sabotaged = 1
@@ -328,7 +328,7 @@ emp_act
return return
var/obj/item/organ/external/affecting = get_organ(zone) var/obj/item/organ/external/affecting = get_organ(zone)
var/hit_area = affecting.display_name var/hit_area = affecting.name
src.visible_message("\red [src] has been hit in the [hit_area] by [O].") src.visible_message("\red [src] has been hit in the [hit_area] by [O].")
var/armor = run_armor_check(affecting, "melee", "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].") //I guess "melee" is the best fit here var/armor = run_armor_check(affecting, "melee", "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].") //I guess "melee" is the best fit here

View File

@@ -41,7 +41,7 @@
//Moving around with fractured ribs won't do you any good //Moving around with fractured ribs won't do you any good
if (E.is_broken() && E.internal_organs && prob(15)) if (E.is_broken() && E.internal_organs && prob(15))
var/obj/item/organ/I = pick(E.internal_organs) var/obj/item/organ/I = pick(E.internal_organs)
custom_pain("You feel broken bones moving in your [E.display_name]!", 1) custom_pain("You feel broken bones moving in your [E.name]!", 1)
I.take_damage(rand(3,5)) I.take_damage(rand(3,5))
//Moving makes open wounds get infected much faster //Moving makes open wounds get infected much faster

View File

@@ -105,6 +105,20 @@
"eyes" = /obj/item/organ/eyes "eyes" = /obj/item/organ/eyes
) )
var/list/has_limbs = list(
/obj/item/organ/external/chest,
/obj/item/organ/external/groin,
/obj/item/organ/external/head,
/obj/item/organ/external/arm,
/obj/item/organ/external/arm/right,
/obj/item/organ/external/leg,
/obj/item/organ/external/leg/right,
/obj/item/organ/external/hand,
/obj/item/organ/external/hand/right,
/obj/item/organ/external/foot,
/obj/item/organ/external/foot/right
)
/datum/species/New() /datum/species/New()
if(hud_type) if(hud_type)
hud = new hud_type() hud = new hud_type()
@@ -156,18 +170,8 @@
H.organs_by_name = list() H.organs_by_name = list()
H.internal_organs_by_name = list() H.internal_organs_by_name = list()
//This is a basic humanoid limb setup. for(var/limb_type in has_limbs)
H.organs_by_name["chest"] = new/obj/item/organ/external/chest(H) new limb_type(H)
H.organs_by_name["groin"] = new/obj/item/organ/external/groin(H)
H.organs_by_name["head"] = new/obj/item/organ/external/head(H)
H.organs_by_name["l_arm"] = new/obj/item/organ/external/arm(H)
H.organs_by_name["r_arm"] = new/obj/item/organ/external/arm/right(H)
H.organs_by_name["r_leg"] = new/obj/item/organ/external/leg(H)
H.organs_by_name["l_leg"] = new/obj/item/organ/external/leg/right(H)
H.organs_by_name["l_hand"] = new/obj/item/organ/external/hand(H)
H.organs_by_name["r_hand"] = new/obj/item/organ/external/hand/right(H)
H.organs_by_name["l_foot"] = new/obj/item/organ/external/foot(H)
H.organs_by_name["r_foot"] = new/obj/item/organ/external/foot/right(H)
for(var/organ in has_organ) for(var/organ in has_organ)
var/organ_type = has_organ[organ] var/organ_type = has_organ[organ]

View File

@@ -28,7 +28,7 @@
attack_damage = Clamp(attack_damage, 1, 5) attack_damage = Clamp(attack_damage, 1, 5)
if(target == user) if(target == user)
user.visible_message("<span class='danger'>[user] [pick(attack_verb)] \himself in the [affecting.display_name]!</span>") user.visible_message("<span class='danger'>[user] [pick(attack_verb)] \himself in the [affecting.name]!</span>")
return 0 return 0
switch(zone) switch(zone)
@@ -47,9 +47,9 @@
else else
// ----- BODY ----- // // ----- BODY ----- //
switch(attack_damage) switch(attack_damage)
if(1 to 2) user.visible_message("<span class='danger'>[user] scratched [target]'s [affecting.display_name]!</span>") if(1 to 2) user.visible_message("<span class='danger'>[user] scratched [target]'s [affecting.name]!</span>")
if(3 to 4) user.visible_message("<span class='danger'>[user] [pick(attack_verb)] [pick("", "", "the side of")] [target]'s [affecting.display_name]!</span>") if(3 to 4) user.visible_message("<span class='danger'>[user] [pick(attack_verb)] [pick("", "", "the side of")] [target]'s [affecting.name]!</span>")
if(5) user.visible_message("<span class='danger'>[user] tears \his [pick(attack_noun)] [pick("deep into", "into", "across")] [target]'s [affecting.display_name]!</span>") if(5) user.visible_message("<span class='danger'>[user] tears \his [pick(attack_noun)] [pick("deep into", "into", "across")] [target]'s [affecting.name]!</span>")
/datum/unarmed_attack/claws/strong /datum/unarmed_attack/claws/strong
attack_verb = list("slashed") attack_verb = list("slashed")

View File

@@ -124,7 +124,7 @@
if (E.status & ORGAN_BROKEN) if (E.status & ORGAN_BROKEN)
if (prob(mend_prob)) if (prob(mend_prob))
if (E.mend_fracture()) if (E.mend_fracture())
H << "<span class='alium'>You feel something mend itself inside your [E.display_name].</span>" H << "<span class='alium'>You feel something mend itself inside your [E.name].</span>"
return 1 return 1
return 0 return 0

View File

@@ -75,7 +75,7 @@
/datum/unarmed_attack/proc/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage) /datum/unarmed_attack/proc/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage)
var/obj/item/organ/external/affecting = target.get_organ(zone) var/obj/item/organ/external/affecting = target.get_organ(zone)
user.visible_message("<span class='warning'>[user] [pick(attack_verb)] [target] in the [affecting.display_name]!</span>") user.visible_message("<span class='warning'>[user] [pick(attack_verb)] [target] in the [affecting.name]!</span>")
playsound(user.loc, attack_sound, 25, 1, -1) playsound(user.loc, attack_sound, 25, 1, -1)
/datum/unarmed_attack/bite /datum/unarmed_attack/bite
@@ -101,7 +101,7 @@
/datum/unarmed_attack/punch/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage) /datum/unarmed_attack/punch/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage)
var/obj/item/organ/external/affecting = target.get_organ(zone) var/obj/item/organ/external/affecting = target.get_organ(zone)
var/organ = affecting.display_name var/organ = affecting.name
attack_damage = Clamp(attack_damage, 1, 5) // We expect damage input of 1 to 5 for this proc. But we leave this check juuust in case. attack_damage = Clamp(attack_damage, 1, 5) // We expect damage input of 1 to 5 for this proc. But we leave this check juuust in case.
@@ -172,7 +172,7 @@
/datum/unarmed_attack/kick/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage) /datum/unarmed_attack/kick/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage)
var/obj/item/organ/external/affecting = target.get_organ(zone) var/obj/item/organ/external/affecting = target.get_organ(zone)
var/organ = affecting.display_name var/organ = affecting.name
attack_damage = Clamp(attack_damage, 1, 5) attack_damage = Clamp(attack_damage, 1, 5)
@@ -214,7 +214,7 @@
/datum/unarmed_attack/stomp/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage) /datum/unarmed_attack/stomp/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage)
var/obj/item/organ/external/affecting = target.get_organ(zone) var/obj/item/organ/external/affecting = target.get_organ(zone)
var/organ = affecting.display_name var/organ = affecting.name
var/obj/item/clothing/shoes = user.shoes var/obj/item/clothing/shoes = user.shoes
attack_damage = Clamp(attack_damage, 1, 5) attack_damage = Clamp(attack_damage, 1, 5)

View File

@@ -38,7 +38,7 @@
for(var/obj/item/organ/external/organ in M.organs) for(var/obj/item/organ/external/organ in M.organs)
if (!organ) if (!organ)
continue continue
if((organ.status & ORGAN_DESTROYED) && !organ.amputated) if(istype(organ, /obj/item/organ/external/stump))
src.traumatic_shock += 60 src.traumatic_shock += 60
else if(organ.status & ORGAN_BROKEN || organ.open) else if(organ.status & ORGAN_BROKEN || organ.open)
src.traumatic_shock += 30 src.traumatic_shock += 30

View File

@@ -67,7 +67,7 @@
if(length(damaged)>0) if(length(damaged)>0)
for(var/obj/item/organ/external/org in damaged) for(var/obj/item/organ/external/org in damaged)
user.show_message(text("\blue \t []: [] - []", \ user.show_message(text("\blue \t []: [] - []", \
capitalize(org.display_name), \ capitalize(org.name), \
(org.brute_dam > 0) ? "\red [org.brute_dam]" :0, \ (org.brute_dam > 0) ? "\red [org.brute_dam]" :0, \
(org.burn_dam > 0) ? "<font color='#FFA500'>[org.burn_dam]</font>" :0),1) (org.burn_dam > 0) ? "<font color='#FFA500'>[org.burn_dam]</font>" :0),1)
else else

View File

@@ -179,7 +179,7 @@ var/list/organ_cache = list()
var/obj/item/organ/external/parent = owner.get_organ(parent_organ) var/obj/item/organ/external/parent = owner.get_organ(parent_organ)
if (!silent) if (!silent)
owner.custom_pain("Something inside your [parent.display_name] hurts a lot.", 1) owner.custom_pain("Something inside your [parent.name] hurts a lot.", 1)
/obj/item/organ/proc/robotize() //Being used to make robutt hearts, etc /obj/item/organ/proc/robotize() //Being used to make robutt hearts, etc
robotic = 2 robotic = 2
@@ -244,10 +244,11 @@ var/list/organ_cache = list()
if(!organ_blood || !organ_blood.data["blood_DNA"]) if(!organ_blood || !organ_blood.data["blood_DNA"])
owner.vessel.trans_to(src, 5, 1, 1) owner.vessel.trans_to(src, 5, 1, 1)
if(owner && user && vital) if(owner && vital)
user.attack_log += "\[[time_stamp()]\]<font color='red'> removed a vital organ ([src]) from [owner.name] ([owner.ckey]) (INTENT: [uppertext(user.a_intent)])</font>" if(user)
owner.attack_log += "\[[time_stamp()]\]<font color='orange'> had a vital organ ([src]) removed by [user.name] ([user.ckey]) (INTENT: [uppertext(user.a_intent)])</font>" user.attack_log += "\[[time_stamp()]\]<font color='red'> removed a vital organ ([src]) from [owner.name] ([owner.ckey]) (INTENT: [uppertext(user.a_intent)])</font>"
msg_admin_attack("[user.name] ([user.ckey]) removed a vital organ ([src]) from [owner.name] ([owner.ckey]) (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)") owner.attack_log += "\[[time_stamp()]\]<font color='orange'> had a vital organ ([src]) removed by [user.name] ([user.ckey]) (INTENT: [uppertext(user.a_intent)])</font>"
msg_admin_attack("[user.name] ([user.ckey]) removed a vital organ ([src]) from [owner.name] ([owner.ckey]) (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
owner.death() owner.death()
/obj/item/organ/proc/replaced(var/mob/living/carbon/human/target,var/obj/item/organ/external/affected) /obj/item/organ/proc/replaced(var/mob/living/carbon/human/target,var/obj/item/organ/external/affected)

View File

@@ -13,16 +13,16 @@
var/max_size = 0 var/max_size = 0
var/last_dam = -1 var/last_dam = -1
var/icon/mob_icon var/icon/mob_icon
var/icon/item_icon
var/gendered_icon = 0 var/gendered_icon = 0
var/limb_name var/limb_name
var/disfigured = 1 var/disfigured = 1
var/cannot_amputate
var/display_name
var/list/wounds = list() var/list/wounds = list()
var/number_wounds = 0 // cache the number of wounds, which is NOT wounds.len! var/number_wounds = 0 // cache the number of wounds, which is NOT wounds.len!
var/tmp/perma_injury = 0 var/perma_injury = 0
var/tmp/amputated = 0 //Whether this has been cleanly amputated, thus causing no pain
var/obj/item/organ/external/parent var/obj/item/organ/external/parent
var/list/obj/item/organ/external/children var/list/obj/item/organ/external/children
@@ -110,13 +110,16 @@
/obj/item/organ/external/New(var/mob/living/carbon/holder, var/internal) /obj/item/organ/external/New(var/mob/living/carbon/holder, var/internal)
..() ..()
if(owner && parent_organ && istype(owner, /mob/living/carbon/human)) if(owner)
var/mob/living/carbon/human/H = owner var/mob/living/carbon/human/H = owner
var/obj/item/organ/external/parent = H.organs_by_name[src.parent_organ] if(istype(H))
if(parent) H.organs_by_name[limb_name] = src
if(!parent.children) if(parent_organ)
parent.children = list() parent = H.organs_by_name[src.parent_organ]
parent.children.Add(src) if(parent)
if(!parent.children)
parent.children = list()
parent.children.Add(src)
/**************************************************** /****************************************************
DAMAGE PROCS DAMAGE PROCS
@@ -143,11 +146,12 @@
burn *= bumod //~2/3 damage for ROBOLIMBS burn *= bumod //~2/3 damage for ROBOLIMBS
// High brute damage or sharp objects may damage internal organs // High brute damage or sharp objects may damage internal organs
if(internal_organs && ( (sharp && brute >= 5) || brute >= 10) && prob(5)) if(internal_organs && ((brute_dam >= max_damage) || (sharp && brute >= 5) || brute >= 10) && prob(5))
// Damage an internal organ // Damage an internal organ
var/obj/item/organ/I = pick(internal_organs) if(internal_organs && internal_organs.len)
I.take_damage(brute / 2) var/obj/item/organ/I = pick(internal_organs)
brute -= brute / 2 I.take_damage(brute / 2)
brute -= brute / 2
if(status & ORGAN_BROKEN && prob(40) && brute) if(status & ORGAN_BROKEN && prob(40) && brute)
if (!(owner.species && (owner.species.flags & NO_PAIN))) if (!(owner.species && (owner.species.flags & NO_PAIN)))
@@ -190,29 +194,18 @@
//If there are still hurties to dispense //If there are still hurties to dispense
if (burn || brute) if (burn || brute)
if (status & ORGAN_ROBOT) if (status & ORGAN_ROBOT)
droplimb(1) //Robot limbs just kinda fail at full damage. droplimb() //Robot limbs just kinda fail at full damage.
else else
//List organs we can pass it to owner.shock_stage += brute+burn
var/list/obj/item/organ/external/possible_points = list()
if(parent)
possible_points += parent
if(children)
possible_points += children
if(forbidden_limbs.len)
possible_points -= forbidden_limbs
if(possible_points.len)
//And pass the pain around
var/obj/item/organ/external/target = pick(possible_points)
target.take_damage(brute, burn, sharp, edge, used_weapon, forbidden_limbs + src)
// sync the organ's damage with its wounds // sync the organ's damage with its wounds
src.update_damages() src.update_damages()
//If limb took enough damage, try to cut or tear it off //If limb took enough damage, try to cut or tear it off
if(body_part != UPPER_TORSO && body_part != LOWER_TORSO) //as hilarious as it is, getting hit on the chest too much shouldn't effectively gib you. if(body_part != UPPER_TORSO) //as hilarious as it is, getting hit on the chest too much shouldn't effectively gib you.
if(config.limbs_can_break && brute_dam >= max_damage * config.organ_health_multiplier) if(config.limbs_can_break && brute_dam >= max_damage * config.organ_health_multiplier)
if( (edge && prob(5 * brute)) || (brute > 20 && prob(brute)) ) if( (edge && prob(5 * brute)) || (brute > 20 && prob(brute)) )
droplimb(1) droplimb()
return return
owner.updatehealth() owner.updatehealth()
@@ -284,7 +277,7 @@ This function completely restores a damaged organ to perfect condition.
if(damage > 15 && type != BURN && local_damage > 30 && prob(damage) && !(status & ORGAN_ROBOT)) if(damage > 15 && type != BURN && local_damage > 30 && prob(damage) && !(status & ORGAN_ROBOT))
var/datum/wound/internal_bleeding/I = new (min(damage - 15, 15)) var/datum/wound/internal_bleeding/I = new (min(damage - 15, 15))
wounds += I wounds += I
owner.custom_pain("You feel something rip in your [display_name]!", 1) owner.custom_pain("You feel something rip in your [name]!", 1)
// first check whether we can widen an existing wound // first check whether we can widen an existing wound
if(wounds.len > 0 && prob(max(50+(number_wounds-1)*10,90))) if(wounds.len > 0 && prob(max(50+(number_wounds-1)*10,90)))
@@ -300,8 +293,8 @@ This function completely restores a damaged organ to perfect condition.
W.open_wound(damage) W.open_wound(damage)
if(prob(25)) if(prob(25))
//maybe have a separate message for BRUISE type damage? //maybe have a separate message for BRUISE type damage?
owner.visible_message("\red The wound on [owner.name]'s [display_name] widens with a nasty ripping noise.",\ owner.visible_message("\red The wound on [owner.name]'s [name] widens with a nasty ripping noise.",\
"\red The wound on your [display_name] widens with a nasty ripping noise.",\ "\red The wound on your [name] widens with a nasty ripping noise.",\
"You hear a nasty ripping noise, as if flesh is being torn apart.") "You hear a nasty ripping noise, as if flesh is being torn apart.")
return return
@@ -467,7 +460,7 @@ Note that amputating the affected organ does in fact remove the infection from t
if(germ_level >= INFECTION_LEVEL_THREE && antibiotics < 30) //overdosing is necessary to stop severe infections if(germ_level >= INFECTION_LEVEL_THREE && antibiotics < 30) //overdosing is necessary to stop severe infections
if (!(status & ORGAN_DEAD)) if (!(status & ORGAN_DEAD))
status |= ORGAN_DEAD status |= ORGAN_DEAD
owner << "<span class='notice'>You can't feel your [display_name] anymore...</span>" owner << "<span class='notice'>You can't feel your [name] anymore...</span>"
owner.update_body(1) owner.update_body(1)
germ_level++ germ_level++
@@ -497,7 +490,7 @@ Note that amputating the affected organ does in fact remove the infection from t
owner.vessel.remove_reagent("blood", wound_update_accuracy * W.damage/40) //line should possibly be moved to handle_blood, so all the bleeding stuff is in one place. owner.vessel.remove_reagent("blood", wound_update_accuracy * W.damage/40) //line should possibly be moved to handle_blood, so all the bleeding stuff is in one place.
if(prob(1 * wound_update_accuracy)) if(prob(1 * wound_update_accuracy))
owner.custom_pain("You feel a stabbing pain in your [display_name]!",1) owner.custom_pain("You feel a stabbing pain in your [name]!",1)
// slow healing // slow healing
var/heal_amt = 0 var/heal_amt = 0
@@ -598,35 +591,25 @@ Note that amputating the affected organ does in fact remove the infection from t
DISMEMBERMENT DISMEMBERMENT
****************************************************/ ****************************************************/
//Recursive setting of all child organs to amputated
/obj/item/organ/external/proc/setAmputatedTree()
for(var/obj/item/organ/external/O in children)
O.amputated=amputated
O.setAmputatedTree()
//Handles dismemberment //Handles dismemberment
/obj/item/organ/external/proc/droplimb(var/override = 0,var/no_explode = 0,var/amputation=0) /obj/item/organ/external/proc/droplimb(var/clean)
if(status & ORGAN_DESTROYED) if(cannot_amputate)
if(body_part == UPPER_TORSO) return
return
//if(clean) //todo if(!clean)
owner.visible_message(
"<span class='danger'>\The [owner]'s [src.name] flies off in an arc!</span>",\
"<span class='moderate'><b>Your [src.name] goes flying off!</b></span>",\
"<span class='danger'>You hear a terrible sound of ripping tendons and flesh.</span>")
owner.visible_message(
"<span class='danger'>\The [owner]'s [src.name] flies off in an arc!</span>",\
"<span class='moderate'><b>Your [src.name] goes flying off!</b></span>",\
"<span class='danger'>You hear a terrible sound of ripping tendons and flesh.</span>")
if(parent)
parent.children -= src
src.removed() src.removed()
if(parent) if(parent)
spawn(1) parent.children -= src
parent.take_damage(20,0,50,0) // Leave a bloody stump to remember us by. if(!clean)
parent.update_health() new /obj/item/organ/external/stump(owner, 0, src)
parent = null parent = null
update_health() update_health()
owner.update_body() owner.update_body()
@@ -638,16 +621,18 @@ Note that amputating the affected organ does in fact remove the infection from t
M.Turn(rand(180)) M.Turn(rand(180))
src.transform = M src.transform = M
// Throw limb around. if(!clean)
if(src && istype(loc,/turf)) // Throw limb around.
throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30) if(src && istype(loc,/turf))
throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30)
/**************************************************** /****************************************************
HELPERS HELPERS
****************************************************/ ****************************************************/
/obj/item/organ/replaced() /obj/item/organ/external/replaced()
get_icon() get_icon()
icon = mob_icon
return ..() return ..()
/obj/item/organ/external/proc/release_restraints() /obj/item/organ/external/proc/release_restraints()
@@ -706,7 +691,7 @@ Note that amputating the affected organ does in fact remove the infection from t
owner.visible_message(\ owner.visible_message(\
"\red You hear a loud cracking sound coming from \the [owner].",\ "\red You hear a loud cracking sound coming from \the [owner].",\
"\red <b>Something feels like it shattered in your [display_name]!</b>",\ "\red <b>Something feels like it shattered in your [name]!</b>",\
"You hear a sickening crack.") "You hear a sickening crack.")
if(owner.species && !(owner.species.flags & NO_PAIN)) if(owner.species && !(owner.species.flags & NO_PAIN))
@@ -734,7 +719,7 @@ Note that amputating the affected organ does in fact remove the infection from t
if(isnull(suit.supporting_limbs)) if(isnull(suit.supporting_limbs))
return return
owner << "You feel \the [suit] constrict about your [display_name], supporting it." owner << "You feel \the [suit] constrict about your [name], supporting it."
status |= ORGAN_SPLINTED status |= ORGAN_SPLINTED
suit.supporting_limbs |= src suit.supporting_limbs |= src
return return
@@ -816,15 +801,15 @@ Note that amputating the affected organ does in fact remove the infection from t
status |= ORGAN_DESTROYED status |= ORGAN_DESTROYED
owner.bad_external_organs -= src owner.bad_external_organs -= src
icon = item_icon
for(var/implant in implants) //todo: check if this can be left alone for(var/implant in implants) //todo: check if this can be left alone
del(implant) del(implant)
wounds.Cut() //todo: wound on the parent organ
// Attached organs also fly off. // Attached organs also fly off.
for(var/obj/item/organ/external/O in children) for(var/obj/item/organ/external/O in children)
O.removed() O.removed()
O.loc = src //TODO: generate entire limb icons from contents. O.loc = src
// Grab all the internal giblets too. // Grab all the internal giblets too.
for(var/obj/item/organ/organ in internal_organs) for(var/obj/item/organ/organ in internal_organs)
@@ -867,6 +852,7 @@ Note that amputating the affected organ does in fact remove the infection from t
joint = "neck" joint = "neck"
dislocated = -1 dislocated = -1
gendered_icon = 1 gendered_icon = 1
cannot_amputate = 1
/obj/item/organ/external/groin /obj/item/organ/external/groin
name = "lower body" name = "lower body"

View File

@@ -56,7 +56,9 @@ var/global/list/limb_icon_cache = list()
mob_icon.Blend(rgb(owner.r_skin, owner.g_skin, owner.b_skin), ICON_ADD) mob_icon.Blend(rgb(owner.r_skin, owner.g_skin, owner.b_skin), ICON_ADD)
dir = EAST dir = EAST
item_icon = icon(mob_icon,icon_state,SOUTH)
icon = mob_icon icon = mob_icon
return mob_icon return mob_icon
/obj/item/organ/external/head/get_icon(var/skeletal) /obj/item/organ/external/head/get_icon(var/skeletal)

View File

@@ -176,15 +176,15 @@
icon_state = "appendix" icon_state = "appendix"
parent_organ = "groin" parent_organ = "groin"
/obj/item/organ/appendix/removed(var/mob/living/target,var/mob/living/user) /obj/item/organ/appendix/removed()
..() ..()
var/inflamed = 0 var/inflamed = 0
for(var/datum/disease/appendicitis/appendicitis in target.viruses) for(var/datum/disease/appendicitis/appendicitis in owner.viruses)
inflamed = 1 inflamed = 1
appendicitis.cure() appendicitis.cure()
target.resistances += appendicitis owner.resistances += appendicitis
if(inflamed) if(inflamed)
icon_state = "appendixinflamed" icon_state = "appendixinflamed"

View File

@@ -0,0 +1,35 @@
/obj/item/organ/external/stump
name = "limb stump"
icon_name = ""
dislocated = -1
cannot_amputate = 1
/obj/item/organ/external/stump/New(var/mob/living/carbon/holder, var/internal, var/obj/item/organ/external/limb)
if(istype(limb))
limb_name = limb.limb_name
body_part = limb.body_part
amputation_point = limb.amputation_point
joint = limb.joint
parent_organ = limb.parent_organ
wounds = limb.wounds
..(holder, internal)
if(istype(limb))
max_damage = limb.max_damage
/obj/item/organ/external/stump/process()
damage = max_damage
/obj/item/organ/external/stump/handle_rejection()
return
/obj/item/organ/external/stump/rejuvenate()
return
/obj/item/organ/external/stump/is_damaged()
return 1
/obj/item/organ/external/stump/is_bruised()
return 1
/obj/item/organ/external/stump/is_broken()
return 1

View File

@@ -90,7 +90,6 @@ mob/living/carbon/human/proc/handle_pain()
var/obj/item/organ/external/damaged_organ = null var/obj/item/organ/external/damaged_organ = null
for(var/obj/item/organ/external/E in organs) for(var/obj/item/organ/external/E in organs)
// amputated limbs don't cause pain // amputated limbs don't cause pain
if(E.amputated) continue
if(E.status & ORGAN_DEAD) continue if(E.status & ORGAN_DEAD) continue
var/dam = E.get_damage() var/dam = E.get_damage()
// make the choice of the organ depend on damage, // make the choice of the organ depend on damage,
@@ -99,13 +98,13 @@ mob/living/carbon/human/proc/handle_pain()
damaged_organ = E damaged_organ = E
maxdam = dam maxdam = dam
if(damaged_organ) if(damaged_organ)
pain(damaged_organ.display_name, maxdam, 0) pain(damaged_organ.name, maxdam, 0)
// Damage to internal organs hurts a lot. // Damage to internal organs hurts a lot.
for(var/obj/item/organ/I in internal_organs) for(var/obj/item/organ/I in internal_organs)
if(I.damage > 2) if(prob(2)) if(I.damage > 2) if(prob(2))
var/obj/item/organ/external/parent = get_organ(I.parent_organ) var/obj/item/organ/external/parent = get_organ(I.parent_organ)
src.custom_pain("You feel a sharp pain in your [parent.display_name]", 1) src.custom_pain("You feel a sharp pain in your [parent.name]", 1)
var/toxDamageMessage = null var/toxDamageMessage = null
var/toxMessageProb = 1 var/toxMessageProb = 1

View File

@@ -28,7 +28,7 @@
if (H.hand) if (H.hand)
temp = H.organs_by_name["l_hand"] temp = H.organs_by_name["l_hand"]
if(temp && !temp.is_usable()) if(temp && !temp.is_usable())
user << "<span class='notice'>You try to move your [temp.display_name], but cannot!" user << "<span class='notice'>You try to move your [temp.name], but cannot!"
return return
var/response = "" var/response = ""
if(!papers.len > 0) if(!papers.len > 0)

View File

@@ -527,7 +527,7 @@ obj/structure/cable/proc/cableColor(var/colorC)
if(S.burn_dam > 0 && use(1)) if(S.burn_dam > 0 && use(1))
S.heal_damage(0,15,0,1) S.heal_damage(0,15,0,1)
user.visible_message("\red \The [user] repairs some burn damage on \the [M]'s [S.display_name] with \the [src].") user.visible_message("\red \The [user] repairs some burn damage on \the [M]'s [S.name] with \the [src].")
return return
else else
user << "Nothing to fix!" user << "Nothing to fix!"

View File

@@ -237,12 +237,11 @@
var/target_zone = ran_zone(check_zone(user.zone_sel.selecting, target)) var/target_zone = ran_zone(check_zone(user.zone_sel.selecting, target))
var/obj/item/organ/external/affecting = target:get_organ(target_zone) var/obj/item/organ/external/affecting = target:get_organ(target_zone)
if (!affecting) if (!affecting || affecting.status & ORGAN_DESTROYED || istype(affecting, /obj/item/organ/external/stump))
user << "<span class='danger'>They are missing that limb!</span>"
return return
if(affecting.status & ORGAN_DESTROYED)
user << "What [affecting.display_name]?" var/hit_area = affecting.name
return
var/hit_area = affecting.display_name
var/mob/living/carbon/human/H = target var/mob/living/carbon/human/H = target
if((user != target) && H.check_shields(7, "the [src.name]")) if((user != target) && H.check_shields(7, "the [src.name]"))

View File

@@ -23,21 +23,21 @@
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (affected.stage == 0) if (affected.stage == 0)
user.visible_message("[user] starts applying medication to the damaged bones in [target]'s [affected.display_name] with \the [tool]." , \ user.visible_message("[user] starts applying medication to the damaged bones in [target]'s [affected.name] with \the [tool]." , \
"You start applying medication to the damaged bones in [target]'s [affected.display_name] with \the [tool].") "You start applying medication to the damaged bones in [target]'s [affected.name] with \the [tool].")
target.custom_pain("Something in your [affected.display_name] is causing you a lot of pain!",1) target.custom_pain("Something in your [affected.name] is causing you a lot of pain!",1)
..() ..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] applies some [tool] to [target]'s bone in [affected.display_name]", \ user.visible_message("\blue [user] applies some [tool] to [target]'s bone in [affected.name]", \
"\blue You apply some [tool] to [target]'s bone in [affected.display_name] with \the [tool].") "\blue You apply some [tool] to [target]'s bone in [affected.name] with \the [tool].")
affected.stage = 1 affected.stage = 1
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!" , \ user.visible_message("\red [user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.name]!" , \
"\red Your hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!") "\red Your hand slips, smearing [tool] in the incision in [target]'s [affected.name]!")
/datum/surgery_step/set_bone /datum/surgery_step/set_bone
allowed_tools = list( allowed_tools = list(
@@ -56,26 +56,26 @@
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] is beginning to set the bone in [target]'s [affected.display_name] in place with \the [tool]." , \ user.visible_message("[user] is beginning to set the bone in [target]'s [affected.name] in place with \the [tool]." , \
"You are beginning to set the bone in [target]'s [affected.display_name] in place with \the [tool].") "You are beginning to set the bone in [target]'s [affected.name] in place with \the [tool].")
target.custom_pain("The pain in your [affected.display_name] is going to make you pass out!",1) target.custom_pain("The pain in your [affected.name] is going to make you pass out!",1)
..() ..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (affected.status & ORGAN_BROKEN) if (affected.status & ORGAN_BROKEN)
user.visible_message("\blue [user] sets the bone in [target]'s [affected.display_name] in place with \the [tool].", \ user.visible_message("\blue [user] sets the bone in [target]'s [affected.name] in place with \the [tool].", \
"\blue You set the bone in [target]'s [affected.display_name] in place with \the [tool].") "\blue You set the bone in [target]'s [affected.name] in place with \the [tool].")
affected.stage = 2 affected.stage = 2
else else
user.visible_message("\blue [user] sets the bone in [target]'s [affected.display_name]\red in the WRONG place with \the [tool].", \ user.visible_message("\blue [user] sets the bone in [target]'s [affected.name]\red in the WRONG place with \the [tool].", \
"\blue You set the bone in [target]'s [affected.display_name]\red in the WRONG place with \the [tool].") "\blue You set the bone in [target]'s [affected.name]\red in the WRONG place with \the [tool].")
affected.fracture() affected.fracture()
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, damaging the bone in [target]'s [affected.display_name] with \the [tool]!" , \ user.visible_message("\red [user]'s hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!" , \
"\red Your hand slips, damaging the bone in [target]'s [affected.display_name] with \the [tool]!") "\red Your hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!")
affected.createwound(BRUISE, 5) affected.createwound(BRUISE, 5)
/datum/surgery_step/mend_skull /datum/surgery_step/mend_skull
@@ -131,14 +131,14 @@
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts to finish mending the damaged bones in [target]'s [affected.display_name] with \the [tool].", \ user.visible_message("[user] starts to finish mending the damaged bones in [target]'s [affected.name] with \the [tool].", \
"You start to finish mending the damaged bones in [target]'s [affected.display_name] with \the [tool].") "You start to finish mending the damaged bones in [target]'s [affected.name] with \the [tool].")
..() ..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has mended the damaged bones in [target]'s [affected.display_name] with \the [tool]." , \ user.visible_message("\blue [user] has mended the damaged bones in [target]'s [affected.name] with \the [tool]." , \
"\blue You have mended the damaged bones in [target]'s [affected.display_name] with \the [tool]." ) "\blue You have mended the damaged bones in [target]'s [affected.name] with \the [tool]." )
affected.status &= ~ORGAN_BROKEN affected.status &= ~ORGAN_BROKEN
affected.status &= ~ORGAN_SPLINTED affected.status &= ~ORGAN_SPLINTED
affected.stage = 0 affected.stage = 0
@@ -146,5 +146,5 @@
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!" , \ user.visible_message("\red [user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.name]!" , \
"\red Your hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!") "\red Your hand slips, smearing [tool] in the incision in [target]'s [affected.name]!")

View File

@@ -38,7 +38,7 @@
user.visible_message("[user] begins to cut through [target]'s [affected.encased] with \the [tool].", \ user.visible_message("[user] begins to cut through [target]'s [affected.encased] with \the [tool].", \
"You begin to cut through [target]'s [affected.encased] with \the [tool].") "You begin to cut through [target]'s [affected.encased] with \the [tool].")
target.custom_pain("Something hurts horribly in your [affected.display_name]!",1) target.custom_pain("Something hurts horribly in your [affected.name]!",1)
..() ..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
@@ -85,10 +85,10 @@
return return
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/msg = "[user] starts to force open the [affected.encased] in [target]'s [affected.display_name] with \the [tool]." var/msg = "[user] starts to force open the [affected.encased] in [target]'s [affected.name] with \the [tool]."
var/self_msg = "You start to force open the [affected.encased] in [target]'s [affected.display_name] with \the [tool]." var/self_msg = "You start to force open the [affected.encased] in [target]'s [affected.name] with \the [tool]."
user.visible_message(msg, self_msg) user.visible_message(msg, self_msg)
target.custom_pain("Something hurts horribly in your [affected.display_name]!",1) target.custom_pain("Something hurts horribly in your [affected.name]!",1)
..() ..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
@@ -145,7 +145,7 @@
var/msg = "[user] starts bending [target]'s [affected.encased] back into place with \the [tool]." var/msg = "[user] starts bending [target]'s [affected.encased] back into place with \the [tool]."
var/self_msg = "You start bending [target]'s [affected.encased] back into place with \the [tool]." var/self_msg = "You start bending [target]'s [affected.encased] back into place with \the [tool]."
user.visible_message(msg, self_msg) user.visible_message(msg, self_msg)
target.custom_pain("Something hurts horribly in your [affected.display_name]!",1) target.custom_pain("Something hurts horribly in your [affected.name]!",1)
..() ..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
@@ -202,7 +202,7 @@
var/msg = "[user] starts applying \the [tool] to [target]'s [affected.encased]." var/msg = "[user] starts applying \the [tool] to [target]'s [affected.encased]."
var/self_msg = "You start applying \the [tool] to [target]'s [affected.encased]." var/self_msg = "You start applying \the [tool] to [target]'s [affected.encased]."
user.visible_message(msg, self_msg) user.visible_message(msg, self_msg)
target.custom_pain("Something hurts horribly in your [affected.display_name]!",1) target.custom_pain("Something hurts horribly in your [affected.name]!",1)
..() ..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)

View File

@@ -41,15 +41,15 @@
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts the bloodless incision on [target]'s [affected.display_name] with \the [tool].", \ user.visible_message("[user] starts the bloodless incision on [target]'s [affected.name] with \the [tool].", \
"You start the bloodless incision on [target]'s [affected.display_name] with \the [tool].") "You start the bloodless incision on [target]'s [affected.name] with \the [tool].")
target.custom_pain("You feel a horrible, searing pain in your [affected.display_name]!",1) target.custom_pain("You feel a horrible, searing pain in your [affected.name]!",1)
..() ..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has made a bloodless incision on [target]'s [affected.display_name] with \the [tool].", \ user.visible_message("\blue [user] has made a bloodless incision on [target]'s [affected.name] with \the [tool].", \
"\blue You have made a bloodless incision on [target]'s [affected.display_name] with \the [tool].",) "\blue You have made a bloodless incision on [target]'s [affected.name] with \the [tool].",)
//Could be cleaner ... //Could be cleaner ...
affected.open = 1 affected.open = 1
@@ -62,8 +62,8 @@
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips as the blade sputters, searing a long gash in [target]'s [affected.display_name] with \the [tool]!", \ user.visible_message("\red [user]'s hand slips as the blade sputters, searing a long gash in [target]'s [affected.name] with \the [tool]!", \
"\red Your hand slips as the blade sputters, searing a long gash in [target]'s [affected.display_name] with \the [tool]!") "\red Your hand slips as the blade sputters, searing a long gash in [target]'s [affected.name] with \the [tool]!")
affected.createwound(CUT, 7.5) affected.createwound(CUT, 7.5)
affected.createwound(BURN, 12.5) affected.createwound(BURN, 12.5)
@@ -82,15 +82,15 @@
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts to construct a prepared incision on and within [target]'s [affected.display_name] with \the [tool].", \ user.visible_message("[user] starts to construct a prepared incision on and within [target]'s [affected.name] with \the [tool].", \
"You start to construct a prepared incision on and within [target]'s [affected.display_name] with \the [tool].") "You start to construct a prepared incision on and within [target]'s [affected.name] with \the [tool].")
target.custom_pain("You feel a horrible, searing pain in your [affected.display_name] as it is pushed apart!",1) target.custom_pain("You feel a horrible, searing pain in your [affected.name] as it is pushed apart!",1)
..() ..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has constructed a prepared incision on and within [target]'s [affected.display_name] with \the [tool].", \ user.visible_message("\blue [user] has constructed a prepared incision on and within [target]'s [affected.name] with \the [tool].", \
"\blue You have constructed a prepared incision on and within [target]'s [affected.display_name] with \the [tool].",) "\blue You have constructed a prepared incision on and within [target]'s [affected.name] with \the [tool].",)
affected.open = 1 affected.open = 1
if(istype(target) && !(target.species.flags & NO_BLOOD)) if(istype(target) && !(target.species.flags & NO_BLOOD))
@@ -102,8 +102,8 @@
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand jolts as the system sparks, ripping a gruesome hole in [target]'s [affected.display_name] with \the [tool]!", \ user.visible_message("\red [user]'s hand jolts as the system sparks, ripping a gruesome hole in [target]'s [affected.name] with \the [tool]!", \
"\red Your hand jolts as the system sparks, ripping a gruesome hole in [target]'s [affected.display_name] with \the [tool]!") "\red Your hand jolts as the system sparks, ripping a gruesome hole in [target]'s [affected.name] with \the [tool]!")
affected.createwound(CUT, 20) affected.createwound(CUT, 20)
affected.createwound(BURN, 15) affected.createwound(BURN, 15)
@@ -124,15 +124,15 @@
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts the incision on [target]'s [affected.display_name] with \the [tool].", \ user.visible_message("[user] starts the incision on [target]'s [affected.name] with \the [tool].", \
"You start the incision on [target]'s [affected.display_name] with \the [tool].") "You start the incision on [target]'s [affected.name] with \the [tool].")
target.custom_pain("You feel a horrible pain as if from a sharp knife in your [affected.display_name]!",1) target.custom_pain("You feel a horrible pain as if from a sharp knife in your [affected.name]!",1)
..() ..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has made an incision on [target]'s [affected.display_name] with \the [tool].", \ user.visible_message("\blue [user] has made an incision on [target]'s [affected.name] with \the [tool].", \
"\blue You have made an incision on [target]'s [affected.display_name] with \the [tool].",) "\blue You have made an incision on [target]'s [affected.name] with \the [tool].",)
affected.open = 1 affected.open = 1
if(istype(target) && !(target.species.flags & NO_BLOOD)) if(istype(target) && !(target.species.flags & NO_BLOOD))
@@ -142,8 +142,8 @@
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, slicing open [target]'s [affected.display_name] in the wrong place with \the [tool]!", \ user.visible_message("\red [user]'s hand slips, slicing open [target]'s [affected.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]!") "\red Your hand slips, slicing open [target]'s [affected.name] in the wrong place with \the [tool]!")
affected.createwound(CUT, 10) affected.createwound(CUT, 10)
/datum/surgery_step/generic/clamp_bleeders /datum/surgery_step/generic/clamp_bleeders
@@ -163,22 +163,22 @@
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts clamping bleeders in [target]'s [affected.display_name] with \the [tool].", \ user.visible_message("[user] starts clamping bleeders in [target]'s [affected.name] with \the [tool].", \
"You start clamping bleeders in [target]'s [affected.display_name] with \the [tool].") "You start clamping bleeders in [target]'s [affected.name] with \the [tool].")
target.custom_pain("The pain in your [affected.display_name] is maddening!",1) target.custom_pain("The pain in your [affected.name] is maddening!",1)
..() ..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] clamps bleeders in [target]'s [affected.display_name] with \the [tool].", \ user.visible_message("\blue [user] clamps bleeders in [target]'s [affected.name] with \the [tool].", \
"\blue You clamp bleeders in [target]'s [affected.display_name] with \the [tool].") "\blue You clamp bleeders in [target]'s [affected.name] with \the [tool].")
affected.clamp() affected.clamp()
spread_germs_to_organ(affected, user) spread_germs_to_organ(affected, user)
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, tearing blood vessals and causing massive bleeding in [target]'s [affected.display_name] with \the [tool]!", \ user.visible_message("\red [user]'s hand slips, tearing blood vessals and causing massive bleeding in [target]'s [affected.name] with \the [tool]!", \
"\red Your hand slips, tearing blood vessels and causing massive bleeding in [target]'s [affected.display_name] with \the [tool]!",) "\red Your hand slips, tearing blood vessels and causing massive bleeding in [target]'s [affected.name] with \the [tool]!",)
affected.createwound(CUT, 10) affected.createwound(CUT, 10)
/datum/surgery_step/generic/retract_skin /datum/surgery_step/generic/retract_skin
@@ -198,8 +198,8 @@
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/msg = "[user] starts to pry open the incision on [target]'s [affected.display_name] with \the [tool]." var/msg = "[user] starts to pry open the incision on [target]'s [affected.name] with \the [tool]."
var/self_msg = "You start to pry open the incision on [target]'s [affected.display_name] with \the [tool]." var/self_msg = "You start to pry open the incision on [target]'s [affected.name] with \the [tool]."
if (target_zone == "chest") if (target_zone == "chest")
msg = "[user] starts to separate the ribcage and rearrange the organs in [target]'s torso with \the [tool]." msg = "[user] starts to separate the ribcage and rearrange the organs in [target]'s torso with \the [tool]."
self_msg = "You start to separate the ribcage and rearrange the organs in [target]'s torso with \the [tool]." self_msg = "You start to separate the ribcage and rearrange the organs in [target]'s torso with \the [tool]."
@@ -207,13 +207,13 @@
msg = "[user] starts to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]." msg = "[user] starts to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]."
self_msg = "You start to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]." self_msg = "You start to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]."
user.visible_message(msg, self_msg) user.visible_message(msg, self_msg)
target.custom_pain("It feels like the skin on your [affected.display_name] is on fire!",1) target.custom_pain("It feels like the skin on your [affected.name] is on fire!",1)
..() ..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/msg = "\blue [user] keeps the incision open on [target]'s [affected.display_name] with \the [tool]." var/msg = "\blue [user] keeps the incision open on [target]'s [affected.name] with \the [tool]."
var/self_msg = "\blue You keep the incision open on [target]'s [affected.display_name] with \the [tool]." var/self_msg = "\blue You keep the incision open on [target]'s [affected.name] with \the [tool]."
if (target_zone == "chest") if (target_zone == "chest")
msg = "\blue [user] keeps the ribcage open on [target]'s torso with \the [tool]." msg = "\blue [user] keeps the ribcage open on [target]'s torso with \the [tool]."
self_msg = "\blue You keep the ribcage open on [target]'s torso with \the [tool]." self_msg = "\blue You keep the ribcage open on [target]'s torso with \the [tool]."
@@ -225,8 +225,8 @@
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/msg = "\red [user]'s hand slips, tearing the edges of the 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.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]!" var/self_msg = "\red Your hand slips, tearing the edges of the incision on [target]'s [affected.name] with \the [tool]!"
if (target_zone == "chest") if (target_zone == "chest")
msg = "\red [user]'s hand slips, damaging several organs in [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]!" self_msg = "\red Your hand slips, damaging several organs in [target]'s torso with \the [tool]!"
@@ -254,23 +254,23 @@
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] is beginning to cauterize the incision on [target]'s [affected.display_name] with \the [tool]." , \ user.visible_message("[user] is beginning to cauterize the incision on [target]'s [affected.name] with \the [tool]." , \
"You are beginning to cauterize the incision on [target]'s [affected.display_name] with \the [tool].") "You are beginning to cauterize the incision on [target]'s [affected.name] with \the [tool].")
target.custom_pain("Your [affected.display_name] is being burned!",1) target.custom_pain("Your [affected.name] is being burned!",1)
..() ..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] cauterizes the incision on [target]'s [affected.display_name] with \the [tool].", \ user.visible_message("\blue [user] cauterizes the incision on [target]'s [affected.name] with \the [tool].", \
"\blue You cauterize the incision on [target]'s [affected.display_name] with \the [tool].") "\blue You cauterize the incision on [target]'s [affected.name] with \the [tool].")
affected.open = 0 affected.open = 0
affected.germ_level = 0 affected.germ_level = 0
affected.status &= ~ORGAN_BLEEDING affected.status &= ~ORGAN_BLEEDING
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, leaving a small burn on [target]'s [affected.display_name] with \the [tool]!", \ user.visible_message("\red [user]'s hand slips, leaving a small burn on [target]'s [affected.name] with \the [tool]!", \
"\red Your hand slips, leaving a small burn on [target]'s [affected.display_name] with \the [tool]!") "\red Your hand slips, leaving a small burn on [target]'s [affected.name] with \the [tool]!")
target.apply_damage(3, BURN, affected) target.apply_damage(3, BURN, affected)
/datum/surgery_step/generic/amputate /datum/surgery_step/generic/amputate
@@ -292,24 +292,24 @@
return 0 return 0
if (affected.status & ORGAN_DESTROYED) if (affected.status & ORGAN_DESTROYED)
return 0 return 0
return target_zone != "chest" && target_zone != "groin" && target_zone != "head" return !affected.cannot_amputate
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] is beginning to amputate [target]'s [affected.display_name] with \the [tool]." , \ user.visible_message("[user] is beginning to amputate [target]'s [affected.name] with \the [tool]." , \
"You are beginning to cut through [target]'s [affected.amputation_point] with \the [tool].") "You are beginning to cut through [target]'s [affected.amputation_point] with \the [tool].")
target.custom_pain("Your [affected.amputation_point] is being ripped apart!",1) target.custom_pain("Your [affected.amputation_point] is being ripped apart!",1)
..() ..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] amputates [target]'s [affected.display_name] with \the [tool].", \ user.visible_message("\blue [user] amputates [target]'s [affected.name] at the [affected.amputation_point] with \the [tool].", \
"\blue You amputate [target]'s [affected.display_name] with \the [tool].") "\blue You amputate [target]'s [affected.name] with \the [tool].")
affected.droplimb(1,1,1) affected.droplimb(1)
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/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]!", \ user.visible_message("\red [user]'s hand slips, sawing through the bone in [target]'s [affected.name] with \the [tool]!", \
"\red Your 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.name] with \the [tool]!")
affected.createwound(CUT, 30) affected.createwound(CUT, 30)
affected.fracture() affected.fracture()

View File

@@ -47,8 +47,8 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (affected.parent) if (affected.parent)
affected = affected.parent affected = affected.parent
user.visible_message("\red [user]'s hand slips, ripping [target]'s [affected.display_name] open!", \ user.visible_message("\red [user]'s hand slips, ripping [target]'s [affected.name] open!", \
"\red Your hand slips, ripping [target]'s [affected.display_name] open!") "\red Your hand slips, ripping [target]'s [affected.name] open!")
affected.createwound(CUT, 10) affected.createwound(CUT, 10)
@@ -69,7 +69,7 @@
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] is beginning to reshape [target]'s esophagal and vocal region with \the [tool].", \ user.visible_message("[user] is beginning to reshape [target]'s esophagal and vocal region with \the [tool].", \
"You start to reshape [target]'s [affected.display_name] esophagal and vocal region with \the [tool].") "You start to reshape [target]'s [affected.name] esophagal and vocal region with \the [tool].")
..() ..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
@@ -142,8 +142,6 @@
"\blue You have finished adjusting the area around [target]'s neck with \the [tool].") "\blue You have finished adjusting the area around [target]'s neck with \the [tool].")
target.op_stage.head_reattach = 0 target.op_stage.head_reattach = 0
affected.status |= ORGAN_ATTACHABLE affected.status |= ORGAN_ATTACHABLE
affected.amputated = 1
affected.setAmputatedTree()
affected.open = 0 affected.open = 0
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
@@ -151,7 +149,7 @@
if (affected.parent) if (affected.parent)
affected = affected.parent affected = affected.parent
user.visible_message("\red [user]'s hand slips, searing [target]'s neck!", \ user.visible_message("\red [user]'s hand slips, searing [target]'s neck!", \
"\red Your hand slips, searing [target]'s [affected.display_name]!") "\red Your hand slips, searing [target]'s [affected.name]!")
target.apply_damage(10, BURN, affected) target.apply_damage(10, BURN, affected)
@@ -176,7 +174,6 @@
user.visible_message("\blue [user] has attached [target]'s head to the body.", \ user.visible_message("\blue [user] has attached [target]'s head to the body.", \
"\blue You have attached [target]'s head to the body.") "\blue You have attached [target]'s head to the body.")
affected.status = 0 affected.status = 0
affected.amputated = 0
target.update_body() target.update_body()
target.updatehealth() target.updatehealth()
target.UpdateDamageIcon() target.UpdateDamageIcon()

View File

@@ -62,8 +62,8 @@
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone) var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, scraping tissue inside [target]'s [affected.display_name] with \the [tool]!", \ user.visible_message("\red [user]'s hand slips, scraping tissue inside [target]'s [affected.name] with \the [tool]!", \
"\red Your hand slips, scraping tissue inside [target]'s [affected.display_name] with \the [tool]!") "\red Your hand slips, scraping tissue inside [target]'s [affected.name] with \the [tool]!")
affected.createwound(CUT, 20) affected.createwound(CUT, 20)
/datum/surgery_step/cavity/close_space /datum/surgery_step/cavity/close_space
@@ -98,8 +98,8 @@
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone) var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, scraping tissue inside [target]'s [affected.display_name] with \the [tool]!", \ user.visible_message("\red [user]'s hand slips, scraping tissue inside [target]'s [affected.name] with \the [tool]!", \
"\red Your hand slips, scraping tissue inside [target]'s [affected.display_name] with \the [tool]!") "\red Your hand slips, scraping tissue inside [target]'s [affected.name] with \the [tool]!")
affected.createwound(CUT, 20) affected.createwound(CUT, 20)
/datum/surgery_step/cavity/place_item /datum/surgery_step/cavity/place_item
@@ -130,7 +130,7 @@
user << "\red You tear some blood vessels trying to fit such a 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 (10) var/datum/wound/internal_bleeding/I = new (10)
affected.wounds += I affected.wounds += I
affected.owner.custom_pain("You feel something rip in your [affected.display_name]!", 1) affected.owner.custom_pain("You feel something rip in your [affected.name]!", 1)
user.drop_item() user.drop_item()
affected.hidden = tool affected.hidden = tool
tool.loc = target tool.loc = target
@@ -138,8 +138,8 @@
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone) var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, scraping tissue inside [target]'s [affected.display_name] with \the [tool]!", \ user.visible_message("\red [user]'s hand slips, scraping tissue inside [target]'s [affected.name] with \the [tool]!", \
"\red Your hand slips, scraping tissue inside [target]'s [affected.display_name] with \the [tool]!") "\red Your hand slips, scraping tissue inside [target]'s [affected.name] with \the [tool]!")
affected.createwound(CUT, 20) affected.createwound(CUT, 20)
////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////
@@ -162,8 +162,8 @@
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts poking around inside the incision on [target]'s [affected.display_name] with \the [tool].", \ user.visible_message("[user] starts poking around inside the incision on [target]'s [affected.name] with \the [tool].", \
"You start poking around inside the incision on [target]'s [affected.display_name] with \the [tool]" ) "You start poking around inside the incision on [target]'s [affected.name] with \the [tool]" )
target.custom_pain("The pain in your chest is living hell!",1) target.custom_pain("The pain in your chest is living hell!",1)
..() ..()
@@ -186,8 +186,8 @@
find_prob +=50 find_prob +=50
if (prob(find_prob)) if (prob(find_prob))
user.visible_message("\blue [user] takes something out of incision on [target]'s [affected.display_name] with \the [tool].", \ user.visible_message("\blue [user] takes something out of incision on [target]'s [affected.name] with \the [tool].", \
"\blue You take [obj] out of incision on [target]'s [affected.display_name]s with \the [tool]." ) "\blue You take [obj] out of incision on [target]'s [affected.name]s with \the [tool]." )
affected.implants -= obj affected.implants -= obj
BITSET(target.hud_updateflag, IMPLOYAL_HUD) BITSET(target.hud_updateflag, IMPLOYAL_HUD)
@@ -206,11 +206,11 @@
imp.imp_in = null imp.imp_in = null
imp.implanted = 0 imp.implanted = 0
else else
user.visible_message("\blue [user] removes \the [tool] from [target]'s [affected.display_name].", \ user.visible_message("\blue [user] removes \the [tool] from [target]'s [affected.name].", \
"\blue There's something inside [target]'s [affected.display_name], but you just missed it this time." ) "\blue There's something inside [target]'s [affected.name], but you just missed it this time." )
else if (affected.hidden) else if (affected.hidden)
user.visible_message("\blue [user] takes something out of incision on [target]'s [affected.display_name] with \the [tool].", \ user.visible_message("\blue [user] takes something out of incision on [target]'s [affected.name] with \the [tool].", \
"\blue You take something out of incision on [target]'s [affected.display_name]s with \the [tool]." ) "\blue You take something out of incision on [target]'s [affected.name]s with \the [tool]." )
affected.hidden.loc = get_turf(target) affected.hidden.loc = get_turf(target)
if(!affected.hidden.blood_DNA) if(!affected.hidden.blood_DNA)
affected.hidden.blood_DNA = list() affected.hidden.blood_DNA = list()
@@ -219,20 +219,20 @@
affected.hidden = null affected.hidden = null
else else
user.visible_message("\blue [user] could not find anything inside [target]'s [affected.display_name], and pulls \the [tool] out.", \ user.visible_message("\blue [user] could not find anything inside [target]'s [affected.name], and pulls \the [tool] out.", \
"\blue You could not find anything inside [target]'s [affected.display_name]." ) "\blue You could not find anything inside [target]'s [affected.name]." )
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone) var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, scraping tissue inside [target]'s [affected.display_name] with \the [tool]!", \ user.visible_message("\red [user]'s hand slips, scraping tissue inside [target]'s [affected.name] with \the [tool]!", \
"\red Your hand slips, scraping tissue inside [target]'s [affected.display_name] with \the [tool]!") "\red Your hand slips, scraping tissue inside [target]'s [affected.name] with \the [tool]!")
affected.createwound(CUT, 20) affected.createwound(CUT, 20)
if (affected.implants.len) if (affected.implants.len)
var/fail_prob = 10 var/fail_prob = 10
fail_prob += 100 - tool_quality(tool) fail_prob += 100 - tool_quality(tool)
if (prob(fail_prob)) if (prob(fail_prob))
var/obj/item/weapon/implant/imp = affected.implants[1] var/obj/item/weapon/implant/imp = affected.implants[1]
user.visible_message("\red Something beeps inside [target]'s [affected.display_name]!") user.visible_message("\red Something beeps inside [target]'s [affected.name]!")
playsound(imp.loc, 'sound/items/countdown.ogg', 75, 1, -3) playsound(imp.loc, 'sound/items/countdown.ogg', 75, 1, -3)
spawn(25) spawn(25)
imp.activate() imp.activate()

View File

@@ -94,7 +94,7 @@
user.visible_message("[user] starts treating damage to [target]'s [I.name] with [tool_name].", \ user.visible_message("[user] starts treating damage to [target]'s [I.name] with [tool_name].", \
"You start treating damage to [target]'s [I.name] with [tool_name]." ) "You start treating damage to [target]'s [I.name] with [tool_name]." )
target.custom_pain("The pain in your [affected.display_name] is living hell!",1) target.custom_pain("The pain in your [affected.name] is living hell!",1)
..() ..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
@@ -121,8 +121,8 @@
return return
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, getting mess and tearing the inside of [target]'s [affected.display_name] with \the [tool]!", \ user.visible_message("\red [user]'s hand slips, getting mess and tearing the inside of [target]'s [affected.name] with \the [tool]!", \
"\red Your hand slips, getting mess and tearing the inside of [target]'s [affected.display_name] with \the [tool]!") "\red Your hand slips, getting mess and tearing the inside of [target]'s [affected.name] with \the [tool]!")
var/dam_amt = 2 var/dam_amt = 2
if (istype(tool, /obj/item/stack/medical/advanced/bruise_pack)) if (istype(tool, /obj/item/stack/medical/advanced/bruise_pack))
@@ -172,7 +172,7 @@
user.visible_message("[user] starts mending the damage to [target]'s [I.name]'s mechanisms.", \ user.visible_message("[user] starts mending the damage to [target]'s [I.name]'s mechanisms.", \
"You start mending the damage to [target]'s [I.name]'s mechanisms." ) "You start mending the damage to [target]'s [I.name]'s mechanisms." )
target.custom_pain("The pain in your [affected.display_name] is living hell!",1) target.custom_pain("The pain in your [affected.name] is living hell!",1)
..() ..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
@@ -195,8 +195,8 @@
return return
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, gumming up the mechanisms inside of [target]'s [affected.display_name] with \the [tool]!", \ user.visible_message("\red [user]'s hand slips, gumming up the mechanisms inside of [target]'s [affected.name] with \the [tool]!", \
"\red Your hand slips, gumming up the mechanisms inside of [target]'s [affected.display_name] with \the [tool]!") "\red Your hand slips, gumming up the mechanisms inside of [target]'s [affected.name] with \the [tool]!")
target.adjustToxLoss(5) target.adjustToxLoss(5)
affected.createwound(CUT, 5) affected.createwound(CUT, 5)
@@ -244,7 +244,7 @@
user.visible_message("[user] starts to separate [target]'s [target.op_stage.current_organ] with \the [tool].", \ user.visible_message("[user] starts to separate [target]'s [target.op_stage.current_organ] with \the [tool].", \
"You start to separate [target]'s [target.op_stage.current_organ] with \the [tool]." ) "You start to separate [target]'s [target.op_stage.current_organ] with \the [tool]." )
target.custom_pain("The pain in your [affected.display_name] is living hell!",1) target.custom_pain("The pain in your [affected.name] is living hell!",1)
..() ..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
@@ -257,8 +257,8 @@
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, slicing an artery inside [target]'s [affected.display_name] with \the [tool]!", \ user.visible_message("\red [user]'s hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!", \
"\red Your hand slips, slicing an artery inside [target]'s [affected.display_name] with \the [tool]!") "\red Your hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!")
affected.createwound(CUT, rand(30,50), 1) affected.createwound(CUT, rand(30,50), 1)
/datum/surgery_step/internal/remove_organ /datum/surgery_step/internal/remove_organ
@@ -311,8 +311,8 @@
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, damaging the flesh in [target]'s [affected.display_name] with \the [tool]!", \ user.visible_message("\red [user]'s hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!", \
"\red Your hand slips, damaging the flesh in [target]'s [affected.display_name] with \the [tool]!") "\red Your hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!")
affected.createwound(BRUISE, 20) affected.createwound(BRUISE, 20)
/datum/surgery_step/internal/replace_organ /datum/surgery_step/internal/replace_organ
@@ -357,7 +357,7 @@
if(O && affected.name == O.parent_organ) if(O && affected.name == O.parent_organ)
organ_compatible = 1 organ_compatible = 1
else else
user << "\red \The [O.organ_tag] [o_do] normally go in \the [affected.display_name]." user << "\red \The [O.organ_tag] [o_do] normally go in \the [affected.name]."
return 2 return 2
else else
user << "\red You're pretty sure [target.species.name_plural] don't normally have [o_a][O.organ_tag]." user << "\red You're pretty sure [target.species.name_plural] don't normally have [o_a][O.organ_tag]."
@@ -367,15 +367,15 @@
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts transplanting \the [tool] into [target]'s [affected.display_name].", \ user.visible_message("[user] starts transplanting \the [tool] into [target]'s [affected.name].", \
"You start transplanting \the [tool] into [target]'s [affected.display_name].") "You start transplanting \the [tool] into [target]'s [affected.name].")
target.custom_pain("Someone's rooting around in your [affected.display_name]!",1) target.custom_pain("Someone's rooting around in your [affected.name]!",1)
..() ..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has transplanted \the [tool] into [target]'s [affected.display_name].", \ user.visible_message("\blue [user] has transplanted \the [tool] into [target]'s [affected.name].", \
"\blue You have transplanted \the [tool] into [target]'s [affected.display_name].") "\blue You have transplanted \the [tool] into [target]'s [affected.name].")
user.drop_item(tool) user.drop_item(tool)
var/obj/item/organ/O = tool var/obj/item/organ/O = tool
if(istype(O)) if(istype(O))
@@ -433,8 +433,8 @@
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, damaging the flesh in [target]'s [affected.display_name] with \the [tool]!", \ user.visible_message("\red [user]'s hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!", \
"\red Your hand slips, damaging the flesh in [target]'s [affected.display_name] with \the [tool]!") "\red Your hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!")
affected.createwound(BRUISE, 20) affected.createwound(BRUISE, 20)
////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////

View File

@@ -31,15 +31,15 @@
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts patching the damaged vein in [target]'s [affected.display_name] with \the [tool]." , \ user.visible_message("[user] starts patching the damaged vein in [target]'s [affected.name] with \the [tool]." , \
"You start patching the damaged vein in [target]'s [affected.display_name] with \the [tool].") "You start patching the damaged vein in [target]'s [affected.name] with \the [tool].")
target.custom_pain("The pain in [affected.display_name] is unbearable!",1) target.custom_pain("The pain in [affected.name] is unbearable!",1)
..() ..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has patched the damaged vein in [target]'s [affected.display_name] with \the [tool].", \ user.visible_message("\blue [user] has patched the damaged vein in [target]'s [affected.name] with \the [tool].", \
"\blue You have patched the damaged vein in [target]'s [affected.display_name] with \the [tool].") "\blue You have patched the damaged vein in [target]'s [affected.name] with \the [tool].")
for(var/datum/wound/W in affected.wounds) if(W.internal) for(var/datum/wound/W in affected.wounds) if(W.internal)
affected.wounds -= W affected.wounds -= W
@@ -48,8 +48,8 @@
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!" , \ user.visible_message("\red [user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.name]!" , \
"\red Your hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!") "\red Your hand slips, smearing [tool] in the incision in [target]'s [affected.name]!")
affected.take_damage(5, 0) affected.take_damage(5, 0)
/datum/surgery_step/fix_dead_tissue //Debridement /datum/surgery_step/fix_dead_tissue //Debridement
@@ -79,21 +79,21 @@
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts cutting away necrotic tissue in [target]'s [affected.display_name] with \the [tool]." , \ user.visible_message("[user] starts cutting away necrotic tissue in [target]'s [affected.name] with \the [tool]." , \
"You start cutting away necrotic tissue in [target]'s [affected.display_name] with \the [tool].") "You start cutting away necrotic tissue in [target]'s [affected.name] with \the [tool].")
target.custom_pain("The pain in [affected.display_name] is unbearable!",1) target.custom_pain("The pain in [affected.name] is unbearable!",1)
..() ..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has cut away necrotic tissue in [target]'s [affected.display_name] with \the [tool].", \ user.visible_message("\blue [user] has cut away necrotic tissue in [target]'s [affected.name] with \the [tool].", \
"\blue You have cut away necrotic tissue in [target]'s [affected.display_name] with \the [tool].") "\blue You have cut away necrotic tissue in [target]'s [affected.name] with \the [tool].")
affected.open = 3 affected.open = 3
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, slicing an artery inside [target]'s [affected.display_name] with \the [tool]!", \ user.visible_message("\red [user]'s hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!", \
"\red Your hand slips, slicing an artery inside [target]'s [affected.display_name] with \the [tool]!") "\red Your hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!")
affected.createwound(CUT, 20, 1) affected.createwound(CUT, 20, 1)
/datum/surgery_step/treat_necrosis /datum/surgery_step/treat_necrosis
@@ -131,9 +131,9 @@
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts applying medication to the affected tissue in [target]'s [affected.display_name] with \the [tool]." , \ user.visible_message("[user] starts applying medication to the affected tissue in [target]'s [affected.name] with \the [tool]." , \
"You start applying medication to the affected tissue in [target]'s [affected.display_name] with \the [tool].") "You start applying medication to the affected tissue in [target]'s [affected.name] with \the [tool].")
target.custom_pain("Something in your [affected.display_name] is causing you a lot of pain!",1) target.custom_pain("Something in your [affected.name] is causing you a lot of pain!",1)
..() ..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
@@ -151,8 +151,8 @@
if(container.reagents.has_reagent("peridaxon")) if(container.reagents.has_reagent("peridaxon"))
affected.status &= ~ORGAN_DEAD affected.status &= ~ORGAN_DEAD
user.visible_message("\blue [user] applies [trans] units of the solution to affected tissue in [target]'s [affected.display_name]", \ user.visible_message("\blue [user] applies [trans] units of the solution to affected tissue in [target]'s [affected.name]", \
"\blue You apply [trans] units of the solution to affected tissue in [target]'s [affected.display_name] with \the [tool].") "\blue You apply [trans] units of the solution to affected tissue in [target]'s [affected.name] with \the [tool].")
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
@@ -165,8 +165,8 @@
var/trans = container.reagents.trans_to(target, container.amount_per_transfer_from_this) var/trans = container.reagents.trans_to(target, container.amount_per_transfer_from_this)
container.reagents.reaction(target, INGEST) //technically it's contact, but the reagents are being applied to internal tissue container.reagents.reaction(target, INGEST) //technically it's contact, but the reagents are being applied to internal tissue
user.visible_message("\red [user]'s hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.display_name] with the [tool]!" , \ user.visible_message("\red [user]'s hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.name] with the [tool]!" , \
"\red Your hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.display_name] with the [tool]!") "\red Your hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.name] with the [tool]!")
//no damage or anything, just wastes medicine //no damage or anything, just wastes medicine

View File

@@ -36,22 +36,22 @@
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts cutting away flesh where [target]'s [affected.display_name] used to be with \the [tool].", \ user.visible_message("[user] starts cutting away flesh where [target]'s [affected.name] used to be with \the [tool].", \
"You start cutting away flesh where [target]'s [affected.display_name] used to be with \the [tool].") "You start cutting away flesh where [target]'s [affected.name] used to be with \the [tool].")
..() ..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] cuts away flesh where [target]'s [affected.display_name] used to be with \the [tool].", \ user.visible_message("\blue [user] cuts away flesh where [target]'s [affected.name] used to be with \the [tool].", \
"\blue You cut away flesh where [target]'s [affected.display_name] used to be with \the [tool].") "\blue You cut away flesh where [target]'s [affected.name] used to be with \the [tool].")
affected.status |= ORGAN_CUT_AWAY affected.status |= ORGAN_CUT_AWAY
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (affected.parent) if (affected.parent)
affected = affected.parent affected = affected.parent
user.visible_message("\red [user]'s hand slips, cutting [target]'s [affected.display_name] open!", \ user.visible_message("\red [user]'s hand slips, cutting [target]'s [affected.name] open!", \
"\red Your hand slips, cutting [target]'s [affected.display_name] open!") "\red Your hand slips, cutting [target]'s [affected.name] open!")
affected.createwound(CUT, 10) affected.createwound(CUT, 10)
@@ -71,22 +71,22 @@
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] is beginning to reposition 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.name] used to be with [tool].", \
"You start repositioning flesh and nerve endings where [target]'s [affected.display_name] used to be with [tool].") "You start repositioning flesh and nerve endings where [target]'s [affected.name] used to be with [tool].")
..() ..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has finished repositioning flesh and nerve endings where [target]'s [affected.display_name] used to be with [tool].", \ user.visible_message("\blue [user] has finished repositioning flesh and nerve endings where [target]'s [affected.name] used to be with [tool].", \
"\blue You have finished repositioning flesh and nerve endings where [target]'s [affected.display_name] used to be with [tool].") "\blue You have finished repositioning flesh and nerve endings where [target]'s [affected.name] used to be with [tool].")
affected.open = 3 affected.open = 3
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (affected.parent) if (affected.parent)
affected = affected.parent affected = affected.parent
user.visible_message("\red [user]'s hand slips, tearing flesh on [target]'s [affected.display_name]!", \ user.visible_message("\red [user]'s hand slips, tearing flesh on [target]'s [affected.name]!", \
"\red Your hand slips, tearing flesh on [target]'s [affected.display_name]!") "\red Your hand slips, tearing flesh on [target]'s [affected.name]!")
target.apply_damage(10, BRUTE, affected, sharp=1) target.apply_damage(10, BRUTE, affected, sharp=1)
@@ -108,25 +108,23 @@
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts adjusting the area around [target]'s [affected.display_name] with \the [tool].", \ user.visible_message("[user] starts adjusting the area around [target]'s [affected.name] with \the [tool].", \
"You start adjusting the area around [target]'s [affected.display_name] with \the [tool].") "You start adjusting the area around [target]'s [affected.name] with \the [tool].")
..() ..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has finished adjusting the area around [target]'s [affected.display_name] with \the [tool].", \ user.visible_message("\blue [user] has finished adjusting the area around [target]'s [affected.name] with \the [tool].", \
"\blue You have finished adjusting the area around [target]'s [affected.display_name] with \the [tool].") "\blue You have finished adjusting the area around [target]'s [affected.name] with \the [tool].")
affected.status |= ORGAN_ATTACHABLE affected.status |= ORGAN_ATTACHABLE
affected.amputated = 1
affected.setAmputatedTree()
affected.open = 0 affected.open = 0
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (affected.parent) if (affected.parent)
affected = affected.parent affected = affected.parent
user.visible_message("\red [user]'s hand slips, searing [target]'s [affected.display_name]!", \ user.visible_message("\red [user]'s hand slips, searing [target]'s [affected.name]!", \
"\red Your hand slips, searing [target]'s [affected.display_name]!") "\red Your hand slips, searing [target]'s [affected.name]!")
target.apply_damage(10, BURN, affected) target.apply_damage(10, BURN, affected)
@@ -147,14 +145,14 @@
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts attaching \the [tool] where [target]'s [affected.display_name] used to be.", \ user.visible_message("[user] starts attaching \the [tool] where [target]'s [affected.name] used to be.", \
"You start attaching \the [tool] where [target]'s [affected.display_name] used to be.") "You start attaching \the [tool] where [target]'s [affected.name] used to be.")
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/robot_parts/L = tool var/obj/item/robot_parts/L = tool
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has attached \the [tool] where [target]'s [affected.display_name] used to be.", \ user.visible_message("\blue [user] has attached \the [tool] where [target]'s [affected.name] used to be.", \
"\blue You have attached \the [tool] where [target]'s [affected.display_name] used to be.") "\blue You have attached \the [tool] where [target]'s [affected.name] used to be.")
affected.germ_level = 0 affected.germ_level = 0
affected.robotize() affected.robotize()
if(L.sabotaged) if(L.sabotaged)
@@ -168,6 +166,6 @@
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone) var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, damaging connectors on [target]'s [affected.display_name]!", \ user.visible_message("\red [user]'s hand slips, damaging connectors on [target]'s [affected.name]!", \
"\red Your hand slips, damaging connectors on [target]'s [affected.display_name]!") "\red Your hand slips, damaging connectors on [target]'s [affected.name]!")
target.apply_damage(10, BRUTE, affected, sharp=1) target.apply_damage(10, BRUTE, affected, sharp=1)

View File

@@ -81,11 +81,11 @@
var/mob/living/carbon/human/H = mob var/mob/living/carbon/human/H = mob
var/obj/item/organ/external/O = pick(H.organs) var/obj/item/organ/external/O = pick(H.organs)
if(prob(25)) if(prob(25))
mob << "<span class='warning'>Your [O.display_name] feels as if it might fall off!</span>" mob << "<span class='warning'>Your [O.name] feels as if it might fall off!</span>"
if(prob(10)) if(prob(10))
spawn(50) spawn(50)
if(O) if(O)
O.droplimb(1) O.droplimb()
else else
if(prob(75)) if(prob(75))
mob << "<span class='warning'>Your whole body feels like it might fall apart!</span>" mob << "<span class='warning'>Your whole body feels like it might fall apart!</span>"
@@ -156,7 +156,7 @@
var/obj/item/organ/external/E = H.organs_by_name[organ] var/obj/item/organ/external/E = H.organs_by_name[organ]
if (!(E.status & ORGAN_DEAD)) if (!(E.status & ORGAN_DEAD))
E.status |= ORGAN_DEAD E.status |= ORGAN_DEAD
H << "<span class='notice'>You can't feel your [E.display_name] anymore...</span>" H << "<span class='notice'>You can't feel your [E.name] anymore...</span>"
for (var/obj/item/organ/external/C in E.children) for (var/obj/item/organ/external/C in E.children)
C.status |= ORGAN_DEAD C.status |= ORGAN_DEAD
H.update_body(1) H.update_body(1)