U_I Phase 1.0: First consolidation pass

This commit is contained in:
Arokha Sieyes
2018-03-06 18:05:23 -05:00
parent 59def29202
commit aa9ec19118
17 changed files with 325 additions and 536 deletions

View File

@@ -98,9 +98,17 @@
#define INV_R_HAND_DEF_ICON 'icons/mob/items/righthand.dmi'
#define INV_W_UNIFORM_DEF_ICON 'icons/mob/uniform.dmi'
#define INV_ACCESSORIES_DEF_ICON 'icons/mob/ties.dmi'
#define INV_SUIT_DEF_ICON 'icons/mob/ties.dmi'
#define INV_TIE_DEF_ICON 'icons/mob/ties.dmi'
#define INV_SUIT_DEF_ICON 'icons/mob/suit.dmi'
#define MAX_SUPPLIED_LAW_NUMBER 50
#define INV_WEAR_ID_DEF_ICON 'icons/mob/mob.dmi'
#define INV_GLOVES_DEF_ICON 'icons/mob/hands.dmi'
#define INV_EYES_DEF_ICON 'icons/mob/eyes.dmi'
#define INV_EARS_DEF_ICON 'icons/mob/ears.dmi'
#define INV_FEET_DEF_ICON 'icons/mob/feet.dmi'
#define INV_BELT_DEF_ICON 'icons/mob/belt.dmi'
#define INV_MASK_DEF_ICON 'icons/mob/mask.dmi'
#define INV_HCUFF_DEF_ICON 'icons/mob/mob.dmi'
#define INV_LCUFF_DEF_ICON 'icons/mob/mob.dmi'
// Character's economic class
#define CLASS_UPPER "Wealthy"
@@ -256,3 +264,8 @@
#define VIS_MESONS 20
#define VIS_COUNT 20 //Must be highest number from above.
//Some mob icon layering defines
#define BODY_LAYER -100
#define BACKPLANE_LAYER -101
#define HUD_LAYER -105

View File

@@ -886,6 +886,7 @@ proc/sort_atoms_by_layer(var/list/atoms)
/proc/gen_hud_image(var/file, var/person, var/state, var/plane)
var/image/img = image(file, person, state)
img.plane = plane //Thanks Byond.
img.layer = HUD_LAYER
img.appearance_flags = APPEARANCE_UI|KEEP_APART
return img

View File

@@ -63,11 +63,11 @@ datum/category_group/underwear/dd_SortValue()
/datum/category_item/underwear/proc/is_default(var/gender)
return is_default
/datum/category_item/underwear/proc/generate_image(var/list/metadata)
/datum/category_item/underwear/proc/generate_image(var/list/metadata, var/layer = FLOAT_LAYER)
if(!icon_state)
return
var/image/I = image(icon = icon, icon_state = icon_state)
var/image/I = image(icon = icon, icon_state = icon_state, layer = layer)
for(var/datum/gear_tweak/gt in tweaks)
gt.tweak_item(I, metadata && metadata["[gt]"] ? metadata["[gt]"] : gt.get_default())
return I

View File

@@ -84,6 +84,9 @@
var/reach = 1 // Length of tiles it can reach, 1 is adjacent.
var/addblends // Icon overlay for ADD highlights when applicable.
var/icon/default_worn_icon //Default on-mob icon
var/worn_layer //Default on-mob layer
/obj/item/New()
..()
if(embed_chance < 0)
@@ -679,3 +682,113 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
// My best guess as to why this is here would be that it does so little. Still, keep it under all the procs, for sanity's sake.
/obj/item/device
icon = 'icons/obj/device.dmi'
//Worn icon generation for on-mob sprites
/obj/item/proc/make_worn_icon(var/body_type,var/slot_name,var/inhands,var/default_icon,var/default_layer = 0)
//Get the required information about the base icon
var/icon/icon2use = get_worn_icon_file(body_type = body_type, slot_name = slot_name, default_icon = default_icon)
var/state2use = get_worn_icon_state(slot_name = slot_name)
var/layer2use = get_worn_layer(default_layer = default_layer)
//Snowflakey inhand icons in a specific slot
if(inhands && icon2use == icon_override)
switch(slot_name)
if(slot_r_hand_str)
state2use += "_r"
if(slot_l_hand_str)
state2use += "_l"
testing("[src] (\ref[src]) - Worn Icon:[icon2use], Worn State:[state2use], Worn Layer:[layer2use]")
//Generate the base onmob icon
var/icon/standing_icon = icon(icon = icon2use, icon_state = state2use)
apply_custom(standing_icon) //Pre-image overridable proc to customize the thing
apply_addblends(icon2use,standing_icon) //Some items have ICON_ADD blend shaders
var/image/standing = image(standing_icon)
standing.alpha = alpha
standing.color = color
standing.layer = layer2use
//Apply any special features
apply_blood(standing) //Some items show blood when bloodied
apply_accessories(standing) //Some items sport accessories like webbing
//Return our icon
return standing
//Returns the icon object that should be used for the worn icon
/obj/item/proc/get_worn_icon_file(var/body_type,var/slot_name,var/default_icon)
//1: icon_override var
if(icon_override)
return icon_override
//2: species-specific sprite sheets
var/sheet = sprite_sheets[body_type]
if(sheet)
return sheet
//3: slot-specific sprite sheets
sheet = item_icons[slot_name]
if(sheet)
return sheet
//4: item's default icon
if(default_worn_icon)
return default_worn_icon
//5: provided default_icon
if(default_icon)
return default_icon
//6: give up
return
//Returns the state that should be used for the worn icon
/obj/item/proc/get_worn_icon_state(var/slot_name)
//1: slot-specific sprite sheets
var/state = item_state_slots[slot_name]
if(state)
return state
//2: item_state variable
if(item_state)
return item_state
//3: icon_state variable
if(icon_state)
return icon_state
//Returns the layer that should be used for the worn icon (as a FLOAT_LAYER layer, so negative)
/obj/item/proc/get_worn_layer(var/default_layer)
//1: worn_layer variable
if(!isnull(worn_layer)) //Can be zero, so...
return -100+worn_layer
//2: your default
return -100+default_layer
//Apply the addblend blends onto the icon
/obj/item/proc/apply_addblends(var/source_icon, var/icon/standing_icon)
//If we have addblends, blend them onto the provided icon
if(addblends && standing_icon && source_icon)
var/addblend_icon = icon("icon" = source_icon, "icon_state" = addblends)
standing_icon.Blend(addblend_icon, ICON_ADD)
//STUB
/obj/item/proc/apply_custom(var/icon/standing_icon)
return standing_icon
//STUB
/obj/item/proc/apply_blood(var/image/standing)
return standing
//STUB
/obj/item/proc/apply_accessories(var/image/standing)
return standing

View File

