mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 22:19:30 +01:00
Fixes lowered megamothwings not rendering (#60856)
This commit is contained in:
@@ -332,6 +332,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
|
||||
#define TRAIT_AI_BAGATTACK "bagattack"
|
||||
/// This mobs bodyparts are invisible but still clickable.
|
||||
#define TRAIT_INVISIBLE_MAN "invisible_man"
|
||||
/// Don't draw external organs/species features like wings, horns, frills and stuff
|
||||
#define TRAIT_HIDE_EXTERNAL_ORGANS "hide_external_organs"
|
||||
///When people are floating from zero-grav or something, we can move around freely!
|
||||
#define TRAIT_FREE_FLOAT_MOVEMENT "free_float_movement"
|
||||
// You can stare into the abyss, but it does not stare back.
|
||||
|
||||
@@ -162,8 +162,8 @@ GLOBAL_LIST_INIT(traits_by_type, list(
|
||||
"TRAIT_KISS_OF_DEATH" = TRAIT_KISS_OF_DEATH,
|
||||
"TRAIT_ANXIOUS" = TRAIT_ANXIOUS,
|
||||
"TRAIT_WEAK_SOUL" = TRAIT_WEAK_SOUL,
|
||||
"TRAIT_INVISIBLE_MAN" = TRAIT_INVISIBLE_MAN
|
||||
|
||||
"TRAIT_INVISIBLE_MAN" = TRAIT_INVISIBLE_MAN,
|
||||
"TRAIT_HIDE_EXTERNAL_ORGANS" = TRAIT_HIDE_EXTERNAL_ORGANS,
|
||||
),
|
||||
/obj/item/bodypart = list(
|
||||
"TRAIT_PARALYSIS" = TRAIT_PARALYSIS,
|
||||
|
||||
@@ -248,9 +248,10 @@
|
||||
|
||||
//GENERATE NEW LIMBS
|
||||
var/list/new_limbs = list()
|
||||
var/draw_features = !HAS_TRAIT(src, TRAIT_INVISIBLE_MAN)
|
||||
for(var/X in bodyparts)
|
||||
var/obj/item/bodypart/BP = X
|
||||
new_limbs += BP.get_limb_icon()
|
||||
new_limbs += BP.get_limb_icon(draw_external_organs = draw_features)
|
||||
if(new_limbs.len)
|
||||
overlays_standing[BODYPARTS_LAYER] = new_limbs
|
||||
limb_icon_cache[icon_render_key] = new_limbs
|
||||
|
||||
@@ -590,9 +590,10 @@ generate/load female uniform sprites matching all previously decided variables
|
||||
var/obj/item/bodypart/BP = X
|
||||
. += "-[BP.body_zone]"
|
||||
|
||||
for(var/obj/item/organ/external/organ in BP.external_organs)
|
||||
if(organ.can_draw_on_bodypart(src)) //make sure we're drawn before generating a key
|
||||
. += "([organ.cache_key])"
|
||||
if(!HAS_TRAIT(src, TRAIT_INVISIBLE_MAN))
|
||||
for(var/obj/item/organ/external/organ as anything in BP.external_organs)
|
||||
if(organ.can_draw_on_bodypart(src)) //make sure we're drawn before generating a key
|
||||
. += "([organ.cache_key])"
|
||||
|
||||
if(BP.status == BODYPART_ORGANIC)
|
||||
. += "-organic"
|
||||
|
||||
@@ -680,6 +680,7 @@
|
||||
return
|
||||
|
||||
ADD_TRAIT(invisible_man, TRAIT_INVISIBLE_MAN, name)
|
||||
ADD_TRAIT(invisible_man, TRAIT_HIDE_EXTERNAL_ORGANS, name)
|
||||
|
||||
var/datum/dna/druggy_dna = invisible_man.has_dna()
|
||||
if(druggy_dna?.species)
|
||||
@@ -695,6 +696,7 @@
|
||||
if(HAS_TRAIT(invisible_man, TRAIT_INVISIBLE_MAN))
|
||||
invisible_man.add_to_all_human_data_huds() //Is this safe, what do you think, Floyd?
|
||||
REMOVE_TRAIT(invisible_man, TRAIT_INVISIBLE_MAN, name)
|
||||
REMOVE_TRAIT(invisible_man, TRAIT_HIDE_EXTERNAL_ORGANS, name)
|
||||
to_chat(invisible_man, span_notice("As you sober up, opacity once again returns to your body meats."))
|
||||
|
||||
var/datum/dna/druggy_dna = invisible_man.has_dna()
|
||||
|
||||
@@ -819,7 +819,7 @@
|
||||
add_overlay(standing)
|
||||
|
||||
//Gives you a proper icon appearance for the dismembered limb
|
||||
/obj/item/bodypart/proc/get_limb_icon(dropped)
|
||||
/obj/item/bodypart/proc/get_limb_icon(dropped, draw_external_organs)
|
||||
icon_state = "" //to erase the default sprite, we're building the visual aspects of the bodypart through overlays alone.
|
||||
|
||||
. = list()
|
||||
@@ -921,6 +921,9 @@
|
||||
aux_em_block.color = GLOB.em_block_color
|
||||
aux.overlays += aux_em_block
|
||||
|
||||
if(!draw_external_organs)
|
||||
return
|
||||
|
||||
//Draw external organs like horns and frills
|
||||
for(var/obj/item/organ/external/external_organ in external_organs)
|
||||
if(!dropped && !external_organ.can_draw_on_bodypart(owner))
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
img.pixel_y = px_y
|
||||
add_overlay(standing)
|
||||
|
||||
/obj/item/bodypart/head/get_limb_icon(dropped)
|
||||
/obj/item/bodypart/head/get_limb_icon(dropped, draw_external_organs)
|
||||
cut_overlays()
|
||||
. = ..()
|
||||
if(dropped) //certain overlays only appear when the limb is being detached from its owner.
|
||||
|
||||
@@ -72,8 +72,7 @@
|
||||
/obj/item/organ/external/proc/get_overlays(list/overlay_list, image_dir, image_layer, body_type, image_color)
|
||||
if(!sprite_datum)
|
||||
return
|
||||
if(owner && HAS_TRAIT(owner, TRAIT_INVISIBLE_MAN))
|
||||
return
|
||||
|
||||
var/gender = (body_type == FEMALE) ? "f" : "m"
|
||||
var/finished_icon_state = (sprite_datum.gender_specific ? gender : "m") + "_" + preference + "_" + sprite_datum.icon_state + mutant_bodyparts_layertext(image_layer)
|
||||
var/mutable_appearance/appearance = mutable_appearance(sprite_datum.icon, finished_icon_state, layer = -image_layer)
|
||||
|
||||
Reference in New Issue
Block a user