[MIRROR] Fixes DNA Infuser's brain swapping, a little bit of qol, ui reworked [MDB IGNORE] (#17844)

* Fixes DNA Infuser's brain swapping, a little bit of qol, ui reworked

* conflicts

* fix the bad

Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
This commit is contained in:
SkyratBot
2022-12-08 18:41:31 +01:00
committed by GitHub
parent d484d7b188
commit c681cee605
19 changed files with 198 additions and 51 deletions
@@ -469,6 +469,8 @@ GLOBAL_LIST_INIT(preference_entries_by_key, init_preference_entries_by_key())
for (var/name in sprite_accessories)
var/datum/sprite_accessory/sprite_accessory = sprite_accessories[name]
if(sprite_accessory.locked)
continue
var/icon/final_icon
@@ -92,7 +92,7 @@
relevant_species_trait = FACEHAIR
/datum/preference/choiced/facial_hair_gradient/init_possible_values()
return assoc_to_keys(GLOB.facial_hair_gradients_list)
return assoc_to_keys_features(GLOB.facial_hair_gradients_list)
/datum/preference/choiced/facial_hair_gradient/apply_to_human(mob/living/carbon/human/target, value)
LAZYSETLEN(target.grad_style, GRADIENTS_LEN)
@@ -155,7 +155,7 @@
relevant_species_trait = HAIR
/datum/preference/choiced/hair_gradient/init_possible_values()
return assoc_to_keys(GLOB.hair_gradients_list)
return assoc_to_keys_features(GLOB.hair_gradients_list)
/datum/preference/choiced/hair_gradient/apply_to_human(mob/living/carbon/human/target, value)
LAZYSETLEN(target.grad_style, GRADIENTS_LEN)
@@ -7,7 +7,7 @@
relevant_external_organ = /obj/item/organ/external/tail/cat
/datum/preference/choiced/tail_human/init_possible_values()
return assoc_to_keys(GLOB.sprite_accessories["tail"])
return assoc_to_keys_features(GLOB.tails_list_human)
/datum/preference/choiced/tail_human/apply_to_human(mob/living/carbon/human/target, value)
target.dna.features["tail_cat"] = value
@@ -24,7 +24,7 @@
relevant_mutant_bodypart = "ears"
/datum/preference/choiced/ears/init_possible_values()
return GLOB.sprite_accessories["ears"]
return assoc_to_keys_features(GLOB.ears_list)
/datum/preference/choiced/ears/apply_to_human(mob/living/carbon/human/target, value)
target.dna.features["ears"] = value
@@ -98,7 +98,7 @@
relevant_mutant_bodypart = "legs"
/datum/preference/choiced/lizard_legs/init_possible_values()
return assoc_to_keys(GLOB.legs_list)
return assoc_to_keys_features(GLOB.legs_list)
/datum/preference/choiced/lizard_legs/apply_to_human(mob/living/carbon/human/target, value)
target.dna.features["legs"] = value
@@ -123,7 +123,7 @@
relevant_mutant_bodypart = "spines"
/datum/preference/choiced/lizard_spines/init_possible_values()
return assoc_to_keys(GLOB.spines_list)
return assoc_to_keys_features(GLOB.spines_list)
/datum/preference/choiced/lizard_spines/apply_to_human(mob/living/carbon/human/target, value)
target.dna.features["spines"] = value
@@ -135,7 +135,7 @@
relevant_external_organ = /obj/item/organ/external/tail/lizard
/datum/preference/choiced/lizard_tail/init_possible_values()
return assoc_to_keys(GLOB.tails_list_lizard)
return assoc_to_keys_features(GLOB.tails_list_lizard)
/datum/preference/choiced/lizard_tail/apply_to_human(mob/living/carbon/human/target, value)
target.dna.features["tail_lizard"] = value
@@ -14,6 +14,8 @@
for (var/antennae_name in GLOB.moth_antennae_list)
var/datum/sprite_accessory/antennae = GLOB.moth_antennae_list[antennae_name]
if(antennae.locked)
continue
var/icon/icon_with_antennae = new(moth_head)
icon_with_antennae.Blend(icon(antennae.icon, "m_moth_antennae_[antennae.icon_state]_FRONT"), ICON_OVERLAY)
@@ -57,6 +59,8 @@
for (var/markings_name in GLOB.moth_markings_list)
var/datum/sprite_accessory/markings = GLOB.moth_markings_list[markings_name]
if(markings.locked)
continue
var/icon/icon_with_markings = new(moth_body)
if (markings_name != "None")
@@ -12,6 +12,8 @@
for (var/pod_name in GLOB.pod_hair_list)
var/datum/sprite_accessory/pod_hair = GLOB.pod_hair_list[pod_name]
if(pod_hair.locked)
continue
var/icon/icon_with_hair = new(pod_head)
var/icon/icon_adj = icon(pod_hair.icon, "m_pod_hair_[pod_hair.icon_state]_ADJ")
@@ -27,7 +29,7 @@
return values
/datum/preference/choiced/pod_hair/create_default_value()
return pick(GLOB.pod_hair_list)
return pick(assoc_to_keys_features(GLOB.pod_hair_list))
/datum/preference/choiced/pod_hair/apply_to_human(mob/living/carbon/human/target, value)
target.dna.features["pod_hair"] = value