mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 00:21:11 +01:00
Refdrop dmdoc external organs (#18015)
* Atomization * sdfa --------- Co-authored-by: FluffyGhost <FluffyGhost>
This commit is contained in:
co-authored by
FluffyGhost <FluffyGhost>
parent
694f95fd59
commit
a535b49ea5
@@ -27,23 +27,41 @@
|
||||
|
||||
//Damage variables.
|
||||
var/brute_mod = 1
|
||||
var/brute_dam = 0 // Actual current brute damage.
|
||||
var/brute_ratio = 0 // Ratio of current brute damage to max damage.
|
||||
|
||||
///Actual current brute damage
|
||||
var/brute_dam = 0
|
||||
|
||||
///Ratio of current brute damage to max damage
|
||||
var/brute_ratio = 0
|
||||
|
||||
|
||||
var/burn_mod = 1
|
||||
var/burn_dam = 0 // Actual current burn damage.
|
||||
var/burn_ratio = 0 // Ratio of current burn damage to max damage.
|
||||
|
||||
///Actual current burn damage
|
||||
var/burn_dam = 0
|
||||
|
||||
///Ratio of current burn damage to max damage
|
||||
var/burn_ratio = 0
|
||||
|
||||
var/last_dam = -1
|
||||
var/genetic_degradation = 0 // Amount of current genetic damage.
|
||||
var/pain = 0 // How much the limb hurts.
|
||||
var/pain_disability_threshold // Point at which a limb becomes unusable due to pain.
|
||||
|
||||
//Organ behaviour.
|
||||
///Amount of current genetic damage
|
||||
var/genetic_degradation = 0
|
||||
|
||||
///How much the limb hurts
|
||||
var/pain = 0
|
||||
|
||||
///The amount of `pain` at which a limb becomes unusable
|
||||
var/pain_disability_threshold
|
||||
|
||||
///Organ behaviour flags, see `ORGAN_CAN_*` and `ORGAN_HAS_*` in `code\__defines\damage_organs.dm`
|
||||
var/limb_flags = ORGAN_CAN_AMPUTATE | ORGAN_CAN_BREAK | ORGAN_CAN_MAIM
|
||||
|
||||
var/max_size = 0
|
||||
|
||||
///The `/icon` of the mob that has this organ
|
||||
var/icon/mob_icon
|
||||
|
||||
var/gendered_icon = 0
|
||||
var/force_icon
|
||||
|
||||
@@ -54,20 +72,41 @@
|
||||
var/skin_color
|
||||
var/hair_color
|
||||
|
||||
var/list/wounds = list()
|
||||
///A `/list` of wounds
|
||||
var/list/datum/wound/wounds = list()
|
||||
|
||||
///A list of implants present in this organ
|
||||
var/list/implants = list()
|
||||
var/number_wounds = 0 // cache the number of wounds, which is NOT wounds.len!
|
||||
|
||||
///Cache the number of wounds, which is NOT wounds.len!
|
||||
var/number_wounds = 0
|
||||
|
||||
var/perma_injury = 0
|
||||
|
||||
///The parent organ
|
||||
var/obj/item/organ/external/parent
|
||||
var/list/obj/item/organ/external/children
|
||||
var/supports_children = TRUE
|
||||
var/list/internal_organs = list() // Internal organs of this body part
|
||||
|
||||
///A `/list` of organs that have this organ as a parent
|
||||
var/list/obj/item/organ/external/children
|
||||
|
||||
///Boolean, if this organ supports childrens, which will be added in `children`
|
||||
var/supports_children = TRUE
|
||||
|
||||
///Internal organs of this body part
|
||||
var/list/obj/item/organ/internal/internal_organs = list()
|
||||
|
||||
///The tendon
|
||||
var/datum/tendon/tendon
|
||||
|
||||
///A path of the type of tendon to create when this organ is created
|
||||
var/tendon_path = /datum/tendon
|
||||
var/tendon_name = "tendon" // Name of the limb's tendon. Achilles heel, etc.
|
||||
var/tendon_health = 30 // HP value of the limb's tendon
|
||||
|
||||
///Name of the limb's tendon. Achilles heel, etc.
|
||||
var/tendon_name = "tendon"
|
||||
|
||||
///HP value of the limb's tendon
|
||||
var/tendon_health = 30
|
||||
|
||||
var/list/tendon_msgs = list("tore apart", "ripped away")
|
||||
|
||||
var/damage_msg = "<span class='warning'>You feel an intense pain!</span>"
|
||||
@@ -75,51 +114,92 @@
|
||||
var/open = 0
|
||||
var/stage = 0
|
||||
var/cavity = 0
|
||||
var/sabotaged = 0 // If a prosthetic limb is emagged, it will detonate when it fails.
|
||||
var/encased // Needs to be opened with a saw to access the organs.
|
||||
var/joint = "joint" // Descriptive string used in dislocation.
|
||||
var/artery_name = "artery" //Name of the artery. Cartoid, etc.
|
||||
var/arterial_bleed_severity = 1 // Multiplier for bleeding in a limb.
|
||||
var/amputation_point // Descriptive string used in amputation.
|
||||
var/dislocated = 0 // If you target a joint, you can dislocate the limb, causing temporary damage to the organ.
|
||||
|
||||
var/wound_update_accuracy = 1 // how often wounds should be updated, a higher number means less often
|
||||
///Boolean, if it was sabotaged (emagged), make it detonate when it fails
|
||||
var/sabotaged = FALSE
|
||||
|
||||
///Needs to be opened with a saw to access the organs
|
||||
var/encased
|
||||
|
||||
///Descriptive string used in dislocation
|
||||
var/joint = "joint"
|
||||
|
||||
///Name of the artery. Cartoid, etc.
|
||||
var/artery_name = "artery"
|
||||
|
||||
///Multiplier for bleeding in a limb
|
||||
var/arterial_bleed_severity = 1
|
||||
|
||||
///Descriptive string used in amputation
|
||||
var/amputation_point
|
||||
|
||||
///If the joint is dislocated
|
||||
var/dislocated = FALSE
|
||||
|
||||
///How often wounds should be updated, a higher number means less often
|
||||
var/wound_update_accuracy = 1
|
||||
var/body_hair
|
||||
var/painted = 0
|
||||
|
||||
var/maim_bonus = 0 //For special projectile gibbing calculation, dubbed "maiming"
|
||||
///For special projectile gibbing calculation, dubbed "maiming"
|
||||
var/maim_bonus = 0
|
||||
|
||||
var/list/genetic_markings // Markings (body_markings) to apply to the icon
|
||||
var/list/temporary_markings // Same as above, but not preserved when cloning
|
||||
var/list/cached_markings // The two above lists cached for perf. reasons.
|
||||
var/list/additional_images
|
||||
///Markings (body_markings) to apply to the icon
|
||||
var/list/genetic_markings
|
||||
|
||||
var/atom/movable/applied_pressure //Pressure applied to wounds. It'll make them bleed less, generally.
|
||||
///Same as `genetic_markings`, but not preserved when cloning
|
||||
var/list/temporary_markings
|
||||
|
||||
///The `genetic_markings` and `temporary_markings` cached for perf. reasons
|
||||
var/list/cached_markings
|
||||
|
||||
var/list/image/additional_images
|
||||
|
||||
///Pressure applied to wounds. It'll make them bleed less, generally.
|
||||
var/atom/movable/applied_pressure
|
||||
|
||||
var/image/hud_damage_image
|
||||
|
||||
var/augment_limit //how many augments you can fit inside this limb
|
||||
///How many augments you can fit inside this limb
|
||||
var/augment_limit
|
||||
|
||||
var/obj/item/organ/infect_target_internal //make internal organs become infected one at a time instead of all at once
|
||||
var/obj/item/organ/infect_target_external //make child and parent organs become infected one at a time instead of all at once
|
||||
var/obj/item/organ/internal/infect_target_internal //make internal organs become infected one at a time instead of all at once
|
||||
var/obj/item/organ/external/infect_target_external //make child and parent organs become infected one at a time instead of all at once
|
||||
|
||||
///Dionae limb
|
||||
var/mob/living/carbon/alien/diona/nymph
|
||||
|
||||
var/mob/living/carbon/alien/diona/nymph //used by dionae limbs
|
||||
var/nymph_child
|
||||
|
||||
/obj/item/organ/external/proc/invalidate_marking_cache()
|
||||
cached_markings = null
|
||||
|
||||
/obj/item/organ/external/Destroy()
|
||||
if(parent && parent.children)
|
||||
if(parent?.children)
|
||||
parent.children -= src
|
||||
|
||||
if(children)
|
||||
for(var/obj/item/organ/external/C in children)
|
||||
qdel(C)
|
||||
if(istype(owner) && owner.bad_external_organs)
|
||||
owner.bad_external_organs -= src
|
||||
|
||||
if(internal_organs)
|
||||
for(var/obj/item/organ/O in internal_organs)
|
||||
qdel(O)
|
||||
if(limb_name && istype(owner, /mob/living/carbon) && owner.organs_by_name)
|
||||
owner.organs_by_name[limb_name] = null
|
||||
owner.organs_by_name -= limb_name
|
||||
|
||||
parent = null
|
||||
|
||||
//Remove the images from the owner and clear them
|
||||
if(istype(owner))
|
||||
cut_additional_images(owner)
|
||||
additional_images = null
|
||||
|
||||
genetic_markings = null
|
||||
temporary_markings = null
|
||||
cached_markings = null
|
||||
mob_icon = null
|
||||
|
||||
QDEL_NULL_LIST(children)
|
||||
QDEL_NULL_LIST(internal_organs)
|
||||
QDEL_NULL_LIST(wounds)
|
||||
QDEL_NULL_LIST(implants)
|
||||
|
||||
infect_target_internal = null
|
||||
@@ -131,7 +211,8 @@
|
||||
|
||||
QDEL_NULL(tendon)
|
||||
|
||||
return ..()
|
||||
. = ..()
|
||||
|
||||
|
||||
/obj/item/organ/external/attack_self(var/mob/user)
|
||||
if(!contents.len)
|
||||
|
||||
Reference in New Issue
Block a user