diff --git a/code/__DEFINES/mob.dm b/code/__DEFINES/mob.dm
index fcb6e53c365..0080658562b 100644
--- a/code/__DEFINES/mob.dm
+++ b/code/__DEFINES/mob.dm
@@ -29,6 +29,8 @@
#define ORGAN_ASSISTED 4096
#define DROPLIMB_EDGE 0
+#define DROPLIMB_BLUNT 1
+#define DROPLIMB_BURN 2
#define AGE_MIN 17 //youngest a character can be
#define AGE_MAX 85 //oldest a character can be
diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm
index 47fb0090ac2..a71b1c76df4 100644
--- a/code/game/objects/items/weapons/tools.dm
+++ b/code/game/objects/items/weapons/tools.dm
@@ -308,7 +308,7 @@
/obj/item/weapon/weldingtool/proc/setWelding(var/temp_welding)
//If we're turning it on
if(temp_welding > 0)
- if (remove_fuel(1))
+ if (get_fuel() > 0)
usr << "\blue The [src] switches on."
src.force = 15
src.damtype = "fire"
@@ -480,7 +480,7 @@
if (!S)
return
- if(!(S.status & ORGAN_ROBOT) || user.a_intent != "help")
+ if(!(S.status & ORGAN_ROBOT) || user.a_intent != "help" || S.open == 2)
return ..()
if(S.brute_dam)
@@ -489,13 +489,13 @@
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
S.heal_damage(15,0,0,1)
user.visible_message("\The [user] patches some dents on \the [M]'s [S.name] with \the [src].")
- else
+ else if(S.open != 2)
user << "Need more welding fuel!"
return 1
else
- user << "The damage is far too severe to patch over externally."
+ user << "The damage is far too severe to patch over externally."
return 1
- else if(!S.open)
+ else if(S.open != 2)
user << "Nothing to fix!"
else
diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm
index 5c83d142a8e..92af27ee01a 100644
--- a/code/modules/organs/organ_external.dm
+++ b/code/modules/organs/organ_external.dm
@@ -603,10 +603,24 @@ Note that amputating the affected organ does in fact remove the infection from t
switch(disintegrate)
if(DROPLIMB_EDGE)
if(!clean)
+ var/gore_sound = "[(status & ORGAN_ROBOT) ? "tortured metal" : "ripping tendons and flesh"]"
owner.visible_message(
"\The [owner]'s [src.name] flies off in an arc!",\
"Your [src.name] goes flying off!",\
- "You hear a terrible sound of ripping tendons and flesh.")
+ "You hear a terrible sound of [gore_sound].")
+ if(DROPLIMB_BURN)
+ var/gore = "[(status & ORGAN_ROBOT) ? "": " of burning flesh"]"
+ owner.visible_message(
+ "\The [owner]'s [src.name] flashes away into ashes!",\
+ "Your [src.name] flashes away into ashes!",\
+ "You hear a crackling sound[gore].")
+ if(DROPLIMB_BLUNT)
+ var/gore = "[(status & ORGAN_ROBOT) ? "": " in shower of gore"]"
+ var/gore_sound = "[(status & ORGAN_ROBOT) ? "rending sound of tortured metal" : "sickening splatter of gore"]"
+ owner.visible_message(
+ "\The [owner]'s [src.name] explodes[gore]!",\
+ "Your [src.name] explodes[gore]!",\
+ "You hear the [gore_sound].")
var/mob/living/carbon/human/victim = owner //Keep a reference for post-removed().
removed(null, ignore_children)
@@ -614,17 +628,15 @@ Note that amputating the affected organ does in fact remove the infection from t
wounds.Cut()
if(parent && !nodamage)
- var/datum/wound/W
- if(clean || max_damage < 50)
- W = new/datum/wound/lost_limb/small(max_damage)
- else
- W = new/datum/wound/lost_limb(max_damage)
+ var/datum/wound/lost_limb/W = new (src, disintegrate, clean)
parent.children -= src
if(clean)
parent.wounds |= W
parent.update_damages()
else
var/obj/item/organ/external/stump/stump = new (victim, 0, src)
+ if(status & ORGAN_ROBOT)
+ stump.robotize()
stump.wounds |= W
victim.organs |= stump
stump.update_damages()
diff --git a/code/modules/organs/wound.dm b/code/modules/organs/wound.dm
index bd044163ff3..55a2f3f5cee 100644
--- a/code/modules/organs/wound.dm
+++ b/code/modules/organs/wound.dm
@@ -36,9 +36,8 @@
var/list/stages
// internal wounds can only be fixed through surgery
var/internal = 0
- // maximum stage at which bleeding should still happen, counted from the right rather than the left of the list
- // 1 means all stages except the last should bleed
- var/max_bleeding_stage = 1
+ // maximum stage at which bleeding should still happen. Beyond this stage bleeding is prevented.
+ var/max_bleeding_stage = 0
// one of CUT, BRUISE, BURN
var/damage_type = CUT
// whether this wound needs a bandage/salve to heal at all
@@ -64,8 +63,6 @@
src.damage = damage
- max_bleeding_stage = src.desc_list.len - max_bleeding_stage
-
// initialize with the appropriate stage
src.init_stage(damage)
@@ -247,8 +244,9 @@
/** CUTS **/
/datum/wound/cut/small
- // link wound descriptions to amounts of damage
- max_bleeding_stage = 2
+ // Minor cuts have max_bleeding_stage set to the stage that bears the wound type's name.
+ // The major cut types have the max_bleeding_stage set to the clot stage (which is accordingly given the "blood soaked" descriptor).
+ max_bleeding_stage = 3
stages = list("ugly ripped cut" = 20, "ripped cut" = 10, "cut" = 5, "healing cut" = 2, "small scab" = 0)
damage_type = CUT
@@ -263,25 +261,25 @@
damage_type = CUT
/datum/wound/cut/gaping
- max_bleeding_stage = 2
- stages = list("gaping wound" = 50, "large blood soaked clot" = 25, "large clot" = 15, "small angry scar" = 5, "small straight scar" = 0)
+ max_bleeding_stage = 3
+ stages = list("gaping wound" = 50, "large blood soaked clot" = 25, "blood soaked clot" = 15, "small angry scar" = 5, "small straight scar" = 0)
damage_type = CUT
/datum/wound/cut/gaping_big
- max_bleeding_stage = 2
- stages = list("big gaping wound" = 60, "healing gaping wound" = 40, "large angry scar" = 10, "large straight scar" = 0)
+ max_bleeding_stage = 3
+ stages = list("big gaping wound" = 60, "healing gaping wound" = 40, "large blood soaked clot" = 25, "large angry scar" = 10, "large straight scar" = 0)
damage_type = CUT
datum/wound/cut/massive
- max_bleeding_stage = 2
- stages = list("massive wound" = 70, "massive healing wound" = 50, "massive angry scar" = 10, "massive jagged scar" = 0)
+ max_bleeding_stage = 3
+ stages = list("massive wound" = 70, "massive healing wound" = 50, "massive blood soaked clot" = 25, "massive angry scar" = 10, "massive jagged scar" = 0)
damage_type = CUT
/** BRUISES **/
/datum/wound/bruise
- stages = list("monumental bruise" = 80, "huge bruise" = 50, "large bruise" = 30,\
+ stages = list("monumental bruise" = 80, "huge bruise" = 50, "large bruise" = 30,
"moderate bruise" = 20, "small bruise" = 10, "tiny bruise" = 5)
- max_bleeding_stage = 3
+ max_bleeding_stage = 3 //only large bruise and above can bleed.
autoheal_cutoff = 30
damage_type = BRUISE
@@ -309,18 +307,38 @@ datum/wound/cut/massive
/** INTERNAL BLEEDING **/
/datum/wound/internal_bleeding
internal = 1
- stages = list("severed vein" = 30, "cut vein" = 20, "damaged vein" = 10, "bruised vein" = 5)
+ stages = list("severed artery" = 30, "cut artery" = 20, "damaged artery" = 10, "bruised artery" = 5)
autoheal_cutoff = 5
- max_bleeding_stage = 0 //all stages bleed. It's called internal bleeding after all.
+ max_bleeding_stage = 4 //all stages bleed. It's called internal bleeding after all.
+
/** EXTERNAL ORGAN LOSS **/
/datum/wound/lost_limb
- damage_type = CUT
- stages = list("ripped stump" = 65, "bloody stump" = 50, "clotted stump" = 25, "scarred stump" = 0)
- max_bleeding_stage = 3
- can_merge(var/datum/wound/other)
- return 0 //cannot be merged
+/datum/wound/lost_limb/New(var/obj/item/organ/external/lost_limb, var/losstype, var/clean)
+ var/damage_amt = lost_limb.max_damage
+ if(clean) damage_amt /= 2
+
+ switch(losstype)
+ if(DROPLIMB_EDGE, DROPLIMB_BLUNT)
+ damage_type = CUT
+ max_bleeding_stage = 3 //clotted stump and above can bleed.
+ stages = list(
+ "ripped stump" = damage_amt*1.3,
+ "bloody stump" = damage_amt,
+ "clotted stump" = damage_amt*0.5,
+ "scarred stump" = 0
+ )
+ if(DROPLIMB_BURN)
+ damage_type = BURN
+ stages = list(
+ "ripped charred stump" = damage_amt*1.3,
+ "charred stump" = damage_amt,
+ "scarred stump" = damage_amt*0.5,
+ "scarred stump" = 0
+ )
+
+ ..(damage_amt)
-/datum/wound/lost_limb/small
- stages = list("ripped hole" = 40, "bloody hole" = 30, "clotted hole" = 15, "scarred hole" = 0)
+/datum/wound/lost_limb/can_merge(var/datum/wound/other)
+ return 0 //cannot be merged
diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm
index 0887f8642c1..de6fb00c621 100644
--- a/code/modules/power/cable.dm
+++ b/code/modules/power/cable.dm
@@ -496,7 +496,6 @@ obj/structure/cable/proc/cableColor(var/colorC)
///////////////////////////////////
// General procedures
///////////////////////////////////
-
//you can use wires to heal robotics
/obj/item/stack/cable_coil/attack(mob/M as mob, mob/user as mob)
if(ishuman(M))
@@ -505,19 +504,18 @@ obj/structure/cable/proc/cableColor(var/colorC)
if(!S)
return
- if(!(S.status & ORGAN_ROBOT) || user.a_intent != "help")
+ if(!(S.status & ORGAN_ROBOT) || user.a_intent != "help" || S.open == 2)
return ..()
- if(S.burn_dam > 0 && use(1))
+ if(S.burn_dam)
if(S.burn_dam < ROBOLIMB_SELF_REPAIR_CAP)
S.heal_damage(0,15,0,1)
user.visible_message("\The [user] repairs some burn damage on \the [M]'s [S.name] with \the [src].")
- else
- user << "The damage is far too severe to patch over externally."
+ else if(S.open != 2)
+ user << "The damage is far too severe to patch over externally."
return 1
- else if(!S.open)
+ else if(S.open != 2)
user << "Nothing to fix!"
-
else
return ..()
diff --git a/code/modules/surgery/robotics.dm b/code/modules/surgery/robotics.dm
index d7ae91e40c9..f0da9944abf 100644
--- a/code/modules/surgery/robotics.dm
+++ b/code/modules/surgery/robotics.dm
@@ -76,7 +76,7 @@
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
- user.visible_message("\blue [user] open the maintenance hatch on [target]'s [affected.name] with \the [tool].", \
+ user.visible_message("\blue [user] opens the maintenance hatch on [target]'s [affected.name] with \the [tool].", \
"\blue You open the maintenance hatch on [target]'s [affected.name] with \the [tool]." )
affected.open = 2
@@ -134,7 +134,7 @@
var/obj/item/weapon/weldingtool/welder = tool
if(!welder.isOn() || !welder.remove_fuel(1,user))
return 0
- return affected && affected.open && affected.brute_dam > 0 && target_zone != "mouth"
+ return affected && affected.open == 2 && affected.brute_dam > 0 && target_zone != "mouth"
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
@@ -164,8 +164,17 @@
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(..())
+ var/obj/item/stack/cable_coil/C = tool
var/obj/item/organ/external/affected = target.get_organ(target_zone)
- return affected && affected.open && affected.burn_dam > 0 && target_zone != "mouth"
+ var/limb_can_operate = (affected && affected.open == 2 && affected.burn_dam > 0 && target_zone != "mouth")
+ if(limb_can_operate)
+ if(istype(C))
+ if(!C.get_amount() >= 3)
+ user << "You need three or more cable pieces to repair this damage."
+ return 2
+ C.use(3)
+ return 1
+ return 0
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)