Item color removal port fixes.

This commit is contained in:
Ghommie
2020-04-13 03:34:58 +02:00
parent 3aad79f6e1
commit 0d0f14d3f8
4 changed files with 24 additions and 38 deletions

View File

@@ -30,16 +30,14 @@
/obj/item/clothing/head/helmet/space/hardsuit/attack_self(mob/user) /obj/item/clothing/head/helmet/space/hardsuit/attack_self(mob/user)
on = !on on = !on
icon_state = "[basestate][on]-[hardsuit_type]"
user.update_inv_head() //so our mob-overlays update user.update_inv_head() //so our mob-overlays update
if(on) if(on)
set_light(brightness_on) set_light(brightness_on)
else else
set_light(0) set_light(0)
for(var/X in actions)
var/datum/action/A = X /obj/item/clothing/head/helmet/space/hardsuit/update_icon_state()
A.UpdateButtonIcon() icon_state = "[basestate][on]-[hardsuit_type]"
/obj/item/clothing/head/helmet/space/hardsuit/dropped(mob/user) /obj/item/clothing/head/helmet/space/hardsuit/dropped(mob/user)
..() ..()

View File

@@ -321,12 +321,16 @@ There are several things that need to be remembered:
if(!get_bodypart(BODY_ZONE_HEAD)) //Decapitated if(!get_bodypart(BODY_ZONE_HEAD)) //Decapitated
return return
if(client && hud_used && hud_used.inv_slots[SLOT_BACK]) if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_HEAD] var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_HEAD]
inv.update_icon() inv.update_icon()
update_mutant_bodyparts()
if(head) if(head)
head.screen_loc = ui_head
if(client && hud_used && hud_used.hud_shown)
if(hud_used.inventory_shown)
client.screen += head
update_observer_view(head,1)
remove_overlay(HEAD_LAYER) remove_overlay(HEAD_LAYER)
var/obj/item/clothing/head/H = head var/obj/item/clothing/head/H = head
var/alt_icon = H.mob_overlay_icon || 'icons/mob/clothing/head.dmi' var/alt_icon = H.mob_overlay_icon || 'icons/mob/clothing/head.dmi'
@@ -348,6 +352,7 @@ There are several things that need to be remembered:
head_overlay.pixel_y += dna.species.offset_features[OFFSET_HEAD][2] head_overlay.pixel_y += dna.species.offset_features[OFFSET_HEAD][2]
overlays_standing[HEAD_LAYER] = head_overlay overlays_standing[HEAD_LAYER] = head_overlay
apply_overlay(HEAD_LAYER) apply_overlay(HEAD_LAYER)
update_mutant_bodyparts()
/mob/living/carbon/human/update_inv_belt() /mob/living/carbon/human/update_inv_belt()
remove_overlay(BELT_LAYER) remove_overlay(BELT_LAYER)
@@ -457,11 +462,16 @@ There are several things that need to be remembered:
if(!get_bodypart(BODY_ZONE_HEAD)) //Decapitated if(!get_bodypart(BODY_ZONE_HEAD)) //Decapitated
return return
if(client && hud_used && hud_used.inv_slots[SLOT_WEAR_MASK]) if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_WEAR_MASK] var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_WEAR_MASK]
inv.update_icon() inv.update_icon()
if(wear_mask) if(wear_mask)
wear_mask.screen_loc = ui_mask
if(client && hud_used && hud_used.hud_shown)
if(hud_used.inventory_shown)
client.screen += wear_mask
update_observer_view(wear_mask,1)
var/obj/item/clothing/mask/M = wear_mask var/obj/item/clothing/mask/M = wear_mask
remove_overlay(FACEMASK_LAYER) remove_overlay(FACEMASK_LAYER)
var/alt_icon = M.mob_overlay_icon || 'icons/mob/clothing/mask.dmi' var/alt_icon = M.mob_overlay_icon || 'icons/mob/clothing/mask.dmi'
@@ -515,22 +525,6 @@ There are several things that need to be remembered:
//human HUD updates for items in our inventory //human HUD updates for items in our inventory
//update whether our head item appears on our hud.
/mob/living/carbon/human/update_hud_head(obj/item/I)
I.screen_loc = ui_head
if(client && hud_used && hud_used.hud_shown)
if(hud_used.inventory_shown)
client.screen += I
update_observer_view(I,1)
//update whether our mask item appears on our hud.
/mob/living/carbon/human/update_hud_wear_mask(obj/item/I)
I.screen_loc = ui_mask
if(client && hud_used && hud_used.hud_shown)
if(hud_used.inventory_shown)
client.screen += I
update_observer_view(I,1)
//update whether our neck item appears on our hud. //update whether our neck item appears on our hud.
/mob/living/carbon/human/update_hud_neck(obj/item/I) /mob/living/carbon/human/update_hud_neck(obj/item/I)
I.screen_loc = ui_neck I.screen_loc = ui_neck
@@ -579,13 +573,7 @@ use_mob_overlay_icon: if FALSE, it will always use the default_icon_file even if
/obj/item/proc/build_worn_icon(default_layer = 0, default_icon_file = null, isinhands = FALSE, femaleuniform = NO_FEMALE_UNIFORM, override_state, style_flags = NONE, use_mob_overlay_icon = TRUE) /obj/item/proc/build_worn_icon(default_layer = 0, default_icon_file = null, isinhands = FALSE, femaleuniform = NO_FEMALE_UNIFORM, override_state, style_flags = NONE, use_mob_overlay_icon = TRUE)
var/t_state var/t_state
if(override_state) t_state = override_state || item_state || icon_state
t_state = override_state
else
if(isinhands && item_state)
t_state = item_state
else
t_state = icon_state
//Find a valid icon file from variables+arguments //Find a valid icon file from variables+arguments
var/file2use var/file2use

