[MIRROR] Adds Trait Genetics (#10142)

Co-authored-by: Cameron Lennox <killer65311@gmail.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-02-13 07:41:59 -07:00
committed by GitHub
parent d81e145924
commit 7bfffc808d
138 changed files with 3818 additions and 2996 deletions

View File

@@ -33,7 +33,7 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain)
if(!owner || owner.stat == DEAD)
defib_timer = max(--defib_timer, 0)
else
defib_timer = min(++defib_timer, (CONFIG_GET(number/defib_timer) MINUTES) / 2) // CHOMPEdit
defib_timer = min(++defib_timer, (CONFIG_GET(number/defib_timer) MINUTES) / 2)
/obj/item/organ/internal/brain/proc/can_assist()
return can_assist
@@ -108,7 +108,7 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain)
if(istype(H))
qdel_swap(brainmob.dna, H.dna.Clone())
brainmob.timeofhostdeath = H.timeofdeath
brainmob.ooc_notes = H.ooc_notes //VOREStation Edit
brainmob.ooc_notes = H.ooc_notes
brainmob.ooc_notes_likes = H.ooc_notes_likes
brainmob.ooc_notes_dislikes = H.ooc_notes_dislikes
//CHOMPEdit Start
@@ -149,7 +149,7 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain)
var/obj/item/organ/internal/brain/B = src
if(istype(B) && owner)
if(istype(owner, /mob/living/carbon) && owner.ckey) //CHOMPEdit - Make sure owner's mind isn't elsewhere otherwise on brain removal brings them back
if(istype(owner, /mob/living/carbon) && owner.ckey)
B.transfer_identity(owner)
..()
@@ -189,7 +189,7 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain)
can_assist = FALSE
/obj/item/organ/internal/brain/slime
icon = 'icons/obj/surgery_vr.dmi' // Vorestation edit
icon = 'icons/obj/surgery_vr.dmi'
name = "slime core"
desc = "A complex, organic knot of jelly and crystalline particles."
icon_state = "core"
@@ -263,7 +263,9 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain)
qdel_swap(H.dna, R.dna.Clone())
H.UpdateAppearance()
H.sync_dna_traits(FALSE) // Traitgenes Sync traits to genetics if needed
H.sync_organ_dna()
H.initialize_vessel()
if(!R.dna.real_name) //to prevent null names
R.dna.real_name = "promethean ([rand(0,999)])"
H.real_name = R.dna.real_name

View File

@@ -958,6 +958,16 @@ Note that amputating the affected organ does in fact remove the infection from t
span_bolddanger("Your [src.name] explodes[gore]!"),\
span_danger("You hear the [gore_sound]."))
if(DROPLIMB_ACID)
if(cannot_gib)
return
var/gore = "[(robotic >= ORGAN_ROBOT) ? "": " in gush of gore"]"
var/gore_sound = "[(status >= ORGAN_ROBOT) ? "sizzling sound of melting metal" : "sickening drips of melting flesh"]"
owner.visible_message(
span_danger("\The [owner]'s [src.name] sloughs off[gore]!"),\
span_bolddanger("<b>Your [src.name] sloughs off of your body[gore]!</b>"),\
span_danger("You hear the [gore_sound]."))
var/mob/living/carbon/human/victim = owner //Keep a reference for post-removed().
var/obj/item/organ/external/parent_organ = parent
@@ -1036,6 +1046,14 @@ Note that amputating the affected organ does in fact remove the infection from t
qdel(src)
if(DROPLIMB_ACID)
appearance_flags &= ~PIXEL_SCALE
compile_icon()
add_blood(victim)
var/matrix/M = matrix()
M.Turn(rand(180))
transform = M
if(victim.l_hand)
if(istype(victim.l_hand,/obj/item/material/twohanded)) //if they're holding a two-handed weapon, drop it now they've lost a hand
victim.l_hand.update_held_icon()

View File

@@ -396,6 +396,15 @@
"scarred stump" = 0
)
if(DROPLIMB_ACID)
damage_type = BURN
stages = list(
"disfigured mass" = damage_amt*1.3,
"melted stump" = damage_amt,
"deformed stump" = damage_amt*0.5,
"scarred stump" = 0
)
..(damage_amt)
/datum/wound/lost_limb/can_merge(var/datum/wound/other)