Partially fixed the double definition of BROKEN, renamed organ definitions

This commit is contained in:
Albert Iordache
2012-07-13 23:42:05 +03:00
parent dd6c41ade1
commit b94b57e04c
33 changed files with 227 additions and 227 deletions

View File

@@ -192,29 +192,29 @@
// Gloves
var/datum/organ/external/lo = organs["l_hand"]
var/datum/organ/external/ro = organs["r_hand"]
if (!(lo.status & DESTROYED && ro.status & DESTROYED))
if (!(lo.status & ORGAN_DESTROYED && ro.status & ORGAN_DESTROYED))
if (gloves)
var/t1 = gloves.item_state
if (!t1)
t1 = gloves.icon_state
var/icon/gloves_icon = new /icon("icon" = 'hands.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")))
if(lo.status & DESTROYED)
if(lo.status & ORGAN_DESTROYED)
gloves_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY)
else if(ro.status & DESTROYED)
else if(ro.status & ORGAN_DESTROYED)
gloves_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY)
overlays += image(gloves_icon, "layer" = MOB_LAYER)
if (gloves.blood_DNA)
var/icon/stain_icon = icon('blood.dmi', "bloodyhands[!lying ? "" : "2"]")
if(lo.status & DESTROYED)
if(lo.status & ORGAN_DESTROYED)
stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY)
else if(ro.status & DESTROYED)
else if(ro.status & ORGAN_DESTROYED)
stain_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY)
overlays += image("icon" = stain_icon, "layer" = MOB_LAYER)
else if (blood_DNA)
var/icon/stain_icon = icon('blood.dmi', "bloodyhands[!lying ? "" : "2"]")
if(lo.status & DESTROYED)
if(lo.status & ORGAN_DESTROYED)
stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY)
else if(ro.status & DESTROYED)
else if(ro.status & ORGAN_DESTROYED)
stain_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY)
overlays += image("icon" = stain_icon, "layer" = MOB_LAYER)
// Glasses
@@ -231,19 +231,19 @@
// Shoes
lo = organs["l_foot"]
ro = organs["r_foot"]
if (!(lo.status & DESTROYED && ro.status & DESTROYED) && shoes)
if (!(lo.status & ORGAN_DESTROYED && ro.status & ORGAN_DESTROYED) && shoes)
var/t1 = shoes.icon_state
var/icon/shoes_icon = new /icon("icon" = 'feet.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")))
if(lo.status & DESTROYED && !lying)
if(lo.status & ORGAN_DESTROYED && !lying)
shoes_icon.Blend(new /icon('limb_mask.dmi', "right[lying?"_l":""]"), ICON_MULTIPLY)
else if(ro.status & DESTROYED && !lying)
else if(ro.status & ORGAN_DESTROYED && !lying)
shoes_icon.Blend(new /icon('limb_mask.dmi', "left[lying?"_l":""]"), ICON_MULTIPLY)
overlays += image(shoes_icon, "layer" = MOB_LAYER)
if (shoes.blood_DNA)
var/icon/stain_icon = icon('blood.dmi', "shoesblood[!lying ? "" : "2"]")
if(lo.status & DESTROYED)
if(lo.status & ORGAN_DESTROYED)
stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY)
else if(ro.status & DESTROYED)
else if(ro.status & ORGAN_DESTROYED)
stain_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY)
overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) // Radio
/* if (w_radio)
@@ -355,7 +355,7 @@
head.screen_loc = ui_head
else
var/datum/organ/external/head = organs["head"]
if(!(head.status & DESTROYED))
if(!(head.status & ORGAN_DESTROYED))
//if not wearing anything on the head, show the ears
overlays += image("icon" = icon('tajaran.dmi', "ears_[gender==FEMALE ? "f" : "m"]_[lying ? "l" : "s"]"), "layer" = MOB_LAYER)
@@ -482,7 +482,7 @@
lying_icon.Blend(new /icon('tajaran.dmi', "chest_[g]_l"), ICON_OVERLAY)
var/datum/organ/external/head = organs["head"]
if(!(head.status & DESTROYED))
if(!(head.status & ORGAN_DESTROYED))
stand_icon.Blend(new /icon('tajaran.dmi', "head_[g]_s"), ICON_OVERLAY)
lying_icon.Blend(new /icon('tajaran.dmi', "head_[g]_l"), ICON_OVERLAY)
@@ -491,12 +491,12 @@
if(!istype(part, /datum/organ/external/groin) \
&& !istype(part, /datum/organ/external/chest) \
&& !istype(part, /datum/organ/external/head) \
&& !(part.status & DESTROYED))
&& !(part.status & ORGAN_DESTROYED))
var/icon/temp = new /icon('tajaran.dmi', "[part.icon_name]_s")
if(part.status & ROBOT) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
if(part.status & ORGAN_ROBOT) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
stand_icon.Blend(temp, ICON_OVERLAY)
temp = new /icon('tajaran.dmi', "[part.icon_name]_l")
if(part.status & ROBOT) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
if(part.status & ORGAN_ROBOT) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
lying_icon.Blend(temp , ICON_OVERLAY)
stand_icon.Blend(new /icon('tajaran.dmi', "groin_[g]_s"), ICON_OVERLAY)
@@ -511,7 +511,7 @@
if(!istype(part, /datum/organ/external/groin) \
&& !istype(part, /datum/organ/external/chest) \
&& !istype(part, /datum/organ/external/head) \
&& (part.status & DESTROYED))
&& (part.status & ORGAN_DESTROYED))
husk_s.Blend(new /icon('dam_mask.dmi', "[part.icon_name]"), ICON_SUBTRACT)
husk_l.Blend(new /icon('dam_mask.dmi', "[part.icon_name]2"), ICON_SUBTRACT)
@@ -539,7 +539,7 @@
if(organs)
var/datum/organ/external/head = organs["head"]
if(head)
if(head.status & DESTROYED)
if(head.status & ORGAN_DESTROYED)
del(face_standing)
del(face_lying)
return

View File

@@ -455,12 +455,12 @@ proc/airborne_can_reach(turf/source, turf/target)
var/name = pick(mob.organs)
var/datum/organ/external/organ = mob.organs[name]
if(!(organ.status & BROKEN) && !(organ.status & ROBOT))
if(!(organ.status & ORGAN_BROKEN) && !(organ.status & ORGAN_ROBOT))
mob.adjustBruteLoss(10)
mob.visible_message("\red You hear a loud cracking sound coming from [mob.name].","\red <b>Something feels like it shattered in your [organ.display_name]!</b>","You hear a sickening crack.")
mob.emote("scream")
organ.status |= BROKEN
organ.broken_description = pick("broken","fracture","hairline fracture") //Randomise in future. Edit: Randomized. --SkyMarshal
organ.status |= ORGAN_BROKEN
organ.broken_description = pick("broken","fracture","hairline fracture")
organ.perma_injury = 10

View File

@@ -282,11 +282,11 @@
var/imp = ""
var/bled = ""
var/splint = ""
if(e.status & SPLINTED)
if(e.status & ORGAN_SPLINTED)
splint = "Splinted:"
if(e.status & BLEEDING)
if(e.status & ORGAN_BLEEDING)
bled = "Bleeding:"
if(e.status & BROKEN)
if(e.status & ORGAN_BROKEN)
AN = "[e.broken_description]:"
if(e.open)
open = "Open:"
@@ -294,7 +294,7 @@
imp = "Implanted:"
if(!AN && !open && !infected & !imp)
AN = "None"
if(!(e.status & DESTROYED))
if(!(e.status & ORGAN_DESTROYED))
dat += "<td>[e.display_name]</td><td>[e.burn_dam]</td><td>[e.brute_dam]</td><td>[bled][AN][splint][open][infected][imp]</td>"
else
dat += "<td>[e.display_name]</td><td>-</td><td>-</td><td>Not Found</td>"

View File

@@ -187,7 +187,7 @@
// Make sure we can't scan a headless person. It breaks the cloner permanently.
var/datum/organ/external/temp = src.scanner.occupant.organs["head"]
if(temp && !(temp.status & DESTROYED))
if(temp && !(temp.status & ORGAN_DESTROYED))
dat += "<a href='byond://?src=\ref[src];scan=1'>Scan - [src.scanner.occupant]</a><br>"
else
dat += "Error: Cannot locate brain for mental indexing. Unable to continue.<br>"

View File

@@ -283,7 +283,7 @@ var/list/sacrificed = list()
del(ghost)
for(var/name in corpse_to_raise.organs)
var/datum/organ/external/affecting = corpse_to_raise.organs[name]
affecting.status &= ~ROBOT
affecting.status &= ~ORGAN_ROBOT
affecting.heal_damage(1000, 1000)
corpse_to_raise.setToxLoss(0)
corpse_to_raise.setOxyLoss(0)

View File

@@ -120,12 +120,12 @@ MASS SPECTROMETER
for(var/name in H.organs)
var/datum/organ/external/e = H.organs[name]
var/limb = e.getDisplayName()
if(e.status & BROKEN)
if(((e.name == "l_arm") || (e.name == "r_arm") || (e.name == "l_leg") || (e.name == "r_leg")) && (!(e.status & SPLINTED)))
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)))
user << "\red Unsecured fracture in subject [limb]. Splinting recommended for transport."
for(var/name in H.organs)
var/datum/organ/external/e = H.organs[name]
if(e.status & BROKEN)
if(e.status & ORGAN_BROKEN)
user.show_message(text("\red Bone fractures detected. Advanced scanner required for location."), 1)
break
if(ishuman(M))

View File

@@ -404,7 +404,7 @@
return
var/datum/organ/external/head = H.organs["head"]
if(head.status & DESTROYED)
if(head.status & ORGAN_DESTROYED)
user << "\blue Put it where? There's no head."
//since these people will be dead M != usr

View File

@@ -97,13 +97,13 @@
if (user.hand)
if(ishuman(user))
var/datum/organ/external/temp = user:organs["l_hand"]
if(temp.status & DESTROYED)
if(temp.status & ORGAN_DESTROYED)
user << "\blue Yo- wait a minute."
return
else
if(ishuman(user))
var/datum/organ/external/temp = user:organs["r_hand"]
if(temp.status & DESTROYED)
if(temp.status & ORGAN_DESTROYED)
user << "\blue Yo- wait a minute."
if (istype(src.loc, /obj/item/weapon/storage))
@@ -136,7 +136,7 @@
if (user.hand)
if(ishuman(user))
var/datum/organ/external/temp = user:organs["l_hand"]
if(!(temp.status & DESTROYED))
if(!(temp.status & ORGAN_DESTROYED))
user.l_hand = src
else
user << "\blue You pick \the [src] up with your ha- wait a minute."
@@ -148,7 +148,7 @@
else
if(ishuman(user))
var/datum/organ/external/temp = user:organs["r_hand"]
if(!(temp.status & DESTROYED))
if(!(temp.status & ORGAN_DESTROYED))
user.r_hand = src
else
user << "\blue You pick \the [src] up with your ha- wait a minute."
@@ -176,13 +176,13 @@
if (user.hand)
if(ismonkey(user))
var/datum/organ/external/temp = user:organs["l_hand"]
if(temp.status & DESTROYED)
if(temp.status & ORGAN_DESTROYED)
user << "\blue Yo- wait a minute."
return
else
if(ismonkey(user))
var/datum/organ/external/temp = user:organs["r_hand"]
if(temp.status & DESTROYED)
if(temp.status & ORGAN_DESTROYED)
user << "\blue Yo- wait a minute."
if (istype(src.loc, /obj/item/weapon/storage))

View File

@@ -31,7 +31,7 @@
return
if(hasorgans(M))
var/datum/organ/external/target = M:get_organ(check_zone(user.zone_sel.selecting))
if(target.status & DESTROYED)
if(target.status & ORGAN_DESTROYED)
user << "What [target.display_name]?"
return
if(!target.implant)

View File

@@ -44,7 +44,7 @@ MEDICAL
if(!istype(affecting, /datum/organ/external))
affecting = H.get_organ("head")
if(affecting.status & ROBOT)
if(affecting.status & ORGAN_ROBOT)
user << "Medical equipment for a robot arm? Better get a welder..."
return
@@ -53,10 +53,10 @@ MEDICAL
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!"
return
if(!(affecting.status & BROKEN))
if(!(affecting.status & ORGAN_BROKEN))
user << "\red [M]'s [limb] isn't broken!"
return
if(affecting.status & SPLINTED)
if(affecting.status & ORGAN_SPLINTED)
user << "\red [M]'s [limb] is already splinted!"
return
if (M != user)
@@ -75,7 +75,7 @@ MEDICAL
else
user.visible_message("\red [user] fumbles \the [src].", "\red You fumble \the [src].", "\red You hear something being wrapped.")
return
affecting.status |= SPLINTED
affecting.status |= ORGAN_SPLINTED
use(1)
M.update_clothing()
return
@@ -115,8 +115,8 @@ MEDICAL
"You hear gauze being ripped.")
use(1)
if (!ointment && (affecting.status & BLEEDING))
affecting.status &= ~BLEEDING
if (!ointment && (affecting.status & ORGAN_BLEEDING))
affecting.status &= ~ORGAN_BLEEDING
if (affecting.heal_damage(src.heal_brute, src.heal_burn))
H.UpdateDamageIcon()

View File

@@ -24,8 +24,8 @@
var/mob/living/carbon/human/H = M
var/datum/organ/external/S = H.organs[user.zone_sel.selecting]
if(S.status & DESTROYED)
if(!(S.status & ATTACHABLE))
if(S.status & ORGAN_DESTROYED)
if(!(S.status & ORGAN_ATTACHABLE))
user << "\red The wound is not ready for a replacement!"
return 0
if(M != user)
@@ -51,17 +51,17 @@
user << "\red You mess up!"
S.take_damage(15)
S.status &= ~BROKEN
S.status &= ~SPLINTED
S.status &= ~ATTACHABLE
S.status &= ~DESTROYED
S.status |= ROBOT
S.status &= ~ORGAN_BROKEN
S.status &= ~ORGAN_SPLINTED
S.status &= ~ORGAN_ATTACHABLE
S.status &= ~ORGAN_DESTROYED
S.status |= ORGAN_ROBOT
var/datum/organ/external/T = H.organs["[limbloc]"]
T.status &= ~BROKEN
T.status &= ~SPLINTED
T.status &= ~ATTACHABLE
T.status &= ~DESTROYED
T.status |= ROBOT
T.status &= ~ORGAN_BROKEN
T.status &= ~ORGAN_SPLINTED
T.status &= ~ORGAN_ATTACHABLE
T.status &= ~ORGAN_DESTROYED
T.status |= ORGAN_ROBOT
M.update_body()
M.updatehealth()
M.UpdateDamageIcon()

View File

@@ -26,11 +26,11 @@ CIRCULAR SAW
var/datum/organ/external/S = H.organs[user.zone_sel.selecting]
if(user.zone_sel.selecting == "mouth" || user.zone_sel.selecting == "eyes")
S = H.organs["head"]
if(S.status & DESTROYED)
if(S.status & BLEEDING)
if(S.status & ORGAN_DESTROYED)
if(S.status & ORGAN_BLEEDING)
user << "\red There's too much blood here!"
return 0
if(!(S.status & CUT_AWAY))
if(!(S.status & ORGAN_CUT_AWAY))
user << "\red The flesh hasn't been cleanly cut!"
return 0
if(M != user)
@@ -247,17 +247,17 @@ CIRCULAR SAW
if(!S || !istype(S))
return 0
if(S.status & DESTROYED)
if(S.status & ORGAN_DESTROYED)
return ..()
if(S.status & ROBOT)
if(S.status & ORGAN_ROBOT)
user << "Medical equipment for a robot arm? How would that do any good..."
return
if(!S.open)
user << "\red There is skin in the way!"
return 0
if(S.status & BLEEDING)
if(S.status & ORGAN_BLEEDING)
user << "\red [H] is profusely bleeding in \his [S.display_name]!"
return 0
@@ -306,11 +306,11 @@ CIRCULAR SAW
var/datum/organ/external/S = H.organs[user.zone_sel.selecting]
if(((user.zone_sel.selecting == "l_arm") || (user.zone_sel.selecting == "r_arm") || (user.zone_sel.selecting == "l_leg") || (user.zone_sel.selecting == "r_leg")) & (istype(M, /mob/living/carbon/human)))
if(S.status & DESTROYED)
if(!(S.status & BLEEDING))
if(S.status & ORGAN_DESTROYED)
if(!(S.status & ORGAN_BLEEDING))
user << "\red There is nothing bleeding here!"
return 0
if(!(S.status & CUT_AWAY))
if(!(S.status & ORGAN_CUT_AWAY))
user << "\red The flesh hasn't been cleanly cut!"
return 0
if(M != user)
@@ -336,7 +336,7 @@ CIRCULAR SAW
user << "\red You mess up!"
S.take_damage(15)
S.status &= ~BLEEDING
S.status &= ~ORGAN_BLEEDING
M.updatehealth()
M.UpdateDamageIcon()
@@ -353,7 +353,7 @@ CIRCULAR SAW
user << "\red You clamp bleeders in [M]'s torso with [src]!"
M:embryo_op_stage = 2.0
S.status &= ~BLEEDING
S.status &= ~ORGAN_BLEEDING
M.updatehealth()
M.UpdateDamageIcon()
@@ -378,7 +378,7 @@ CIRCULAR SAW
user << "\red You clamp bleeders in [M]'s abdomen with [src]!"
M:appendix_op_stage = 2.0
S.status &= ~BLEEDING
S.status &= ~ORGAN_BLEEDING
M.updatehealth()
M.UpdateDamageIcon()
@@ -505,7 +505,7 @@ CIRCULAR SAW
M.face_op_stage = 2.0
S.status &= ~BLEEDING
S.status &= ~ORGAN_BLEEDING
M.updatehealth()
M.UpdateDamageIcon()
return
@@ -568,10 +568,10 @@ CIRCULAR SAW
if(!S || !istype(S))
return 0
if(S.status & DESTROYED)
if(S.status & ORGAN_DESTROYED)
return ..()
if(S.status & ROBOT)
if(S.status & ORGAN_ROBOT)
user << "Medical equipment for a robot arm? How would that do any good?"
return
@@ -579,7 +579,7 @@ CIRCULAR SAW
user << "\red There is skin in the way!"
return 0
if(!(S.status & BLEEDING))
if(!(S.status & ORGAN_BLEEDING))
if(S.implant)
if(H != user)
H.visible_message( \
@@ -646,7 +646,7 @@ CIRCULAR SAW
user << "\red You mess up!"
S.take_damage(15)
S.status &= ~BLEEDING
S.status &= ~ORGAN_BLEEDING
H.updatehealth()
H.UpdateDamageIcon()
@@ -822,7 +822,7 @@ CIRCULAR SAW
if(!S.open)
usr << "<b>You have to cut the limb open first!</b>"
return
if(S.status & ROBOT)
if(S.status & ORGAN_ROBOT)
user << "Medical equipment for a robot arm? How would that do any good?"
return
for(var/mob/O in viewers(M))
@@ -846,11 +846,11 @@ CIRCULAR SAW
if(((user.zone_sel.selecting == "l_arm") || (user.zone_sel.selecting == "r_arm") || (user.zone_sel.selecting == "l_leg") || (user.zone_sel.selecting == "r_leg")) & (istype(M, /mob/living/carbon/human)))
var/mob/living/carbon/human/H = M
var/datum/organ/external/S = H.organs[user.zone_sel.selecting]
if(S.status & DESTROYED)
if(S.status & BLEEDING)
if(S.status & ORGAN_DESTROYED)
if(S.status & ORGAN_BLEEDING)
user << "\red There's too much blood here!"
return 0
if(!(S.status & CUT_AWAY))
if(!(S.status & ORGAN_CUT_AWAY))
user << "\red The flesh hasn't been cleanly cut!"
return 0
if(S.open != 3)
@@ -881,7 +881,7 @@ CIRCULAR SAW
S.open = 0
S.stage = 0
S.status |= ATTACHABLE
S.status |= ORGAN_ATTACHABLE
S.amputated = 1 // this should prevent the wound from hurting etc.
M.updatehealth()
M.UpdateDamageIcon()
@@ -1038,10 +1038,10 @@ CIRCULAR SAW
if(!S || !istype(S))
return 0
if(S.status & DESTROYED)
if(S.status & ORGAN_DESTROYED)
user << "What [S.display_name]?"
if(S.status & ROBOT)
if(S.status & ORGAN_ROBOT)
user << "Medical equipment for a robot arm? How would that do any good..."
return
if(!S.open)
@@ -1106,7 +1106,7 @@ CIRCULAR SAW
if(((user.zone_sel.selecting == "l_arm") || (user.zone_sel.selecting == "r_arm") || (user.zone_sel.selecting == "l_leg") || (user.zone_sel.selecting == "r_leg")) & (istype(M, /mob/living/carbon/human)))
var/mob/living/carbon/human/H = M
var/datum/organ/external/S = H.organs[user.zone_sel.selecting]
if(S.status & DESTROYED)
if(S.status & ORGAN_DESTROYED)
if(M != user)
M.visible_message( \
"\red [user] is beginning to cut away at the flesh where [H]'s [S.display_name] used to be with [src].", \
@@ -1126,7 +1126,7 @@ CIRCULAR SAW
"\red [user] finishes cutting where \his [S.display_name] used to be with [src]!", \
"\red You finish cutting where your [S.display_name] used to be with [src]!")
S.status |= BLEEDING|CUT_AWAY
S.status |= ORGAN_BLEEDING|ORGAN_CUT_AWAY
M.updatehealth()
M.UpdateDamageIcon()
else
@@ -1199,7 +1199,7 @@ CIRCULAR SAW
if(istype(H) && H.organs["head"])
var/datum/organ/external/affecting = H.organs["head"]
if(affecting.status & DESTROYED)
if(affecting.status & ORGAN_DESTROYED)
return ..()
if(istype(H) && ( \
@@ -1429,10 +1429,10 @@ CIRCULAR SAW
if(!S || !istype(S))
return 0
if(S.status & DESTROYED)
if(S.status & ORGAN_DESTROYED)
return ..()
if(S.status & ROBOT)
if(S.status & ORGAN_ROBOT)
user << "Medical equipment for a robot arm? How would that do any good..."
return
@@ -1463,7 +1463,7 @@ CIRCULAR SAW
user << "\red You mess up!"
S.take_damage(15)
S.status |= BLEEDING
S.status |= ORGAN_BLEEDING
S.open = 1
if(S.display_name == "chest")
H:embryo_op_stage = 1.0
@@ -1532,7 +1532,7 @@ CIRCULAR SAW
if(!hasorgans(M))
return ..()
var/datum/organ/external/S = M:organs["head"]
if(S.status & DESTROYED)
if(S.status & ORGAN_DESTROYED)
return
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [M] gets \his [S.display_name] sawed at with [src] by [user].... It looks like [user] is trying to cut it off!"), 1)
@@ -1542,7 +1542,7 @@ CIRCULAR SAW
return
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [M] gets \his [S.display_name] sawed off with [src] by [user]."), 1)
S.status |= DESTROYED
S.status |= ORGAN_DESTROYED
S.droplimb()
M:update_body()
if(1.0)
@@ -1632,10 +1632,10 @@ CIRCULAR SAW
else if(user.zone_sel.selecting != "chest" && hasorgans(M))
var/mob/living/carbon/H = M
var/datum/organ/external/S = H:organs[user.zone_sel.selecting]
if(S.status & DESTROYED)
if(S.status & ORGAN_DESTROYED)
return
if(S.status & ROBOT)
if(S.status & ORGAN_ROBOT)
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, M)
spark_system.attach(M)
@@ -1696,33 +1696,33 @@ CIRCULAR SAW
var/datum/organ/external/temp = M.organs[zone]
var/msg
if(temp.status & DESTROYED)
if(temp.status & ORGAN_DESTROYED)
return ..()
// quickly convert embryo removal to bone surgery
if(zone == "chest" && M.embryo_op_stage == 3)
M.embryo_op_stage = 0
temp.open = 2
temp.status &= ~BLEEDING
temp.status &= ~ORGAN_BLEEDING
// quickly convert appendectomy to bone surgery
if(zone == "groin" && M.appendix_op_stage == 3)
M.appendix_op_stage = 0
temp.open = 2
temp.status &= ~BLEEDING
temp.status &= ~ORGAN_BLEEDING
msg = get_message(1,M,user,temp)
for(var/mob/O in viewers(M,null))
O.show_message("\red [msg]",1)
if(do_mob(user,M,time))
if(temp.open == 2 && !(temp.status & BLEEDING))
if(temp.open == 2 && !(temp.status & ORGAN_BLEEDING))
if(temp.broken_description in wound)
if(temp.stage in stage)
temp.stage += 1
if(IsFinalStage(temp.stage))
temp.status &= ~BROKEN
temp.status &= ~SPLINTED
temp.status &= ~ORGAN_BROKEN
temp.status &= ~ORGAN_SPLINTED
temp.stage = 0
temp.perma_injury = 0
temp.brute_dam = temp.min_broken_damage -1
@@ -1820,17 +1820,17 @@ CIRCULAR SAW
var/mob/living/carbon/human/H = M
for(var/name in H.organs)
var/datum/organ/external/e = H.organs[name]
if(e.status & DESTROYED) // this is nanites, not space magic
if(e.status & ORGAN_DESTROYED) // this is nanites, not space magic
continue
e.brute_dam = 0.0
e.burn_dam = 0.0
e.status &= ~BANDAGED
e.status &= ~ORGAN_BANDAGED
e.max_damage = initial(e.max_damage)
e.status &= ~BLEEDING
e.status &= ~ORGAN_BLEEDING
e.open = 0
e.status &= ~BROKEN
e.status &= ~DESTROYED
e.status &= ~SPLINTED
e.status &= ~ORGAN_BROKEN
e.status &= ~ORGAN_DESTROYED
e.status &= ~ORGAN_SPLINTED
e.perma_injury = 0
e.update_icon()
H.update_body()

View File

@@ -327,7 +327,7 @@ WELDINGTOOOL
/obj/item/weapon/weldingtool/attack(mob/M as mob, mob/user as mob)
if(hasorgans(M))
var/datum/organ/external/S = M:organs[user.zone_sel.selecting]
if(!(S.status & ROBOT) || user.a_intent != "help")
if(!(S.status & ORGAN_ROBOT) || user.a_intent != "help")
return ..()
if(S.brute_dam)
S.heal_damage(15,0,0,1)
@@ -404,4 +404,4 @@ WELDINGTOOOL
M.update_clothing()
return
else
..()
..()

View File

@@ -266,7 +266,7 @@ SHARDS
return
if(!((H.shoes) || (H.wear_suit && H.wear_suit.body_parts_covered & FEET)))
var/datum/organ/external/affecting = H.get_organ(pick("l_foot", "r_foot"))
if(affecting.status & ROBOT)
if(affecting.status & ORGAN_ROBOT)
return
H.Weaken(3)
affecting.take_damage(5, 0)

View File

@@ -375,7 +375,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
var/obj/item/weapon/implant/uplink/U = src.loc
var/mob/living/A = U.imp_in
var/datum/organ/external/head = A:organs["head"]
head.status |= DESTROYED
head.status |= ORGAN_DESTROYED
spawn(2)
head.droplimb()
del(src.master)

View File

@@ -137,14 +137,14 @@
if("feet")
if(!H.shoes)
affecting = H.get_organ(pick("l_leg", "r_leg"))
if(!(affecting.status & ROBOT))
if(!(affecting.status & ORGAN_ROBOT))
H.Weaken(3)
if("l_hand", "r_hand")
if(!H.gloves)
affecting = H.get_organ(type)
if(!(affecting.status & ROBOT))
if(!(affecting.status & ORGAN_ROBOT))
H.Stun(3)
if(affecting && !(affecting.status & ROBOT))
if(affecting && !(affecting.status & ORGAN_ROBOT))
affecting.take_damage(1, 0)
H.UpdateDamageIcon()
H.updatehealth()

View File

@@ -49,13 +49,13 @@
if (M.hand)
if(ishuman(M) || ismonkey(M))
var/datum/organ/external/temp = M:organs["l_hand"]
if(temp.status & DESTROYED)
if(temp.status & ORGAN_DESTROYED)
M << "\red Yo- wait a minute."
return
else
if(ishuman(M) || ismonkey(M))
var/datum/organ/external/temp = M:organs["r_hand"]
if(temp.status & DESTROYED)
if(temp.status & ORGAN_DESTROYED)
M << "\red Yo- wait a minute."
return
@@ -100,13 +100,13 @@
if (M.hand)
if(ishuman(M) || ismonkey(M))
var/datum/organ/external/temp = M:organs["l_hand"]
if(temp.status & DESTROYED)
if(temp.status & ORGAN_DESTROYED)
M << "\red Yo- wait a minute."
return
else
if(ishuman(M) || ismonkey(M))
var/datum/organ/external/temp = M:organs["r_hand"]
if(temp.status & DESTROYED)
if(temp.status & ORGAN_DESTROYED)
M << "\red Yo- wait a minute."
return
@@ -224,7 +224,7 @@
status = "blugeoned"
if(brutedamage > 40)
status = "mangled"
if(org.status & BLEEDING && brutedamage)
if(org.status & ORGAN_BLEEDING && brutedamage)
status += ",[burndamage ? "" : " and"] bleeding[burndamage ? "," : ""]"
if(brutedamage > 0 && burndamage > 0)
status += " and "
@@ -235,7 +235,7 @@
status += "blistered"
else if(burndamage > 0)
status += "numb"
if(org.status & DESTROYED)
if(org.status & ORGAN_DESTROYED)
status = "MISSING!"
if(status == "")

View File

@@ -131,7 +131,7 @@
//splints
for(var/organ in list("l_leg","r_leg","l_arm","r_arm"))
var/datum/organ/external/o = organs["[organ]"]
if(o.status & SPLINTED)
if(o.status & ORGAN_SPLINTED)
msg += "<span class='warning'>[t_He] [t_has] a splint on his [o.getDisplayName()]!</span>\n"
//belt
@@ -271,11 +271,11 @@
for(var/named in organs)
var/datum/organ/external/temp = organs[named]
if(temp)
if(temp.status & DESTROYED)
if(temp.status & ORGAN_DESTROYED)
is_destroyed["[temp.display_name]"] = 1
wound_flavor_text["[temp.display_name]"] = "<span class='warning'><b>[t_He] is missing [t_his] [temp.display_name].</b></span>\n"
continue
if(temp.status & ROBOT)
if(temp.status & ORGAN_ROBOT)
if(!(temp.brute_dam + temp.burn_dam))
wound_flavor_text["[temp.display_name]"] = "<span class='warning'>[t_He] has a robot [temp.display_name]!</span>\n"
continue
@@ -336,7 +336,7 @@
flavor_text_string += flavor_text[text]
flavor_text_string += " on [t_his] [named].</span><br>"
wound_flavor_text["[named]"] = flavor_text_string
if(temp.status & BLEEDING)
if(temp.status & ORGAN_BLEEDING)
is_bleeding["[named]"] = 1
else
wound_flavor_text["[temp.display_name]"] = ""

View File

@@ -284,8 +284,8 @@
for(var/organ in list("l_leg","l_foot","r_leg","r_foot"))
var/datum/organ/external/o = organs["[organ]"]
if((o.status & BROKEN) || (o.status & DESTROYED))
if(o.status & SPLINTED)
if((o.status & ORGAN_BROKEN) || (o.status & ORGAN_DESTROYED))
if(o.status & ORGAN_SPLINTED)
tally += 3
else
tally += 6
@@ -780,7 +780,7 @@
M.show_message(text("\red [] has been hit by []", src, O), 1)
if (health > 0)
var/datum/organ/external/affecting = get_organ(pick("chest", "chest", "chest", "head"))
if(!affecting || affecting.status & DESTROYED) return
if(!affecting || affecting.status & ORGAN_DESTROYED) return
if (istype(O, /obj/effect/immovablerod))
affecting.take_damage(101, 0)
else
@@ -969,29 +969,29 @@
// Gloves
var/datum/organ/external/lo = organs["l_hand"]
var/datum/organ/external/ro = organs["r_hand"]
if (!(lo.status & DESTROYED && ro.status & DESTROYED))
if (!(lo.status & ORGAN_DESTROYED && ro.status & ORGAN_DESTROYED))
if (gloves)
var/t1 = gloves.item_state
if (!t1)
t1 = gloves.icon_state
var/icon/gloves_icon = new /icon("icon" = 'hands.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")))
if(lo.status & DESTROYED)
if(lo.status & ORGAN_DESTROYED)
gloves_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY)
if(ro.status & DESTROYED)
if(ro.status & ORGAN_DESTROYED)
gloves_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY)
clothing_overlays += image(gloves_icon, "layer" = GLOVES_LAYER)
if (gloves.blood_DNA)
var/icon/stain_icon = icon('blood.dmi', "bloodyhands[!lying ? "" : "2"]")
if(lo.status & DESTROYED)
if(lo.status & ORGAN_DESTROYED)
stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY)
else if(ro.status & DESTROYED)
else if(ro.status & ORGAN_DESTROYED)
stain_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY)
clothing_overlays += image("icon" = stain_icon, "layer" = B_GLOVES_LAYER)
else if (blood_DNA)
var/icon/stain_icon = icon('blood.dmi', "bloodyhands[!lying ? "" : "2"]")
if(lo.status & DESTROYED)
if(lo.status & ORGAN_DESTROYED)
stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY)
else if(ro.status & DESTROYED)
else if(ro.status & ORGAN_DESTROYED)
stain_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY)
clothing_overlays += image("icon" = stain_icon, "layer" = B_GLOVES_LAYER)
@@ -1011,19 +1011,19 @@
// Shoes
lo = organs["l_foot"]
ro = organs["r_foot"]
if (!(lo.status & DESTROYED && ro.status & DESTROYED) && shoes)
if (!(lo.status & ORGAN_DESTROYED && ro.status & ORGAN_DESTROYED) && shoes)
var/t1 = shoes.icon_state
var/icon/shoes_icon = new /icon("icon" = 'feet.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")))
if(lo.status & DESTROYED && !lying)
if(lo.status & ORGAN_DESTROYED && !lying)
shoes_icon.Blend(new /icon('limb_mask.dmi', "right[lying?"_l":""]"), ICON_MULTIPLY)
else if(ro.status & DESTROYED && !lying)
else if(ro.status & ORGAN_DESTROYED && !lying)
shoes_icon.Blend(new /icon('limb_mask.dmi', "left[lying?"_l":""]"), ICON_MULTIPLY)
clothing_overlays += image(shoes_icon, "layer" = SHOES_LAYER)
if (shoes.blood_DNA)
var/icon/stain_icon = icon('blood.dmi', "shoeblood[!lying ? "" : "2"]")
if(lo.status & DESTROYED)
if(lo.status & ORGAN_DESTROYED)
stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY)
else if(ro.status & DESTROYED)
else if(ro.status & ORGAN_DESTROYED)
stain_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY)
clothing_overlays += image("icon" = stain_icon, "layer" = B_SHOES_LAYER) // Radio
@@ -1102,7 +1102,7 @@
// Splints
for(var/organ in list("l_leg","r_leg","l_arm","r_arm"))
var/datum/organ/external/o = organs["[organ]"]
if (o.status & SPLINTED)
if (o.status & ORGAN_SPLINTED)
if (!lying)
clothing_overlays += image("icon" = 'mob.dmi', "icon_state" = "[o]_splint", "layer" = CUFFED_LAYER)
else
@@ -1419,7 +1419,7 @@
lying_icon.Blend(new /icon('human.dmi', "chest_[g]_l"), ICON_OVERLAY)
var/datum/organ/external/head = organs["head"]
if(!(head.status & DESTROYED))
if(!(head.status & ORGAN_DESTROYED))
stand_icon.Blend(new /icon('human.dmi', "head_[g]_s"), ICON_OVERLAY)
lying_icon.Blend(new /icon('human.dmi', "head_[g]_l"), ICON_OVERLAY)
@@ -1428,12 +1428,12 @@
if(!istype(part, /datum/organ/external/groin) \
&& !istype(part, /datum/organ/external/chest) \
&& !istype(part, /datum/organ/external/head) \
&& !(part.status & DESTROYED))
&& !(part.status & ORGAN_DESTROYED))
var/icon/temp = new /icon('human.dmi', "[part.icon_name]_s")
if(part.status & ROBOT) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
if(part.status & ORGAN_ROBOT) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
stand_icon.Blend(temp, ICON_OVERLAY)
temp = new /icon('human.dmi', "[part.icon_name]_l")
if(part.status & ROBOT) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
if(part.status & ORGAN_ROBOT) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
lying_icon.Blend(temp , ICON_OVERLAY)
stand_icon.Blend(new /icon('human.dmi', "groin_[g]_s"), ICON_OVERLAY)
@@ -1473,7 +1473,7 @@
if(!istype(part, /datum/organ/external/groin) \
&& !istype(part, /datum/organ/external/chest) \
&& !istype(part, /datum/organ/external/head) \
&& (part.status & DESTROYED))
&& (part.status & ORGAN_DESTROYED))
husk_s.Blend(new /icon('dam_mask.dmi', "[part.icon_name]"), ICON_SUBTRACT)
husk_l.Blend(new /icon('dam_mask.dmi', "[part.icon_name]2"), ICON_SUBTRACT)
@@ -1503,7 +1503,7 @@
if(organs)
var/datum/organ/external/head = organs["head"]
if(head)
if(head.status & DESTROYED)
if(head.status & ORGAN_DESTROYED)
del(face_standing)
del(face_lying)
return
@@ -1627,7 +1627,7 @@
var/count = 0
for(var/organ in list("l_leg","r_leg","l_arm","r_arm"))
var/datum/organ/external/o = target.organs["[organ]"]
if(o.status & SPLINTED)
if(o.status & ORGAN_SPLINTED)
count = 1
break
if(count == 0)
@@ -2230,9 +2230,9 @@ It can still be worn/put on as normal.
if("splints")
for(var/organ in list("l_leg","r_leg","l_arm","r_arm"))
var/datum/organ/external/o = target.organs["[organ]"]
if (o.status & SPLINTED)
if (o.status & ORGAN_SPLINTED)
var/obj/item/W = new /obj/item/stack/medical/splint/single()
o.status &= ~SPLINTED
o.status &= ~ORGAN_SPLINTED
if (W)
W.loc = target.loc
W.layer = initial(W.layer)
@@ -2651,7 +2651,7 @@ It can still be worn/put on as normal.
var/amount = 0.0
for(var/name in organs)
var/datum/organ/external/O = organs[name]
if(!(O.status & ROBOT)) amount+= O.brute_dam
if(!(O.status & ORGAN_ROBOT)) amount+= O.brute_dam
return amount
/mob/living/carbon/human/adjustBruteLoss(var/amount, var/used_weapon = null)
@@ -2664,7 +2664,7 @@ It can still be worn/put on as normal.
var/amount = 0.0
for(var/name in organs)
var/datum/organ/external/O = organs[name]
if(!(O.status & ROBOT)) amount+= O.burn_dam
if(!(O.status & ORGAN_ROBOT)) amount+= O.burn_dam
return amount
/mob/living/carbon/human/adjustFireLoss(var/amount,var/used_weapon = null)

View File

@@ -26,7 +26,7 @@
for(var/name in organs)
var/datum/organ/external/O = organs[name]
if(O.status & DESTROYED) damage_appearance += "d"
if(O.status & ORGAN_DESTROYED) damage_appearance += "d"
else
damage_appearance += O.damage_state
@@ -41,7 +41,7 @@
for(var/name in organs)
var/datum/organ/external/O = organs[name]
if(!(O.status & DESTROYED))
if(!(O.status & ORGAN_DESTROYED))
O.update_icon()
var/icon/DI = new /icon('dam_human.dmi', O.damage_state) // the damage icon for whole human
DI.Blend(new /icon('dam_mask.dmi', O.icon_name), ICON_MULTIPLY) // mask with this organ's pixels
@@ -68,7 +68,7 @@
else
if(!def_zone) def_zone = ran_zone(def_zone)
organ = get_organ(check_zone(def_zone))
if(!organ || organ.status & DESTROYED) return 0
if(!organ || organ.status & ORGAN_DESTROYED) return 0
if(blocked)
damage = (damage/(blocked+1))

View File

@@ -110,7 +110,7 @@ emp_act
O.emp_act(severity)
for(var/named in organs)
var/datum/organ/external/O = organs[named]
if(O.status & DESTROYED) continue
if(O.status & ORGAN_DESTROYED) continue
O.emp_act(severity)
..()
@@ -125,7 +125,7 @@ emp_act
if((user != src) && check_shields(I.force, "the [I.name]"))
return 0
if(!(affecting.status & DESTROYED))
if(!(affecting.status & ORGAN_DESTROYED))
visible_message("\red <B>[src] has been attacked in the [hit_area] with [I.name] by [user]!</B>")
else
user << "What [affecting]?"

View File

@@ -904,7 +904,7 @@
for(var/name in organs)
var/datum/organ/external/E = organs[name]
E.process()
if(E.status & ROBOT && prob(E.brute_dam + E.burn_dam))
if(E.status & ORGAN_ROBOT && prob(E.brute_dam + E.burn_dam))
if(E.name == "l_hand" || E.name == "l_arm")
if(hand && equipped())
drop_item()
@@ -928,10 +928,10 @@
else if(E.name == "l_leg" || E.name == "l_foot" \
|| E.name == "r_leg" || E.name == "r_foot" && !lying)
leg_tally-- // let it fail even if just foot&leg
if(E.status & BROKEN || E.status & DESTROYED)
if(E.status & ORGAN_BROKEN || E.status & ORGAN_DESTROYED)
if(E.name == "l_hand" || E.name == "l_arm")
if(hand && equipped())
if(E.status & SPLINTED && prob(10))
if(E.status & ORGAN_SPLINTED && prob(10))
drop_item()
emote("scream")
else
@@ -939,7 +939,7 @@
emote("scream")
else if(E.name == "r_hand" || E.name == "r_arm")
if(!hand && equipped())
if(E.status & SPLINTED && prob(10))
if(E.status & ORGAN_SPLINTED && prob(10))
drop_item()
emote("scream")
else
@@ -947,7 +947,7 @@
emote("scream")
else if(E.name == "l_leg" || E.name == "l_foot" \
|| E.name == "r_leg" || E.name == "r_foot" && !lying)
if(!(E.status & SPLINTED))
if(!(E.status & ORGAN_SPLINTED))
leg_tally-- // let it fail even if just foot&leg
// can't stand
if(leg_tally == 0 && !paralysis && !(lying || resting))
@@ -1097,10 +1097,10 @@
var/blood_max = 0
for(var/name in organs)
var/datum/organ/external/temp = organs[name]
if(!(temp.status & BLEEDING) || temp.status & ROBOT)
if(!(temp.status & ORGAN_BLEEDING) || temp.status & ORGAN_ROBOT)
continue
blood_max += 2
if(temp.status & DESTROYED && !(temp.status & GAUZED))
if(temp.status & ORGAN_DESTROYED && !(temp.status & ORGAN_GAUZED))
blood_max += 10 //Yer missing a fucking limb.
drip(blood_max)
if (eye_blind)

View File

@@ -27,11 +27,11 @@
for(var/named in organs)
var/datum/organ/external/temp = organs[named]
if(temp)
if(temp.status & DESTROYED)
if(temp.status & ORGAN_DESTROYED)
is_destroyed["[temp.display_name]"] = 1
wound_flavor_text["[temp.display_name]"] = "<span class='warning'><b>It is missing its [temp.display_name].</b></span>\n"
continue
if(temp.status & ROBOT)
if(temp.status & ORGAN_ROBOT)
if(!(temp.brute_dam + temp.burn_dam))
wound_flavor_text["[temp.display_name]"] = "<span class='warning'>It has a robot [temp.display_name]!</span>\n"
continue

View File

@@ -431,10 +431,10 @@
for(var/name in organs)
var/datum/organ/external/E = organs[name]
E.process()
if(E.status & BROKEN || E.status & DESTROYED)
if(E.status & ORGAN_BROKEN || E.status & ORGAN_DESTROYED)
if(E.name == "l_hand" || E.name == "l_arm")
if(hand && equipped())
if(E.status & SPLINTED && prob(7))
if(E.status & ORGAN_SPLINTED && prob(7))
drop_item()
emote("scream")
else
@@ -442,7 +442,7 @@
emote("scream")
else if(E.name == "r_hand" || E.name == "r_arm")
if(!hand && equipped())
if(E.status & SPLINTED && prob(7))
if(E.status & ORGAN_SPLINTED && prob(7))
drop_item()
emote("scream")
else
@@ -450,7 +450,7 @@
emote("scream")
else if(E.name == "l_leg" || E.name == "l_foot" \
|| E.name == "r_leg" || E.name == "r_foot" && !lying)
if(!(E.status & SPLINTED))
if(!(E.status & ORGAN_SPLINTED))
leg_tally-- // let it fail even if just foot&leg
// can't stand

View File

@@ -585,7 +585,7 @@
lying_icon.Blend(new /icon('monkey.dmi', "chest_l"), ICON_OVERLAY)
var/datum/organ/external/head = organs["head"]
if(!(head.status & DESTROYED))
if(!(head.status & ORGAN_DESTROYED))
stand_icon.Blend(new /icon('monkey.dmi', "head_s"), ICON_OVERLAY)
lying_icon.Blend(new /icon('monkey.dmi', "head_l"), ICON_OVERLAY)
@@ -594,12 +594,12 @@
if(!istype(part, /datum/organ/external/groin) \
&& !istype(part, /datum/organ/external/chest) \
&& !istype(part, /datum/organ/external/head) \
&& !(part.status & DESTROYED))
&& !(part.status & ORGAN_DESTROYED))
var/icon/temp = new /icon('monkey.dmi', "[part.icon_name]_s")
if(part.status & ROBOT) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
if(part.status & ORGAN_ROBOT) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
stand_icon.Blend(temp, ICON_OVERLAY)
temp = new /icon('monkey.dmi', "[part.icon_name]_l")
if(part.status & ROBOT) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
if(part.status & ORGAN_ROBOT) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
lying_icon.Blend(temp , ICON_OVERLAY)
stand_icon.Blend(new /icon('monkey.dmi', "groin_s"), ICON_OVERLAY)
@@ -743,7 +743,7 @@
var/count = 0
for(var/organ in list("l_leg","r_leg","l_arm","r_arm"))
var/datum/organ/external/o = target.organs["[organ]"]
if(o.status & SPLINTED)
if(o.status & ORGAN_SPLINTED)
count = 1
break
if(count == 0)
@@ -890,9 +890,9 @@
if("splints")
for(var/organ in list("l_leg","r_leg","l_arm","r_arm"))
var/datum/organ/external/o = target.organs["[organ]"]
if (o.status & SPLINTED)
if (o.status & ORGAN_SPLINTED)
var/obj/item/W = new /obj/item/stack/medical/splint/single()
o.status &= ~SPLINTED
o.status &= ~ORGAN_SPLINTED
if (W)
W.loc = target.loc
W.layer = initial(W.layer)
@@ -937,7 +937,7 @@
else
if(!def_zone) def_zone = ran_zone(def_zone)
organ = get_organ(check_zone(def_zone))
if(!organ || organ.status & DESTROYED) return 0
if(!organ || organ.status & ORGAN_DESTROYED) return 0
if(blocked)
damage = (damage/(blocked+1))
@@ -1060,7 +1060,7 @@
var/amount = 0.0
for(var/name in organs)
var/datum/organ/external/O = organs[name]
if(!(O.status & ROBOT)) amount+= O.brute_dam
if(!(O.status & ORGAN_ROBOT)) amount+= O.brute_dam
return amount
/mob/living/carbon/monkey/adjustBruteLoss(var/amount, var/used_weapon = null)
@@ -1073,7 +1073,7 @@
var/amount = 0.0
for(var/name in organs)
var/datum/organ/external/O = organs[name]
if(!(O.status & ROBOT)) amount+= O.burn_dam
if(!(O.status & ORGAN_ROBOT)) amount+= O.burn_dam
return amount
/mob/living/carbon/monkey/adjustFireLoss(var/amount,var/used_weapon = null)

View File

@@ -22,11 +22,11 @@
var/mob/living/carbon/human/M = src
for(var/name in M.organs)
var/datum/organ/external/organ = M.organs[name]
if((organ.status & DESTROYED) && !organ.amputated)
if((organ.status & ORGAN_DESTROYED) && !organ.amputated)
src.traumatic_shock += 60
else if(organ.status & BROKEN || organ.open)
else if(organ.status & ORGAN_BROKEN || organ.open)
src.traumatic_shock += 30
if(organ.status & SPLINTED)
if(organ.status & ORGAN_SPLINTED)
src.traumatic_shock -= 20
if(src.traumatic_shock < 0)

View File

@@ -181,9 +181,9 @@
affecting = H.organs[A]
if(!istype(affecting, /datum/organ/external)) continue
affecting.heal_damage(1000, 1000) //fixes getting hit after ingestion, killing you when game updates organ health
affecting.status &= ~BROKEN
affecting.status &= ~SPLINTED
affecting.status &= ~DESTROYED
affecting.status &= ~ORGAN_BROKEN
affecting.status &= ~ORGAN_SPLINTED
affecting.status &= ~ORGAN_DESTROYED
del affecting.wound_descs
H.UpdateDamageIcon()
H.update_body()
@@ -209,13 +209,13 @@
var/datum/organ/external/e = H.organs[name]
e.brute_dam = 0.0
e.burn_dam = 0.0
e.status &= ~BANDAGED
e.status &= ~ORGAN_BANDAGED
e.max_damage = initial(e.max_damage)
e.status &= ~BLEEDING
e.status &= ~ORGAN_BLEEDING
e.open = 0
e.status &= ~BROKEN
e.status &= ~SPLINTED
e.status &= ~DESTROYED
e.status &= ~ORGAN_BROKEN
e.status &= ~ORGAN_SPLINTED
e.status &= ~ORGAN_DESTROYED
e.perma_injury = 0
e.update_icon()
del e.wound_descs

View File

@@ -687,7 +687,7 @@
if(H.health - H.halloss <= config.health_threshold_crit)
for(var/name in H.organs)
var/datum/organ/external/e = H.organs[name]
if((H.lying) && ((e.status & BROKEN && !(e.status & SPLINTED)) || e.status & BLEEDING) && (H.getBruteLoss() + H.getFireLoss() >= 100))
if((H.lying) && ((e.status & ORGAN_BROKEN && !(e.status & ORGAN_SPLINTED)) || e.status & ORGAN_BLEEDING) && (H.getBruteLoss() + H.getFireLoss() >= 100))
return 1
break
return 0
@@ -713,12 +713,12 @@
if(ishuman(usr))
if(usr.hand) // if he's using his left hand.
var/datum/organ/external/temp = usr:get_organ("l_hand")
if(temp.status & DESTROYED)
if(temp.status & ORGAN_DESTROYED)
usr << "\blue You look at your stump."
return
else
var/datum/organ/external/temp = usr:get_organ("r_hand")
if(temp.status & DESTROYED)
if(temp.status & ORGAN_DESTROYED)
usr << "\blue You look at your stump."
return

View File

@@ -1233,10 +1233,10 @@ datum/preferences
var/status = organ_data[name]
if(status == "amputated")
O.amputated = 1
O.status |= DESTROYED
O.status |= ORGAN_DESTROYED
O.destspawn = 1
else if(status == "cyborg")
O.status |= ROBOT
O.status |= ORGAN_ROBOT
switch(UI_style)
if("Midnight")

View File

@@ -13,10 +13,10 @@ datum/skill/var
var/global/list/SKILLS = null
var/list/SKILL_ENGINEER = list("field" = "Engineering", "EVA" = SKILL_BASIC, "construction" = SKILL_ADEPT, "electrical" = SKILL_BASIC, "engines" = SKILL_ADEPT)
var/list/SKILL_ROBOTICIST = list("field" = "Science", "devices" = SKILL_ADEPT, "electrical" = SKILL_BASIC, "computer" = SKILL_ADEPT, "anatomy" = SKILL_BASIC)
var/list/SKILL_ORGAN_ROBOTICIST = list("field" = "Science", "devices" = SKILL_ADEPT, "electrical" = SKILL_BASIC, "computer" = SKILL_ADEPT, "anatomy" = SKILL_BASIC)
var/list/SKILL_SECURITY_OFFICER = list("field" = "Security", "combat" = SKILL_BASIC, "weapons" = SKILL_ADEPT, "law" = SKILL_ADEPT, "forensics" = SKILL_BASIC)
var/list/SKILL_CHEMIST = list("field" = "Science", "chemistry" = SKILL_ADEPT, "science" = SKILL_ADEPT, "medical" = SKILL_BASIC, "devices" = SKILL_BASIC)
var/global/list/SKILL_PRE = list("Engineer" = SKILL_ENGINEER, "Roboticist" = SKILL_ROBOTICIST, "Security Officer" = SKILL_SECURITY_OFFICER, "Chemist" = SKILL_CHEMIST)
var/global/list/SKILL_PRE = list("Engineer" = SKILL_ENGINEER, "Roboticist" = SKILL_ORGAN_ROBOTICIST, "Security Officer" = SKILL_SECURITY_OFFICER, "Chemist" = SKILL_CHEMIST)
datum/skill/management
ID = "management"

View File

@@ -121,26 +121,26 @@ var/list/wound_progressions = list(
proc/take_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list())
if((brute <= 0) && (burn <= 0))
return 0
if(status & DESTROYED)
if(status & ORGAN_DESTROYED)
return 0
if(status & ROBOT)
if(status & ORGAN_ROBOT)
brute *= 0.66 //~2/3 damage for ROBOLIMBS
burn *= 0.66 //~2/3 damage for ROBOLIMBS
if(owner && !(status & ROBOT))
if(owner && !(status & ORGAN_ROBOT))
owner.pain(display_name, (brute+burn)*3, 1, burn > brute)
if(sharp)
var/nux = brute * rand(10,15)
if(brute_dam >= max_damage)
if(prob(5 * brute))
status |= DESTROYED
status |= ORGAN_DESTROYED
droplimb()
return
else if(prob(nux))
createwound( CUT, brute )
if(!(status & ROBOT))
if(!(status & ORGAN_ROBOT))
owner << "You feel something wet on your [display_name]"
if((brute_dam + burn_dam + brute + burn) < max_damage)
@@ -172,7 +172,7 @@ var/list/wound_progressions = list(
burn = can_inflict
burn_dam += burn
createwound(max(1,min(6,round(burn/10) + rand(0,1))),2,burn)
else if(!(status & ROBOT))
else if(!(status & ORGAN_ROBOT))
var/passed_dam = (brute + burn) - can_inflict //Getting how much overdamage we have.
var/list/datum/organ/external/possible_points = list()
if(parent)
@@ -193,7 +193,7 @@ var/list/wound_progressions = list(
droplimb(1) //Robot limbs just kinda fail at full damage.
if(status & BROKEN)
if(status & ORGAN_BROKEN)
owner.emote("scream")
if(used_weapon) add_wound(used_weapon, brute + burn)
@@ -205,7 +205,7 @@ var/list/wound_progressions = list(
proc/heal_damage(brute, burn, internal = 0, robo_repair = 0)
if(status & ROBOT && !robo_repair)
if(status & ORGAN_ROBOT && !robo_repair)
return
// var/brute_to_heal = 0
// var/brute_wounds = list()
@@ -217,7 +217,7 @@ var/list/wound_progressions = list(
burn_dam = max(0, burn_dam-burn)
if(internal)
status &= ~BROKEN
status &= ~ORGAN_BROKEN
perma_injury = 0
// if all damage is healed, replace the wounds with scars
if(brute_dam + burn_dam == 0)
@@ -255,23 +255,23 @@ var/list/wound_progressions = list(
process()
if(next_wound_update && world.time > next_wound_update)
update_wounds()
if(status & DESTROYED)
if(status & ORGAN_DESTROYED)
if(!destspawn)
droplimb()
return
if(!(status & BROKEN))
if(!(status & ORGAN_BROKEN))
perma_dmg = 0
if(parent)
if(parent.status & DESTROYED)
status |= DESTROYED
if(parent.status & ORGAN_DESTROYED)
status |= ORGAN_DESTROYED
owner:update_body()
return
if(brute_dam > min_broken_damage && !(status & ROBOT))
if(!(status & BROKEN))
if(brute_dam > min_broken_damage && !(status & ORGAN_ROBOT))
if(!(status & ORGAN_BROKEN))
//owner.unlock_medal("Broke Yarrr Bones!", 0, "Break a bone.", "easy")
owner.visible_message("\red You hear a loud cracking sound coming from \the [owner].","\red <b>Something feels like it shattered in your [display_name]!</b>","You hear a sickening crack.")
owner.emote("scream")
status |= BROKEN
status |= ORGAN_BROKEN
broken_description = pick("broken","fracture","hairline fracture")
perma_injury = brute_dam
return
@@ -314,17 +314,17 @@ var/list/wound_progressions = list(
proc/droplimb(var/override = 0,var/no_explode = 0)
if(override)
status |= DESTROYED
if(status & DESTROYED)
if(status & SPLINTED)
status &= ~SPLINTED
status |= ORGAN_DESTROYED
if(status & ORGAN_DESTROYED)
if(status & ORGAN_SPLINTED)
status &= ~ORGAN_SPLINTED
if(implant)
for(var/implants in implant)
del(implants)
//owner.unlock_medal("Lost something?", 0, "Lose a limb.", "easy")
for(var/datum/organ/external/I in children)
if(I && !(I.status & DESTROYED))
if(I && !(I.status & ORGAN_DESTROYED))
I.droplimb(1,1)
var/obj/item/weapon/organ/H
switch(body_part)
@@ -390,7 +390,7 @@ var/list/wound_progressions = list(
var/lol = pick(cardinal)
step(H,lol)
destspawn = 1
if(status & ROBOT)
if(status & ORGAN_ROBOT)
owner.visible_message("\red \The [owner]'s [display_name] explodes violently!",\
"\red <b>Your [display_name] explodes!</b>",\
"You hear an explosion followed by a scream!")
@@ -416,7 +416,7 @@ var/list/wound_progressions = list(
var/size = min( max( 1, damage/10 ) , 6)
switch(type)
if(CUT)
src.status |= BLEEDING
src.status |= ORGAN_BLEEDING
var/list/size_names = list("cut", "deep cut", "flesh wound", "gaping wound", "big gaping wound", "massive wound")
wound_name = size_names[size]
if(wound_descs["[update_time]"])
@@ -469,7 +469,7 @@ var/list/wound_progressions = list(
next_wound_update = 0
proc/emp_act(severity)
if(!(status & ROBOT))
if(!(status & ORGAN_ROBOT))
return
if(prob(30*severity))
take_damage(4(4-severity), 0, 1, used_weapon = "EMP")

View File

@@ -457,7 +457,7 @@
/obj/item/weapon/cable_coil/attack(mob/M as mob, mob/user as mob)
if(hasorgans(M))
var/datum/organ/external/S = M:organs[user.zone_sel.selecting]
if(!(S.status & ROBOT) || user.a_intent != "help")
if(!(S.status & ORGAN_ROBOT) || user.a_intent != "help")
return ..()
if(S.burn_dam > 0)
S.heal_damage(0,15,0,1)

View File

@@ -465,12 +465,12 @@ var/list/liftable_structures = list(\
/////////////////
//ORGAN DEFINES//
/////////////////
#define CUT_AWAY 1
#define GAUZED 2
#define ATTACHABLE 4
#define BLEEDING 8
#define BANDAGED 16
#define BROKEN 32
#define DESTROYED 64
#define ROBOT 128
#define SPLINTED 256
#define ORGAN_CUT_AWAY 1
#define ORGAN_GAUZED 2
#define ORGAN_ATTACHABLE 4
#define ORGAN_BLEEDING 8
#define ORGAN_BANDAGED 16
#define ORGAN_BROKEN 32
#define ORGAN_DESTROYED 64
#define ORGAN_ROBOT 128
#define ORGAN_SPLINTED 256