View File

@@ -90,9 +90,9 @@
if(!get_bodypart(BODY_ZONE_HEAD)) //Decapitated if(!get_bodypart(BODY_ZONE_HEAD)) //Decapitated
return return
if(client && hud_used && hud_used.inv_slots[SLOT_WEAR_MASK]) if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_WEAR_MASK] var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_WEAR_MASK]
inv.update_icon() inv?.update_icon()
if(wear_mask) if(wear_mask)
if(!(head && (head.flags_inv & HIDEMASK))) if(!(head && (head.flags_inv & HIDEMASK)))
@@ -110,7 +110,7 @@
if(wear_neck) if(wear_neck)
if(!(head && (head.flags_inv & HIDENECK))) if(!(head && (head.flags_inv & HIDENECK)))
overlays_standing[NECK_LAYER] = wear_neck.build_worn_icon(default_layer = NECK_LAYER, default_icon_file = 'icons/mob/clothing/neck.dmi', override_state = wear_mask.icon_state) overlays_standing[NECK_LAYER] = wear_neck.build_worn_icon(default_layer = NECK_LAYER, default_icon_file = 'icons/mob/clothing/neck.dmi', override_state = wear_neck.icon_state)
update_hud_neck(wear_neck) update_hud_neck(wear_neck)
apply_overlay(NECK_LAYER) apply_overlay(NECK_LAYER)
@@ -118,9 +118,9 @@
/mob/living/carbon/update_inv_back() /mob/living/carbon/update_inv_back()
remove_overlay(BACK_LAYER) remove_overlay(BACK_LAYER)
if(client && hud_used && hud_used.inv_slots[SLOT_BACK]) if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_BACK] var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_BACK]
inv.update_icon() inv?.update_icon()
if(back) if(back)
overlays_standing[BACK_LAYER] = back.build_worn_icon(default_layer = BACK_LAYER, default_icon_file = 'icons/mob/clothing/back.dmi', override_state = back.icon_state) overlays_standing[BACK_LAYER] = back.build_worn_icon(default_layer = BACK_LAYER, default_icon_file = 'icons/mob/clothing/back.dmi', override_state = back.icon_state)
@@ -134,9 +134,9 @@
if(!get_bodypart(BODY_ZONE_HEAD)) //Decapitated if(!get_bodypart(BODY_ZONE_HEAD)) //Decapitated
return return
if(client && hud_used && hud_used.inv_slots[SLOT_BACK]) if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_HEAD] var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_HEAD]
inv.update_icon() inv?.update_icon()
if(head) if(head)
overlays_standing[HEAD_LAYER] = head.build_worn_icon(default_layer = HEAD_LAYER, default_icon_file = 'icons/mob/clothing/head.dmi', override_state = head.icon_state) overlays_standing[HEAD_LAYER] = head.build_worn_icon(default_layer = HEAD_LAYER, default_icon_file = 'icons/mob/clothing/head.dmi', override_state = head.icon_state)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 336 KiB

After

Width:  |  Height:  |  Size: 336 KiB