mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-19 20:06:28 +01:00
96a2951608
This PR includes several changes to bring our wound code up to date with baystation, nebula, and modern standards. Highlights include: - The usage of integers between 0 and 100 for ratios (expressed as a percentage), instead of 0.0 to 1.0. Small decimal values are prone to floating point precision errors, but by moving to a percentage instead, we can reduce the impact of this. - The untangling of damage flags and injury flags, which were used interchangably in the code. This could have caused issues should we expand any of these. - Larger embedded objects now halt bleeding in wounds, until they are pulled out. In exchange however, embedded objects will halt healing in wounds (it is difficult to close an open wound that currently has a rod stuck in it) - A lot of data, such as implanted objects and organs, are now stored in amputated limbs.
29 lines
793 B
Plaintext
29 lines
793 B
Plaintext
/obj/item/organ/external/stump
|
|
name = "limb stump"
|
|
icon_name = ""
|
|
dislocated = -1
|
|
|
|
/obj/item/organ/external/stump/Initialize(mapload, var/internal, var/obj/item/organ/external/limb)
|
|
if(istype(limb))
|
|
name = "[limb.name] stump"
|
|
limb_name = limb.limb_name
|
|
body_part = limb.body_part
|
|
amputation_point = limb.amputation_point
|
|
joint = limb.joint
|
|
parent_organ = limb.parent_organ
|
|
. = ..(mapload, internal)
|
|
if(istype(limb))
|
|
max_damage = limb.max_damage
|
|
if((limb.status & ORGAN_ROBOT) && (!parent || (parent.status & ORGAN_ROBOT)))
|
|
robotize() //if both limb and the parent are robotic, the stump is robotic too
|
|
|
|
/obj/item/organ/external/stump/is_stump()
|
|
return 1
|
|
|
|
/obj/item/organ/external/stump/removed()
|
|
..()
|
|
qdel(src)
|
|
|
|
/obj/item/organ/external/stump/is_usable()
|
|
return 0
|