Ports the radiation subsystem and cleans up damage flags. (#15715)

This commit is contained in:
Matt Atlas
2023-02-07 13:22:47 +01:00
committed by GitHub
parent 5527fc0810
commit 31c73ead85
198 changed files with 981 additions and 649 deletions
+4 -4
View File
@@ -39,7 +39,7 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(SPAN_WARNING("[user]'s hand slips, smearing some of [tool] in the incision in [target]'s [affected.name]!") , \
SPAN_WARNING("Your hand slips, smearing some of [tool] in the incision in [target]'s [affected.name]!"))
target.apply_damage(15, PAIN)
target.apply_damage(15, DAMAGE_PAIN)
/singleton/surgery_step/set_bone
name = "Set Broken Bone"
@@ -79,7 +79,7 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(SPAN_WARNING("[user]'s hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!") , \
SPAN_WARNING("Your hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!"))
target.apply_damage(5, BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
target.apply_damage(5, DAMAGE_BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
/singleton/surgery_step/mend_skull
name = "Repair Broken Skull"
@@ -113,7 +113,7 @@
user.visible_message(SPAN_WARNING("[user]'s hand slips, damaging [target]'s face with \the [tool]!") , \
SPAN_WARNING("Your hand slips, damaging [target]'s face with \the [tool]!"))
var/obj/item/organ/external/head/h = affected
target.apply_damage(10, BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
target.apply_damage(10, DAMAGE_BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
h.disfigured = 1
/singleton/surgery_step/finish_bone
@@ -153,4 +153,4 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(SPAN_WARNING("[user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.name]!") , \
SPAN_WARNING("Your hand slips, smearing [tool] in the incision in [target]'s [affected.name]!"))
target.apply_damage(15, PAIN)
target.apply_damage(15, DAMAGE_PAIN)
+3 -3
View File
@@ -60,7 +60,7 @@
user.visible_message(SPAN_WARNING("[user]'s hand slips, cracking [target]'s [affected.encased] with \the [tool]!") , \
SPAN_WARNING("Your hand slips, cracking [target]'s [affected.encased] with \the [tool]!") )
target.apply_damage(20, BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
target.apply_damage(20, DAMAGE_BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
affected.fracture()
@@ -112,7 +112,7 @@
var/self_msg = SPAN_WARNING("Your hand slips, cracking [target]'s [affected.encased]!")
user.visible_message(msg, self_msg)
target.apply_damage(20, BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
target.apply_damage(20, DAMAGE_BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
affected.fracture()
/singleton/surgery_step/open_encased/close
@@ -164,7 +164,7 @@
var/self_msg = SPAN_WARNING("Your hand slips, bending [target]'s [affected.encased] the wrong way!")
user.visible_message(msg, self_msg)
target.apply_damage(20, BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
target.apply_damage(20, DAMAGE_BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
affected.fracture()
if(affected.internal_organs && affected.internal_organs.len)
+3 -3
View File
@@ -42,8 +42,8 @@
/singleton/surgery_step/generic/cut_face/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message(SPAN_WARNING("[user]'s hand slips, slicing [target]'s throat wth \the [tool]!") , \
SPAN_WARNING("Your hand slips, slicing [target]'s throat wth \the [tool]!") )
target.apply_damage(40, BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
target.apply_damage(20, OXY)
target.apply_damage(40, DAMAGE_BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
target.apply_damage(20, DAMAGE_OXY)
target.losebreath += 10
@@ -81,4 +81,4 @@
/singleton/surgery_step/robotics/face/synthskin/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message(SPAN_WARNING("[user]'s hand slips, slicing [target]'s throat wth \the [tool]!") , \
SPAN_WARNING("Your hand slips, slicing [target]'s throat wth \the [tool]!") )
target.apply_damage(40, BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
target.apply_damage(40, DAMAGE_BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
+9 -9
View File
@@ -42,8 +42,8 @@
/singleton/surgery_step/generic/prepare_face/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message(SPAN_WARNING("[user]'s hand slips, slicing [target]'s throat wth \the [tool]!") , \
SPAN_WARNING("Your hand slips, slicing [target]'s throat wth \the [tool]!") )
target.apply_damage(40, BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
target.apply_damage(20, OXY)
target.apply_damage(40, DAMAGE_BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
target.apply_damage(20, DAMAGE_OXY)
target.losebreath += 10
@@ -88,8 +88,8 @@
/singleton/surgery_step/generic/alter_face/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message(SPAN_WARNING("[user]'s hand slips, slicing [target]'s throat wth \the [tool]!") , \
SPAN_WARNING("Your hand slips, slicing [target]'s throat wth \the [tool]!") )
target.apply_damage(40, BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
target.apply_damage(20, OXY)
target.apply_damage(40, DAMAGE_BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
target.apply_damage(20, DAMAGE_OXY)
target.losebreath += 10
@@ -128,7 +128,7 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(SPAN_WARNING("[user]'s hand slips, leaving a small burn on [target]'s face with \the [tool]!"), \
SPAN_WARNING("Your hand slips, leaving a small burn on [target]'s face with \the [tool]!"))
target.apply_damage(5, BURN, affected)
target.apply_damage(5, DAMAGE_BURN, affected)
/singleton/surgery_step/robotics/face
priority = 2
@@ -164,7 +164,7 @@
/singleton/surgery_step/robotics/face/synthskinopen/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message(SPAN_WARNING("[user]'s hand slips, slicing [target]'s throat wth \the [tool]!") , \
SPAN_WARNING("Your hand slips, slicing [target]'s throat wth \the [tool]!") )
target.apply_damage(40, BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
target.apply_damage(40, DAMAGE_BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
/singleton/surgery_step/robotics/face/prepare_face
name = "Prepare Face"
@@ -192,7 +192,7 @@
/singleton/surgery_step/robotics/face/prepare_face/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message(SPAN_WARNING("[user]'s hand slips, slicing [target]'s throat wth \the [tool]!") , \
SPAN_WARNING("Your hand slips, slicing [target]'s throat wth \the [tool]!") )
target.apply_damage(40, BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
target.apply_damage(40, DAMAGE_BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
/singleton/surgery_step/robotics/face/alter_synthface
name = "Alter Face"
@@ -236,7 +236,7 @@
/singleton/surgery_step/robotics/face/alter_synthface/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message(SPAN_WARNING("[user]'s hand slips, slicing [target]'s throat wth \the [tool]!") , \
SPAN_WARNING("Your hand slips, slicing [target]'s throat wth \the [tool]!") )
target.apply_damage(40, BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
target.apply_damage(40, DAMAGE_BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
/singleton/surgery_step/robotics/face/seal_face
name = "Seal face"
@@ -272,4 +272,4 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(SPAN_WARNING("[user]'s hand slips, leaving a small burn on [target]'s synthskin face with \the [tool]!"), \
SPAN_WARNING("Your hand slips, leaving a small burn on [target]'s synthskin face with \the [tool]!"))
target.apply_damage(5, BURN, affected)
target.apply_damage(5, DAMAGE_BURN, affected)
+12 -12
View File
@@ -56,7 +56,7 @@
affected.status |= ORGAN_BLEEDING
playsound(target.loc, 'sound/weapons/bladeslice.ogg', 50, 1)
target.apply_damage(1, BRUTE, target_zone, 0)
target.apply_damage(1, DAMAGE_BRUTE, target_zone, 0)
affected.clamp_organ()
spread_germs_to_organ(affected, user)
@@ -64,8 +64,8 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(SPAN_WARNING("[user]'s hand slips as the blade sputters, searing a long gash in [target]'s [affected.name] with \the [tool]!"), \
SPAN_WARNING("Your hand slips as the blade sputters, searing a long gash in [target]'s [affected.name] with \the [tool]!"))
target.apply_damage(7.5, BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
target.apply_damage(12.5, BURN, target_zone, 0, tool)
target.apply_damage(7.5, DAMAGE_BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
target.apply_damage(12.5, DAMAGE_BURN, target_zone, 0, tool)
/singleton/surgery_step/generic/incision_manager
name = "Make Managed Incision"
@@ -98,7 +98,7 @@
if(istype(target) && !(target.species.flags & NO_BLOOD))
affected.status |= ORGAN_BLEEDING
target.apply_damage(1, BRUTE, target_zone, 0)
target.apply_damage(1, DAMAGE_BRUTE, target_zone, 0)
affected.clamp_organ()
affected.open = ORGAN_OPEN_RETRACTED
@@ -106,8 +106,8 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(SPAN_WARNING("[user]'s hand jolts as the system sparks, ripping a gruesome hole in [target]'s [affected.name] with \the [tool]!"), \
SPAN_WARNING("Your hand jolts as the system sparks, ripping a gruesome hole in [target]'s [affected.name] with \the [tool]!"))
target.apply_damage(20, BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
target.apply_damage(15, BURN, target_zone, 0, tool)
target.apply_damage(20, DAMAGE_BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
target.apply_damage(15, DAMAGE_BURN, target_zone, 0, tool)
/singleton/surgery_step/generic/cut_open
name = "Make Incision"
@@ -145,14 +145,14 @@
if(istype(target) && !(target.species.flags & NO_BLOOD))
affected.status |= ORGAN_BLEEDING
target.apply_damage(1, BRUTE, target_zone, 0)
target.apply_damage(1, DAMAGE_BRUTE, target_zone, 0)
playsound(target.loc, 'sound/weapons/bladeslice.ogg', 15, 1)
/singleton/surgery_step/generic/cut_open/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(SPAN_WARNING("[user]'s hand slips, slicing open [target]'s [affected.name] in the wrong place with \the [tool]!"), \
SPAN_WARNING("Your hand slips, slicing open [target]'s [affected.name] in the wrong place with \the [tool]!"))
target.apply_damage(10, BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
target.apply_damage(10, DAMAGE_BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
/singleton/surgery_step/generic/cut_open_vaurca
name = "Cut Open Vaurca"
@@ -189,13 +189,13 @@
if(istype(target) && !(target.species.flags & NO_BLOOD))
affected.status |= ORGAN_BLEEDING
target.apply_damage(1, BRUTE, target_zone, 0)
target.apply_damage(1, DAMAGE_BRUTE, target_zone, 0)
/singleton/surgery_step/generic/cut_open_vaurca/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(SPAN_WARNING("[user]'s hand slips, cracking [target]'s [affected.name] carapace in the wrong place with \the [tool]!"), \
SPAN_WARNING("Your hand slips, cracking [target]'s [affected.name] carapace in the wrong place with \the [tool]!"))
target.apply_damage(15, BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
target.apply_damage(15, DAMAGE_BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
/singleton/surgery_step/generic/clamp_bleeders
name = "Clamp Bleeders"
@@ -292,7 +292,7 @@
msg = SPAN_WARNING("[user]'s hand slips, damaging several organs in [target]'s lower abdomen with \the [tool]")
self_msg = SPAN_WARNING("Your hand slips, damaging several organs in [target]'s lower abdomen with \the [tool]!")
user.visible_message(msg, self_msg)
target.apply_damage(12, BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
target.apply_damage(12, DAMAGE_BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
/singleton/surgery_step/generic/cauterize
name = "Cauterize Incision"
@@ -332,4 +332,4 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(SPAN_WARNING("[user]'s hand slips, leaving a small burn on [target]'s [affected.name] with \the [tool]!"), \
SPAN_WARNING("Your hand slips, leaving a small burn on [target]'s [affected.name] with \the [tool]!"))
target.apply_damage(5, BURN, affected, tool)
target.apply_damage(5, DAMAGE_BURN, affected, tool)
+2 -2
View File
@@ -37,7 +37,7 @@
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
user.visible_message(SPAN_WARNING("[user]'s hand slips, scraping around inside [target]'s [affected.name] with \the [tool]!"), \
SPAN_WARNING("Your hand slips, scraping around inside [target]'s [affected.name] with \the [tool]!"))
target.apply_damage(20, BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
target.apply_damage(20, DAMAGE_BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
/singleton/surgery_step/cavity/make_space
name = "Hollow Out Cavity"
@@ -231,5 +231,5 @@
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
user.visible_message(SPAN_WARNING("[user] loses their grip and stabs [target] with \the [tool]!"), SPAN_WARNING("You lose your grip on \the [tool] and stab [target]!"))
affected.sever_artery()
target.apply_damage(25, BRUTE, target_zone)
target.apply_damage(25, DAMAGE_BRUTE, target_zone)
+3 -3
View File
@@ -47,7 +47,7 @@
var/obj/item/organ/external/E = tool
user.visible_message(SPAN_WARNING("[user]'s hand slips, damaging [target]'s [E.amputation_point]!"), \
SPAN_WARNING("Your hand slips, damaging [target]'s [E.amputation_point]!"))
target.apply_damage(10, BRUTE, null, damage_flags = DAM_EDGE)
target.apply_damage(10, DAMAGE_BRUTE, null, damage_flags = DAMAGE_FLAG_EDGE)
/singleton/surgery_step/limb/connect
name = "Connect Limb"
@@ -89,7 +89,7 @@
var/obj/item/organ/external/E = tool
user.visible_message(SPAN_WARNING("[user]'s hand slips, damaging [target]'s [E.amputation_point]!"), \
SPAN_WARNING("Your hand slips, damaging [target]'s [E.amputation_point]!"))
target.apply_damage(10, BRUTE, null, damage_flags = DAM_SHARP)
target.apply_damage(10, DAMAGE_BRUTE, null, damage_flags = DAMAGE_FLAG_SHARP)
/singleton/surgery_step/limb/mechanize
name = "Attach Prosthetic Limb"
@@ -138,4 +138,4 @@
/singleton/surgery_step/limb/mechanize/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message(SPAN_WARNING("[user]'s hand slips, damaging [target]'s flesh!"), \
SPAN_WARNING("Your hand slips, damaging [target]'s flesh!"))
target.apply_damage(10, BRUTE, null, damage_flags = DAM_SHARP)
target.apply_damage(10, DAMAGE_BRUTE, null, damage_flags = DAMAGE_FLAG_SHARP)
+6 -6
View File
@@ -99,7 +99,7 @@
else if(istype(tool, /obj/item/stack/medical/bruise_pack))
dam_amt = 5
target.adjustToxLoss(10)
target.apply_damage(5, BRUTE, target_zone, 0, tool)
target.apply_damage(5, DAMAGE_BRUTE, target_zone, 0, tool)
for(var/obj/item/organ/internal/I in affected.internal_organs)
if(I && I.is_damaged())
@@ -167,7 +167,7 @@
SPAN_WARNING("Your hand slips, gumming up the mechanisms inside of [target]'s [affected.name] with \the [tool]!"))
target.adjustToxLoss(5)
target.apply_damage(5, BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
target.apply_damage(5, DAMAGE_BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
for(var/obj/item/organ/internal/I in affected.internal_organs)
if(I)
@@ -236,7 +236,7 @@
user.visible_message(SPAN_WARNING("[user]'s hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!"), \
SPAN_WARNING("Your hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!"))
affected.sever_artery()
target.apply_damage(rand(30, 50), BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
target.apply_damage(rand(30, 50), DAMAGE_BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
/singleton/surgery_step/internal/remove_organ
name = "Remove Organ"
@@ -297,7 +297,7 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(SPAN_WARNING("[user]'s hand slips, damaging [target]'s [affected.name] with \the [tool]!"), \
SPAN_WARNING("Your hand slips, damaging [target]'s [affected.name] with \the [tool]!"))
target.apply_damage(20, BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
target.apply_damage(20, DAMAGE_BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
/singleton/surgery_step/internal/replace_organ
name = "Replace Organ"
@@ -454,7 +454,7 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(SPAN_WARNING("[user]'s hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!"), \
SPAN_WARNING("Your hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!"))
target.apply_damage(20, BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
target.apply_damage(20, DAMAGE_BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
/singleton/surgery_step/internal/prepare
name = "Prepare Brain"
@@ -499,4 +499,4 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(SPAN_WARNING("[user]'s hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!"), \
SPAN_WARNING("Your hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!"))
target.apply_damage(20, BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
target.apply_damage(20, DAMAGE_BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
+2 -2
View File
@@ -221,7 +221,7 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(SPAN_WARNING("[user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.name]!") , \
SPAN_WARNING("Your hand slips, smearing [tool] in the incision in [target]'s [affected.name]!"))
target.apply_damage(15, PAIN)
target.apply_damage(15, DAMAGE_PAIN)
/singleton/surgery_step/hardsuit
name = "Remove Hardsuit"
@@ -331,5 +331,5 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(SPAN_WARNING("[user]'s hand slips, sawing through the bone in [target]'s [affected.name] with \the [tool]!"), \
SPAN_WARNING("Your hand slips, sawwing through the bone in [target]'s [affected.name] with \the [tool]!"))
target.apply_damage(30, BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
target.apply_damage(30, DAMAGE_BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
affected.fracture()
+2 -2
View File
@@ -227,7 +227,7 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(SPAN_WARNING("[user]'s [tool.name] slips, damaging the internal structure of [target]'s [affected.name]."),
SPAN_WARNING("Your [tool.name] slips, damaging the internal structure of [target]'s [affected.name]."))
target.apply_damage(rand(5,10), BURN, affected)
target.apply_damage(rand(5,10), DAMAGE_BURN, affected)
/singleton/surgery_step/robotics/repair_burn
name = "Repair Burns"
@@ -271,7 +271,7 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(SPAN_WARNING("[user] causes a short circuit in [target]'s [affected.name]!"),
SPAN_WARNING("You cause a short circuit in [target]'s [affected.name]!"))
target.apply_damage(rand(5,10), BURN, affected)
target.apply_damage(rand(5,10), DAMAGE_BURN, affected)
/singleton/surgery_step/robotics/detach_organ_robotic
name = "Detach Robotic Organ"