mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 00:58:26 +01:00
Mutant Hat Offset Fix [FIXED FOR REAL THIS TIME] (#21259)
* removed worn_offsets from mutant_overriden sprites An ugly fix but there's no way to modularize this because of where the overlay applications happen in the function. Affects update_worn_glasses, update_inv_ears, update_worn_neck, update_worn_head, update_worn_belt, update_worn_oversuit, update_worn_mask, and update_worn_back. * worn_offsets don't work on /icon/, blending does * Pretty'fied the mutant_override checks for Gandalf --------- Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
This commit is contained in:
co-authored by
lessthanthree
parent
18276afa71
commit
7955efbb09
@@ -252,7 +252,10 @@ There are several things that need to be remembered:
|
||||
|
||||
var/mutable_appearance/glasses_overlay = glasses.build_worn_icon(default_layer = GLASSES_LAYER, default_icon_file = icon_file, override_file = mutant_override ? icon_file : null) // SKYRAT EDIT CHANGE
|
||||
|
||||
my_head.worn_glasses_offset?.apply_offset(glasses_overlay)
|
||||
// SKYRAT EDIT ADDITION
|
||||
if(!mutant_override)
|
||||
my_head.worn_glasses_offset?.apply_offset(glasses_overlay)
|
||||
// SKYRAT EDIT END
|
||||
overlays_standing[GLASSES_LAYER] = glasses_overlay
|
||||
apply_overlay(GLASSES_LAYER)
|
||||
|
||||
@@ -288,7 +291,10 @@ There are several things that need to be remembered:
|
||||
|
||||
var/mutable_appearance/ears_overlay = ears.build_worn_icon(default_layer = EARS_LAYER, default_icon_file = icon_file, override_file = mutant_override ? icon_file : null) // SKYRAT EDIT CHANGE
|
||||
|
||||
my_head.worn_ears_offset?.apply_offset(ears_overlay)
|
||||
// SKYRAT EDIT ADDITION
|
||||
if(!mutant_override)
|
||||
my_head.worn_ears_offset?.apply_offset(ears_overlay)
|
||||
// SKYRAT EDIT END
|
||||
overlays_standing[EARS_LAYER] = ears_overlay
|
||||
apply_overlay(EARS_LAYER)
|
||||
|
||||
@@ -320,7 +326,10 @@ There are several things that need to be remembered:
|
||||
var/mutable_appearance/neck_overlay = worn_item.build_worn_icon(default_layer = NECK_LAYER, default_icon_file = icon_file, override_file = mutant_override ? icon_file : null) // SKYRAT EDIT CHANGE
|
||||
|
||||
var/obj/item/bodypart/chest/my_chest = get_bodypart(BODY_ZONE_CHEST)
|
||||
my_chest?.worn_belt_offset?.apply_offset(neck_overlay)
|
||||
// SKYRAT EDIT ADDITION
|
||||
if(!mutant_override)
|
||||
my_chest?.worn_belt_offset?.apply_offset(neck_overlay)
|
||||
// SKYRAT EDIT END
|
||||
overlays_standing[NECK_LAYER] = neck_overlay
|
||||
|
||||
apply_overlay(NECK_LAYER)
|
||||
@@ -435,7 +444,10 @@ There are several things that need to be remembered:
|
||||
var/mutable_appearance/head_overlay = head.build_worn_icon(default_layer = HEAD_LAYER, default_icon_file = icon_file, override_file = mutant_override ? icon_file : null) // SKYRAT EDIT CHANGE
|
||||
|
||||
var/obj/item/bodypart/head/my_head = get_bodypart(BODY_ZONE_HEAD)
|
||||
my_head?.worn_head_offset?.apply_offset(head_overlay)
|
||||
// SKYRAT EDIT ADDITION
|
||||
if(!mutant_override)
|
||||
my_head?.worn_head_offset?.apply_offset(head_overlay)
|
||||
// SKYRAT EDIT END
|
||||
overlays_standing[HEAD_LAYER] = head_overlay
|
||||
|
||||
update_mutant_bodyparts()
|
||||
@@ -469,7 +481,10 @@ There are several things that need to be remembered:
|
||||
var/mutable_appearance/belt_overlay = belt.build_worn_icon(default_layer = BELT_LAYER, default_icon_file = icon_file, override_file = mutant_override ? icon_file : null) // SKYRAT EDIT CHANGE
|
||||
|
||||
var/obj/item/bodypart/chest/my_chest = get_bodypart(BODY_ZONE_CHEST)
|
||||
my_chest?.worn_belt_offset?.apply_offset(belt_overlay)
|
||||
// SKYRAT EDIT ADDITION
|
||||
if(!mutant_override)
|
||||
my_chest?.worn_belt_offset?.apply_offset(belt_overlay)
|
||||
// SKYRAT EDIT END
|
||||
overlays_standing[BELT_LAYER] = belt_overlay
|
||||
|
||||
apply_overlay(BELT_LAYER)
|
||||
@@ -511,7 +526,10 @@ There are several things that need to be remembered:
|
||||
var/mutable_appearance/suit_overlay = wear_suit.build_worn_icon(default_layer = SUIT_LAYER, default_icon_file = icon_file, override_file = mutant_override ? icon_file : null, mutant_styles = mutant_styles) // SKYRAT EDIT CHANGE - Mutant bodytypes and Taur-friendly suits!
|
||||
|
||||
var/obj/item/bodypart/chest/my_chest = get_bodypart(BODY_ZONE_CHEST)
|
||||
my_chest?.worn_suit_offset?.apply_offset(suit_overlay)
|
||||
// SKYRAT EDIT ADDITION
|
||||
if(!mutant_override)
|
||||
my_chest?.worn_suit_offset?.apply_offset(suit_overlay)
|
||||
// SKYRAT EDIT END
|
||||
overlays_standing[SUIT_LAYER] = suit_overlay
|
||||
update_body_parts()
|
||||
update_mutant_bodyparts()
|
||||
@@ -576,7 +594,10 @@ There are several things that need to be remembered:
|
||||
|
||||
var/mutable_appearance/mask_overlay = wear_mask.build_worn_icon(default_layer = FACEMASK_LAYER, default_icon_file = icon_file, override_file = mutant_override ? icon_file : null) // SKYRAT EDIT CHANGE
|
||||
|
||||
my_head.worn_mask_offset?.apply_offset(mask_overlay)
|
||||
// SKYRAT EDIT ADDITION
|
||||
if(!mutant_override)
|
||||
my_head.worn_mask_offset?.apply_offset(mask_overlay)
|
||||
// SKYRAT EDIT END
|
||||
overlays_standing[FACEMASK_LAYER] = mask_overlay
|
||||
|
||||
apply_overlay(FACEMASK_LAYER)
|
||||
@@ -609,7 +630,10 @@ There are several things that need to be remembered:
|
||||
if(!back_overlay)
|
||||
return
|
||||
var/obj/item/bodypart/chest/my_chest = get_bodypart(BODY_ZONE_CHEST)
|
||||
my_chest?.worn_back_offset?.apply_offset(back_overlay)
|
||||
// SKYRAT EDIT ADDITION
|
||||
if(!mutant_override)
|
||||
my_chest?.worn_back_offset?.apply_offset(back_overlay)
|
||||
// SKYRAT EDIT END
|
||||
overlays_standing[BACK_LAYER] = back_overlay
|
||||
apply_overlay(BACK_LAYER)
|
||||
|
||||
|
||||
@@ -54,8 +54,7 @@
|
||||
|
||||
// Generate muzzled icon, but offset
|
||||
var/icon/new_icon = icon('icons/blanks/32x32.dmi', "nothing")
|
||||
selected_offset?.apply_offset(new_icon)
|
||||
new_icon.Blend(icon(human_icon, human_icon_state), ICON_OVERLAY)
|
||||
new_icon.Blend(icon(human_icon, human_icon_state), ICON_OVERLAY, x = selected_offset.offset_x["north"], y = selected_offset.offset_y["north"])
|
||||
new_icon.Insert(new_icon, human_icon_state)
|
||||
set_custom_worn_icon_cached(human_icon, human_icon_state, "m", new_icon)
|
||||
return new_icon
|
||||
|
||||
Reference in New Issue
Block a user