mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 12:05:59 +01:00
Fix flaky ears CI failures (#4855)
## About The Pull Request - Prioritize checking `dna.mutant_bodyparts` before `dna.features` when imprinting sprite accessories on organs - Add missing mutantpart_key to ears - Add check for `mutant_bodyparts` settings in `should_visual_organ_apply_to` ## Why It's Good For The Game Fixes #4851 Fixes #4845 Fixes #4838 Fixes #4836 Fixes #4831 ## Proof Of Testing Tested that mobs get the correct bodypart overlay based on mutant bodyparts info and that species with special ears retained them ## Changelog N/A
This commit is contained in:
@@ -33,19 +33,15 @@
|
||||
stack_trace("adding a [parent.type] to a [receiver.type] when it shouldn't be!")
|
||||
|
||||
if(imprint_on_next_insertion) //We only want this set *once*
|
||||
var/feature_name = receiver.dna.features[feature_key] // BUBBER EDIT CHANGE - Original: var/feature_name = receiver.dna.features[feature_key] || receiver.dna.species.mutant_organs[parent.type]
|
||||
// BUBBER EDIT CHANGE BEGIN - try mutant_bodyparts method before features
|
||||
imprint_on_next_insertion = FALSE
|
||||
if(set_appearance_from_dna(receiver.dna))
|
||||
return
|
||||
var/feature_name = receiver.dna.features[feature_key] || receiver.dna.species.mutant_organs[parent.type]
|
||||
if (isnull(feature_name))
|
||||
/* SKYRAT EDIT - Customization - ORIGINAL:
|
||||
stack_trace("[type] has no default feature name for organ [parent.type]!")
|
||||
feature_name = get_consistent_feature_entry(get_global_feature_list()) //fallback to something
|
||||
set_appearance_from_name(feature_name)
|
||||
*/ // SKYRAT EDIT START
|
||||
if(!set_appearance_from_dna(receiver.dna))
|
||||
set_appearance_from_name(receiver.dna.species.mutant_organs[parent.type] || get_consistent_feature_entry(get_global_feature_list()))
|
||||
else
|
||||
set_appearance_from_name(feature_name)
|
||||
// SKYRAT EDIT END
|
||||
imprint_on_next_insertion = FALSE
|
||||
// BUBBER EDIT CHANGE END
|
||||
|
||||
/datum/bodypart_overlay/mutant/get_overlay(layer, obj/item/bodypart/limb)
|
||||
inherit_color(limb) // If draw_color is not set yet, go ahead and do that
|
||||
|
||||
@@ -64,6 +64,12 @@ Unlike normal organs, we're actually inside a persons limbs at all times
|
||||
|
||||
if(target.dna.features[feature_key] != SPRITE_ACCESSORY_NONE)
|
||||
return TRUE
|
||||
|
||||
// BUBBER EDIT ADDITION BEGIN - Customization
|
||||
if(target.dna.mutant_bodyparts[feature_key] && target.dna.mutant_bodyparts[feature_key][MUTANT_INDEX_NAME] != SPRITE_ACCESSORY_NONE)
|
||||
return TRUE
|
||||
// BUBBER EDIT ADDITION END
|
||||
|
||||
return FALSE
|
||||
|
||||
///Update our features after something changed our appearance
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/obj/item/organ/ears
|
||||
mutantpart_key = "ears"
|
||||
mutantpart_info = list(MUTANT_INDEX_NAME = "Cat", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF"))
|
||||
|
||||
/obj/item/organ/ears/mutant
|
||||
name = "fluffy ears"
|
||||
desc = "Wait, there's two pairs of these?"
|
||||
|
||||
Reference in New Issue
Block a user