[MIRROR] [TEST-MERGE FIRST] Allows all limbs to be dismembered and significantly refactors wounds [MDB IGNORE] (#23407)

* [TEST-MERGE FIRST] Allows all limbs to be dismembered and significantly refactors wounds

* ah fuck it

* test

* edaawdawd

* Revert "edaawdawd"

This reverts commit 47be710fe61a1f4ca79212b29b3e88bf05ec9a3a.

* nothing but sheer hatred

* freaawd

* dzfxg

* Fixing some diffs here while we are at it.

* These are deprecated and should be removed

---------

Co-authored-by: nikothedude <59709059+nikothedude@users.noreply.github.com>
Co-authored-by: nikothedude <simon.prouty@gmail.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-09-05 19:24:22 +02:00
committed by GitHub
parent 02f66628e2
commit 2bcbb36ab9
84 changed files with 1974 additions and 2797 deletions
+10 -5
View File
@@ -1268,12 +1268,17 @@
else
wound_type = forced_type
else
wound_type = pick(GLOB.global_all_wound_types)
for (var/datum/wound/path as anything in shuffle(GLOB.all_wound_pregen_data))
var/datum/wound_pregen_data/pregen_data = GLOB.all_wound_pregen_data[path]
if (pregen_data.can_be_applied_to(scar_part, random_roll = TRUE))
wound_type = path
break
var/datum/wound/phantom_wound = new wound_type
scaries.generate(scar_part, phantom_wound)
scaries.fake = TRUE
QDEL_NULL(phantom_wound)
if (wound_type) // can feasibly happen, if its an inorganic limb/cant be wounded/scarred
var/datum/wound/phantom_wound = new wound_type
scaries.generate(scar_part, phantom_wound)
scaries.fake = TRUE
QDEL_NULL(phantom_wound)
/mob/living/carbon/is_face_visible()
return !(wear_mask?.flags_inv & HIDEFACE) && !(head?.flags_inv & HIDEFACE)
@@ -775,7 +775,6 @@
return ..()
var/obj/item/bodypart/grasped_part = get_bodypart(zone_selected)
//SKYRAT EDIT CHANGE BEGIN - MEDICAL
/*
if(!grasped_part?.get_modified_bleed_rate())
return
@@ -795,9 +794,8 @@
QDEL_NULL(grasp)
return
grasp.grasp_limb(grasped_part)
*/
*/ // SKYRAT EDIT REMOVAL - MODULARIZED INTO grasp.dm's self_grasp_bleeding_limb !! IF THIS PROC IS UPDATED, PUT IT IN THERE !!
self_grasp_bleeding_limb(grasped_part, supress_message)
//SKYRAT EDIT CHANGE END
/// an abstract item representing you holding your own limb to staunch the bleeding, see [/mob/living/carbon/proc/grabbedby] will probably need to find somewhere else to put this.
/obj/item/hand_item/self_grasp
@@ -104,6 +104,9 @@
/// All of the scars a carbon has afflicted throughout their limbs
var/list/all_scars
/// Assoc list of BODY_ZONE -> WOUND_TYPE. Set when a limb is dismembered, unset when one is attached. Used for determining what scar to add when it comes time to generate them.
var/list/body_zone_dismembered_by
/// Simple modifier for whether this mob can handle greater or lesser skillchip complexity. See /datum/mutation/human/biotechcompat/ for example.
var/skillchip_complexity_modifier = 0
+1 -1
View File
@@ -154,7 +154,7 @@
SEND_SIGNAL(src, COMSIG_ATOM_EXAMINE, user, .)
//SKYRAT EDIT REMOVAL - MOVED - MEDICAL
//SKYRAT EDIT REMOVAL - MOVED - MEDICAL - carbon_examine.dm
/*
/mob/living/carbon/examine_more(mob/user)
. = ..()
@@ -1327,7 +1327,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
if(!(prob(25 + (weapon.force * 2))))
return TRUE
if(IS_ORGANIC_LIMB(affecting))
if(affecting.can_bleed())
weapon.add_mob_blood(human) //Make the weapon bloody, not the person.
if(prob(weapon.force * 2)) //blood spatter!
bloody = TRUE
@@ -1706,19 +1706,19 @@ GLOBAL_LIST_EMPTY(features_by_species)
// Lets pick a random body part and check for an existing burn
var/obj/item/bodypart/bodypart = pick(humi.bodyparts)
var/datum/wound/burn/existing_burn = locate(/datum/wound/burn) in bodypart.wounds
var/datum/wound/burn/flesh/existing_burn = locate(/datum/wound/burn) in bodypart.wounds
// If we have an existing burn try to upgrade it
if(existing_burn)
switch(existing_burn.severity)
if(WOUND_SEVERITY_MODERATE)
if(humi.bodytemperature > BODYTEMP_HEAT_WOUND_LIMIT + 400) // 800k
bodypart.force_wound_upwards(/datum/wound/burn/severe, wound_source = "hot temperatures")
bodypart.force_wound_upwards(/datum/wound/burn/flesh/severe, wound_source = "hot temperatures")
if(WOUND_SEVERITY_SEVERE)
if(humi.bodytemperature > BODYTEMP_HEAT_WOUND_LIMIT + 2800) // 3200k
bodypart.force_wound_upwards(/datum/wound/burn/critical, wound_source = "hot temperatures")
bodypart.force_wound_upwards(/datum/wound/burn/flesh/critical, wound_source = "hot temperatures")
else // If we have no burn apply the lowest level burn
bodypart.force_wound_upwards(/datum/wound/burn/moderate, wound_source = "hot temperatures")
bodypart.force_wound_upwards(/datum/wound/burn/flesh/moderate, wound_source = "hot temperatures")
// always take some burn damage
var/burn_damage = HEAT_DAMAGE_LEVEL_1
@@ -705,11 +705,7 @@
//SKYRAT EDIT ADDITION BEGIN - MEDICAL
if(body_part.current_gauze)
var/datum/bodypart_aid/current_gauze = body_part.current_gauze
combined_msg += "\t [span_notice("Your [body_part.name] is [current_gauze.desc_prefix] with <a href='?src=[REF(current_gauze)];remove=1'>[current_gauze.get_description()]</a>.")]"
if(body_part.current_splint)
var/datum/bodypart_aid/current_splint = body_part.current_splint
combined_msg += "\t [span_notice("Your [body_part.name] is [current_splint.desc_prefix] with <a href='?src=[REF(current_splint)];remove=1'>[current_splint.get_description()]</a>.")]"
combined_msg += "\t [span_notice("Your [body_part.name] is [body_part.current_gauze.get_gauze_usage_prefix()] with <a href='?src=[REF(body_part.current_gauze)];remove=1'>[body_part.current_gauze.get_gauze_description()]</a>.")]"
//SKYRAT EDIT END
for(var/t in missing)
@@ -169,13 +169,15 @@
if(LAZYLEN(scar_data) != SCAR_SAVE_LENGTH)
return // invalid, should delete
var/version = text2num(scar_data[SCAR_SAVE_VERS])
if(!version || version < SCAR_CURRENT_VERSION) // get rid of old scars
if(!version || version != SCAR_CURRENT_VERSION) // get rid of scars using a incompatable version
return
if(specified_char_index && (mind?.original_character_slot_index != specified_char_index))
return
if (isnull(text2num(scar_data[SCAR_SAVE_BIOLOGY])))
return
var/obj/item/bodypart/the_part = get_bodypart("[scar_data[SCAR_SAVE_ZONE]]")
var/datum/scar/scaries = new
return scaries.load(the_part, scar_data[SCAR_SAVE_VERS], scar_data[SCAR_SAVE_DESC], scar_data[SCAR_SAVE_PRECISE_LOCATION], text2num(scar_data[SCAR_SAVE_SEVERITY]), text2num(scar_data[SCAR_SAVE_BIOLOGY]), text2num(scar_data[SCAR_SAVE_CHAR_SLOT]))
return scaries.load(the_part, scar_data[SCAR_SAVE_VERS], scar_data[SCAR_SAVE_DESC], scar_data[SCAR_SAVE_PRECISE_LOCATION], text2num(scar_data[SCAR_SAVE_SEVERITY]), text2num(scar_data[SCAR_SAVE_BIOLOGY]), text2num(scar_data[SCAR_SAVE_CHAR_SLOT]), text2num(scar_data[SCAR_SAVE_CHECK_ANY_BIO]))
/// Read all the scars we have for the designated character/scar slots, verify they're good/dump them if they're old/wrong format, create them on the user, and write the scars that passed muster back to the file
/mob/living/carbon/human/proc/load_persistent_scars()
@@ -9,6 +9,8 @@
TRAIT_VIRUSIMMUNE,
TRAIT_NOBLOOD,
TRAIT_CHUNKYFINGERS_IGNORE_BATON,
TRAIT_NODISMEMBER,
TRAIT_NEVER_WOUNDED
)
mutanttongue = /obj/item/organ/internal/tongue/abductor
mutantstomach = null
@@ -7,7 +7,6 @@
TRAIT_GENELESS,
TRAIT_LAVA_IMMUNE,
TRAIT_NOBREATH,
TRAIT_NODISMEMBER,
TRAIT_NOBLOOD,
TRAIT_NOFIRE,
TRAIT_PIERCEIMMUNE,
@@ -15,6 +14,8 @@
TRAIT_NO_DNA_COPY,
TRAIT_NO_TRANSFORMATION_STING,
TRAIT_NO_AUGMENTS,
TRAIT_NODISMEMBER,
TRAIT_NEVER_WOUNDED
)
mutantheart = null
mutantlungs = null
@@ -10,6 +10,8 @@
TRAIT_RADIMMUNE,
TRAIT_VIRUSIMMUNE,
TRAIT_NOBLOOD,
TRAIT_NODISMEMBER,
TRAIT_NEVER_WOUNDED
)
inherent_factions = list(FACTION_FAITHLESS)
changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_PRIDE | MIRROR_MAGIC
+2 -2
View File
@@ -49,8 +49,6 @@
handle_diseases(seconds_per_tick, times_fired)// DEAD check is in the proc itself; we want it to spread even if the mob is dead, but to handle its disease-y properties only if you're not.
handle_wounds(seconds_per_tick, times_fired)
if (QDELETED(src)) // diseases can qdel the mob via transformations
return
@@ -65,6 +63,8 @@
handle_gravity(seconds_per_tick, times_fired)
handle_wounds(seconds_per_tick, times_fired)
if(machine)
machine.check_eye(src)