mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
Merge pull request #10992 from RemieRichards/AlternateWornLayer
Adds alternate_worn_layer
This commit is contained in:
@@ -212,13 +212,18 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
var/image/standing
|
||||
|
||||
var/iconfile2use //Which icon file to use to generate the overlay and any female alterations.
|
||||
var/layer2use
|
||||
|
||||
if(U.alternate_worn_icon)
|
||||
iconfile2use = U.alternate_worn_icon
|
||||
if(!iconfile2use)
|
||||
iconfile2use = 'icons/mob/uniform.dmi'
|
||||
if(U.alternate_worn_layer)
|
||||
layer2use = U.alternate_worn_layer
|
||||
if(!layer2use)
|
||||
layer2use = UNIFORM_LAYER
|
||||
|
||||
standing = image("icon"=iconfile2use, "icon_state"="[t_color]_s", "layer"=-UNIFORM_LAYER)
|
||||
standing = image("icon"=iconfile2use, "icon_state"="[t_color]_s", "layer"=-layer2use)
|
||||
|
||||
overlays_standing[UNIFORM_LAYER] = standing
|
||||
|
||||
@@ -266,11 +271,17 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
var/t_state = gloves.item_state
|
||||
if(!t_state) t_state = gloves.icon_state
|
||||
|
||||
var/layer2use
|
||||
if(gloves.alternate_worn_layer)
|
||||
layer2use = gloves.alternate_worn_layer
|
||||
if(!layer2use)
|
||||
layer2use = GLOVES_LAYER
|
||||
|
||||
var/image/standing
|
||||
if(gloves.alternate_worn_icon)
|
||||
standing = image("icon"=gloves.alternate_worn_icon, "icon_state"="[t_state]", "layer"=-GLOVES_LAYER)
|
||||
standing = image("icon"=gloves.alternate_worn_icon, "icon_state"="[t_state]", "layer"=-layer2use)
|
||||
if(!standing)
|
||||
standing = image("icon"='icons/mob/hands.dmi', "icon_state"="[t_state]", "layer"=-GLOVES_LAYER)
|
||||
standing = image("icon"='icons/mob/hands.dmi', "icon_state"="[t_state]", "layer"=-layer2use)
|
||||
|
||||
overlays_standing[GLOVES_LAYER] = standing
|
||||
|
||||
@@ -294,11 +305,17 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
glasses.screen_loc = ui_glasses //...draw the item in the inventory screen
|
||||
client.screen += glasses //Either way, add the item to the HUD
|
||||
|
||||
var/layer2use
|
||||
if(glasses.alternate_worn_layer)
|
||||
layer2use = glasses.alternate_worn_layer
|
||||
if(!layer2use)
|
||||
layer2use = GLASSES_LAYER
|
||||
|
||||
var/image/standing
|
||||
if(glasses.alternate_worn_icon)
|
||||
standing = image("icon"=glasses.alternate_worn_icon, "icon_state"="[glasses.icon_state]","layer"=-GLASSES_LAYER)
|
||||
standing = image("icon"=glasses.alternate_worn_icon, "icon_state"="[glasses.icon_state]","layer"=-layer2use)
|
||||
if(!standing)
|
||||
standing = image("icon"='icons/mob/eyes.dmi', "icon_state"="[glasses.icon_state]", "layer"=-GLASSES_LAYER)
|
||||
standing = image("icon"='icons/mob/eyes.dmi', "icon_state"="[glasses.icon_state]", "layer"=-layer2use)
|
||||
|
||||
overlays_standing[GLASSES_LAYER] = standing
|
||||
|
||||
@@ -314,11 +331,17 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
ears.screen_loc = ui_ears //...draw the item in the inventory screen
|
||||
client.screen += ears //Either way, add the item to the HUD
|
||||
|
||||
var/layer2use
|
||||
if(ears.alternate_worn_layer)
|
||||
layer2use = ears.alternate_worn_layer
|
||||
if(!layer2use)
|
||||
layer2use = EARS_LAYER
|
||||
|
||||
var/image/standing
|
||||
if(ears.alternate_worn_icon)
|
||||
standing = image("icon"=ears.alternate_worn_icon, "icon_state"="[ears.icon_state]", "layer"=-EARS_LAYER)
|
||||
standing = image("icon"=ears.alternate_worn_icon, "icon_state"="[ears.icon_state]", "layer"=-layer2use)
|
||||
if(!standing)
|
||||
standing = image("icon"='icons/mob/ears.dmi', "icon_state"="[ears.icon_state]", "layer"=-EARS_LAYER)
|
||||
standing = image("icon"='icons/mob/ears.dmi', "icon_state"="[ears.icon_state]", "layer"=-layer2use)
|
||||
|
||||
overlays_standing[EARS_LAYER] = standing
|
||||
|
||||
@@ -334,11 +357,17 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
shoes.screen_loc = ui_shoes //...draw the item in the inventory screen
|
||||
client.screen += shoes //Either way, add the item to the HUD
|
||||
|
||||
var/layer2use
|
||||
if(shoes.alternate_worn_layer)
|
||||
layer2use = shoes.alternate_worn_layer
|
||||
if(!layer2use)
|
||||
layer2use = SHOES_LAYER
|
||||
|
||||
var/image/standing
|
||||
if(shoes.alternate_worn_icon)
|
||||
standing = image("icon"=shoes.alternate_worn_icon, "icon_state"="[shoes.icon_state]","layer"=-SHOES_LAYER)
|
||||
standing = image("icon"=shoes.alternate_worn_icon, "icon_state"="[shoes.icon_state]","layer"=-layer2use)
|
||||
if(!standing)
|
||||
standing = image("icon"='icons/mob/feet.dmi', "icon_state"="[shoes.icon_state]", "layer"=-SHOES_LAYER)
|
||||
standing = image("icon"='icons/mob/feet.dmi', "icon_state"="[shoes.icon_state]", "layer"=-layer2use)
|
||||
overlays_standing[SHOES_LAYER] = standing
|
||||
|
||||
if(shoes.blood_DNA)
|
||||
@@ -384,11 +413,17 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
var/t_state = belt.item_state
|
||||
if(!t_state) t_state = belt.icon_state
|
||||
|
||||
var/layer2use
|
||||
if(belt.alternate_worn_layer)
|
||||
layer2use = belt.alternate_worn_layer
|
||||
if(!layer2use)
|
||||
layer2use = BELT_LAYER
|
||||
|
||||
var/image/standing
|
||||
if(belt.alternate_worn_icon)
|
||||
standing = image("icon"=belt.alternate_worn_icon, "icon_state"="[t_state]", "layer"=-BELT_LAYER)
|
||||
standing = image("icon"=belt.alternate_worn_icon, "icon_state"="[t_state]", "layer"=-layer2use)
|
||||
if(!standing)
|
||||
standing = image("icon"='icons/mob/belt.dmi', "icon_state"="[t_state]", "layer"=-BELT_LAYER)
|
||||
standing = image("icon"='icons/mob/belt.dmi', "icon_state"="[t_state]", "layer"=-layer2use)
|
||||
|
||||
overlays_standing[BELT_LAYER] = standing
|
||||
|
||||
@@ -405,11 +440,18 @@ Please contact me on #coderbus IRC. ~Carnie x
|
||||
wear_suit.screen_loc = ui_oclothing //TODO //...draw the item in the inventory screen
|
||||
client.screen += wear_suit //Either way, add the item to the HUD
|
||||
|
||||
|
||||
var/layer2use
|
||||
if(wear_suit.alternate_worn_layer)
|
||||
layer2use = wear_suit.alternate_worn_layer
|
||||
if(!layer2use)
|
||||
layer2use = SUIT_LAYER
|
||||
|
||||
var/image/standing
|
||||
if(wear_suit.alternate_worn_icon)
|
||||
standing = image("icon"=wear_suit.alternate_worn_icon, "icon_state"="[wear_suit.icon_state]", "layer"=-SUIT_LAYER)
|
||||
standing = image("icon"=wear_suit.alternate_worn_icon, "icon_state"="[wear_suit.icon_state]", "layer"=-layer2use)
|
||||
if(!standing)
|
||||
standing = image("icon"='icons/mob/suit.dmi', "icon_state"="[wear_suit.icon_state]", "layer"=-SUIT_LAYER)
|
||||
standing = image("icon"='icons/mob/suit.dmi', "icon_state"="[wear_suit.icon_state]", "layer"=-layer2use)
|
||||
overlays_standing[SUIT_LAYER] = standing
|
||||
|
||||
if(istype(wear_suit, /obj/item/clothing/suit/straight_jacket))
|
||||
|
||||
@@ -96,11 +96,18 @@
|
||||
/mob/living/carbon/update_inv_wear_mask()
|
||||
remove_overlay(FACEMASK_LAYER)
|
||||
if(istype(wear_mask, /obj/item/clothing/mask))
|
||||
|
||||
var/layer2use
|
||||
if(wear_mask.alternate_worn_layer)
|
||||
layer2use = wear_mask.alternate_worn_layer
|
||||
if(!layer2use)
|
||||
layer2use = FACEMASK_LAYER
|
||||
|
||||
var/image/standing
|
||||
if(wear_mask.alternate_worn_icon)
|
||||
standing = image("icon"=wear_mask.alternate_worn_icon, "icon_state"="[wear_mask.icon_state]", "layer"=-FACEMASK_LAYER)
|
||||
standing = image("icon"=wear_mask.alternate_worn_icon, "icon_state"="[wear_mask.icon_state]", "layer"=-layer2use)
|
||||
if(!standing)
|
||||
standing = image("icon"='icons/mob/mask.dmi', "icon_state"="[wear_mask.icon_state]", "layer"=-FACEMASK_LAYER)
|
||||
standing = image("icon"='icons/mob/mask.dmi', "icon_state"="[wear_mask.icon_state]", "layer"=-layer2use)
|
||||
|
||||
overlays_standing[FACEMASK_LAYER] = standing
|
||||
|
||||
@@ -111,11 +118,18 @@
|
||||
/mob/living/carbon/update_inv_back()
|
||||
remove_overlay(BACK_LAYER)
|
||||
if(back)
|
||||
|
||||
var/layer2use
|
||||
if(back.alternate_worn_layer)
|
||||
layer2use = back.alternate_worn_layer
|
||||
if(!layer2use)
|
||||
layer2use = BACK_LAYER
|
||||
|
||||
var/image/standing
|
||||
if(back.alternate_worn_icon)
|
||||
standing = image("icon"=back.alternate_worn_icon, "icon_state"="[back.icon_state]", "layer"=-BACK_LAYER)
|
||||
standing = image("icon"=back.alternate_worn_icon, "icon_state"="[back.icon_state]", "layer"=-layer2use)
|
||||
if(!standing)
|
||||
standing = image("icon"='icons/mob/back.dmi', "icon_state"="[back.icon_state]", "layer"=-BACK_LAYER)
|
||||
standing = image("icon"='icons/mob/back.dmi', "icon_state"="[back.icon_state]", "layer"=-layer2use)
|
||||
|
||||
overlays_standing[BACK_LAYER] = standing
|
||||
return back
|
||||
@@ -124,11 +138,18 @@
|
||||
/mob/living/carbon/update_inv_head()
|
||||
remove_overlay(HEAD_LAYER)
|
||||
if(head)
|
||||
|
||||
var/layer2use
|
||||
if(head.alternate_worn_layer)
|
||||
layer2use = head.alternate_worn_layer
|
||||
if(!layer2use)
|
||||
layer2use = HEAD_LAYER
|
||||
|
||||
var/image/standing
|
||||
if(head.alternate_worn_icon)
|
||||
standing = image("icon"=head.alternate_worn_icon, "icon_state"="[head.icon_state]", "layer"=-HEAD_LAYER)
|
||||
standing = image("icon"=head.alternate_worn_icon, "icon_state"="[head.icon_state]", "layer"=-layer2use)
|
||||
if(!standing)
|
||||
standing = image("icon"='icons/mob/head.dmi', "icon_state"="[head.icon_state]", "layer"=-HEAD_LAYER)
|
||||
standing = image("icon"='icons/mob/head.dmi', "icon_state"="[head.icon_state]", "layer"=-layer2use)
|
||||
standing.color = head.color // For now, this is here solely for kitty ears, but everything should do this eventually
|
||||
standing.alpha = head.alpha
|
||||
|
||||
|
||||
Reference in New Issue
Block a user