From 62c3d1d11dc6054649982902e248b3f77ec5ba50 Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Sat, 23 Jun 2012 16:35:25 -0700 Subject: [PATCH 1/5] De-retarded wound system. --- .../Cael_Aislinn/Tajara/tajaran.dm | 38 +- code/WorkInProgress/virus2/base.dm | 6 +- code/game/machinery/adv_med.dm | 8 +- code/game/magic/cultist/runes.dm | 2 +- code/game/objects/devices/scanners.dm | 4 +- code/game/objects/items.dm | 2 +- code/game/objects/items/item.dm | 12 +- .../items/weapons/implants/implanter.dm | 2 +- code/game/objects/items/weapons/medical.dm | 212 ++++----- .../items/weapons/surgery_limbattachment.dm | 19 +- .../objects/items/weapons/surgery_tools.dm | 132 +++--- .../game/objects/items/weapons/tiles_wires.dm | 2 +- code/game/objects/items/weapons/tools.dm | 4 +- code/game/objects/stacks/glass.dm | 2 +- code/game/objects/uplinks.dm | 2 +- code/game/objects/weapons.dm | 8 +- code/modules/mob/living/carbon/carbon.dm | 12 +- .../mob/living/carbon/human/examine.dm | 232 ++------- code/modules/mob/living/carbon/human/human.dm | 45 +- .../mob/living/carbon/human/human_damage.dm | 4 +- .../mob/living/carbon/human/human_defense.dm | 4 +- code/modules/mob/living/carbon/human/life.dm | 24 +- .../mob/living/carbon/monkey/examine.dm | 248 +++------- code/modules/mob/living/carbon/monkey/life.dm | 2 +- .../mob/living/carbon/monkey/monkey.dm | 14 +- code/modules/mob/living/carbon/shock.dm | 4 +- code/modules/mob/living/living.dm | 20 +- code/modules/mob/mob.dm | 4 +- code/modules/mob/organ/organ.dm | 444 +++++++----------- code/modules/power/antimatter/computer.dm | 7 +- code/modules/research/artifact_effect.dm | 3 - code/setup.dm | 15 +- 32 files changed, 558 insertions(+), 979 deletions(-) diff --git a/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dm b/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dm index 048aadd1657..09ec5eb3aa8 100644 --- a/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dm +++ b/code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dm @@ -192,29 +192,29 @@ // Gloves var/datum/organ/external/lo = organs["l_hand"] var/datum/organ/external/ro = organs["r_hand"] - if (!lo.destroyed || !ro.destroyed) + if (!(lo.status & DESTROYED && ro.status & DESTROYED)) if (gloves) var/t1 = gloves.item_state if (!t1) t1 = gloves.icon_state var/icon/gloves_icon = new /icon("icon" = 'hands.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2"))) - if(lo.destroyed) + if(lo.status & DESTROYED) gloves_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY) - else if(ro.destroyed) + else if(ro.status & DESTROYED) gloves_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY) overlays += image(gloves_icon, "layer" = MOB_LAYER) if (gloves.blood_DNA) var/icon/stain_icon = icon('blood.dmi', "bloodyhands[!lying ? "" : "2"]") - if(lo.destroyed) + if(lo.status & DESTROYED) stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY) - else if(ro.destroyed) + else if(ro.status & DESTROYED) stain_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY) overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) else if (blood_DNA) var/icon/stain_icon = icon('blood.dmi', "bloodyhands[!lying ? "" : "2"]") - if(lo.destroyed) + if(lo.status & DESTROYED) stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY) - else if(ro.destroyed) + else if(ro.status & 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.destroyed || !ro.destroyed) && shoes) + if (!(lo.status & DESTROYED && ro.status & 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.destroyed && !lying) + if(lo.status & DESTROYED && !lying) shoes_icon.Blend(new /icon('limb_mask.dmi', "right[lying?"_l":""]"), ICON_MULTIPLY) - else if(ro.destroyed && !lying) + else if(ro.status & DESTROYED && !lying) shoes_icon.Blend(new /icon('limb_mask.dmi', "left[lying?"_l":""]"), ICON_MULTIPLY) overlays += image(shoes_icon, "layer" = MOB_LAYER) if (shoes.blood_DNA) var/icon/stain_icon = icon('blood.dmi', "shoesblood[!lying ? "" : "2"]") - if(lo.destroyed) + if(lo.status & DESTROYED) stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY) - else if(ro.destroyed) + else if(ro.status & 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.destroyed) + if(!(head.status & 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.destroyed) + if(!(head.status & 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.destroyed) + && !(part.status & DESTROYED)) var/icon/temp = new /icon('tajaran.dmi', "[part.icon_name]_s") - if(part.robot) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0)) + if(part.status & 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.robot) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0)) + if(part.status & 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.destroyed) + && (part.status & 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.destroyed) + if(head.status & DESTROYED) del(face_standing) del(face_lying) return diff --git a/code/WorkInProgress/virus2/base.dm b/code/WorkInProgress/virus2/base.dm index 01cadec2aa3..b9f1303cd48 100644 --- a/code/WorkInProgress/virus2/base.dm +++ b/code/WorkInProgress/virus2/base.dm @@ -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.broken && !organ.robot) + if(!(organ.status & BROKEN) && !(organ.status & ROBOT)) mob.adjustBruteLoss(10) mob.visible_message("\red You hear a loud cracking sound coming from [mob.name].","\red Something feels like it shattered in your [organ.display_name]!","You hear a sickening crack.") mob.emote("scream") - organ.broken = 1 - organ.wound = pick("broken","fracture","hairline fracture") //Randomise in future. Edit: Randomized. --SkyMarshal + organ.status |= BROKEN + organ.broken_description = pick("broken","fracture","hairline fracture") //Randomise in future. Edit: Randomized. --SkyMarshal organ.perma_injury = 10 diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index e366238992a..cef719c3c2e 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -247,17 +247,17 @@ var/infected = "" var/imp = "" var/bled = "" - if(e.bleeding) + if(e.status & BLEEDING) bled = "Bleeding:" - if(e.broken) - AN = "[e.wound]:" + if(e.status & BROKEN) + AN = "[e.broken_description]:" if(e.open) open = "OPEN:" if(e.implant && e.implant.len) imp = "IMPLANT:" if(!AN && !open && !infected & !imp) AN = "None" - if(!e.destroyed) + if(!e.status & DESTROYED) dat += "[e.display_name][e.burn_dam][e.brute_dam][bled][AN][open][infected][imp]" else dat += "[e.display_name]--Not Found" diff --git a/code/game/magic/cultist/runes.dm b/code/game/magic/cultist/runes.dm index 0727bf111e4..e4c0d452fa6 100644 --- a/code/game/magic/cultist/runes.dm +++ b/code/game/magic/cultist/runes.dm @@ -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.robot = 0 + affecting.status &= ~ROBOT affecting.heal_damage(1000, 1000) corpse_to_raise.setToxLoss(0) corpse_to_raise.setOxyLoss(0) diff --git a/code/game/objects/devices/scanners.dm b/code/game/objects/devices/scanners.dm index 4d2a52722d3..a7566c5e44c 100644 --- a/code/game/objects/devices/scanners.dm +++ b/code/game/objects/devices/scanners.dm @@ -119,8 +119,8 @@ MASS SPECTROMETER var/mob/living/carbon/human/H = M for(var/name in H.organs) var/datum/organ/external/e = H.organs[name] - if(e.broken) - user.show_message(text("\red Bone fractures detected. Advanced scanner required for location."), 1) + if(e.status & BROKEN) + user.show_message("\red Bone fractures detected. Advanced scanner required for location.", 1) break if(ishuman(M)) if(M:vessel) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index b4287def0a7..1a6b101e08c 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -398,7 +398,7 @@ return var/datum/organ/external/head = H.organs["head"] - if(head.destroyed) + if(head.status & DESTROYED) user << "\blue Put it where? There's no head." //since these people will be dead M != usr diff --git a/code/game/objects/items/item.dm b/code/game/objects/items/item.dm index 682cfae67d3..62f8b9e3180 100755 --- a/code/game/objects/items/item.dm +++ b/code/game/objects/items/item.dm @@ -97,13 +97,13 @@ if (user.hand) if(ishuman(user)) var/datum/organ/external/temp = user:organs["l_hand"] - if(temp.destroyed) + if(temp.status & DESTROYED) user << "\blue Yo- wait a minute." return else if(ishuman(user)) var/datum/organ/external/temp = user:organs["r_hand"] - if(temp.destroyed) + if(temp.status & 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.destroyed) + if(!(temp.status & 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.destroyed) + if(!(temp.status & 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.destroyed) + if(temp.status & DESTROYED) user << "\blue Yo- wait a minute." return else if(ismonkey(user)) var/datum/organ/external/temp = user:organs["r_hand"] - if(temp.destroyed) + if(temp.status & DESTROYED) user << "\blue Yo- wait a minute." if (istype(src.loc, /obj/item/weapon/storage)) diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm index 167e3e4d989..f2191d9980d 100644 --- a/code/game/objects/items/weapons/implants/implanter.dm +++ b/code/game/objects/items/weapons/implants/implanter.dm @@ -31,7 +31,7 @@ return if(hasorgans(M)) var/datum/organ/external/target = M:get_organ(check_zone(user.zone_sel.selecting)) - if(target.destroyed) + if(target.status & DESTROYED) user << "What [target.display_name]?" return target.implant += imp diff --git a/code/game/objects/items/weapons/medical.dm b/code/game/objects/items/weapons/medical.dm index 09996aa6216..1abb9f9bb81 100644 --- a/code/game/objects/items/weapons/medical.dm +++ b/code/game/objects/items/weapons/medical.dm @@ -8,8 +8,22 @@ MEDICAL /obj/item/stack/medical/attack(mob/living/carbon/M as mob, mob/user as mob) if (M.stat == 2) - user << "\red \The [M] is dead, you cannot help [M.get_gender_form("it")]!" + var/t_him = "it" + if (M.gender == MALE) + t_him = "him" + else if (M.gender == FEMALE) + t_him = "her" + user << "\red \The [M] is dead, you cannot help [t_him]!" return + if (M.health < 50) + var/t_him = "it" + if (M.gender == MALE) + t_him = "him" + else if (M.gender == FEMALE) + t_him = "her" + user << "\red \The [M] is wounded badly, this item cannot help [t_him]!" + return + if (!istype(M)) user << "\red \The [src] cannot be applied to \the [M]!" @@ -21,113 +35,64 @@ MEDICAL user << "\red You don't have the dexterity to do this!" return 1 - - - var/stoppedblood = 0 - if(hasorgans(M)) - var/datum/organ/external/affecting = M:get_organ("chest") + if (istype(M, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = M + var/datum/organ/external/affecting = H.get_organ("chest") if(istype(user, /mob/living/carbon/human)) var/mob/living/carbon/human/user2 = user - affecting = M:get_organ(check_zone(user2.zone_sel.selecting)) + affecting = H.get_organ(check_zone(user2.zone_sel.selecting)) else - if(!istype(affecting, /datum/organ/external) || affecting:burn_dam <= 0) - affecting = M:get_organ("head") - if(affecting.destroyed && !affecting.gauzed) - user.visible_message("\red \The [user] does [user.get_gender_form("its")] best to stem \the [M]'s bleeding from [M.get_gender_form("its")] stump.", "\red You do your best to stop the bleeding from \the [M]'s stump.", "\red You hear something like gauze being ripped.") - affecting.gauzed = 1 + if(!istype(affecting, /datum/organ/external)) + affecting = H.get_organ("head") + + if (affecting.heal_damage(src.heal_brute, src.heal_burn)) + H.UpdateDamageIcon() + if (user) + if (M != user) + user.visible_message("\red \The [H]'s [affecting.display_name] has been bandaged with \a [src] by \the [user].",\ + "\red You bandage \the [H]'s [affecting.display_name] with \the [src].",\ + "You hear gauze being ripped.") + else + var/t_his = "its" + if (user.gender == MALE) + t_his = "his" + else if (user.gender == FEMALE) + t_his = "her" + user.visible_message("\red \The [user] bandages [t_his] [affecting.display_name] with \a [src].",\ + "\red You bandage your [affecting.display_name] with \the [src].",\ + "You hear gauze being ripped.") use(1) - return + else + user << "Nothing to patch up!" - if(affecting.robot) - user << "Medical equipment for a robot arm? Better get a welder..." - return - - for(var/datum/organ/wound/W in affecting.wounds) - if(W.bleeding || !W.is_healing) - if(heal_brute && W.wound_type == 2) - continue - if(heal_burn && W.wound_type < 2) - continue - if(W.wound_size > 3 && (W.bleeding || !W.is_healing)) - if(stoppedblood) - stoppedblood += 1 - break - W.bleeding = 0 - W.is_healing = 1 - stoppedblood = 1 - else if(W.wound_size <= 3) - if(stoppedblood) - stoppedblood += 1 - break - W.stopbleeding() - stoppedblood = 1 - - if (user && stoppedblood) - if (M != user) - user.visible_message("\red \The [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] \the [M]'s cuts with \the [src].", "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] \the [M]'s [heal_burn? "burns" : "wounds"].", "\red You hear something like gauze being ripped.") - else - user.visible_message("\red \The [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] [user.get_gender_form("its")] own cuts with \the [src].", "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] your [heal_burn? "burns" : "wounds"].", "\red You hear something like gauze being ripped.") - else if(user) - user << "\red Nothing to patch up!" - return + M.updatehealth() else M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2)) - use(1) - -// if (M.health < 50 && !stoppedblood) -// var/t_him = "it" -// if (M.gender == MALE) -// t_him = "him" -// else if (M.gender == FEMALE) -// t_him = "her" -// user << "\red \The [M] is wounded badly, this item cannot help [t_him]!" -// return - -// if (user) -// if (M != user) -// user.visible_message( \ -// "\blue [M] has been applied with [src] by [user].", \ -// "\blue You apply \the [src] to [M]." \ -// ) -// else -// var/t_himself = "itself" -// if (user.gender == MALE) -// t_himself = "himself" -// else if (user.gender == FEMALE) -// t_himself = "herself" - -// user.visible_message( \ -// "\blue [M] applied [src] on [t_himself].", \ -// "\blue You apply \the [src] on yourself." \ -// ) - -// if (istype(M, /mob/living/carbon/human)) -// var/mob/living/carbon/human/H = M -// var/datum/organ/external/affecting = H.get_organ("chest") - -// if(istype(user, /mob/living/carbon/human)) -// var/mob/living/carbon/human/user2 = user -// affecting = H.get_organ(check_zone(user2.zone_sel.selecting)) -// else -// if(!istype(affecting, /datum/organ/external) || affecting:burn_dam <= 0) -// affecting = H.get_organ("head") -// -// if (affecting.heal_damage(src.heal_brute, src.heal_burn)) -// H.UpdateDamageIcon() -// M.updatehealth() - - - + use(1) /obj/item/stack/medical/advanced/attack(mob/living/carbon/M as mob, mob/user as mob) if (M.stat == 2) - user << "\red \The [M] is dead, you cannot help [M.get_gender_form("it")]!" + var/t_him = "it" + if (M.gender == MALE) + t_him = "him" + else if (M.gender == FEMALE) + t_him = "her" + user << "\red \The [M] is dead, you cannot help [t_him]!" + return + if (M.health < 0) + var/t_him = "it" + if (M.gender == MALE) + t_him = "him" + else if (M.gender == FEMALE) + t_him = "her" + user << "\red \The [M] is wounded badly, this item cannot help [t_him]!" return + if (!istype(M)) - user << "\red \The [src] cannot be applied to \the [M]!" + user << "\red \The [src] cannot be applied to [M]!" return 1 if ( ! (istype(user, /mob/living/carbon/human) || \ @@ -136,50 +101,37 @@ MEDICAL user << "\red You don't have the dexterity to do this!" return 1 - var/stoppedblood = 0 - if(hasorgans(M)) - var/datum/organ/external/affecting = M:get_organ("chest") + if (istype(M, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = M + var/datum/organ/external/affecting = H.get_organ("chest") if(istype(user, /mob/living/carbon/human)) var/mob/living/carbon/human/user2 = user - affecting = M:get_organ(check_zone(user2.zone_sel.selecting)) + affecting = H.get_organ(check_zone(user2.zone_sel.selecting)) else if(!istype(affecting, /datum/organ/external) || affecting:burn_dam <= 0) - affecting = M:get_organ("head") - if(affecting.destroyed && !affecting.gauzed) - M.visible_message("\red \The [user] does their best to stem \the [M]'s bleeding from [M.get_gender_form("its")] stump.", "\red You do your best to stop the bleeding from \the [M]'s stump.", "\red You hear something like gauze being ripped.") - affecting.gauzed = 1 + affecting = H.get_organ("head") + + if (affecting.heal_damage(src.heal_brute, src.heal_burn)) + H.UpdateDamageIcon() + if (user) + if (M != user) + user.visible_message("\red \The [H]'s [affecting.display_name] has been bandaged with \a [src] by \the [user].",\ + "\red You bandage \the [H]'s [affecting.display_name] with \the [src].",\ + "You hear gauze being ripped.") + else + var/t_his = "its" + if (user.gender == MALE) + t_his = "his" + else if (user.gender == FEMALE) + t_his = "her" + user.visible_message("\red \The [user] bandages [t_his] [affecting.display_name] with \a [src].",\ + "\red You bandage your [affecting.display_name] with \the [src].",\ + "You hear gauze being ripped.") use(1) - return - if(affecting.robot) - user << "Medical equipment for a robot arm? Better get a welder..." - return - for(var/datum/organ/wound/W in affecting.wounds) - if(W.bleeding || !W.healing_state) - if(heal_brute && W.wound_type == 2) - continue - if(heal_burn && W.wound_type < 2) - continue - if(stoppedblood) - stoppedblood++ - break - W.stopbleeding() - stoppedblood = 1 - - if (user && stoppedblood) - if (M != user) - user.visible_message("\red \The [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] \the [M]'s cuts with \the [src].",\ - "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] \the [M]'s [heal_burn? "burns" : "wounds"].",\ - "\red You hear something like gauze being ripped.") - else - user.visible_message("\red \The [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] [user.get_gender_form("its")] own cuts with \the [src].",\ - "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] your [heal_burn? "burns" : "wounds"].",\ - "\red You hear something like gauze being ripped.") - else if(user) - user << "\red Nothing to patch up!" - return + M.updatehealth() else M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2)) - use(1) \ No newline at end of file + use(1) \ No newline at end of file diff --git a/code/game/objects/items/weapons/surgery_limbattachment.dm b/code/game/objects/items/weapons/surgery_limbattachment.dm index d84350109a6..6d7ea982eee 100644 --- a/code/game/objects/items/weapons/surgery_limbattachment.dm +++ b/code/game/objects/items/weapons/surgery_limbattachment.dm @@ -23,9 +23,9 @@ return ..() var/mob/living/carbon/human/H = M - var/datum/organ/external/S = H.organs[user.zone_sel.selecting] - if(S.destroyed) - if(!S.attachable) + var/datum/organ/external/S = H.organs[limbloc] + if(S.status & DESTROYED) + if(!(S.status & ATTACHABLE)) user << "\red The wound is not ready for a replacement!" return 0 if(M != user) @@ -51,15 +51,10 @@ user << "\red You mess up!" S.take_damage(15) - S.broken = 0 - S.attachable = 0 - S.destroyed = 0 - S.robot = 1 - var/datum/organ/external/T = H.organs["[limbloc]"] - T.attachable = 0 - T.destroyed = 0 - T.broken = 0 - T.robot = 1 + S.status &= ~BROKEN + S.status &= ~ATTACHABLE + S.status &= ~DESTROYED + S.status |= ROBOT M.update_body() M.updatehealth() M.UpdateDamageIcon() diff --git a/code/game/objects/items/weapons/surgery_tools.dm b/code/game/objects/items/weapons/surgery_tools.dm index f6096afa797..a9a6e66f154 100644 --- a/code/game/objects/items/weapons/surgery_tools.dm +++ b/code/game/objects/items/weapons/surgery_tools.dm @@ -24,11 +24,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.destroyed) - if(S.bleeding) + if(S.status & DESTROYED) + if(S.status & BLEEDING) user << "\red There's too much blood here!" return 0 - if(!S.cutaway) + if(!(S.status & CUT_AWAY)) user << "\red The flesh hasn't been cleanly cut!" return 0 if(M != user) @@ -245,17 +245,17 @@ CIRCULAR SAW if(!S || !istype(S)) return 0 - if(S.destroyed) + if(S.status & DESTROYED) return ..() - if(S.robot) + if(S.status & 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.bleeding) + if(S.status & BLEEDING) user << "\red [H] is profusely bleeding in \his [S.display_name]!" return 0 @@ -303,11 +303,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.destroyed) - if(!S.bleeding) + if(S.status & DESTROYED) + if(!(S.status & BLEEDING)) user << "\red There is nothing bleeding here!" return 0 - if(!S.cutaway) + if(!(S.status & CUT_AWAY)) user << "\red The flesh hasn't been cleanly cut!" return 0 if(M != user) @@ -333,7 +333,7 @@ CIRCULAR SAW user << "\red You mess up!" S.take_damage(15) - S.bleeding = 0 + S.status &= ~BLEEDING M.updatehealth() M.UpdateDamageIcon() @@ -559,10 +559,10 @@ CIRCULAR SAW if(!S || !istype(S)) return 0 - if(S.destroyed) + if(S.status & DESTROYED) return ..() - if(S.robot) + if(S.status & ROBOT) user << "Medical equipment for a robot arm? How would that do any good?" return @@ -570,7 +570,7 @@ CIRCULAR SAW user << "\red There is skin in the way!" return 0 - if(!S.bleeding) + if(!(S.status & BLEEDING)) if(S.implant) if(H != user) H.visible_message( \ @@ -581,17 +581,18 @@ CIRCULAR SAW "\red [user] attempts to remove the implant in \his [S.display_name] with \the [src]!", \ "\red You attempt to remove the implant in your [S.display_name] with \the [src]!") - if(do_mob(user, H, 50)) - if(prob(50)) - if(H != user) - H.visible_message( \ - "\red [user] successfully removes the implant in [H]'s [S.display_name] with \the [src]!", \ - "\red [user] successfully removes the implant in your [S.display_name] with \the [src]!") - else - H.visible_message( \ - "\red [user] successfully removes the implant in \his [S.display_name] with \the [src]!", \ - "\red You successfully remove the implant in your [S.display_name] with \the [src]!") - for(var/obj/item/weapon/implant/implant in S.implant) + do + if(do_mob(user, H, 50)) + if(prob(50)) + if(H != user) + H.visible_message( \ + "\red [user] successfully removes the implant in [H]'s [S.display_name] with \a [src]!", \ + "\red [user] successfully removes the implant in your [S.display_name] with \the [src]!") + else + H.visible_message( \ + "\red [user] successfully removes the implant in \his [S.display_name] with \a [src]!", \ + "\red You successfully remove the implant in your [S.display_name] with \the [src]!") + var/obj/item/weapon/implant/implant = pick(S.implant) implant.loc = (get_turf(H)) implant.implanted = 0 S.implant.Remove(implant) @@ -599,15 +600,15 @@ CIRCULAR SAW if(istype(implant, /obj/item/weapon/implant/explosive) || istype(implant, /obj/item/weapon/implant/uplink) || istype(implant, /obj/item/weapon/implant/dexplosive) || istype(implant, /obj/item/weapon/implant/explosive) || istype(implant, /obj/item/weapon/implant/compressed)) usr << "The implant disintegrates into nothing..." del(implant) - else - if(H != user) - H.visible_message( \ - "\red [user] fails to removes the implant!", \ - "\red [user] fails to removes the implant!") + if(!S.implant.len) + del S.implant else H.visible_message( \ - "\red [user] fails to removes the implant!", \ - "\red You fail to removes the implant!") + "\red [user] fails to remove the implant!", \ + "\red You fail to remove the implant!") + else + break + while (S.implant && S.implant.len) return 1 else @@ -637,7 +638,7 @@ CIRCULAR SAW user << "\red You mess up!" S.take_damage(15) - S.bleeding = 0 + S.status &= ~BLEEDING H.updatehealth() H.UpdateDamageIcon() @@ -813,7 +814,7 @@ CIRCULAR SAW if(!S.open) usr << "You have to cut the limb open first!" return - if(S.robot) + if(S.status & ROBOT) user << "Medical equipment for a robot arm? How would that do any good?" return for(var/mob/O in viewers(M)) @@ -837,11 +838,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.destroyed) - if(S.bleeding) + if(S.status & DESTROYED) + if(S.status & BLEEDING) user << "\red There's too much blood here!" return 0 - if(!S.cutaway) + if(!(S.status & CUT_AWAY)) user << "\red The flesh hasn't been cleanly cut!" return 0 if(S.open != 3) @@ -872,7 +873,7 @@ CIRCULAR SAW S.open = 0 S.stage = 0 - S.attachable = 1 + S.status |= ATTACHABLE M.updatehealth() M.UpdateDamageIcon() @@ -1028,10 +1029,10 @@ CIRCULAR SAW if(!S || !istype(S)) return 0 - if(S.destroyed) + if(S.status & DESTROYED) user << "What [S.display_name]?" - if(S.robot) + if(S.status & ROBOT) user << "Medical equipment for a robot arm? How would that do any good..." return if(!S.open) @@ -1096,7 +1097,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.destroyed) + if(S.status & 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].", \ @@ -1116,8 +1117,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.cutaway = 1 - S.bleeding = 1 + S.status |= BLEEDING|CUT_AWAY M.updatehealth() M.UpdateDamageIcon() else @@ -1190,7 +1190,7 @@ CIRCULAR SAW if(istype(H) && H.organs["head"]) var/datum/organ/external/affecting = H.organs["head"] - if(affecting.destroyed) + if(affecting.status & DESTROYED) return ..() if(istype(H) && ( \ @@ -1242,7 +1242,7 @@ CIRCULAR SAW if(istype(M, /mob/living/carbon/human)) var/datum/organ/external/affecting = M:get_organ("head") affecting.take_damage(7) - affecting.open = 1 + affecting.status |= OPEN else M.take_organ_damage(7) @@ -1420,10 +1420,10 @@ CIRCULAR SAW if(!S || !istype(S)) return 0 - if(S.destroyed) + if(S.status & DESTROYED) return ..() - if(S.robot) + if(S.status & ROBOT) user << "Medical equipment for a robot arm? How would that do any good..." return @@ -1454,8 +1454,7 @@ CIRCULAR SAW user << "\red You mess up!" S.take_damage(15) - S.open = 1 - S.bleeding = 1 + S.status |= OPEN|BLEEDING if(S.display_name == "chest") H:embryo_op_stage = 1.0 if(S.display_name == "groin") @@ -1467,14 +1466,13 @@ CIRCULAR SAW var/msg if(a == 1) msg = "\red [user]'s move slices open [H]'s wound, causing massive bleeding" - S.brute_dam += 35 - S.createwound(rand(1,3)) + S.take_damage(35, 0, 1, "Malpractice") else if(a == 2) msg = "\red [user]'s move slices open [H]'s wound, and causes \him to accidentally stab himself" - S.brute_dam += 35 + S.take_damage(35, 0, 1, "Malpractice") var/datum/organ/external/userorgan = user:organs["chest"] if(userorgan) - userorgan.brute_dam += 35 + userorgan.take_damage(35, 0, 1, "Malpractice") else user.take_organ_damage(35) else if(a == 3) @@ -1524,7 +1522,7 @@ CIRCULAR SAW if(!hasorgans(M)) return ..() var/datum/organ/external/S = M:organs["head"] - if(S.destroyed) + if(S.status & 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) @@ -1534,7 +1532,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.destroyed = 1 + S.status |= DESTROYED S.droplimb() M:update_body() if(1.0) @@ -1624,10 +1622,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.destroyed) + if(S.status & DESTROYED) return - if(S.robot) + if(S.status & 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) @@ -1688,32 +1686,32 @@ CIRCULAR SAW var/datum/organ/external/temp = M.organs[zone] var/msg - if(temp.destroyed) + if(temp.status & 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.bleeding = 0 + temp.status &= ~BLEEDING // quickly convert appendectomy to bone surgery if(zone == "groin" && M.appendix_op_stage == 3) M.appendix_op_stage = 0 temp.open = 2 - temp.bleeding = 0 + temp.status &= ~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.bleeding) - if(temp.wound in wound) + if(temp.open == 2 && !(temp.status & BLEEDING)) + if(temp.broken_description in wound) if(temp.stage in stage) temp.stage += 1 if(IsFinalStage(temp.stage)) - temp.broken = 0 + temp.status &= ~BROKEN temp.stage = 0 temp.perma_injury = 0 temp.brute_dam = temp.min_broken_damage -1 @@ -1811,16 +1809,16 @@ 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.destroyed) // this is nanites, not space magic + if(e.status & DESTROYED) // this is nanites, not space magic continue e.brute_dam = 0.0 e.burn_dam = 0.0 - e.bandaged = 0.0 + e.status &= ~BANDAGED e.max_damage = initial(e.max_damage) - e.bleeding = 0 + e.status &= ~BLEEDING e.open = 0 - e.broken = 0 - e.destroyed = 0 + e.status &= ~BROKEN + e.status &= ~DESTROYED e.perma_injury = 0 e.update_icon() H.update_body() diff --git a/code/game/objects/items/weapons/tiles_wires.dm b/code/game/objects/items/weapons/tiles_wires.dm index 3395f37d0c4..7d449f53a5f 100644 --- a/code/game/objects/items/weapons/tiles_wires.dm +++ b/code/game/objects/items/weapons/tiles_wires.dm @@ -28,7 +28,7 @@ TILES /obj/item/weapon/wire/attack(mob/M as mob, mob/user as mob) if(hasorgans(M)) var/datum/organ/external/S = M:organs[user.zone_sel.selecting] - if(!S.robot || user.a_intent != "help") + if(!(S.status & ROBOT) || user.a_intent != "help") return ..() if(S.brute_dam) S.heal_damage(0,15,0,1) diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 7783ce411d2..2a94be0cd52 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -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.robot || user.a_intent != "help") + if(!(S.status & 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 - ..() \ No newline at end of file + ..() diff --git a/code/game/objects/stacks/glass.dm b/code/game/objects/stacks/glass.dm index 88803375fc3..76d63e9d337 100644 --- a/code/game/objects/stacks/glass.dm +++ b/code/game/objects/stacks/glass.dm @@ -264,7 +264,7 @@ SHARDS var/mob/living/carbon/human/H = M if(!((H.shoes) || (H.wear_suit && H.wear_suit.body_parts_covered & FEET))) var/datum/organ/external/affecting = H.get_organ(pick("l_foot", "r_foot")) - if(affecting.robot) + if(affecting.status & ROBOT) return H.Weaken(3) affecting.take_damage(5, 0) diff --git a/code/game/objects/uplinks.dm b/code/game/objects/uplinks.dm index 95b897b3741..b9aa1276c51 100644 --- a/code/game/objects/uplinks.dm +++ b/code/game/objects/uplinks.dm @@ -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.destroyed = 1 + head.status |= DESTROYED spawn(2) head.droplimb() del(src.master) diff --git a/code/game/objects/weapons.dm b/code/game/objects/weapons.dm index 36137ab6cf2..c0d479c17cf 100644 --- a/code/game/objects/weapons.dm +++ b/code/game/objects/weapons.dm @@ -130,12 +130,14 @@ if("feet") if(!H.shoes) affecting = H.get_organ(pick("l_leg", "r_leg")) - if(!affecting.robot) H.Weaken(3) + if(!(affecting.status & ROBOT)) + H.Weaken(3) if("l_hand", "r_hand") if(!H.gloves) affecting = H.get_organ(type) - if(!affecting.robot) H.Stun(3) - if(affecting && !affecting.robot) + if(!(affecting.status & ROBOT)) + H.Stun(3) + if(affecting && !(affecting.status & ROBOT)) affecting.take_damage(1, 0) H.UpdateDamageIcon() H.updatehealth() diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 7c90d38b410..610c7579bad 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -49,13 +49,13 @@ if (M.hand) if(ishuman(M) || ismonkey(M)) var/datum/organ/external/temp = M:organs["l_hand"] - if(temp.destroyed) + if(temp.status & 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.destroyed) + if(temp.status & 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.destroyed) + if(temp.status & 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.destroyed) + if(temp.status & DESTROYED) M << "\red Yo- wait a minute." return @@ -224,7 +224,7 @@ status = "blugeoned" if(brutedamage > 40) status = "mangled" - if(org.bleeding && brutedamage) + if(org.status & 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.destroyed) + if(org.status & DESTROYED) status = "MISSING!" if(status == "") diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index a88f4b3c801..34c46f83752 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -239,17 +239,17 @@ if (src.digitalcamo) msg += "[t_He] [t_is] repulsively uncanny!\n" - var/list/wound_descriptions = list() var/list/wound_flavor_text = list() var/list/is_destroyed = list() + var/list/is_bleeding = list() for(var/named in organs) var/datum/organ/external/temp = organs[named] if(temp) - if(temp.destroyed) + if(temp.status & DESTROYED) is_destroyed["[temp.display_name]"] = 1 wound_flavor_text["[temp.display_name]"] = "[t_He] is missing [t_his] [temp.display_name].\n" continue - if(temp.robot) + if(temp.status & ROBOT) if(!(temp.brute_dam + temp.burn_dam)) wound_flavor_text["[temp.display_name]"] = "[t_He] has a robot [temp.display_name]!\n" continue @@ -268,192 +268,52 @@ if(21 to INFINITY) wound_flavor_text["[temp.display_name]"] += pick(" a lot of burns"," severe melting") wound_flavor_text["[temp.display_name]"] += "!\n" - else if(temp.wounds) - var/list/wounds = list(list(),list(),list(),list(),list(),list()) - for(var/datum/organ/wound/w in temp.wounds) - switch(w.healing_state) - if(0) - var/list/cut = wounds[1] - cut += w - wounds[1] = cut - if(1) - var/list/cut = wounds[2] - cut += w - wounds[2] = cut - if(2) - var/list/cut = wounds[3] - cut += w - wounds[3] = cut - if(3) - var/list/cut = wounds[4] - cut += w - wounds[4] = cut - if(4) - var/list/cut = wounds[5] - cut += w - wounds[5] = cut - if(5) - var/list/cut = wounds[6] - cut += w - wounds[6] = cut - wound_descriptions["[temp.display_name]"] = wounds - else - wound_flavor_text["[temp.display_name]"] = "" - //Now that we have a big list of all the wounds, on all the limbs. - var/list/is_bleeding = list() - for(var/named in wound_descriptions) - var/list/wound_states = wound_descriptions[named] - var/list/flavor_text = list() - for(var/i = 1, i <= 6, i++) - var/list/wound_state = wound_states[i] //All wounds at this level of healing. - var/list/tally = list("cut" = 0, "deep cut" = 0, "flesh wound" = 0, "gaping wound" = 0, "big gaping wound" = 0, "massive wound" = 0,\ - "tiny bruise" = 0, "small bruise" = 0, "moderate bruise" = 0, "large bruise" = 0, "huge bruise" = 0, "monumental bruise" = 0,\ - "small burn" = 0, "moderate burn" = 0, "large burn" = 0, "severe burn" = 0, "deep burn" = 0, "carbonised area" = 0) //How many wounds of what size. - for(var/datum/organ/wound/w in wound_state) - if(w.bleeding && !is_bleeding[named]) is_bleeding[named] = 1 - switch(w.wound_size) - if(1) - switch(w.wound_type) - if(0) - tally["cut"] += 1 - if(1) - tally["tiny bruise"] += 1 - if(2) - tally["small burn"] += 1 - if(2) - switch(w.wound_type) - if(0) - tally["deep cut"] += 1 - if(1) - tally["small bruise"] += 1 - if(2) - tally["moderate burn"] += 1 - if(3) - switch(w.wound_type) - if(0) - tally["flesh wound"] += 1 - if(1) - tally["moderate bruise"] += 1 - if(2) - tally["large burn"] += 1 - if(4) - switch(w.wound_type) - if(0) - tally["gaping wound"] += 1 - if(1) - tally["large bruise"] += 1 - if(2) - tally["severe burn"] += 1 - if(5) - switch(w.wound_type) - if(0) - tally["big gaping wound"] += 1 - if(1) - tally["huge bruise"] += 1 - if(2) - tally["deep burn"] += 1 - if(6) - switch(w.wound_type) - if(0) - tally["massive wound"] += 1 - if(1) - tally["monumental bruise"] += 1 - if(2) - tally["carbonised area"] += 1 - for(var/tallied in tally) - if(!tally[tallied]) - continue - //if(flavor_text_string && tally[tallied]) - // for( - // flavor_text_string += pick(list(", as well as", ", in addition to")) //add more later. - var/tallied_rename = list("cut" = "cut","deep cut" = "deep cut", "flesh wound" = "flesh wound",\ - "gaping wound" = "gaping wound", "big gaping wound" = "big gaping wound", "massive wound" = "massive wound",\ - "tiny bruise" = "tiny bruise", "small bruise" = "small bruise", "moderate bruise" = "moderate bruise",\ - "large bruise" = "large bruise", "huge bruise" = "huge bruise", "monumental bruise" = "monumental bruise",\ - "small burn" = "small burn", "moderate burn" = "moderate burn", "large burn" = "large burn",\ - "severe burn" = "severe burn", "deep burn" = "deep burn", "carbonised area" = "carbonised area") - switch(i) - if(2) //Healing wounds. - if(tallied in list("cut","small burn")) + else if(temp.wound_descs) + var/list/wound_descriptors = list() + for(var/time in temp.wound_descs) + for(var/wound in temp.wound_descs[time]) + if(wound in wound_descriptors) + wound_descriptors[wound]++ continue - tallied_rename = list("deep cut" = "clotted cut", "flesh wound" = "small bandaged wound",\ - "gaping wound" = "bandaged wound", "big gaping wound" = "gauze wrapped wound",\ - "massive wound" = "massive blood soaked bandage", "tiny bruise" = "tiny bruise", "small bruise" = "small bruise",\ - "moderate bruise" = "moderate bruise", "large bruise" = "large bruise",\ - "huge bruise" = "huge bruise", "monumental bruise" = "monumental bruise",\ - "moderate burn" = "moderate salved burn", "large burn" = "large salved burn",\ - "severe burn" = "severe salved burn", "deep burn" = "deep salved burn",\ - "carbonised area" = "treated carbonised area") - if(3) - if(tallied in list("cut","tiny bruise","small burn")) - continue - tallied_rename = list("deep cut" = "fading cut", "flesh wound" = "small healing wound",\ - "gaping wound" = "healing wound", "big gaping wound" = "big healing wound",\ - "massive wound" = "massive healing wound", "small bruise" = "tiny bruise",\ - "moderate bruise" = "small bruise", "large bruise" = "moderate bruise",\ - "huge bruise" = "large bruise", "monumental bruise" = "huge bruise",\ - "moderate burn" = "healing moderate burn", "large burn" = "healing large burn",\ - "severe burn" = "healing severe burn", "deep burn" = "healing deep burn",\ - "carbonised area" = "slowly healing carbonised area") - if(4) - if(tallied in list("cut","deep cut","tiny bruise", "small bruise","small burn", "moderate burn")) - continue - tallied_rename = list("flesh wound" = "small red scar", "gaping wound" = "angry straight scar",\ - "big gaping wound" = "jagged angry scar", "massive wound" = "gigantic angry scar",\ - "moderate bruise" = "tiny bruise", "large bruise" = "small bruise",\ - "huge bruise" = "moderate bruise", "monumental bruise" = "large bruise",\ - "large burn" = "large burn scar", "severe burn" = "severe burn scar",\ - "deep burn" = "deep burn scar", "carbonised area" = "healing carbonised area") - if(5) - if(tallied in list("cut","deep cut","tiny bruise", "moderate bruise", "small bruise","small burn", "moderate burn")) - continue - tallied_rename = list("flesh wound" = "small scar", "gaping wound" = "straight scar",\ - "big gaping wound" = "jagged scar", "massive wound" = "gigantic scar",\ - "large bruise" = "tiny bruise",\ - "huge bruise" = "small bruise", "monumental bruise" = "moderate bruise",\ - "large burn" = "large burn scar", "severe burn" = "severe burn scar",\ - "deep burn" = "deep burn scar", "carbonised area" = "large scarred area") - if(6) - if(tallied in list("cut","deep cut","flesh wound","tiny bruise", "small bruise", "moderate bruise", "large bruise", "huge bruise","small burn", "moderate burn")) - continue - tallied_rename = list("gaping wound" = "straight scar",\ - "big gaping wound" = "jagged scar", "massive wound" = "gigantic scar",\ - "monumental bruise" = "tiny bruise",\ - "large burn" = "large burn scar", "severe burn" = "severe burn scar",\ - "deep burn" = "deep burn scar", "carbonised area" = "large scarred area") + wound_descriptors[wound] = 1 + var/list/flavor_text = list() var/list/no_exclude = list("gaping wound", "big gaping wound", "massive wound", "large bruise",\ "huge bruise", "massive bruise", "severe burn", "large burn", "deep burn", "carbonised area") - switch(tally[tallied]) - if(1) - if(!flavor_text.len) - flavor_text += "[t_He] has[prob(10) && !(tallied in no_exclude) ? " what might be" : ""] a [tallied_rename[tallied]]" - else - flavor_text += "[prob(10) && !(tallied in no_exclude) ? " what might be" : ""] a [tallied_rename[tallied]]" - if(2) - if(!flavor_text.len) - flavor_text += "[t_He] has[prob(10) && !(tallied in no_exclude) ? " what might be" : ""] a pair of [tallied_rename[tallied]]s" - else - flavor_text += "[prob(10) && !(tallied in no_exclude) ? " what might be" : ""] a pair of [tallied_rename[tallied]]s" - if(3 to 5) - if(!flavor_text.len) - flavor_text += "[t_He] has several [tallied_rename[tallied]]s" - else - flavor_text += " several [tallied_rename[tallied]]s" - if(6 to INFINITY) - if(!flavor_text.len) - flavor_text += "[t_He] has a bunch of [tallied_rename[tallied]]s" - else - flavor_text += " a ton of [tallied_rename[tallied]]s" - if(flavor_text.len) - var/flavor_text_string = "" - for(var/text = 1, text <= flavor_text.len, text++) - if(text == flavor_text.len && flavor_text.len > 1) - flavor_text_string += ", and" - else if(flavor_text.len > 1 && text > 1) - flavor_text_string += "," - flavor_text_string += flavor_text[text] - flavor_text_string += " on [t_his] [named].
" - wound_flavor_text["[named]"] = flavor_text_string + for(var/wound in wound_descriptors) + switch(wound_descriptors[wound]) + if(1) + if(!flavor_text.len) + flavor_text += "[t_He] has[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a [wound]" + else + flavor_text += "[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a [wound]" + if(2) + if(!flavor_text.len) + flavor_text += "[t_He] has[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a pair of [wound]s" + else + flavor_text += "[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a pair of [wound]s" + if(3 to 5) + if(!flavor_text.len) + flavor_text += "[t_He] has several [wound]s" + else + flavor_text += " several [wound]s" + if(6 to INFINITY) + if(!flavor_text.len) + flavor_text += "[t_He] has a bunch of [wound]s" + else + flavor_text += " a ton of [wound]\s" + var/flavor_text_string = "" + for(var/text = 1, text <= flavor_text.len, text++) + if(text == flavor_text.len && flavor_text.len > 1) + flavor_text_string += ", and" + else if(flavor_text.len > 1 && text > 1) + flavor_text_string += "," + flavor_text_string += flavor_text[text] + flavor_text_string += " on [t_his] [named].
" + wound_flavor_text["[named]"] = flavor_text_string + if(temp.status & BLEEDING) + is_bleeding["[named]"] = 1 + else + wound_flavor_text["[temp.display_name]"] = "" //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. diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 31f7e391cfa..177a0efc0bf 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -57,7 +57,6 @@ var/mutantrace = null - var/bloodloss = 0 var/datum/reagents/vessel var/pale = 0 var/examine_text = "" @@ -285,7 +284,7 @@ for(var/organ in list("l_leg","l_foot","r_leg","r_foot")) var/datum/organ/external/o = organs["[organ]"] - if(o.broken) + if(o.status & BROKEN) tally += 6 if(wear_suit) @@ -778,7 +777,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.destroyed) return + if(!affecting || affecting.status & DESTROYED) return if (istype(O, /obj/effect/immovablerod)) affecting.take_damage(101, 0) else @@ -948,29 +947,29 @@ // Gloves var/datum/organ/external/lo = organs["l_hand"] var/datum/organ/external/ro = organs["r_hand"] - if (!lo.destroyed || !ro.destroyed) + if (!(lo.status & DESTROYED && ro.status & DESTROYED)) if (gloves) var/t1 = gloves.item_state if (!t1) t1 = gloves.icon_state var/icon/gloves_icon = new /icon("icon" = 'hands.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2"))) - if(lo.destroyed) + if(lo.status & DESTROYED) gloves_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY) - if(ro.destroyed) + if(ro.status & 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.destroyed) + if(lo.status & DESTROYED) stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY) - else if(ro.destroyed) + else if(ro.status & 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.destroyed) + if(lo.status & DESTROYED) stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY) - else if(ro.destroyed) + else if(ro.status & 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) @@ -990,19 +989,19 @@ // Shoes lo = organs["l_foot"] ro = organs["r_foot"] - if ((!lo.destroyed || !ro.destroyed) && shoes) + if (!(lo.status & DESTROYED && ro.status & 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.destroyed && !lying) + if(lo.status & DESTROYED && !lying) shoes_icon.Blend(new /icon('limb_mask.dmi', "right[lying?"_l":""]"), ICON_MULTIPLY) - else if(ro.destroyed && !lying) + else if(ro.status & 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.destroyed) + if(lo.status & DESTROYED) stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY) - else if(ro.destroyed) + else if(ro.status & 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 @@ -1389,7 +1388,7 @@ lying_icon.Blend(new /icon('human.dmi', "chest_[g]_l"), ICON_OVERLAY) var/datum/organ/external/head = organs["head"] - if(!head.destroyed) + if(!(head.status & 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) @@ -1398,12 +1397,12 @@ if(!istype(part, /datum/organ/external/groin) \ && !istype(part, /datum/organ/external/chest) \ && !istype(part, /datum/organ/external/head) \ - && !part.destroyed) + && !(part.status & DESTROYED)) var/icon/temp = new /icon('human.dmi', "[part.icon_name]_s") - if(part.robot) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0)) + if(part.status & 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.robot) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0)) + if(part.status & 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) @@ -1443,7 +1442,7 @@ if(!istype(part, /datum/organ/external/groin) \ && !istype(part, /datum/organ/external/chest) \ && !istype(part, /datum/organ/external/head) \ - && part.destroyed) + && (part.status & 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) @@ -1473,7 +1472,7 @@ if(organs) var/datum/organ/external/head = organs["head"] if(head) - if(head.destroyed) + if(head.status & DESTROYED) del(face_standing) del(face_lying) return @@ -2598,7 +2597,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.robot) amount+= O.brute_dam + if(!(O.status & ROBOT)) amount+= O.brute_dam return amount /mob/living/carbon/human/adjustBruteLoss(var/amount, var/used_weapon = null) @@ -2611,7 +2610,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.robot) amount+= O.burn_dam + if(!(O.status & ROBOT)) amount+= O.burn_dam return amount /mob/living/carbon/human/adjustFireLoss(var/amount,var/used_weapon = null) diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 97674d0d456..52e97312dca 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -41,7 +41,7 @@ for(var/name in organs) var/datum/organ/external/O = organs[name] - if(!O.destroyed) + if(!(O.status & 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.destroyed) return 0 + if(!organ || organ.status & DESTROYED) return 0 if(blocked) damage = (damage/(blocked+1)) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 36c44ae4db1..eb56584609f 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -110,7 +110,7 @@ emp_act O.emp_act(severity) for(var/named in organs) var/datum/organ/external/O = organs[named] - if(O.destroyed) continue + if(O.status & 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.destroyed) + if(!(affecting.status & DESTROYED)) visible_message("\red [src] has been attacked in the [hit_area] with [I.name] by [user]!") else user << "What [affecting]?" diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index daf21b74276..97b80f7ced3 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -209,11 +209,6 @@ adjustToxLoss(-2) adjustOxyLoss(-2) adjustFireLoss(-2) - - for(var/datum/organ/external/org in organs) - if(org.robot) continue - org.brute_dam = max(org.brute_dam - 2, 0) - org.burn_dam = max(org.burn_dam - 2, 0) updatehealth() if(!(/mob/living/carbon/human/proc/morph in src.verbs)) @@ -909,7 +904,7 @@ for(var/name in organs) var/datum/organ/external/E = organs[name] E.process() - if(E.robot && prob(E.brute_dam + E.burn_dam)) + if(E.status & ROBOT && prob(E.brute_dam + E.burn_dam)) if(E.name == "l_hand" || E.name == "l_arm") if(hand && equipped()) drop_item() @@ -933,7 +928,7 @@ 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.broken || E.destroyed) + if(E.status & BROKEN || E.status & DESTROYED) if(E.name == "l_hand" || E.name == "l_arm") if(hand && equipped()) drop_item() @@ -970,9 +965,7 @@ //At this point, we dun care which blood we are adding to, as long as they get more blood. B.volume = max(min(B.volume + 560/blood_volume,560), 0) //Less blood = More blood generated per tick - if(!blood_volume) // what is this for? if their blood_volume is 0, they'll die anyway - bloodloss = 0 - else if(blood_volume > 448) + if(blood_volume > 448) if(pale) pale = 0 update_body() @@ -1096,15 +1089,12 @@ var/blood_max = 0 for(var/name in organs) var/datum/organ/external/temp = organs[name] - if(!temp.bleeding || temp.robot) + if(!(temp.status & BLEEDING) || temp.status & ROBOT) continue - var/lose_blood = temp.total_wound_bleeding() - if(lose_blood) - drip(lose_blood) - blood_max += lose_blood - if(temp.destroyed && !temp.gauzed) + blood_max += 2 + if(temp.status & DESTROYED && !(temp.status & GAUZED)) blood_max += 10 //Yer missing a fucking limb. - bloodloss = min(bloodloss+1,sqrt(blood_max)) + drip(blood_max) if (eye_blind) eye_blind-- blinded = 1 diff --git a/code/modules/mob/living/carbon/monkey/examine.dm b/code/modules/mob/living/carbon/monkey/examine.dm index 43715c4e54a..5ab18f0a61e 100644 --- a/code/modules/mob/living/carbon/monkey/examine.dm +++ b/code/modules/mob/living/carbon/monkey/examine.dm @@ -22,200 +22,80 @@ msg += "It is limp and unresponsive, with no signs of life.\n" else msg += "" - var/list/wound_descriptions = list() var/list/wound_flavor_text = list() + var/list/is_destroyed = list() for(var/named in organs) var/datum/organ/external/temp = organs[named] if(temp) - if(temp.destroyed) + if(temp.status & DESTROYED) + is_destroyed["[temp.display_name]"] = 1 wound_flavor_text["[temp.display_name]"] = "It is missing its [temp.display_name].\n" continue - if(temp.wounds) - var/list/wounds = list(list(),list(),list(),list(),list(),list()) - for(var/datum/organ/wound/w in temp.wounds) - switch(w.healing_state) - if(0) - var/list/cut = wounds[1] - cut += w - wounds[1] = cut - if(1) - var/list/cut = wounds[2] - cut += w - wounds[2] = cut - if(2) - var/list/cut = wounds[3] - cut += w - wounds[3] = cut - if(3) - var/list/cut = wounds[4] - cut += w - wounds[4] = cut - if(4) - var/list/cut = wounds[5] - cut += w - wounds[5] = cut - if(5) - var/list/cut = wounds[6] - cut += w - wounds[6] = cut - wound_descriptions["[temp.display_name]"] = wounds - else - wound_flavor_text["[temp.display_name]"] = "" - //Now that we have a big list of all the wounds, on all the limbs. - var/list/is_bleeding = list() - for(var/named in wound_descriptions) - var/list/wound_states = wound_descriptions[named] - var/list/flavor_text = list() - for(var/i = 1, i <= 6, i++) - var/list/wound_state = wound_states[i] //All wounds at this level of healing. - var/list/tally = list("cut" = 0, "deep cut" = 0, "flesh wound" = 0, "gaping wound" = 0, "big gaping wound" = 0, "massive wound" = 0,\ - "tiny bruise" = 0, "small bruise" = 0, "moderate bruise" = 0, "large bruise" = 0, "huge bruise" = 0, "monumental bruise" = 0,\ - "small burn" = 0, "moderate burn" = 0, "large burn" = 0, "severe burn" = 0, "deep burn" = 0, "carbonised area" = 0) //How many wounds of what size. - for(var/datum/organ/wound/w in wound_state) - if(w.bleeding && !is_bleeding[named]) is_bleeding[named] = 1 - switch(w.wound_size) - if(1) - switch(w.wound_type) - if(0) - tally["cut"] += 1 - if(1) - tally["tiny bruise"] += 1 - if(2) - tally["small burn"] += 1 - if(2) - switch(w.wound_type) - if(0) - tally["deep cut"] += 1 - if(1) - tally["small bruise"] += 1 - if(2) - tally["moderate burn"] += 1 - if(3) - switch(w.wound_type) - if(0) - tally["flesh wound"] += 1 - if(1) - tally["moderate bruise"] += 1 - if(2) - tally["large burn"] += 1 - if(4) - switch(w.wound_type) - if(0) - tally["gaping wound"] += 1 - if(1) - tally["large bruise"] += 1 - if(2) - tally["severe burn"] += 1 - if(5) - switch(w.wound_type) - if(0) - tally["big gaping wound"] += 1 - if(1) - tally["huge bruise"] += 1 - if(2) - tally["deep burn"] += 1 - if(6) - switch(w.wound_type) - if(0) - tally["massive wound"] += 1 - if(1) - tally["monumental bruise"] += 1 - if(2) - tally["carbonised area"] += 1 - for(var/tallied in tally) - if(!tally[tallied]) + if(temp.status & ROBOT) + if(!(temp.brute_dam + temp.burn_dam)) + wound_flavor_text["[temp.display_name]"] = "It has a robot [temp.display_name]!\n" continue - //if(flavor_text_string && tally[tallied]) - // for( - // flavor_text_string += pick(list(", as well as", ", in addition to")) //add more later. - var/tallied_rename = list("cut" = "cut","deep cut" = "deep cut", "flesh wound" = "flesh wound",\ - "gaping wound" = "gaping wound", "big gaping wound" = "big gaping wound", "massive wound" = "massive wound",\ - "tiny bruise" = "tiny bruise", "small bruise" = "small bruise", "moderate bruise" = "moderate bruise",\ - "large bruise" = "large bruise", "huge bruise" = "huge bruise", "monumental bruise" = "monumental bruise",\ - "small burn" = "small burn", "moderate burn" = "moderate burn", "large burn" = "large burn",\ - "severe burn" = "severe burn", "deep burn" = "deep burn", "carbonised area" = "carbonised area") - switch(i) - if(2) //Healing wounds. - if(tallied in list("cut","small burn")) + else + wound_flavor_text["[temp.display_name]"] = "It has a robot [temp.display_name], it has" + if(temp.brute_dam) switch(temp.brute_dam) + if(0 to 20) + wound_flavor_text["[temp.display_name]"] += " some dents" + if(21 to INFINITY) + wound_flavor_text["[temp.display_name]"] += pick(" a lot of dents"," severe denting") + if(temp.brute_dam && temp.burn_dam) + wound_flavor_text["[temp.display_name]"] += " and" + if(temp.burn_dam) switch(temp.burn_dam) + if(0 to 20) + wound_flavor_text["[temp.display_name]"] += " some burns" + if(21 to INFINITY) + wound_flavor_text["[temp.display_name]"] += pick(" a lot of burns"," severe melting") + wound_flavor_text["[temp.display_name]"] += "!\n" + else if(temp.wound_descs) + var/list/wound_descriptors = list() + for(var/time in temp.wound_descs) + for(var/wound in temp.wound_descs[time]) + if(wound in wound_descriptors) + wound_descriptors[wound]++ continue - tallied_rename = list("deep cut" = "clotted cut", "flesh wound" = "small bandaged wound",\ - "gaping wound" = "bandaged wound", "big gaping wound" = "gauze wrapped wound",\ - "massive wound" = "massive blood soaked bandage", "tiny bruise" = "tiny bruise", "small bruise" = "small bruise",\ - "moderate bruise" = "moderate bruise", "large bruise" = "large bruise",\ - "huge bruise" = "huge bruise", "monumental bruise" = "monumental bruise",\ - "moderate burn" = "moderate salved burn", "large burn" = "large salved burn",\ - "severe burn" = "severe salved burn", "deep burn" = "deep salved burn",\ - "carbonised area" = "treated carbonised area") - if(3) - if(tallied in list("cut","tiny bruise","small burn")) - continue - tallied_rename = list("deep cut" = "fading cut", "flesh wound" = "small healing wound",\ - "gaping wound" = "healing wound", "big gaping wound" = "big healing wound",\ - "massive wound" = "massive healing wound", "small bruise" = "tiny bruise",\ - "moderate bruise" = "small bruise", "large bruise" = "moderate bruise",\ - "huge bruise" = "large bruise", "monumental bruise" = "huge bruise",\ - "moderate burn" = "healing moderate burn", "large burn" = "healing large burn",\ - "severe burn" = "healing severe burn", "deep burn" = "healing deep burn",\ - "carbonised area" = "slowly healing carbonised area") - if(4) - if(tallied in list("cut","deep cut","tiny bruise", "small bruise","small burn", "moderate burn")) - continue - tallied_rename = list("flesh wound" = "small red scar", "gaping wound" = "angry straight scar",\ - "big gaping wound" = "jagged angry scar", "massive wound" = "gigantic angry scar",\ - "moderate bruise" = "tiny bruise", "large bruise" = "small bruise",\ - "huge bruise" = "moderate bruise", "monumental bruise" = "large bruise",\ - "large burn" = "large burn scar", "severe burn" = "severe burn scar",\ - "deep burn" = "deep burn scar", "carbonised area" = "healing carbonised area") - if(5) - if(tallied in list("cut","deep cut","tiny bruise", "moderate bruise", "small bruise","small burn", "moderate burn")) - continue - tallied_rename = list("flesh wound" = "small scar", "gaping wound" = "straight scar",\ - "big gaping wound" = "jagged scar", "massive wound" = "gigantic scar",\ - "large bruise" = "tiny bruise",\ - "huge bruise" = "small bruise", "monumental bruise" = "moderate bruise",\ - "large burn" = "large burn scar", "severe burn" = "severe burn scar",\ - "deep burn" = "deep burn scar", "carbonised area" = "large scarred area") - if(6) - if(tallied in list("cut","deep cut","flesh wound","tiny bruise", "small bruise", "moderate bruise", "large bruise", "huge bruise","small burn", "moderate burn")) - continue - tallied_rename = list("gaping wound" = "straight scar",\ - "big gaping wound" = "jagged scar", "massive wound" = "gigantic scar",\ - "monumental bruise" = "tiny bruise",\ - "large burn" = "large burn scar", "severe burn" = "severe burn scar",\ - "deep burn" = "deep burn scar", "carbonised area" = "large scarred area") + wound_descriptors[wound] = 1 + var/list/flavor_text = list() var/list/no_exclude = list("gaping wound", "big gaping wound", "massive wound", "large bruise",\ "huge bruise", "massive bruise", "severe burn", "large burn", "deep burn", "carbonised area") - switch(tally[tallied]) - if(1) - if(!flavor_text.len) - flavor_text += "\The [src] has[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a [tallied_rename[tallied]]" - else - flavor_text += "[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a [tallied_rename[tallied]]" - if(2) - if(!flavor_text.len) - flavor_text += "\The [src] has[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a pair of [tallied_rename[tallied]]s" - else - flavor_text += "[prob(4) && !(tallied in no_exclude) ? " what might be" : ""] a pair of [tallied_rename[tallied]]s" - if(3 to 5) - if(!flavor_text.len) - flavor_text += "\The [src] has several [tallied_rename[tallied]]s" - else - flavor_text += " several [tallied_rename[tallied]]s" - if(6 to INFINITY) - if(!flavor_text.len) - flavor_text += "\The [src] has a bunch of [tallied_rename[tallied]]s" - else - flavor_text += " a ton of [tallied_rename[tallied]]s" - if(flavor_text.len) - var/flavor_text_string = "" - for(var/text = 1, text <= flavor_text.len, text++) - if(text == flavor_text.len && flavor_text.len > 1) - flavor_text_string += ", and" - else if(flavor_text.len > 1 && text > 1) - flavor_text_string += "," - flavor_text_string += flavor_text[text] - flavor_text_string += " on its [named].
" - wound_flavor_text["[named]"] = flavor_text_string + for(var/wound in wound_descriptors) + switch(wound_descriptors[wound]) + if(1) + if(!flavor_text.len) + flavor_text += "It has[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a [wound]" + else + flavor_text += "[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a [wound]" + if(2) + if(!flavor_text.len) + flavor_text += "It has[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a pair of [wound]s" + else + flavor_text += "[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a pair of [wound]s" + if(3 to 5) + if(!flavor_text.len) + flavor_text += "It has several [wound]s" + else + flavor_text += " several [wound]s" + if(6 to INFINITY) + if(!flavor_text.len) + flavor_text += "It has a bunch of [wound]s" + else + flavor_text += " a ton of [wound]\s" + var/flavor_text_string = "" + for(var/text = 1, text <= flavor_text.len, text++) + if(text == flavor_text.len && flavor_text.len > 1) + flavor_text_string += ", and" + else if(flavor_text.len > 1 && text > 1) + flavor_text_string += "," + flavor_text_string += flavor_text[text] + flavor_text_string += " on its [named].
" + wound_flavor_text["[named]"] = flavor_text_string + else + wound_flavor_text["[temp.display_name]"] = "" + + //Handles the text strings being added to the actual description. if(wound_flavor_text["head"]) msg += wound_flavor_text["head"] if(wound_flavor_text["chest"]) diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index 33b6ed641b5..855ad0d3a7e 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -431,7 +431,7 @@ for(var/name in organs) var/datum/organ/external/E = organs[name] E.process() - if(E.broken || E.destroyed) + if(E.status & BROKEN || E.status & DESTROYED) if(E.name == "l_hand" || E.name == "l_arm") if(hand && equipped()) drop_item() diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index 06ec610f526..a697c531202 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -585,7 +585,7 @@ lying_icon.Blend(new /icon('monkey.dmi', "chest_l"), ICON_OVERLAY) var/datum/organ/external/head = organs["head"] - if(!head.destroyed) + if(!(head.status & 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.destroyed) + && !(part.status & DESTROYED)) var/icon/temp = new /icon('monkey.dmi', "[part.icon_name]_s") - if(part.robot) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0)) + if(part.status & 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.robot) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0)) + if(part.status & 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) @@ -915,7 +915,7 @@ else if(!def_zone) def_zone = ran_zone(def_zone) organ = get_organ(check_zone(def_zone)) - if(!organ || organ.destroyed) return 0 + if(!organ || organ.status & DESTROYED) return 0 if(blocked) damage = (damage/(blocked+1)) @@ -1038,7 +1038,7 @@ var/amount = 0.0 for(var/name in organs) var/datum/organ/external/O = organs[name] - if(!O.robot) amount+= O.brute_dam + if(!(O.status & ROBOT)) amount+= O.brute_dam return amount /mob/living/carbon/monkey/adjustBruteLoss(var/amount, var/used_weapon = null) @@ -1051,7 +1051,7 @@ var/amount = 0.0 for(var/name in organs) var/datum/organ/external/O = organs[name] - if(!O.robot) amount+= O.burn_dam + if(!(O.status & ROBOT)) amount+= O.burn_dam return amount /mob/living/carbon/monkey/adjustFireLoss(var/amount,var/used_weapon = null) diff --git a/code/modules/mob/living/carbon/shock.dm b/code/modules/mob/living/carbon/shock.dm index e1b9d6c90c5..be199abfb1c 100644 --- a/code/modules/mob/living/carbon/shock.dm +++ b/code/modules/mob/living/carbon/shock.dm @@ -22,9 +22,9 @@ var/mob/living/carbon/human/M = src for(var/name in M.organs) var/datum/organ/external/organ = M.organs[name] - if(organ.destroyed) + if(organ.status & DESTROYED) src.traumatic_shock += 60 - else if(organ.broken || organ.open) + else if(organ.status & BROKEN || organ.open) src.traumatic_shock += 30 if(src.traumatic_shock < 0) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 20d6de34bd1..c4028a43fba 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -181,11 +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.broken = 0 - affecting.destroyed = 0 - for(var/datum/organ/wound/W in affecting.wounds) - W.stopbleeding() - del(W) + affecting.status &= ~BROKEN + affecting.status &= ~DESTROYED + del affecting.wound_descs H.UpdateDamageIcon() H.update_body() //src.fireloss = 0 @@ -210,17 +208,15 @@ var/datum/organ/external/e = H.organs[name] e.brute_dam = 0.0 e.burn_dam = 0.0 - e.bandaged = 0.0 + e.status &= ~BANDAGED e.max_damage = initial(e.max_damage) - e.bleeding = 0 + e.status &= ~BLEEDING e.open = 0 - e.broken = 0 - e.destroyed = 0 + e.status &= ~BROKEN + e.status &= ~DESTROYED e.perma_injury = 0 e.update_icon() - for(var/datum/organ/wound/W in e.wounds) - if(W.bleeding || !W.is_healing) - W.stopbleeding() + del e.wound_descs del(H.vessel) H.vessel = new/datum/reagents(560) H.vessel.my_atom = H diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 17e4acdde25..4d92b29f8bf 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -701,12 +701,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.destroyed) + if(temp.status & DESTROYED) usr << "\blue You look at your stump." return else var/datum/organ/external/temp = usr:get_organ("r_hand") - if(temp.destroyed) + if(temp.status & DESTROYED) usr << "\blue You look at your stump." return diff --git a/code/modules/mob/organ/organ.dm b/code/modules/mob/organ/organ.dm index fb150d03627..380c679aabf 100644 --- a/code/modules/mob/organ/organ.dm +++ b/code/modules/mob/organ/organ.dm @@ -1,4 +1,43 @@ -//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 +/////////////////////////////// +//CONTAINS: ORGANS AND WOUNDS// +/////////////////////////////// + +var/list/wound_progressions = list( +//cut healing path" +"cut" = "healing cut", "healing cut" = "small scab",\ + +//deep cut healing path +"deep cut" = "clotted cut", "clotted cut" = "scab", "scab" = "fresh skin",\ + +//flesh wound healing path +"flesh wound" = "blood soaked clot", "blood soaked clot" = "large scab", "large scab" = "fresh skin",\ + +//gaping wound healing path +"gaping wound" = "large blood soaked clot", "large blood soaked clot" = "large clot", "large clot" = "small angry scar",\ +"small angry scar" = "small straight scar",\ + +//big gaping wound healing path +"big gaping wound" = "gauze wrapped wound", "gauze wrapped wound" = "blood soaked bandage", "blood soaked bandage" = "large angry scar",\ +"large angry scar" = "large straight scar",\ + +//massive wound healing path +"massive wound" = "massive blood soaked bandage", "massive blood soaked bandage" = "huge bloody mess", "huge bloody mess" = "massive angry scar",\ +"massive angry scar" = "massive jagged scar",\ + +//bruise healing path +"monumental bruise" = "large bruise", "huge bruise" = "large bruise", "large bruise" = "moderate bruise",\ +"moderate bruise" = "small bruise", "small bruise" = "tiny bruise",\ + +//moderate burn healing path +"moderate burn" = "moderate salved burn", "moderate salved burn" = "fresh skin",\ + +"large burn" = "large salved burn", "large salved burn" = "moderate salved burn",\ + +"severe burn" = "severe salved burn", "severe salved burn" = "burn scar",\ + +"deep burn" = "deep salved burn", "deep salved burn" = "large burn scar",\ + +"carbonised area" = "treated carbonised area", "treated carbonised area" = "massive burn scar") /datum/organ var/name = "organ" @@ -31,6 +70,10 @@ W.time_inflicted = time_inflicted return W +#define CUT 0 +#define BRUISE 1 +#define BURN 2 + /**************************************************** EXTERNAL ORGANS ****************************************************/ @@ -42,31 +85,29 @@ var/damage_state = "00" var/brute_dam = 0 var/burn_dam = 0 - var/bandaged = 0 var/max_damage = 0 var/max_size = 0 - var/tmp/list/obj/item/weapon/implant/implant = list() + var/tmp/list/obj/item/weapon/implant/implant var/display_name - var/tmp/list/wounds = list() - var/tmp/bleeding = 0 + + var/tmp/list/wound_descs = list() + var/tmp/next_wound_update = 0 + var/tmp/perma_injury = 0 var/tmp/perma_dmg = 0 - var/tmp/broken = 0 - var/tmp/destroyed = 0 var/tmp/destspawn = 0 //Has it spawned the broken limb? - var/tmp/gauzed = 0 //Has the missing limb been patched? - var/tmp/robot = 0 //ROBOT ARM MAN! - var/tmp/cutaway = 0 //First part of limb reattachment. - var/tmp/attachable = 0 //Can limb be attached? var/min_broken_damage = 30 + var/datum/organ/external/parent var/list/datum/organ/external/children + var/damage_msg = "\red You feel a intense pain" + var/status = 0 + var/broken_description var/open = 0 var/stage = 0 - var/wound = 0 New(mob/living/carbon/H) ..(H) @@ -76,59 +117,43 @@ owner = H H.organs[name] = src - Del() - for(var/datum/organ/wound/W in wounds) - del(W) - ..() - - proc/total_wound_bleeding() - // Get the total amount and size of bleeding wounds - var/rval = 0 - - for(var/datum/organ/wound/W in wounds) if(W.bleeding) - rval += W.wound_size - - // bandages reduce bleeding - if(bandaged) return rval / 8 - - return rval - - proc/take_damage(brute, burn, sharp, used_weapon = null, spread=0) + proc/take_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list()) if((brute <= 0) && (burn <= 0)) return 0 - if(destroyed) + if(status & DESTROYED) return 0 - if(robot) + if(status & ROBOT) brute *= 0.66 //~2/3 damage for ROBOLIMBS burn *= 0.66 //~2/3 damage for ROBOLIMBS - if(owner && !robot) + if(owner && !(status & 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)) -// for(var/mob/M in viewers(owner)) -// M.show_message("\red [owner.name]'s [display_name] flies off.") - destroyed = 1 + status |= DESTROYED droplimb() return + else if(prob(nux)) - createwound(max(1,min(6,round(brute/10) + rand(0,1))),0,brute) - if(!robot) owner << "You feel something wet on your [display_name]" + createwound( CUT, brute ) + if(!(status & ROBOT)) + owner << "You feel something wet on your [display_name]" if((brute_dam + burn_dam + brute + burn) < max_damage) if(brute) brute_dam += brute - if(prob(brute*2) && !sharp) - createwound(rand(4,6),0,brute) + if( (prob(brute*2) && !sharp) || sharp ) + createwound( CUT, brute ) else if(!sharp) - createwound(max(1,min(6,round(brute/10) + rand(1,2))),1,brute) + createwound( BRUISE, brute ) if(burn) burn_dam += burn - createwound(max(1,min(6,round(burn/10) + rand(0,1))),2,burn) + createwound( BURN, burn ) else - var/can_inflict = max_damage - (brute_dam + burn_dam) + var/can_inflict = max_damage - (brute_dam + burn_dam) //How much damage can we actually cause? if(can_inflict) if (brute > 0 && burn > 0) brute = can_inflict/2 @@ -146,87 +171,52 @@ burn = can_inflict burn_dam += burn createwound(max(1,min(6,round(burn/10) + rand(0,1))),2,burn) - else if(!robot) + else if(!(status & ROBOT)) var/passed_dam = (brute + burn) - can_inflict //Getting how much overdamage we have. var/list/datum/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) message_admins("Oh god WHAT! [owner]'s [src] was unable to find an organ to pass overdamage too!") else - if(!spread) - var/datum/organ/external/target = pick(possible_points) - if(brute) - target.take_damage(passed_dam, 0, sharp, used_weapon,1) - else - target.take_damage(0, passed_dam, sharp, used_weapon,1) + var/datum/organ/external/target = pick(possible_points) + if(brute) + target.take_damage(passed_dam, 0, sharp, used_weapon, forbidden_limbs + src) + else + target.take_damage(0, passed_dam, sharp, used_weapon, forbidden_limbs + src) else droplimb(1) //Robot limbs just kinda fail at full damage. - if(broken) + if(status & BROKEN) owner.emote("scream") if(used_weapon) add_wound(used_weapon, brute + burn) + owner.updatehealth() + var/result = update_icon() return result proc/heal_damage(brute, burn, internal = 0, robo_repair = 0) - if(robot && !robo_repair) + if(status & ROBOT && !robo_repair) return - var/brute_to_heal = 0 - var/brute_wounds = list() - var/burn_to_heal = 0 - var/burn_wounds = list() - for(var/datum/organ/wound/W in wounds) - if(W.wound_type > 1 && W.damage) - burn_to_heal += W.damage - burn_wounds += W - else if(W.damage) - brute_to_heal += W.damage - brute_wounds += W - if(brute && brute <= brute_to_heal) - for(var/datum/organ/wound/W in brute_wounds) - if(brute >= W.damage) - brute_dam -= W.damage - brute -= W.damage - W.damage = 0 - W.initial_dmg = 0 - W.stopbleeding(1) - else - W.damage -= brute - W.initial_dmg -= brute - W.stopbleeding() - else if(brute) - for(var/datum/organ/wound/W in brute_wounds) - W.damage = 0 - W.initial_dmg = 0 - W.stopbleeding(1) - brute_dam = 0 - if(burn && burn <= burn_to_heal) - for(var/datum/organ/wound/W in burn_wounds) - if(burn >= W.damage) - burn_dam -= W.damage - burn -= W.damage - W.damage = 0 - W.initial_dmg = 0 - W.stopbleeding() - else - W.damage -= burn - W.initial_dmg -= burn - W.stopbleeding() - else if(burn) - for(var/datum/organ/wound/W in burn_wounds) - W.damage = 0 - W.initial_dmg = 0 - W.stopbleeding() - burn_dam = 0 + // var/brute_to_heal = 0 + // var/brute_wounds = list() + // var/burn_to_heal = 0 + // var/burn_wounds = list() + // for(var/datum/organ/wound/W in brute_wounds) + + brute_dam = max(0, brute_dam-brute) + burn_dam = max(0, burn_dam-burn) + if(internal) - broken = 0 + status &= ~BROKEN perma_injury = 0 // if all damage is healed, replace the wounds with scars if(brute_dam + burn_dam == 0) @@ -234,6 +224,7 @@ var/datum/autopsy_data/W = autopsy_data[V] del W autopsy_data = list() + owner.updatehealth() var/result = update_icon() return result @@ -252,35 +243,36 @@ proc/get_damage() //returns total damage - return max(brute_dam + burn_dam - perma_injury,perma_injury) //could use health? + return max(brute_dam + burn_dam - perma_injury, perma_injury) //could use health? proc/get_damage_brute() - return max(brute_dam+perma_injury,perma_injury) + return max(brute_dam+perma_injury, perma_injury) proc/get_damage_fire() return burn_dam process() - if(destroyed) + if(next_wound_update && world.time > next_wound_update) + update_wounds() + if(status & DESTROYED) if(!destspawn) droplimb() return - if(broken == 0) + if(!(status & BROKEN)) perma_dmg = 0 if(parent) - if(parent.destroyed) - destroyed = 1 + if(parent.status & DESTROYED) + status |= DESTROYED owner:update_body() return - if(brute_dam > min_broken_damage && !robot) - if(broken == 0) + if(brute_dam > min_broken_damage && !(status & ROBOT)) + if(!(status & BROKEN)) //owner.unlock_medal("Broke Yarrr Bones!", 0, "Break a bone.", "easy") - owner.visible_message("\red You hear a loud cracking sound coming from [owner.name].","\red Something feels like it shattered in your [display_name]!","You hear a sickening crack.") + owner.visible_message("\red You hear a loud cracking sound coming from \the [owner].","\red Something feels like it shattered in your [display_name]!","You hear a sickening crack.") owner.emote("scream") - broken = 1 - wound = pick("broken","fracture","hairline fracture") //Randomise in future. Edit: Randomized. --SkyMarshal + status |= BROKEN + broken_description = pick("broken","fracture","hairline fracture") perma_injury = brute_dam - return return // new damage icon system @@ -321,15 +313,15 @@ proc/droplimb(var/override = 0,var/no_explode = 0) if(override) - destroyed = 1 - if(destroyed) + status |= DESTROYED + if(status & DESTROYED) 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.destroyed) + if(I && !(I.status & DESTROYED)) I.droplimb(1,1) var/obj/item/weapon/organ/H switch(body_part) @@ -395,12 +387,8 @@ var/lol = pick(cardinal) step(H,lol) destspawn = 1 - if(!robot) - owner.visible_message("\red [owner.name]'s [display_name] flies off in an arc.",\ - "Your [display_name] goes flying off!",\ - "You hear a terrible sound of ripping tendons and flesh.") - else - owner.visible_message("\red [owner.name]'s [display_name] explodes violently!",\ + if(status & ROBOT) + owner.visible_message("\red \The [owner]'s [display_name] explodes violently!",\ "\red Your [display_name] explodes!",\ "You hear an explosion followed by a scream!") if(!no_explode) @@ -411,51 +399,81 @@ spark_system.start() spawn(10) del(spark_system) - for(var/datum/organ/wound/W in wounds) - W.update_health() - del(W) + else + owner.visible_message("\red [owner.name]'s [display_name] flies off in an arc.",\ + "Your [display_name] goes flying off!",\ + "You hear a terrible sound of ripping tendons and flesh.") owner.update_body_appearance() owner.update_clothing() - proc/createwound(var/size = 1, var/type = 0, var/damage) - var/list/datum/organ/wound/possible_wounds = list() - for(var/datum/organ/wound/W in wounds) - if(W.wound_type == type && W.wound_size <= 3 && size <= 3 && ((!W.is_healing && type == 1) || (!W.healing_state && type != 1))) - possible_wounds += W + proc/createwound(var/type = CUT, var/damage) if(hasorgans(owner)) - if(!possible_wounds.len || prob(20)) - var/datum/organ/wound/W = new(src) - W.bleeding = !type || (size > 2) // large wounds always cause bleeding + var/wound_name + var/update_time = world.time + damage*100 + var/size = min( max( 0, damage/10 ) , 6) + switch(type) + if(CUT) + 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]"]) + var/list/update_next = wound_descs["[update_time]"] + update_next += wound_name + else + if (next_wound_update > update_time) + next_wound_update = update_time + wound_descs["[update_time]"] = list(wound_name) + if(BRUISE) + var/list/size_names = list("tiny bruise", "small bruise", "moderate bruise", "large bruise", "huge bruise", "monumental bruise") + wound_name = size_names[size] + if(wound_descs["[update_time]"]) + var/list/update_next = wound_descs["[update_time]"] + update_next += wound_name + else + if (next_wound_update > update_time) + next_wound_update = update_time + wound_descs["[update_time]"] = list(wound_name) + if(BURN) + var/list/size_names = list("small burn", "moderate burn", "large burn", "severe burn", "deep burn", "carbonised area") + wound_name = size_names[size] + update_time += damage*300 + if(wound_descs["[update_time]"]) + var/list/update_next = wound_descs["[update_time]"] + update_next += wound_name + else + if (next_wound_update > update_time) + next_wound_update = update_time + wound_descs["[update_time]"] = list(wound_name) - W.damage = damage - W.initial_dmg = damage - W.wound_type = type - W.wound_size = size - W.owner = owner - W.parent = src - if(type == 1) - spawn W.become_scar() + proc/update_wounds() + var/list/wounds_to_update = wound_descs["[next_wound_update]"] + for(var/wound in wounds_to_update) + if(wound_progressions[wound]) + var/wound_name = wound_progressions[wound] + var/next_update = world.time + 600*rand(5,13) + if(wound_descs["[next_update]"]) + var/list/update_next = wound_descs["[next_update]"] + update_next += wound_name else - spawn W.start_close() //Let small cuts close themselves. - wounds += W - else - var/datum/organ/wound/W = pick(possible_wounds) - bleeding = max(!type,bleeding) //Sharp objects cause bleeding. - W.bleeding = max(!type,W.bleeding) - - W.damage += damage - W.initial_dmg += damage - W.wound_size = max(1,min(6,round(W.damage/10) + rand(0,1))) + wound_descs["[next_update]"] = list(wound_name) + wound_descs.Remove("[next_wound_update]") + if(wound_descs.len) + var/next_update = text2num(wound_descs[1]) + for(var/wound in wound_descs) + next_update = min(next_update, text2num(wound)) + next_wound_update = next_update + else + next_wound_update = 0 proc/emp_act(severity) - if(!robot) return + if(!(status & ROBOT)) + return if(prob(30*severity)) take_damage(4(4-severity), 0, 1, used_weapon = "EMP") else droplimb(1) proc/getDisplayName() - switch(src.name) + switch(name) if("l_leg") return "left leg" if("r_leg") @@ -473,127 +491,7 @@ if("r_hand") return "right hand" else - return src.name - -/datum/organ/wound - name = "wound" - var/wound_type = 0 //0 = cut, 1 = bruise, 2 = burn - var/damage = 0 //How much damage it caused. - var/initial_dmg = 0 - var/wound_size = 1 - var/datum/organ/external/parent - var/bleeding = 0 //You got wounded, of course it's bleeding. -- Scratch that. Rewrote it. - var/healing_state = 0 - var/is_healing = 0 - var/slowheal = 3 - - proc/start_close() - if(parent.robot) - return - spawn(rand(1800,3000)) //3-5 minutes - if(prob(50) && wound_size == 1) - parent.wounds.Remove(src) - update_health(1) - del(src) - else if(prob(33) && wound_size < 3) - stopbleeding() - else - spawn(rand(1800,3000)) - if(wound_size == 1) //Small cuts heal in 6-10 minutes. - parent.wounds.Remove(src) - update_health(1) - del(src) - else if(prob(50) && wound_size < 3 && bleeding) - stopbleeding() - return - - proc/stopbleeding(var/bleed = 0) - if(is_healing) - return 0 -// owner:bloodloss -= 10 * src.wound_size - parent.bleeding = min(bleed,bleeding) - for(var/datum/organ/wound/W in parent) - if(W.bleeding && W != src) - parent.bleeding = 1 - break - bleeding = min(bleed,bleeding) - is_healing = 1 - slowheal = 1 - if(!healing_state) - spawn become_scar() //spawn off the process of becoming a scar. - return 1 - - proc/become_scar() - if(parent.robot || healing_state) - return - healing_state = 1 //Patched - spawn(200*slowheal) //~20-60 seconds - update_health(5) //Heals some. - - spawn(rand(180,300)*slowheal) //18-30 second - if(!parent || !parent.owner || parent.owner.stat == 2) - if(!parent || !parent.owner) - del(parent) - del(src) - return - if(prob(80) && wound_size < 2) //Small cuts heal. - update_health(1) - parent.wounds.Remove(src) - del(src) - - healing_state = 2 //Noticibly healing. - update_health(2) //Heals more. - - spawn(rand(1200,1800)*slowheal) //2-3 minutes - if(!parent || !parent.owner || parent.owner.stat == 2) - if(!parent || !parent.owner) - del(parent) - del(src) - return - if(prob(60) && wound_size < 3) //Cuts heal up - parent.wounds.Remove(src) - del(src) - healing_state = 3 //Angry red scar - update_health(1) //Heals the rest of the way. - - - spawn(rand(6000,9000)*slowheal) //10-15 minutes - if(!parent || !parent.owner || parent.owner.stat == 2) - if(!parent || !parent.owner) - del(parent) - del(src) - return - if(prob(80) && wound_size < 4) //Minor wounds heal up fully. - parent.wounds.Remove(src) - del(src) - healing_state = 4 //Scar. - - spawn(rand(6000,9000)*slowheal) //10-15 minutes - if(!parent || !parent.owner || parent.owner.stat == 2) - if(!parent || !parent.owner) - del(parent) - del(src) - return - if(prob(30) || wound_size < 4 || wound_type == 1) //Small chance for the scar to disappear, any small remaining wounds deleted. - parent.wounds.Remove(src) - del(src) - healing_state = 5 //Faded scar - return - - proc/update_health(var/percent = 1) - if(!owner || owner.stat == 2) - return - damage = max(damage - damage/percent,0) //Remove that amount of the damage - if(wound_type > 1) - parent.burn_dam = max(parent.burn_dam - (initial_dmg - damage),0) - else - parent.brute_dam = max(parent.brute_dam - (initial_dmg - damage),0) - initial_dmg = damage //reset it for further updates. - parent.owner.updatehealth() - if(percent == 1 && wound_type == 1) - parent.wounds.Remove(src) - del(src) - + return name diff --git a/code/modules/power/antimatter/computer.dm b/code/modules/power/antimatter/computer.dm index e16936b185d..c8a32cabb1b 100644 --- a/code/modules/power/antimatter/computer.dm +++ b/code/modules/power/antimatter/computer.dm @@ -1,4 +1,8 @@ //This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05 +#define STATE_DEFAULT 1 +#define STATE_INJECTOR 2 +#define STATE_ENGINE 3 + /obj/machinery/computer/am_engine name = "Antimatter Engine Console" @@ -10,9 +14,6 @@ var/obj/machinery/power/am_engine/engine/connected_E = null var/obj/machinery/power/am_engine/injector/connected_I = null var/state = STATE_DEFAULT - var/const/STATE_DEFAULT = 1 - var/const/STATE_INJECTOR = 2 - var/const/STATE_ENGINE = 3 /obj/machinery/computer/am_engine/New() ..() diff --git a/code/modules/research/artifact_effect.dm b/code/modules/research/artifact_effect.dm index 63262c50fc1..867bf030187 100644 --- a/code/modules/research/artifact_effect.dm +++ b/code/modules/research/artifact_effect.dm @@ -55,9 +55,6 @@ affecting = H.organs[A] if(!istype(affecting, /datum/organ/external)) continue affecting.heal_damage(25, 25) //fixes getting hit after ingestion, killing you when game updates organ health - for(var/datum/organ/wound/W in affecting.wounds) - W.stopbleeding() - W.is_healing = 1 //user:heal_organ_damage(25, 25) // user.adjustOxyLoss(-25) diff --git a/code/setup.dm b/code/setup.dm index 0afd4f21e29..8ed5104a711 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -397,7 +397,6 @@ var/static/list/scarySounds = list('thudswoosh.ogg','Taser.ogg','armbomb.ogg','h #define TRANSITIONEDGE 7 //Distance from edge to move to another z-level -#define OPEN 1 #define CLOSED 0 // Maximum and minimum character ages. @@ -459,4 +458,16 @@ var/list/liftable_structures = list(\ #define RADIO_SECBOT "7" #define RADIO_MULEBOT "8" #define RADIO_MAGNETS "9" -#define RADIO_POWER "10" \ No newline at end of file +#define RADIO_POWER "10" + +///////////////// +//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 \ No newline at end of file From 25757511d61bc19df331ff93b6f562133b12ed19 Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Sat, 23 Jun 2012 16:36:34 -0700 Subject: [PATCH 2/5] Fixed a derp --- baystation12.dme | 5 ----- code/modules/mob/organ/organ.dm | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/baystation12.dme b/baystation12.dme index 12b3af529ec..3d156afe557 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -356,7 +356,6 @@ #include "code\defines\procs\logging.dm" #include "code\defines\procs\religion_name.dm" #include "code\defines\procs\station_name.dm" -#include "code\defines\procs\statistics.dm" #include "code\defines\procs\syndicate_name.dm" #include "code\defines\procs\time_stamp.dm" #include "code\defines\sd_procs\base64.dm" @@ -379,7 +378,6 @@ #include "code\game\shuttle_engines.dm" #include "code\game\skincmd.dm" #include "code\game\smoothwall.dm" -#include "code\game\socket_talk.dm" #include "code\game\sound.dm" #include "code\game\specops_shuttle.dm" #include "code\game\status.dm" @@ -555,7 +553,6 @@ #include "code\game\machinery\computer\law.dm" #include "code\game\machinery\computer\lockdown.dm" #include "code\game\machinery\computer\medical.dm" -#include "code\game\machinery\computer\message.dm" #include "code\game\machinery\computer\Operating.dm" #include "code\game\machinery\computer\pod.dm" #include "code\game\machinery\computer\power.dm" @@ -700,7 +697,6 @@ #include "code\game\objects\devices\shields.dm" #include "code\game\objects\devices\taperecorder.dm" #include "code\game\objects\devices\PDA\cart.dm" -#include "code\game\objects\devices\PDA\chatroom.dm" #include "code\game\objects\devices\PDA\PDA.dm" #include "code\game\objects\devices\PDA\radio.dm" #include "code\game\objects\items\apc_frame.dm" @@ -1077,7 +1073,6 @@ #include "code\modules\mob\simple_animal\worm.dm" #include "code\modules\power\apc.dm" #include "code\modules\power\cable.dm" -#include "code\modules\power\cable_heavyduty.dm" #include "code\modules\power\cell.dm" #include "code\modules\power\engine.dm" #include "code\modules\power\generator.dm" diff --git a/code/modules/mob/organ/organ.dm b/code/modules/mob/organ/organ.dm index 380c679aabf..6ffc7c576b9 100644 --- a/code/modules/mob/organ/organ.dm +++ b/code/modules/mob/organ/organ.dm @@ -410,7 +410,7 @@ var/list/wound_progressions = list( if(hasorgans(owner)) var/wound_name var/update_time = world.time + damage*100 - var/size = min( max( 0, damage/10 ) , 6) + var/size = min( max( 1, damage/10 ) , 6) switch(type) if(CUT) var/list/size_names = list("cut", "deep cut", "flesh wound", "gaping wound", "big gaping wound", "massive wound") From 3efa1d4e6b28dff226273dea250bd2cc8f4aea50 Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Sat, 23 Jun 2012 17:00:28 -0700 Subject: [PATCH 3/5] More fixes. --- baystation12.dme | 4 +++ .../machinery/computer/HolodeckControl.dm | 8 ++--- .../items/weapons/implants/implanter.dm | 6 ++-- code/game/objects/tables_racks.dm | 8 ++--- code/modules/DetectiveWork/scanner.dm | 6 ++-- code/modules/mob/living/carbon/carbon.dm | 2 +- .../mob/living/carbon/human/examine.dm | 32 +++++++++++++++---- code/modules/mob/living/carbon/human/human.dm | 12 ++----- code/modules/mob/mob.dm | 9 +----- 9 files changed, 49 insertions(+), 38 deletions(-) diff --git a/baystation12.dme b/baystation12.dme index 3d156afe557..52310b50e60 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -378,6 +378,7 @@ #include "code\game\shuttle_engines.dm" #include "code\game\skincmd.dm" #include "code\game\smoothwall.dm" +#include "code\game\socket_talk.dm" #include "code\game\sound.dm" #include "code\game\specops_shuttle.dm" #include "code\game\status.dm" @@ -553,6 +554,7 @@ #include "code\game\machinery\computer\law.dm" #include "code\game\machinery\computer\lockdown.dm" #include "code\game\machinery\computer\medical.dm" +#include "code\game\machinery\computer\message.dm" #include "code\game\machinery\computer\Operating.dm" #include "code\game\machinery\computer\pod.dm" #include "code\game\machinery\computer\power.dm" @@ -697,6 +699,7 @@ #include "code\game\objects\devices\shields.dm" #include "code\game\objects\devices\taperecorder.dm" #include "code\game\objects\devices\PDA\cart.dm" +#include "code\game\objects\devices\PDA\chatroom.dm" #include "code\game\objects\devices\PDA\PDA.dm" #include "code\game\objects\devices\PDA\radio.dm" #include "code\game\objects\items\apc_frame.dm" @@ -1073,6 +1076,7 @@ #include "code\modules\mob\simple_animal\worm.dm" #include "code\modules\power\apc.dm" #include "code\modules\power\cable.dm" +#include "code\modules\power\cable_heavyduty.dm" #include "code\modules\power\cell.dm" #include "code\modules\power\engine.dm" #include "code\modules\power\generator.dm" diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm index 41e9701f311..460784d305d 100644 --- a/code/game/machinery/computer/HolodeckControl.dm +++ b/code/game/machinery/computer/HolodeckControl.dm @@ -434,12 +434,12 @@ "\red You hear the nauseating crunch of bone and gristle on solid metal and the squeal of said metal deforming.") dented++ else if(prob(50)) - G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [H.get_gender_form("its")] bone and cartilage making a loud crunch!",\ - "\red You smash \the [H]'s head on \the [src], [H.get_gender_form("its")] bone and cartilage making a loud crunch!",\ + G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [H.get_visible_gender() == MALE ? "his" : H.get_visible_gender() == FEMALE ? "her" : "their"] bone and cartilage making a loud crunch!",\ + "\red You smash \the [H]'s head on \the [src], [H.get_visible_gender() == MALE ? "his" : H.get_visible_gender() == FEMALE ? "her" : "their"] bone and cartilage making a loud crunch!",\ "\red You hear the nauseating crunch of bone and gristle on solid metal, the noise echoing through the room.") else - G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [H.get_gender_form("its")] nose smashed and face bloodied!",\ - "\red You smash \the [H]'s head on \the [src], [H.get_gender_form("its")] nose smashed and face bloodied!",\ + G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [H.get_visible_gender() == MALE ? "his" : H.get_visible_gender() == FEMALE ? "her" : "their"] nose smashed and face bloodied!",\ + "\red You smash \the [H]'s head on \the [src], [H.get_visible_gender() == MALE ? "his" : H.get_visible_gender() == FEMALE ? "her" : "their"] nose smashed and face bloodied!",\ "\red You hear the nauseating crunch of bone and gristle on solid metal and the gurgling gasp of someone who is trying to breathe through their own blood.") else affecting.take_damage(rand(5,10), 0) diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm index f2191d9980d..725ddc57e79 100644 --- a/code/game/objects/items/weapons/implants/implanter.dm +++ b/code/game/objects/items/weapons/implants/implanter.dm @@ -26,7 +26,7 @@ if (M != user) user.visible_message("\red \The [user] tries to implant \the [M] with \the [src]!","\red You try to implant \the [M] with \the [src]!") else - user.visible_message("\red \The [user] tries to implant [user.get_gender_form("itself")] with \the [src]!","\red You try to implant yourself with \the [src]!") + user.visible_message("\red \The [user] tries to implant [user.get_visible_gender() == MALE ? "himself" : user.get_visible_gender() == FEMALE ? "herself" : "themselves"] with \the [src]!","\red You try to implant yourself with \the [src]!") if(!do_mob(user, M,60)) return if(hasorgans(M)) @@ -34,12 +34,14 @@ if(target.status & DESTROYED) user << "What [target.display_name]?" return + if(!target.implant) + target.implant = list() target.implant += imp imp.loc = target if (M != user) user.visible_message("\red \The [user] implants \the [M]'s [target.display_name] with \the [src]!","\red You implant \the [M]'s [target.display_name] with \the [src]!") else - user.visible_message("\red \The [user] implants [user.get_gender_form("its")] own [target.display_name] with \the [src]!","\red You implant your [target.display_name] with \the [src]!") + user.visible_message("\red \The [user] implants [user.get_visible_gender() == MALE ? "his" : user.get_visible_gender() == FEMALE ? "her" : "their"] own [target.display_name] with \the [src]!","\red You implant your [target.display_name] with \the [src]!") M.attack_log += text("\[[time_stamp()]\] Implanted with [src] ([imp]) by [user] ([user.ckey])") user.attack_log += text("\[[time_stamp()]\] Used the [src] ([imp]) to implant [M] ([M.ckey])") log_admin("ATTACK: [user] ([user.ckey]) implanted [M] ([M.ckey]) with [src].") diff --git a/code/game/objects/tables_racks.dm b/code/game/objects/tables_racks.dm index dfc0f319551..5d6ea698d80 100644 --- a/code/game/objects/tables_racks.dm +++ b/code/game/objects/tables_racks.dm @@ -170,12 +170,12 @@ TABLE AND RACK OBJECT INTERATIONS "\red You hear the nauseating crunch of bone and gristle on solid metal and the squeal of said metal deforming.") dented++ else if(prob(50)) - G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [H.get_gender_form("its")] bone and cartilage making a loud crunch!",\ - "\red You smash \the [H]'s head on \the [src], [H.get_gender_form("its")] bone and cartilage making a loud crunch!",\ + G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [H.get_visible_gender() == MALE ? "his" : H.get_visible_gender() == FEMALE ? "her" : "their"] bone and cartilage making a loud crunch!",\ + "\red You smash \the [H]'s head on \the [src], [H.get_visible_gender() == MALE ? "his" : H.get_visible_gender() == FEMALE ? "her" : "their"] bone and cartilage making a loud crunch!",\ "\red You hear the nauseating crunch of bone and gristle on solid metal, the noise echoing through the room.") else - G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [H.get_gender_form("its")] nose smashed and face bloodied!",\ - "\red You smash \the [H]'s head on \the [src], [H.get_gender_form("its")] nose smashed and face bloodied!",\ + G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [H.get_visible_gender() == MALE ? "his" : H.get_visible_gender() == FEMALE ? "her" : "their"] nose smashed and face bloodied!",\ + "\red You smash \the [H]'s head on \the [src], [H.get_visible_gender() == MALE ? "his" : H.get_visible_gender() == FEMALE ? "her" : "their"] nose smashed and face bloodied!",\ "\red You hear the nauseating crunch of bone and gristle on solid metal and the gurgling gasp of someone who is trying to breathe through their own blood.") else affecting.take_damage(rand(5,10), 0) diff --git a/code/modules/DetectiveWork/scanner.dm b/code/modules/DetectiveWork/scanner.dm index 25a9984a330..51bc0b238cf 100644 --- a/code/modules/DetectiveWork/scanner.dm +++ b/code/modules/DetectiveWork/scanner.dm @@ -84,7 +84,7 @@ //General if ((!A.fingerprints || !A.fingerprints.len) && !A.suit_fibers && !A.blood_DNA) - user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.get_gender_form("it")] humming[prob(70) ? " gently." : "."]" ,\ + user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.get_visible_gender() == MALE ? "him" : H.get_visible_gender() == FEMALE ? "her" : "them"] humming[prob(70) ? " gently." : "."]" ,\ "\blue Unable to locate any fingerprints, materials, fibers, or blood on [A]!",\ "You hear a faint hum of electrical equipment.") return 0 @@ -123,12 +123,12 @@ for(var/blood in A.blood_DNA) user << "Blood type: \red [A.blood_DNA[blood]] \t \black DNA: \red [blood]" if(prob(80) || !A.fingerprints) - user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.get_gender_form("it")] humming[prob(70) ? " gently." : "."]" ,\ + user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.get_visible_gender() == MALE ? "him" : H.get_visible_gender() == FEMALE ? "her" : "them"] humming[prob(70) ? " gently." : "."]" ,\ "You finish scanning \the [A].",\ "You hear a faint hum of electrical equipment.") return 0 else - user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.get_gender_form("it")] humming[prob(70) ? " gently." : "."]\n[user.get_gender_form("It")] seems to perk up slightly at the readout." ,\ + user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.get_visible_gender() == MALE ? "him" : H.get_visible_gender() == FEMALE ? "her" : "them"] humming[prob(70) ? " gently." : "."]\n[user.get_visible_gender() == MALE ? "He" : H.get_visible_gender() == FEMALE ? "She" : "They"] seems to perk up slightly at the readout." ,\ "The results of the scan pique your interest.",\ "You hear a faint hum of electrical equipment, and someone making a thoughtful noise.") return 0 diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 610c7579bad..26e3ab12633 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -204,7 +204,7 @@ if(src == M && istype(src, /mob/living/carbon/human)) var/mob/living/carbon/human/H = M var/list/damaged = H.get_damaged_organs(1,1) - visible_message("\blue [src] examines [get_gender_form("itself")].", \ + visible_message("\blue [src] examines [get_visible_gender() == MALE ? "himself" : get_visible_gender() == FEMALE ? "herself" : "themselves"].", \ "\blue You check yourself for injuries.", \ "You hear a rustle, as someone checks about their person.") diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 34c46f83752..96978f233d3 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -27,19 +27,37 @@ skipears = src.head.flags_inv & HIDEEARS // crappy hacks because you can't do \his[src] etc. I'm sorry this proc is so unreadable, blame the text macros :< - var/list/proper_forms = get_visible_gender() - var/t_He = proper_forms["It"] //capitalised for use at the start of each line. - var/t_his = proper_forms["its"] - var/t_him = proper_forms["it"] - var/t_has = proper_forms["has"] - var/t_is = proper_forms["is"] + var/t_He = "It" //capitalised for use at the start of each line. + var/t_his = "its" + var/t_him = "it" + var/t_has = "has" + var/t_is = "is" + + var/msg = "*---------*\nThis is " + if(src.icon) + msg += "\icon[src.icon] " //fucking BYOND: this should stop dreamseeker crashing if we -somehow- examine somebody before their icon is generated + else + switch(get_visible_gender()) + if(MALE) + t_He = "He" + t_his = "his" + t_him = "him" + if(FEMALE) + t_He = "She" + t_his = "her" + t_him = "her" + if(NEUTER) + t_He = "They" + t_his = "their" + t_him = "them" + t_has = "have" + t_is = "are" if(mutantrace == "lizard") examine_text = "one of those lizard-like Soghuns" if(mutantrace == "skrell") examine_text = "one of those gelatinous Skrells" - var/msg = "*---------*\nThis is " if(icon) msg += "\icon[icon] " //fucking BYOND: this should stop dreamseeker crashing if we -somehow- examine somebody before their icon is generated diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 177a0efc0bf..9a5de65385b 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -2782,12 +2782,6 @@ It can still be worn/put on as normal. src.tkdisable = 0 /mob/living/carbon/human/get_visible_gender() - var/skip_gender = (wear_suit && wear_suit.flags_inv & HIDEJUMPSUIT && ((head && head.flags_inv & HIDEMASK) || wear_mask)) - - if( !skip_gender ) //big suits/masks make it hard to tell their gender - switch(gender) - if(MALE) - return list("It" = "He", "its" = "his", "it" = "he", "has" = "has", "is" = "is", "itself" = "himself") - if(FEMALE) - return list("It" = "She", "its" = "her", "it" = "she", "has" = "has", "is" = "is", "itself" = "herself") - return list("It" = "They", "its" = "their", "it" = "them", "has" = "have", "is" = "are", "itself" = "themselves") + if(wear_suit && wear_suit.flags_inv & HIDEJUMPSUIT && ((head && head.flags_inv & HIDEMASK) || wear_mask)) + return NEUTER + return gender \ No newline at end of file diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 4d92b29f8bf..cd0902eaada 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1115,11 +1115,4 @@ note dizziness decrements automatically in the mob's Life() proc. ..() /mob/proc/get_visible_gender() - //Returns the proper words to use based on the mob's visible gender. Used in text creation. - return list("It" = "It", "its" = "its", "it" = "it", "has" = "has", "is" = "is", "itself" = "itself") - -/mob/proc/get_gender_form(var/form) - if(!istext(form)) - return - var/list/proper_forms = get_visible_gender() - return proper_forms[form] \ No newline at end of file + return gender \ No newline at end of file From ea5913fde8838e86c7f34a0ed48b2dd9059371bc Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Sat, 23 Jun 2012 17:02:30 -0700 Subject: [PATCH 4/5] *sigh* Missed some stuff, compile fix. --- code/modules/DetectiveWork/scanner.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/DetectiveWork/scanner.dm b/code/modules/DetectiveWork/scanner.dm index 51bc0b238cf..ce05ef905f2 100644 --- a/code/modules/DetectiveWork/scanner.dm +++ b/code/modules/DetectiveWork/scanner.dm @@ -84,7 +84,7 @@ //General if ((!A.fingerprints || !A.fingerprints.len) && !A.suit_fibers && !A.blood_DNA) - user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.get_visible_gender() == MALE ? "him" : H.get_visible_gender() == FEMALE ? "her" : "them"] humming[prob(70) ? " gently." : "."]" ,\ + user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.get_visible_gender() == MALE ? "him" : user.get_visible_gender() == FEMALE ? "her" : "them"] humming[prob(70) ? " gently." : "."]" ,\ "\blue Unable to locate any fingerprints, materials, fibers, or blood on [A]!",\ "You hear a faint hum of electrical equipment.") return 0 @@ -123,12 +123,12 @@ for(var/blood in A.blood_DNA) user << "Blood type: \red [A.blood_DNA[blood]] \t \black DNA: \red [blood]" if(prob(80) || !A.fingerprints) - user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.get_visible_gender() == MALE ? "him" : H.get_visible_gender() == FEMALE ? "her" : "them"] humming[prob(70) ? " gently." : "."]" ,\ + user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.get_visible_gender() == MALE ? "him" : user.get_visible_gender() == FEMALE ? "her" : "them"] humming[prob(70) ? " gently." : "."]" ,\ "You finish scanning \the [A].",\ "You hear a faint hum of electrical equipment.") return 0 else - user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.get_visible_gender() == MALE ? "him" : H.get_visible_gender() == FEMALE ? "her" : "them"] humming[prob(70) ? " gently." : "."]\n[user.get_visible_gender() == MALE ? "He" : H.get_visible_gender() == FEMALE ? "She" : "They"] seems to perk up slightly at the readout." ,\ + user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.get_visible_gender() == MALE ? "him" : user.get_visible_gender() == FEMALE ? "her" : "them"] humming[prob(70) ? " gently." : "."]\n[user.get_visible_gender() == MALE ? "He" : user.get_visible_gender() == FEMALE ? "She" : "They"] seems to perk up slightly at the readout." ,\ "The results of the scan pique your interest.",\ "You hear a faint hum of electrical equipment, and someone making a thoughtful noise.") return 0 From 0737f64d12c7ad6235e9675af342d400ab81f68b Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Sat, 23 Jun 2012 17:07:13 -0700 Subject: [PATCH 5/5] Goddammit --- code/modules/mob/living/carbon/human/human_damage.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 52e97312dca..4140e9dd751 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -26,7 +26,7 @@ for(var/name in organs) var/datum/organ/external/O = organs[name] - if(O.destroyed) damage_appearance += "d" + if(O.status & DESTROYED) damage_appearance += "d" else damage_appearance += O.damage_state