@@ -3,6 +3,7 @@
desc = "An updated, modular intercom that fits over the head. Takes encryption keys"
var/radio_desc = ""
icon_state = "headset"
item_state = null //To remove the radio's state
matter = list(DEFAULT_WALL_MATERIAL = 75)
subspace_transmission = 1
canhear_range = 0 // can't hear headsets from very far away
@@ -63,6 +64,17 @@
return ..(freq, level)
return -1
/obj/item/device/radio/headset/get_worn_icon_state(var/slot_name)
var/append = ""
if(icon_override)
switch(slot_name)
if(slot_l_ear_str)
append = "_l"
if(slot_r_ear_str)
append = "_r"
return "[..()][append]"
/obj/item/device/radio/headset/syndicate
origin_tech = list(TECH_ILLEGAL = 3)
syndie = 1

View File

@@ -89,6 +89,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
var/weldermes = "USER lights NAME with FLAME"
var/ignitermes = "USER lights NAME with FLAME"
var/brand
blood_sprite_state = null //Can't bloody these
/obj/item/clothing/mask/smokable/New()
..()

View File

@@ -20,6 +20,12 @@
var/use_time = 30
sprite_sheets = list("Teshari" = 'icons/mob/species/seromi/handcuffs.dmi')
/obj/item/weapon/handcuffs/get_worn_icon_state(var/slot_name)
if(slot_name == slot_handcuffed_str)
return "handcuff1" //Simple
return ..()
/obj/item/weapon/handcuffs/attack(var/mob/living/carbon/C, var/mob/living/user)
if(!user.IsAdvancedToolUser())
@@ -210,6 +216,12 @@ var/last_chew = 0
breakouttime = 30
cuff_sound = 'sound/weapons/towelwipe.ogg' //Is there anything this sound can't do?
/obj/item/weapon/handcuffs/legcuffs/get_worn_icon_state(var/slot_name)
if(slot_name == slot_legcuffed_str)
return "legcuff1"
return ..()
/obj/item/weapon/handcuffs/legcuffs/bola/can_place(var/mob/target, var/mob/user)
if(user) //A ranged legcuff, until proper implementation as items it remains a projectile-only thing.
return 1

View File

@@ -112,6 +112,12 @@
usr << "The fingerprint hash on the card is [fingerprint_hash]."
return
/obj/item/weapon/card/id/get_worn_icon_state(var/slot_name)
if(slot_name == slot_wear_id_str)
return "id" //Legacy, just how it is. There's only one sprite.
return ..()
/obj/item/weapon/card/id/initialize()
. = ..()
var/datum/job/J = job_master.GetJob(rank)

View File

@@ -22,6 +22,16 @@
show_above_suit = !show_above_suit
update_icon()
//Some belts have sprites to show icons
/obj/item/weapon/storage/make_worn_icon(var/body_type,var/slot_name,var/inhands,var/default_icon,var/default_layer = 0)
var/image/standing = ..()
if(contents.len)
for(var/obj/item/i in contents)
var/i_state = i.item_state
if(!i_state) i_state = i.icon_state
standing.add_overlay(image(icon = INV_BELT_DEF_ICON, icon_state = i_state))
return standing
/obj/item/weapon/storage/update_icon()
if (ismob(src.loc))
var/mob/M = src.loc

View File

