Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synth tweaks #528

Merged
merged 1 commit into from
Jul 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Synth tweaks
  • Loading branch information
MrMelbert committed Jul 8, 2024
commit 465bc193ebfd63ed4fb3dc70fbce48c7abbbeef4
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ GLOBAL_LIST_EMPTY(synth_head_cover_list)
inherent_traits = list(
TRAIT_AGEUSIA,
TRAIT_NOBREATH,
TRAIT_NODISMEMBER,
TRAIT_NOHUNGER,
TRAIT_NOLIMBDISABLE,
TRAIT_NO_DNA_COPY,
TRAIT_RADIMMUNE,
TRAIT_VIRUSIMMUNE,
)
inherent_biotypes = MOB_ROBOTIC|MOB_HUMANOID
Expand Down Expand Up @@ -204,17 +204,16 @@ GLOBAL_LIST_EMPTY(synth_head_cover_list)

synth.add_traits(disguise_species.inherent_traits, "synth_disguise_[SPECIES_TRAIT]")

synth.update_body(TRUE)
regenerate_organs(synth, replace_current = FALSE)

if(limb_updates_on_change)
for(var/obj/item/bodypart/part as anything in synth.bodyparts)
limb_gained(synth, part, update = FALSE)

synth.update_body_parts(TRUE)
RegisterSignal(synth, COMSIG_CARBON_REMOVE_LIMB, PROC_REF(limb_lost_sig))
RegisterSignal(synth, COMSIG_CARBON_ATTACH_LIMB, PROC_REF(limb_gained_sig))

synth.update_body(TRUE)

/datum/species/synth/proc/drop_disguise(mob/living/carbon/human/synth, skip_bodyparts = FALSE)
if(isnull(disguise_species))
return
Expand All @@ -233,14 +232,12 @@ GLOBAL_LIST_EMPTY(synth_head_cover_list)
if(!skip_bodyparts)
for(var/obj/item/bodypart/part as anything in synth.bodyparts)
limb_lost(synth, part, update = FALSE)

synth.update_body_parts(TRUE)
UnregisterSignal(synth, COMSIG_CARBON_REMOVE_LIMB)
UnregisterSignal(synth, COMSIG_CARBON_ATTACH_LIMB)

QDEL_NULL(disguise_species)
synth.update_body(TRUE)
regenerate_organs(synth)
synth.update_body(TRUE)

/datum/species/synth/proc/limb_lost_sig(mob/living/carbon/human/source, obj/item/bodypart/limb, ...)
SIGNAL_HANDLER
Expand Down Expand Up @@ -317,6 +314,7 @@ GLOBAL_LIST_EMPTY(synth_head_cover_list)
limb_id = initial(other_part.limb_id)
should_draw_greyscale = initial(other_part.should_draw_greyscale)
is_dimorphic = initial(other_part.is_dimorphic)
bodytype = initial(other_part.bodytype)

if(!update)
return
Expand Down Expand Up @@ -367,6 +365,8 @@ GLOBAL_LIST_EMPTY(synth_head_cover_list)
head_flags = initial(other_part.head_flags)
return ..()

#define SYNTH_PART_BODYTYPES (BODYTYPE_HUMANOID|BODYTYPE_ROBOTIC)

/obj/item/bodypart/head/synth
limb_id = BODYPART_ID_SYNTH
icon_static = 'maplestation_modules/icons/mob/synth_heads.dmi'
Expand All @@ -375,7 +375,7 @@ GLOBAL_LIST_EMPTY(synth_head_cover_list)
should_draw_greyscale = FALSE
obj_flags = CONDUCTS_ELECTRICITY
is_dimorphic = FALSE
bodytype = BODYTYPE_HUMANOID|BODYTYPE_ROBOTIC
bodytype = SYNTH_PART_BODYTYPES
brute_modifier = 0.8
burn_modifier = 0.8
biological_state = BIO_ROBOTIC|BIO_BLOODED
Expand All @@ -390,7 +390,7 @@ GLOBAL_LIST_EMPTY(synth_head_cover_list)
obj_flags = CONDUCTS_ELECTRICITY
is_dimorphic = FALSE
should_draw_greyscale = FALSE
bodytype = BODYTYPE_HUMANOID|BODYTYPE_ROBOTIC
bodytype = SYNTH_PART_BODYTYPES
brute_modifier = 0.8
burn_modifier = 0.8
biological_state = BIO_ROBOTIC|BIO_BLOODED
Expand All @@ -405,7 +405,7 @@ GLOBAL_LIST_EMPTY(synth_head_cover_list)
obj_flags = CONDUCTS_ELECTRICITY
is_dimorphic = FALSE
should_draw_greyscale = FALSE
bodytype = BODYTYPE_HUMANOID|BODYTYPE_ROBOTIC
bodytype = SYNTH_PART_BODYTYPES
brute_modifier = 0.8
burn_modifier = 0.8
biological_state = BIO_ROBOTIC|BIO_BLOODED
Expand All @@ -419,7 +419,7 @@ GLOBAL_LIST_EMPTY(synth_head_cover_list)
obj_flags = CONDUCTS_ELECTRICITY
is_dimorphic = FALSE
should_draw_greyscale = FALSE
bodytype = BODYTYPE_HUMANOID|BODYTYPE_ROBOTIC
bodytype = SYNTH_PART_BODYTYPES
brute_modifier = 0.8
burn_modifier = 0.8
biological_state = BIO_ROBOTIC|BIO_BLOODED
Expand All @@ -433,7 +433,7 @@ GLOBAL_LIST_EMPTY(synth_head_cover_list)
obj_flags = CONDUCTS_ELECTRICITY
is_dimorphic = FALSE
should_draw_greyscale = FALSE
bodytype = BODYTYPE_HUMANOID|BODYTYPE_ROBOTIC
bodytype = SYNTH_PART_BODYTYPES
brute_modifier = 0.8
burn_modifier = 0.8
biological_state = BIO_ROBOTIC|BIO_BLOODED
Expand All @@ -447,12 +447,14 @@ GLOBAL_LIST_EMPTY(synth_head_cover_list)
obj_flags = CONDUCTS_ELECTRICITY
is_dimorphic = FALSE
should_draw_greyscale = FALSE
bodytype = BODYTYPE_HUMANOID|BODYTYPE_ROBOTIC
bodytype = SYNTH_PART_BODYTYPES
brute_modifier = 0.8
burn_modifier = 0.8
biological_state = BIO_ROBOTIC|BIO_BLOODED
change_exempt_flags = BP_BLOCK_CHANGE_SPECIES

#undef SYNTH_PART_BODYTYPES

/obj/item/organ/internal/eyes/robotic/synth
name = "synth eyes"

Expand Down
Loading