@@ -22,6 +22,7 @@
*/
var/list/sprite_sheets_refit = null
var/ear_protection = 0
var/blood_sprite_state
//Updates the icons of the mob wearing the clothing item, if any.
/obj/item/clothing/proc/update_clothing_icon()
@@ -197,6 +198,7 @@
w_class = ITEMSIZE_SMALL
icon = 'icons/obj/clothing/gloves.dmi'
siemens_coefficient = 0.9
blood_sprite_state = "bloodyhands"
var/wired = 0
var/obj/item/weapon/cell/cell = 0
var/fingerprint_chance = 0 //How likely the glove is to let fingerprints through
@@ -318,6 +320,7 @@
body_parts_covered = HEAD
slot_flags = SLOT_HEAD
w_class = ITEMSIZE_SMALL
blood_sprite_state = "helmetblood"
var/light_overlay = "helmet_light"
var/light_applied
@@ -427,6 +430,7 @@
body_parts_covered = HEAD
slot_flags = SLOT_MASK
body_parts_covered = FACE|EYES
blood_sprite_state = "maskblood"
sprite_sheets = list(
"Teshari" = 'icons/mob/species/seromi/masks.dmi',
"Vox" = 'icons/mob/species/vox/masks.dmi',
@@ -460,6 +464,7 @@
siemens_coefficient = 0.9
body_parts_covered = FEET
slot_flags = SLOT_FEET
blood_sprite_state = "shoeblood"
var/can_hold_knife = 0
var/obj/item/holding
@@ -574,6 +579,7 @@
w_class = ITEMSIZE_NORMAL
preserve_item = 1
sprite_sheets = list(
"Teshari" = 'icons/mob/species/seromi/suit.dmi',
"Vox" = 'icons/mob/species/vox/suit.dmi'
@@ -602,6 +608,7 @@
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
w_class = ITEMSIZE_NORMAL
show_messages = 1
blood_sprite_state = "uniformblood"
var/has_sensor = 1 //For the crew computer 2 = unable to change mode
var/sensor_mode = 0

View File

@@ -0,0 +1,34 @@
/obj/item/clothing/apply_accessories(var/image/standing)
if(LAZYLEN(accessories))
for(var/obj/item/clothing/accessory/A in accessories)
standing.add_overlay(A.get_mob_overlay())
/obj/item/clothing/apply_blood(var/image/standing)
if(blood_DNA && blood_sprite_state && ishuman(loc))
var/mob/living/carbon/human/H = loc
var/image/bloodsies = image(icon = H.species.get_blood_mask(H), icon_state = blood_sprite_state)
bloodsies.color = blood_color
standing.add_overlay(bloodsies)
//UNIFORM: Always appends "_s" to iconstate, stupidly.
/obj/item/clothing/under/get_worn_icon_state(var/slot_name)
var/state2use = ..()
state2use += "_s"
return state2use
//HELMET: May have a lighting overlay
/obj/item/clothing/head/make_worn_icon(var/body_type,var/slot_name,var/inhands,var/default_icon,var/default_layer = 0)
var/image/standing = ..()
if(on)
var/cache_key = "[light_overlay]_[body_type]"
if(standing && light_overlay_cache[cache_key])
standing.add_overlay(light_overlay_cache[cache_key])
return standing
//SUIT: Blood state is slightly different
/obj/item/clothing/suit/apply_blood(var/image/standing)
if(blood_DNA && blood_sprite_state && ishuman(loc))
var/mob/living/carbon/human/H = loc
var/image/bloodsies = image(icon = H.species.get_blood_mask(H), icon_state = "[blood_overlay_type]blood")
bloodsies.color = blood_color
standing.add_overlay(bloodsies)

View File

@@ -179,6 +179,12 @@
spark_system = null
return ..()
/obj/item/weapon/rig/get_worn_icon_file(var/body_type,var/slot_name,var/default_icon)
if(slot_name == slot_back_str)
return icon_override || mob_icon //That's just all this does.
return ..()
/obj/item/weapon/rig/proc/suit_is_deployed()
if(!istype(wearer) || src.loc != wearer || wearer.back != src)
return 0

View File

@@ -8,6 +8,16 @@ var/global/list/human_icon_cache = list()
var/global/list/tail_icon_cache = list() //key is [species.race_key][r_skin][g_skin][b_skin]
var/global/list/light_overlay_cache = list()
/mob/living/carbon/human/proc/apply_overlay(cache_index)
if((. = overlays_standing[cache_index]))
add_overlay(.)
/mob/living/carbon/human/proc/remove_overlay(cache_index)
var/I = overlays_standing[cache_index]
if(I)
cut_overlay(I)
overlays_standing[cache_index] = null
///////////////////////
//UPDATE_ICONS SYSTEM//
///////////////////////
@@ -89,38 +99,37 @@ Please contact me on #coderbus IRC. ~Carn x
*/
//Human Overlays Indexes/////////
#define MUTATIONS_LAYER 1
#define SKIN_LAYER 2
#define DAMAGE_LAYER 3
#define SURGERY_LEVEL 4 //bs12 specific.
#define UNDERWEAR_LAYER 5
#define SHOES_LAYER_ALT 6
#define UNIFORM_LAYER 7
#define ID_LAYER 8
#define SHOES_LAYER 9
#define GLOVES_LAYER 10
#define BELT_LAYER 11
#define SUIT_LAYER 12
#define TAIL_LAYER 13 //bs12 specific. //In a perfect world the parts of the tail that show between legs would be on a new layer. Until then, sprite's been tweaked
#define GLASSES_LAYER 14
#define BELT_LAYER_ALT 15
#define SUIT_STORE_LAYER 16
#define BACK_LAYER 17
#define HAIR_LAYER 18 //TODO: make part of head layer?
#define EARS_LAYER 19
#define EYES_LAYER 20
#define FACEMASK_LAYER 21
#define HEAD_LAYER 22
#define COLLAR_LAYER 23
#define HANDCUFF_LAYER 24
#define LEGCUFF_LAYER 25
#define L_HAND_LAYER 26
#define R_HAND_LAYER 27
#define MODIFIER_EFFECTS_LAYER 28
#define FIRE_LAYER 29 //If you're on fire
#define WATER_LAYER 30 //If you're submerged in water.
#define TARGETED_LAYER 31 //BS12: Layer for the target overlay from weapon targeting system
#define TOTAL_LAYERS 31
#define MUTATIONS_LAYER 1 //Mutations like fat, and lasereyes
#define SKIN_LAYER 2 //Skin things added by a call on species
#define DAMAGE_LAYER 3 //Injury overlay sprites like open wounds
#define SURGERY_LEVEL 4 //Overlays for open surgical sites
#define UNDERWEAR_LAYER 5 //Underwear/bras/etc
#define SHOES_LAYER_ALT 6 //Shoe-slot item (when set to be under uniform via verb)
#define UNIFORM_LAYER 7 //Uniform-slot item
#define ID_LAYER 8 //ID-slot item
#define SHOES_LAYER 9 //Shoe-slot item
#define GLOVES_LAYER 10 //Glove-slot item
#define BELT_LAYER 11 //Belt-slot item
#define SUIT_LAYER 12 //Suit-slot item
#define TAIL_LAYER 13 //Some species have tails to render
#define GLASSES_LAYER 14 //Eye-slot item
#define BELT_LAYER_ALT 15 //Belt-slot item (when set to be above suit via verb)
#define SUIT_STORE_LAYER 16 //Suit storage-slot item
#define BACK_LAYER 17 //Back-slot item
#define HAIR_LAYER 18 //The human's hair
#define EARS_LAYER 19 //Both ear-slot items (combined image)
#define EYES_LAYER 20 //Mob's eyes (used for glowing eyes)
#define FACEMASK_LAYER 21 //Mask-slot item
#define HEAD_LAYER 22 //Head-slot item
#define HANDCUFF_LAYER 23 //Handcuffs, if the human is handcuffed, in a secret inv slot
#define LEGCUFF_LAYER 24 //Same as handcuffs, for legcuffs
#define L_HAND_LAYER 25 //Left-hand item
#define R_HAND_LAYER 26 //Right-hand item
#define MODIFIER_EFFECTS_LAYER 27 //Effects drawn by modifiers
#define FIRE_LAYER 28 //'Mob on fire' overlay layer
#define WATER_LAYER 29 //'Mob submerged' overlay layer
#define TARGETED_LAYER 30 //'Aimed at' overlay layer
#define TOTAL_LAYERS 30//<---- KEEP THIS UPDATED, should always equal the highest number here, used to initialize a list.
//////////////////////////////////
/mob/living/carbon/human
@@ -144,13 +153,13 @@ Please contact me on #coderbus IRC. ~Carn x
var/mutable_appearance/ma_compiled = new(src)
//1: HUDs because these are hidden behind a backplane. See update_icons_huds()
ma_compiled.overlays = list_huds //The first one can set instead of add
ma_compiled.underlays = list_huds //The first one can set instead of add
//2: The body itself, all the organs and whatnot
ma_compiled.overlays += list_body
//ma_compiled.overlays += list_body //Trying flat icon setting for now
//3: The 'layers' list (overlays_standing), from the defines above
ma_compiled.overlays += list_layers
ma_compiled.overlays = list_layers
//4: Apply transforms based on situation
update_transform(ma_compiled)
@@ -285,7 +294,7 @@ var/global/list/damage_icon_parts = list()
var/icon/standing = new /icon(species.damage_overlays, "00")
var/image/standing_image = new /image("icon" = standing)
var/image/standing_image = new /image("icon" = standing,layer = BODY_LAYER+DAMAGE_LAYER)
// blend the individual damage states with our icons
for(var/obj/item/organ/external/O in organs)
@@ -434,7 +443,10 @@ var/global/list/damage_icon_parts = list()
//END CACHED ICON GENERATION.
stand_icon.Blend(base_icon,ICON_OVERLAY)
list_body += stand_icon //A little silly, almost pointless to use a list for this, but can come back later and make this proc itself better
//var/image/standing = image(stand_icon)
//standing.layer = BODY_LAYER
//list_body += standing //A little silly, almost pointless to use a list for this, but can come back later and make this proc itself better
icon = stand_icon
if(update_icons)
update_icons()
@@ -446,7 +458,11 @@ var/global/list/damage_icon_parts = list()
if(QDESTROYING(src))
return
overlays_standing[SKIN_LAYER] = species.update_skin(src)
var/image/skin = species.update_skin(src)
if(skin)
skin.layer = BODY_LAYER+SKIN_LAYER
overlays_standing[SKIN_LAYER] = skin
if(update_icons) update_icons_layers()
//UNDERWEAR OVERLAY
@@ -462,7 +478,8 @@ var/global/list/damage_icon_parts = list()
if(hide_underwear[category])
continue
var/datum/category_item/underwear/UWI = all_underwear[category]
overlays_standing[UNDERWEAR_LAYER] += UWI.generate_image(all_underwear_metadata[category])
var/image/wear = UWI.generate_image(all_underwear_metadata[category], layer = BODY_LAYER+UNDERWEAR_LAYER)
overlays_standing[UNDERWEAR_LAYER] += wear
if(update_icons) update_icons_layers()
@@ -511,7 +528,7 @@ var/global/list/damage_icon_parts = list()
if(head_organ.nonsolid)
face_standing += rgb(,,,120)
overlays_standing[HAIR_LAYER] = image(face_standing)
overlays_standing[HAIR_LAYER] = image(face_standing, layer = BODY_LAYER+HAIR_LAYER)
if(update_icons) update_icons_layers()
/mob/living/carbon/human/update_eyes(var/update_icons=1)
@@ -573,7 +590,7 @@ var/global/list/damage_icon_parts = list()
if(FAT in mutations)
fat = "fat"
var/image/standing = image(icon = 'icons/effects/genetics.dmi')
var/image/standing = image(icon = 'icons/effects/genetics.dmi', layer = BODY_LAYER+MUTATIONS_LAYER)
var/g = gender == FEMALE ? "f" : "m"
for(var/datum/dna/gene/gene in dna_genes)
@@ -650,60 +667,14 @@ var/global/list/damage_icon_parts = list()
//Align this item on the inventory screen TODO: Move this elsewhere
w_uniform.screen_loc = ui_iclothing
//Pick an icon file
var/icon/under_icon
if(w_uniform.icon_override)
under_icon = w_uniform.icon_override
else if(w_uniform.sprite_sheets && w_uniform.sprite_sheets[species.get_bodytype(src)])
under_icon = w_uniform.sprite_sheets[species.get_bodytype(src)]
else if(w_uniform.item_icons && w_uniform.item_icons[slot_w_uniform_str])
under_icon = w_uniform.item_icons[slot_w_uniform_str]
else
under_icon = INV_W_UNIFORM_DEF_ICON
//Pick an icon state
var/under_state
if(w_uniform.item_state_slots && w_uniform.item_state_slots[slot_w_uniform_str])
under_state = w_uniform.item_state_slots[slot_w_uniform_str]
else if(w_uniform.item_state)
under_state = w_uniform.item_state
else
under_state = w_uniform.icon_state
//SNOWFLAKE: Append _s for no apparent reason at all
var/image/standing = image(icon = under_icon, icon_state = "[under_state]_s")
//Addblends is something some accessories use when they want to ICON_ADD blends onto the uniform
if(w_uniform.addblends)
var/icon/base = new/icon("icon" = standing.icon, "icon_state" = standing.icon_state)
var/addblend_icon = new/icon("icon" = standing.icon, "icon_state" = w_uniform.addblends)
if(w_uniform.color)
base.Blend(w_uniform.color, ICON_MULTIPLY)
base.Blend(addblend_icon, ICON_ADD)
standing = image(base)
else
standing.color = w_uniform.color
//Blood overlay for uniform blood splatter
if(w_uniform.blood_DNA)
var/image/bloodsies = image(icon = species.get_blood_mask(src), icon_state = "uniformblood")
bloodsies.color = w_uniform.blood_color
standing.overlays += bloodsies
//Accessories drawn directly onto the uniform
var/obj/item/clothing/under/under = w_uniform
if(under.accessories.len)
for(var/obj/item/clothing/accessory/A in under.accessories)
standing.overlays |= A.get_mob_overlay()
overlays_standing[UNIFORM_LAYER] = standing
//Build a uniform sprite
overlays_standing[UNIFORM_LAYER] = w_uniform.make_worn_icon(body_type = species.get_bodytype(), slot_name = slot_w_uniform_str, default_icon = INV_W_UNIFORM_DEF_ICON, default_layer = UNIFORM_LAYER)
//Shoes can be affected by uniform being drawn onto them
update_inv_shoes(FALSE)
//TODO: Remove this
if(update_icons)
update_icons_layers()
if(update_icons) update_icons_layers()
/mob/living/carbon/human/update_inv_wear_id(var/update_icons=1)
if(QDESTROYING(src))
@@ -718,16 +689,11 @@ var/global/list/damage_icon_parts = list()
//Align this item on the inventory screen TODO: Move this elsewhere
wear_id.screen_loc = ui_id
//Only draw the ID on the mob if the uniform allows for it TODO: bad colon check
if(w_uniform && w_uniform:displays_id)
var/image/standing
if(wear_id.icon_override)
standing = image("icon" = wear_id.icon_override, "icon_state" = "[icon_state]")
else if(wear_id.sprite_sheets && wear_id.sprite_sheets[species.get_bodytype(src)])
standing = image("icon" = wear_id.sprite_sheets[species.get_bodytype(src)], "icon_state" = "[icon_state]")
else
standing = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "id")
overlays_standing[ID_LAYER] = standing
//Only draw the ID on the mob if the uniform allows for it
if(w_uniform && istype(w_uniform, /obj/item/clothing/under))
var/obj/item/clothing/under/U = w_uniform
if(U.displays_id)
overlays_standing[ID_LAYER] = wear_id.make_worn_icon(body_type = species.get_bodytype(), slot_name = slot_wear_id_str, default_icon = INV_WEAR_ID_DEF_ICON, default_layer = ID_LAYER)
//Set the bits to update the ID hud since they put something in this slot (or removed it)
//TODO: Move elsewhere, update icons is not the place.
@@ -751,37 +717,9 @@ var/global/list/damage_icon_parts = list()
if(gloves)
gloves.screen_loc = ui_gloves //TODO
var/t_state = gloves.item_state
if(!t_state) t_state = gloves.icon_state
overlays_standing[GLOVES_LAYER] = gloves.make_worn_icon(body_type = species.get_bodytype(), slot_name = slot_gloves_str, default_icon = INV_GLOVES_DEF_ICON, default_layer = GLOVES_LAYER)
//Garbled mess of picking an icon and state at the same time
var/image/standing
if(gloves.icon_override)
standing = image("icon" = gloves.icon_override, "icon_state" = "[t_state]")
else if(gloves.sprite_sheets && gloves.sprite_sheets[species.get_bodytype(src)])
standing = image("icon" = gloves.sprite_sheets[species.get_bodytype(src)], "icon_state" = "[t_state]")
else
standing = image("icon" = 'icons/mob/hands.dmi', "icon_state" = "[t_state]")
//Bloodying them if necessary TODO this is basically identical to the elif blood_DNA below
if(gloves.blood_DNA)
var/image/bloodsies = image("icon" = species.get_blood_mask(src), "icon_state" = "bloodyhands")
bloodsies.color = gloves.blood_color
standing.overlays += bloodsies
//Accessory things for gloves that use ADD blend
if(gloves.addblends)
var/icon/base = new/icon("icon" = standing.icon, "icon_state" = standing.icon_state)
var/addblend_icon = new/icon("icon" = standing.icon, "icon_state" = gloves.addblends)
if(gloves.color)
base.Blend(gloves.color, ICON_MULTIPLY)
base.Blend(addblend_icon, ICON_ADD)
standing = image(base)
else
standing.color = gloves.color
overlays_standing[GLOVES_LAYER] = standing
else if(blood_DNA)
else if(blood_DNA) //TODO: Make this proc generic
var/image/bloodsies = image("icon" = species.get_blood_mask(src), "icon_state" = "bloodyhands")
bloodsies.color = hand_blood_color
overlays_standing[GLOVES_LAYER] = bloodsies
@@ -799,26 +737,7 @@ var/global/list/damage_icon_parts = list()
if(update_icons) update_icons_layers()
return //Not wearing glasses, no need to update anything.
//Garbled mess of picking an icon and iconstate at the same time
var/image/standing
if(glasses.icon_override)
standing = image("icon" = glasses.icon_override, "icon_state" = "[glasses.icon_state]")
else if(glasses.sprite_sheets && glasses.sprite_sheets[species.get_bodytype(src)])
standing = image("icon" = glasses.sprite_sheets[species.get_bodytype(src)], "icon_state" = "[glasses.icon_state]")
else
standing = image("icon" = 'icons/mob/eyes.dmi', "icon_state" = "[glasses.icon_state]")
//Thing for glasses ADD blend accessories (probably never used)
if(glasses.addblends)
var/icon/base = new/icon("icon" = standing.icon, "icon_state" = standing.icon_state)
var/addblend_icon = new/icon("icon" = standing.icon, "icon_state" = glasses.addblends)
if(glasses.color)
base.Blend(glasses.color, ICON_MULTIPLY)
base.Blend(addblend_icon, ICON_ADD)
standing = image(base)
else
standing.color = glasses.color
overlays_standing[GLASSES_LAYER] = standing
overlays_standing[GLASSES_LAYER] = glasses.make_worn_icon(body_type = species.get_bodytype(), slot_name = slot_gloves_str, default_icon = INV_EYES_DEF_ICON, default_layer = GLASSES_LAYER)
if(update_icons) update_icons_layers()
@@ -837,59 +756,15 @@ var/global/list/damage_icon_parts = list()
return //Why bother, if no ear sprites
// Blank image upon which to layer left & right overlays.
var/image/both = image("icon" = 'icons/effects/effects.dmi', "icon_state" = "nothing")
var/image/both = image(icon = 'icons/effects/effects.dmi', icon_state = "nothing", layer = BODY_LAYER+EARS_LAYER)
if(l_ear)
var/image/standing
var/t_type = l_ear.icon_state
//Jumbled mess of deciding an icon and iconstate at the same time
if(l_ear.icon_override)
t_type = "[t_type]_l"
standing = image("icon" = l_ear.icon_override, "icon_state" = "[t_type]")
else if(l_ear.sprite_sheets && l_ear.sprite_sheets[species.get_bodytype(src)])
t_type = "[t_type]_l"
standing = image("icon" = l_ear.sprite_sheets[species.get_bodytype(src)], "icon_state" = "[t_type]")
else
standing = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[t_type]")
//Addblends system for ear accessories (literally nothing uses this, probably??)
if(l_ear.addblends)
var/icon/base = new/icon("icon" = standing.icon, "icon_state" = standing.icon_state)
var/addblend_icon = new/icon("icon" = standing.icon, "icon_state" = l_ear.addblends)
if(l_ear.color)
base.Blend(l_ear.color, ICON_MULTIPLY)
base.Blend(addblend_icon, ICON_ADD)
standing = image(base)
else
standing.color = l_ear.color
both.overlays += standing
var/image/standing = l_ear.make_worn_icon(body_type = species.get_bodytype(), slot_name = slot_l_ear_str, default_icon = INV_EARS_DEF_ICON, default_layer = EARS_LAYER)
both.add_overlay(standing)
if(r_ear)
var/image/standing
var/t_type = r_ear.icon_state
//Jumbled mess of deciding an icon and iconstate at the same time
if(r_ear.icon_override)
t_type = "[t_type]_r"
standing = image("icon" = r_ear.icon_override, "icon_state" = "[t_type]")
else if(r_ear.sprite_sheets && r_ear.sprite_sheets[species.get_bodytype(src)])
t_type = "[t_type]_r"
standing = image("icon" = r_ear.sprite_sheets[species.get_bodytype(src)], "icon_state" = "[t_type]")
else
standing = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[t_type]")
//Addblends system for ear accessories (literally nothing uses this, probably??)
if(r_ear.addblends)
var/icon/base = new/icon("icon" = standing.icon, "icon_state" = standing.icon_state)
var/addblend_icon = new/icon("icon" = standing.icon, "icon_state" = r_ear.addblends)
if(r_ear.color)
base.Blend(r_ear.color, ICON_MULTIPLY)
base.Blend(addblend_icon, ICON_ADD)
standing = image(base)
else
standing.color = r_ear.color
both.overlays += standing
var/image/standing = r_ear.make_worn_icon(body_type = species.get_bodytype(), slot_name = slot_r_ear_str, default_icon = INV_EARS_DEF_ICON, default_layer = EARS_LAYER)
both.add_overlay(standing)
overlays_standing[EARS_LAYER] = both
@@ -907,16 +782,6 @@ var/global/list/damage_icon_parts = list()
return //Either nothing to draw, or it'd be hidden.
if(shoes)
var/image/standing
//Jumbled mess of deciding icon and iconstate at the same time
if(shoes.icon_override)
standing = image("icon" = shoes.icon_override, "icon_state" = "[shoes.icon_state]")
else if(shoes.sprite_sheets && shoes.sprite_sheets[species.get_bodytype(src)])
standing = image("icon" = shoes.sprite_sheets[species.get_bodytype(src)], "icon_state" = "[shoes.icon_state]")
else
standing = image("icon" = 'icons/mob/feet.dmi', "icon_state" = "[shoes.icon_state]")
//Allow for shoe layer toggle nonsense
var/shoe_layer = SHOES_LAYER
if(istype(shoes, /obj/item/clothing/shoes))
@@ -924,27 +789,10 @@ var/global/list/damage_icon_parts = list()
if(ushoes.shoes_under_pants == 1)
shoe_layer = SHOES_LAYER_ALT
//Damn near identical to feet_blood_DNA section, TODO
if(shoes.blood_DNA)
var/image/bloodsies = image("icon" = species.get_blood_mask(src), "icon_state" = "shoeblood")
bloodsies.color = shoes.blood_color
standing.overlays += bloodsies
//NB: the use of a var for the layer on this one
overlays_standing[shoe_layer] = shoes.make_worn_icon(body_type = species.get_bodytype(), slot_name = slot_shoes_str, default_icon = INV_FEET_DEF_ICON, default_layer = shoe_layer)
//Probably never used: for ICON_ADD accessories on shoes
if(shoes.addblends)
var/icon/base = new/icon("icon" = standing.icon, "icon_state" = standing.icon_state)
var/addblend_icon = new/icon("icon" = standing.icon, "icon_state" = shoes.addblends)
if(shoes.color)
base.Blend(shoes.color, ICON_MULTIPLY)
base.Blend(addblend_icon, ICON_ADD)
standing = image(base)
else
standing.color = shoes.color
//NB: Uses a var from above rather than a define
overlays_standing[shoe_layer] = standing
//Bloody feet, but not wearing shoes
//Bloody feet, but not wearing shoes TODO
else if(feet_blood_DNA)
var/image/bloodsies = image("icon" = species.get_blood_mask(src), "icon_state" = "shoeblood")
bloodsies.color = feet_blood_color
@@ -964,10 +812,12 @@ var/global/list/damage_icon_parts = list()
s_store.screen_loc = ui_sstore1 //TODO
//TODO, this is unlike the rest of the things
//Basically has no variety in slot icon choices at all. WHY SPECIES ONLY??
var/t_state = s_store.item_state
if(!t_state) t_state = s_store.icon_state
overlays_standing[SUIT_STORE_LAYER] = image("icon" = species.suit_storage_icon, "icon_state" = "[t_state]")
if(!t_state)
t_state = s_store.icon_state
overlays_standing[SUIT_STORE_LAYER] = image(icon = species.suit_storage_icon, icon_state = t_state, layer = BODY_LAYER+SUIT_STORE_LAYER)
if(update_icons) update_icons_layers()
@@ -983,66 +833,7 @@ var/global/list/damage_icon_parts = list()
head.screen_loc = ui_head //TODO
//Determine the icon to use
var/t_icon
if(head.icon_override)
t_icon = head.icon_override
else if(head.sprite_sheets && head.sprite_sheets[species.get_bodytype(src)])
t_icon = head.sprite_sheets[species.get_bodytype(src)]
else if(head.item_icons && (slot_head_str in head.item_icons))
t_icon = head.item_icons[slot_head_str]
else
t_icon = INV_HEAD_DEF_ICON
//Determine the state to use
var/t_state
if(istype(head, /obj/item/weapon/paper))
/* I don't like this, but bandaid to fix half the hats in the game
being completely broken without re-breaking paper hats */
t_state = "paper"
else
if(head.item_state_slots && head.item_state_slots[slot_head_str])
t_state = head.item_state_slots[slot_head_str]
else if(head.item_state)
t_state = head.item_state
else
t_state = head.icon_state
//Create the image
var/image/standing = image(icon = t_icon, icon_state = t_state)
//Apparently unlike hands or feet, THIS time we can only have blood on our helmet not our head
if(head.blood_DNA)
var/image/bloodsies = image("icon" = species.get_blood_mask(src), "icon_state" = "helmetblood")
bloodsies.color = head.blood_color
standing.overlays += bloodsies
//We really need light overlay caches? It's probably a single icon. Let the helmet hold it?
if(istype(head,/obj/item/clothing/head))
var/obj/item/clothing/head/hat = head
var/cache_key = "[hat.light_overlay]_[species.get_bodytype(src)]"
if(hat.on && light_overlay_cache[cache_key])
standing.overlays |= light_overlay_cache[cache_key]
//For accessories that require ICON_ADD blending (again, why)
if(head.addblends)
var/icon/base = new/icon("icon" = standing.icon, "icon_state" = standing.icon_state)
var/addblend_icon = new/icon("icon" = standing.icon, "icon_state" = head.addblends)
if(head.color)
base.Blend(head.color, ICON_MULTIPLY)
base.Blend(addblend_icon, ICON_ADD)
standing = image(base)
else
standing.color = head.color
//Accessories, again, again, again.
var/obj/item/clothing/head/hat = head
if(istype(hat) && hat.accessories.len)
for(var/obj/item/clothing/accessory/A in hat.accessories)
standing.overlays |= A.get_mob_overlay()
overlays_standing[HEAD_LAYER] = standing
overlays_standing[HEAD_LAYER] = head.make_worn_icon(body_type = species.get_bodytype(), slot_name = slot_head_str, default_icon = INV_HEAD_DEF_ICON, default_layer = HEAD_LAYER)
if(update_icons) update_icons_layers()
@@ -1051,7 +842,7 @@ var/global/list/damage_icon_parts = list()
return
overlays_standing[BELT_LAYER] = null
overlays_standing[BELT_LAYER_ALT] = null
overlays_standing[BELT_LAYER_ALT] = null //Because you can toggle belt layer with a verb
if(!belt)
if(update_icons) update_icons_layers()
@@ -1059,18 +850,6 @@ var/global/list/damage_icon_parts = list()
belt.screen_loc = ui_belt //TODO - Distant screaming.
var/t_state = belt.item_state
if(!t_state) t_state = belt.icon_state
var/image/standing = image("icon_state" = "[t_state]")
//Mess of determining icon
if(belt.icon_override)
standing.icon = belt.icon_override
else if(belt.sprite_sheets && belt.sprite_sheets[species.get_bodytype(src)])
standing.icon = belt.sprite_sheets[species.get_bodytype(src)]
else
standing.icon = 'icons/mob/belt.dmi'
//Toggle for belt layering with uniform
var/belt_layer = BELT_LAYER
if(istype(belt, /obj/item/weapon/storage/belt))
@@ -1078,26 +857,8 @@ var/global/list/damage_icon_parts = list()
if(ubelt.show_above_suit)
belt_layer = BELT_LAYER_ALT
//Some belts have sprites to show icons
if(belt.contents.len)
for(var/obj/item/i in belt.contents)
var/i_state = i.item_state
if(!i_state) i_state = i.icon_state
standing.overlays += image("icon" = 'icons/mob/belt.dmi', "icon_state" = "[i_state]")
//Yet Another Addblends - For accessories with ICON_ADD requirements
if(belt.addblends)
var/icon/base = new/icon("icon" = standing.icon, "icon_state" = standing.icon_state)
var/addblend_icon = new/icon("icon" = standing.icon, "icon_state" = belt.addblends)
if(belt.color)
base.Blend(belt.color, ICON_MULTIPLY)
base.Blend(addblend_icon, ICON_ADD)
standing = image(base)
else
standing.color = belt.color
//NB: This uses a var from above rather than a define
overlays_standing[belt_layer] = standing
//NB: this uses a var from above
overlays_standing[belt_layer] = belt.make_worn_icon(body_type = species.get_bodytype(), slot_name = slot_belt_str, default_icon = INV_BELT_DEF_ICON, default_layer = belt_layer)
if(update_icons) update_icons_layers()
@@ -1113,29 +874,7 @@ var/global/list/damage_icon_parts = list()
wear_suit.screen_loc = ui_oclothing //TODO
var/image/standing
//Garbled mess of icon determination
var/t_icon = INV_SUIT_DEF_ICON
if(wear_suit.icon_override)
t_icon = wear_suit.icon_override
else if(wear_suit.sprite_sheets && wear_suit.sprite_sheets[species.get_bodytype(src)])
t_icon = wear_suit.sprite_sheets[species.name]
else if(wear_suit.item_icons && wear_suit.item_icons[slot_wear_suit_str])
t_icon = wear_suit.item_icons[slot_wear_suit_str]
standing = image("icon" = t_icon, "icon_state" = "[wear_suit.icon_state]")
//Another addblends system, like all the others, for accessories with ICON_ADD requirements
if(wear_suit.addblends)
var/icon/base = new/icon("icon" = standing.icon, "icon_state" = standing.icon_state)
var/addblend_icon = new/icon("icon" = standing.icon, "icon_state" = wear_suit.addblends)
if(wear_suit.color)
base.Blend(wear_suit.color, ICON_MULTIPLY)
base.Blend(addblend_icon, ICON_ADD)
standing = image(base)
else
standing.color = wear_suit.color
overlays_standing[SUIT_LAYER] = wear_suit.make_worn_icon(body_type = species.get_bodytype(), slot_name = slot_wear_suit_str, default_icon = INV_SUIT_DEF_ICON, default_layer = SUIT_LAYER)
//REALLY? REAAAAAAALLY???? UPDATE ICONS??? TODO
if( istype(wear_suit, /obj/item/clothing/suit/straight_jacket) )
@@ -1143,24 +882,7 @@ var/global/list/damage_icon_parts = list()
drop_l_hand()
drop_r_hand()
//Blood on suit sprites
if(wear_suit.blood_DNA)
var/obj/item/clothing/suit/S = wear_suit
if(istype(S)) //You can put non-suits in your suit slot (diona nymphs etc). //Pretty sure nymphs don't go in suit slot. Or, they shouldn't.
var/image/bloodsies = image("icon" = species.get_blood_mask(src), "icon_state" = "[S.blood_overlay_type]blood")
bloodsies.color = wear_suit.blood_color
standing.overlays += bloodsies
//Accessories for suits (are there even any)
var/obj/item/clothing/suit/suit = wear_suit
if(istype(suit) && suit.accessories.len)
for(var/obj/item/clothing/accessory/A in suit.accessories)
standing.overlays |= A.get_mob_overlay()
overlays_standing[SUIT_LAYER] = standing
//Hide/show other layers if necessary (AAAAA) TODO
update_collar(0)
update_inv_w_uniform(0)
update_inv_shoes(0)
update_tail_showing(0)
@@ -1188,34 +910,7 @@ var/global/list/damage_icon_parts = list()
wear_mask.screen_loc = ui_mask //TODO
var/image/standing
//Find an icon and iconstate at the same time which is gross
if(wear_mask.icon_override)
standing = image("icon" = wear_mask.icon_override, "icon_state" = "[wear_mask.icon_state]")
else if(wear_mask.sprite_sheets && wear_mask.sprite_sheets[species.get_bodytype(src)])
standing = image("icon" = wear_mask.sprite_sheets[species.get_bodytype(src)], "icon_state" = "[wear_mask.icon_state]")
else
standing = image("icon" = 'icons/mob/mask.dmi', "icon_state" = "[wear_mask.icon_state]")
//Yet Another... you get the idea. For accessories that use ICON_ADD
if(wear_mask.addblends)
var/icon/base = new/icon("icon" = standing.icon, "icon_state" = standing.icon_state)
var/addblend_icon = new/icon("icon" = standing.icon, "icon_state" = wear_mask.addblends)
if(wear_mask.color)
base.Blend(wear_mask.color, ICON_MULTIPLY)
base.Blend(addblend_icon, ICON_ADD)
standing = image(base)
else
standing.color = wear_mask.color
//Apply blood, but only if it's not a cigarette (we could totally make that work for cigs too though with AND blending) TODO
if( !istype(wear_mask, /obj/item/clothing/mask/smokable/cigarette) && wear_mask.blood_DNA )
var/image/bloodsies = image("icon" = species.get_blood_mask(src), "icon_state" = "maskblood")
bloodsies.color = wear_mask.blood_color
standing.overlays += bloodsies
overlays_standing[FACEMASK_LAYER] = standing
overlays_standing[FACEMASK_LAYER] = wear_mask.make_worn_icon(body_type = species.get_bodytype(), slot_name = slot_wear_mask_str, default_icon = INV_MASK_DEF_ICON, default_layer = FACEMASK_LAYER)
if(update_icons) update_icons_layers()
@@ -1231,45 +926,7 @@ var/global/list/damage_icon_parts = list()
back.screen_loc = ui_back //TODO
//Select an icon to use
var/icon/overlay_icon
if(back.icon_override)
overlay_icon = back.icon_override
else if(istype(back, /obj/item/weapon/rig))
//SNOWFLAKE: If this is a rig and a mob_icon is set, it will take species into account in the rig update_icon() proc.
var/obj/item/weapon/rig/rig = back
overlay_icon = rig.mob_icon
else if(back.sprite_sheets && back.sprite_sheets[species.get_bodytype(src)])
overlay_icon = back.sprite_sheets[species.get_bodytype(src)]
else if(back.item_icons && (slot_back_str in back.item_icons))
overlay_icon = back.item_icons[slot_back_str]
else
overlay_icon = INV_BACK_DEF_ICON
//Select a state to use
var/overlay_state
if(back.item_state_slots && back.item_state_slots[slot_back_str])
overlay_state = back.item_state_slots[slot_back_str]
else if(back.item_state)
overlay_state = back.item_state
else
overlay_state = back.icon_state
//Get an image
var/image/standing = image(icon = overlay_icon, icon_state = overlay_state)
//Another addblends, for things using ICON_ADD
if(back.addblends)
var/icon/base = new/icon("icon" = standing.icon, "icon_state" = standing.icon_state)
var/addblend_icon = new/icon("icon" = standing.icon, "icon_state" = back.addblends)
if(back.color)
base.Blend(back.color, ICON_MULTIPLY)
base.Blend(addblend_icon, ICON_ADD)
standing = image(base)
else
standing.color = back.color
overlays_standing[BACK_LAYER] = standing
overlays_standing[BACK_LAYER] = back.make_worn_icon(body_type = species.get_bodytype(), slot_name = slot_back_str, default_icon = INV_BACK_DEF_ICON, default_layer = BACK_LAYER)
if(update_icons) update_icons_layers()
@@ -1304,16 +961,7 @@ var/global/list/damage_icon_parts = list()
drop_l_hand()
stop_pulling() //TODO: should be handled elsewhere
//Get icon, iconstate at the same time
var/image/standing
if(handcuffed.icon_override)
standing = image("icon" = handcuffed.icon_override, "icon_state" = "handcuff1")
else if(handcuffed.sprite_sheets && handcuffed.sprite_sheets[species.get_bodytype(src)])
standing = image("icon" = handcuffed.sprite_sheets[species.get_bodytype(src)], "icon_state" = "handcuff1")
else
standing = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "handcuff1")
overlays_standing[HANDCUFF_LAYER] = standing
overlays_standing[HANDCUFF_LAYER] = handcuffed.make_worn_icon(body_type = species.get_bodytype(), slot_name = slot_handcuffed_str, default_icon = INV_HCUFF_DEF_ICON, default_layer = HANDCUFF_LAYER)
if(update_icons) update_icons_layers()
@@ -1327,14 +975,7 @@ var/global/list/damage_icon_parts = list()
if(update_icons) update_icons_layers()
return //Not legcuffed, why bother.
//Get icon, iconstate at same time (bleh)
var/image/standing
if(legcuffed.icon_override)
standing = image("icon" = legcuffed.icon_override, "icon_state" = "legcuff1")
else if(legcuffed.sprite_sheets && legcuffed.sprite_sheets[species.get_bodytype(src)])
standing = image("icon" = legcuffed.sprite_sheets[species.get_bodytype(src)], "icon_state" = "legcuff1")
else
standing = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "legcuff1")
overlays_standing[LEGCUFF_LAYER] = handcuffed.make_worn_icon(body_type = species.get_bodytype(), slot_name = slot_legcuffed_str, default_icon = INV_LCUFF_DEF_ICON, default_layer = LEGCUFF_LAYER)
//TODO: Not in my update_icons
if(m_intent != "walk")
@@ -1342,8 +983,6 @@ var/global/list/damage_icon_parts = list()
if(hud_used && src.hud_used.move_intent)
hud_used.move_intent.icon_state = "walking"
overlays_standing[LEGCUFF_LAYER] = standing
if(update_icons) update_icons_layers()
/mob/living/carbon/human/update_inv_r_hand(var/update_icons=1)
@@ -1358,36 +997,11 @@ var/global/list/damage_icon_parts = list()
r_hand.screen_loc = ui_rhand //TODO
var/t_state
var/icon/t_icon
//Select an icon to use
if(r_hand.item_icons && (slot_r_hand_str in r_hand.item_icons))
t_icon = r_hand.item_icons[slot_r_hand_str]
else if(r_hand.icon_override)
t_state += "_r" //SNOWFLAKE
t_icon = r_hand.icon_override
else
t_icon = INV_R_HAND_DEF_ICON
//Select a state to use
if(r_hand.item_state_slots && r_hand.item_state_slots[slot_r_hand_str])
t_state = r_hand.item_state_slots[slot_r_hand_str]
else if(r_hand.item_state)
t_state = r_hand.item_state
else
t_state = r_hand.icon_state
//Apply color
var/image/standing = image(icon = t_icon, icon_state = t_state)
standing.color = r_hand.color
overlays_standing[R_HAND_LAYER] = r_hand.make_worn_icon(body_type = species.get_bodytype(), inhands = TRUE, slot_name = slot_r_hand_str, default_icon = INV_R_HAND_DEF_ICON, default_layer = R_HAND_LAYER)
if(handcuffed)
drop_r_hand() //TODO: EXCUSE ME
overlays_standing[R_HAND_LAYER] = standing
if(update_icons) update_icons_layers()
/mob/living/carbon/human/update_inv_l_hand(var/update_icons=1)
@@ -1402,35 +1016,11 @@ var/global/list/damage_icon_parts = list()
l_hand.screen_loc = ui_lhand //TODO
var/icon/t_icon
var/t_state
//Select an icon to use
if(l_hand.item_icons && (slot_l_hand_str in l_hand.item_icons))
t_icon = l_hand.item_icons[slot_l_hand_str]
else if(l_hand.icon_override)
t_state += "_l"
t_icon = l_hand.icon_override
else
t_icon = INV_L_HAND_DEF_ICON
//Select a state to use
if(l_hand.item_state_slots && l_hand.item_state_slots[slot_l_hand_str])
t_state = l_hand.item_state_slots[slot_l_hand_str]
else if(l_hand.item_state)
t_state = l_hand.item_state
else
t_state = l_hand.icon_state
//Apply color
var/image/standing = image(icon = t_icon, icon_state = t_state)
standing.color = l_hand.color
overlays_standing[L_HAND_LAYER] = l_hand.make_worn_icon(body_type = species.get_bodytype(), inhands = TRUE, slot_name = slot_l_hand_str, default_icon = INV_L_HAND_DEF_ICON, default_layer = L_HAND_LAYER)
if(handcuffed)
drop_l_hand() //TODO: AAAAAAAAAAa
overlays_standing[L_HAND_LAYER] = standing
if(update_icons) update_icons_layers()
/mob/living/carbon/human/proc/update_tail_showing(var/update_icons=1)
@@ -1534,28 +1124,6 @@ var/global/list/damage_icon_parts = list()
if(update_icons) update_icons_layers()
//Adds a collar overlay above the helmet layer if the suit has one
// Suit needs an identically named sprite in icons/mob/collar.dmi
//TODO: Is this used, ever? It was never set to clear this icon.
/mob/living/carbon/human/proc/update_collar(var/update_icons=1)
if(QDESTROYING(src))
return
overlays_standing[COLLAR_LAYER] = null
if(!wear_suit)
if(update_icons) update_icons_layers()
return //No suit to have a collar
//Init icon out here so we can scan iconstates for collar TODO: This is dumb, just have a blank state to catch it.
var/icon/C = icon('icons/mob/collar.dmi')
var/image/standing
if(wear_suit.icon_state in C.IconStates())
standing = image(icon = C, icon_state = wear_suit.icon_state)
overlays_standing[COLLAR_LAYER] = standing
if(update_icons) update_icons_layers()
/mob/living/carbon/human/update_modifier_visuals(var/update_icons=1)
if(QDESTROYING(src))
return

View File

@@ -624,6 +624,7 @@ var/global/image/backplane
backplane = image('icons/misc/win32.dmi')
backplane.alpha = 0
backplane.plane = -100
backplane.layer = BACKPLANE_LAYER
backplane.mouse_opacity = 0
return TRUE

View File

@@ -457,6 +457,10 @@
update_icon()
/obj/item/weapon/paper/get_worn_icon_state(var/slot_name)
if(slot_name == slot_head_str)
return "paper" //Gross, but required for now.
return ..()
/obj/item/weapon/paper/attackby(obj/item/weapon/P as obj, mob/user as mob)
..()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 197 KiB

After

Width:  |  Height:  |  Size: 196 KiB

View File

@@ -1334,6 +1334,7 @@
#include "code\modules\clothing\chameleon.dm"
#include "code\modules\clothing\clothing.dm"
#include "code\modules\clothing\clothing_accessories.dm"
#include "code\modules\clothing\clothing_icons.dm"
#include "code\modules\clothing\ears\ears.dm"
#include "code\modules\clothing\glasses\glasses.dm"
#include "code\modules\clothing\glasses\hud.dm"