Fixes #6783, moves spacesuits to a separate file

Adds an update_clothing_icon() proc to clothing items that will call the
relevant icon update proc on the mob which is equipping the clothing, if
any. Changes various clothing procs to not call update icon procs on usr
which may not even be the mob wearing the clothing.
This commit is contained in:
mwerezak
2014-10-18 22:12:15 -04:00
parent 02a5226b8a
commit b8cfe87ca2
14 changed files with 184 additions and 127 deletions

View File

@@ -787,6 +787,7 @@
#include "code\modules\clothing\spacesuits\miscellaneous.dm" #include "code\modules\clothing\spacesuits\miscellaneous.dm"
#include "code\modules\clothing\spacesuits\ninja.dm" #include "code\modules\clothing\spacesuits\ninja.dm"
#include "code\modules\clothing\spacesuits\rig.dm" #include "code\modules\clothing\spacesuits\rig.dm"
#include "code\modules\clothing\spacesuits\spacesuits.dm"
#include "code\modules\clothing\spacesuits\syndi.dm" #include "code\modules\clothing\spacesuits\syndi.dm"
#include "code\modules\clothing\spacesuits\void.dm" #include "code\modules\clothing\spacesuits\void.dm"
#include "code\modules\clothing\suits\alien.dm" #include "code\modules\clothing\suits\alien.dm"

View File

@@ -170,9 +170,10 @@
usr.l_hand = P usr.l_hand = P
P.layer = 20 P.layer = 20
if(istype(usr,/mob/living/carbon/human)) if (ismob(src.loc))
usr:update_inv_l_hand() var/mob/M = src.loc
usr:update_inv_r_hand() M.update_inv_l_hand()
M.update_inv_r_hand()
/obj/item/weapon/autopsy_scanner/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob) /obj/item/weapon/autopsy_scanner/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob)
if(!istype(M)) if(!istype(M))

View File

@@ -10,6 +10,10 @@
*/ */
var/list/sprite_sheets_refit = null var/list/sprite_sheets_refit = null
//Updates the icons of the mob wearing the clothing item, if any.
/obj/item/clothing/proc/update_clothing_icon()
return
//BS12: Species-restricted clothing check. //BS12: Species-restricted clothing check.
/obj/item/clothing/mob_can_equip(M as mob, slot) /obj/item/clothing/mob_can_equip(M as mob, slot)
@@ -80,6 +84,7 @@
else else
icon = initial(icon) icon = initial(icon)
///////////////////////////////////////////////////////////////////////
// Ears: headsets, earmuffs and tiny objects // Ears: headsets, earmuffs and tiny objects
/obj/item/clothing/ears /obj/item/clothing/ears
name = "ears" name = "ears"
@@ -121,6 +126,11 @@
if(istype(src,/obj/item/clothing/ears/offear)) if(istype(src,/obj/item/clothing/ears/offear))
del(src) del(src)
/obj/item/clothing/ears/update_clothing_icon()
if (ismob(src.loc))
var/mob/M = src.loc
M.update_inv_ears()
/obj/item/clothing/ears/offear /obj/item/clothing/ears/offear
name = "Other ear" name = "Other ear"
w_class = 5.0 w_class = 5.0
@@ -142,7 +152,17 @@
item_state = "earmuffs" item_state = "earmuffs"
slot_flags = SLOT_EARS | SLOT_TWOEARS slot_flags = SLOT_EARS | SLOT_TWOEARS
///////////////////////////////////////////////////////////////////////
//Glasses //Glasses
/*
SEE_SELF // can see self, no matter what
SEE_MOBS // can see all mobs, no matter what
SEE_OBJS // can see all objs, no matter what
SEE_TURFS // can see all turfs (and areas), no matter what
SEE_PIXELS// if an object is located on an unlit area, but some of its pixels are
// in a lit area (via pixel_x,y or smooth movement), can see those pixels
BLIND // can't see anything
*/
/obj/item/clothing/glasses /obj/item/clothing/glasses
name = "glasses" name = "glasses"
icon = 'icons/obj/clothing/glasses.dmi' icon = 'icons/obj/clothing/glasses.dmi'
@@ -153,17 +173,13 @@
var/darkness_view = 0//Base human is 2 var/darkness_view = 0//Base human is 2
var/invisa_view = 0 var/invisa_view = 0
sprite_sheets = list("Vox" = 'icons/mob/species/vox/eyes.dmi') sprite_sheets = list("Vox" = 'icons/mob/species/vox/eyes.dmi')
/*
SEE_SELF // can see self, no matter what
SEE_MOBS // can see all mobs, no matter what
SEE_OBJS // can see all objs, no matter what
SEE_TURFS // can see all turfs (and areas), no matter what
SEE_PIXELS// if an object is located on an unlit area, but some of its pixels are
// in a lit area (via pixel_x,y or smooth movement), can see those pixels
BLIND // can't see anything
*/
/obj/item/clothing/glasses/update_clothing_icon()
if (ismob(src.loc))
var/mob/M = src.loc
M.update_inv_glasses()
///////////////////////////////////////////////////////////////////////
//Gloves //Gloves
/obj/item/clothing/gloves /obj/item/clothing/gloves
name = "gloves" name = "gloves"
@@ -185,6 +201,11 @@ BLIND // can't see anything
..() ..()
return return
/obj/item/clothing/gloves/update_clothing_icon()
if (ismob(src.loc))
var/mob/M = src.loc
M.update_inv_gloves()
/obj/item/clothing/gloves/emp_act(severity) /obj/item/clothing/gloves/emp_act(severity)
if(cell) if(cell)
//why is this not part of the powercell code? //why is this not part of the powercell code?
@@ -217,6 +238,7 @@ BLIND // can't see anything
species_restricted -= "Tajara" species_restricted -= "Tajara"
return return
///////////////////////////////////////////////////////////////////////
//Head //Head
/obj/item/clothing/head /obj/item/clothing/head
name = "head" name = "head"
@@ -225,6 +247,12 @@ BLIND // can't see anything
slot_flags = SLOT_HEAD slot_flags = SLOT_HEAD
w_class = 2.0 w_class = 2.0
/obj/item/clothing/head/update_clothing_icon()
if (ismob(src.loc))
var/mob/M = src.loc
M.update_inv_head()
///////////////////////////////////////////////////////////////////////
//Mask //Mask
/obj/item/clothing/mask /obj/item/clothing/mask
name = "mask" name = "mask"
@@ -234,8 +262,15 @@ BLIND // can't see anything
body_parts_covered = FACE|EYES body_parts_covered = FACE|EYES
sprite_sheets = list("Vox" = 'icons/mob/species/vox/masks.dmi') sprite_sheets = list("Vox" = 'icons/mob/species/vox/masks.dmi')
/obj/item/clothing/mask/proc/filter_air(datum/gas_mixture/air) /obj/item/clothing/mask/update_clothing_icon()
if (ismob(src.loc))
var/mob/M = src.loc
M.update_inv_wear_mask()
/obj/item/clothing/mask/proc/filter_air(datum/gas_mixture/air)
return
///////////////////////////////////////////////////////////////////////
//Shoes //Shoes
/obj/item/clothing/shoes /obj/item/clothing/shoes
name = "shoes" name = "shoes"
@@ -251,6 +286,12 @@ BLIND // can't see anything
species_restricted = list("exclude","Unathi","Tajara") species_restricted = list("exclude","Unathi","Tajara")
sprite_sheets = list("Vox" = 'icons/mob/species/vox/shoes.dmi') sprite_sheets = list("Vox" = 'icons/mob/species/vox/shoes.dmi')
/obj/item/clothing/shoes/update_clothing_icon()
if (ismob(src.loc))
var/mob/M = src.loc
M.update_inv_shoes()
///////////////////////////////////////////////////////////////////////
//Suit //Suit
/obj/item/clothing/suit /obj/item/clothing/suit
icon = 'icons/obj/clothing/suits.dmi' icon = 'icons/obj/clothing/suits.dmi'
@@ -265,74 +306,12 @@ BLIND // can't see anything
siemens_coefficient = 0.9 siemens_coefficient = 0.9
w_class = 3 w_class = 3
//Spacesuit /obj/item/clothing/suit/update_clothing_icon()
//Note: Everything in modules/clothing/spacesuits should have the entire suit grouped together. if (ismob(src.loc))
// Meaning the the suit is defined directly after the corrisponding helmet. Just like below! var/mob/M = src.loc
/obj/item/clothing/head/helmet/space M.update_inv_wear_suit()
name = "Space helmet"
icon_state = "space"
desc = "A special helmet designed for work in a hazardous, low-pressure environment."
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPSPRESSUREDMAGE | THICKMATERIAL
item_state = "space"
permeability_coefficient = 0.01
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50)
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
body_parts_covered = HEAD|FACE|EYES
cold_protection = HEAD
min_cold_protection_temperature = SPACE_HELMET_MIN_COLD_PROTECTION_TEMPERATURE
siemens_coefficient = 0.9
species_restricted = list("exclude","Diona","Vox")
/obj/item/clothing/suit/space
name = "Space suit"
desc = "A suit that protects against low pressure environments. \"NSS EXODUS\" is written in large block letters on the back."
icon_state = "space"
item_state = "s_suit"
w_class = 4//bulky item
gas_transfer_coefficient = 0.01
permeability_coefficient = 0.02
flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE | THICKMATERIAL
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen,/obj/item/device/suit_cooling_unit)
slowdown = 3
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50)
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE
siemens_coefficient = 0.9
species_restricted = list("exclude","Diona","Vox")
var/list/supporting_limbs //If not-null, automatically splints breaks. Checked when removing the suit.
/obj/item/clothing/suit/space/equipped(mob/M)
check_limb_support()
..()
/obj/item/clothing/suit/space/dropped()
check_limb_support()
..()
// Some space suits are equipped with reactive membranes that support
// broken limbs - at the time of writing, only the ninja suit, but
// I can see it being useful for other suits as we expand them. ~ Z
// The actual splinting occurs in /datum/organ/external/proc/fracture()
/obj/item/clothing/suit/space/proc/check_limb_support()
// If this isn't set, then we don't need to care.
if(!supporting_limbs || !supporting_limbs.len)
return
var/mob/living/carbon/human/H = src.loc
// If the holder isn't human, or the holder IS and is wearing the suit, it keeps supporting the limbs.
if(!istype(H) || H.wear_suit == src)
return
// Otherwise, remove the splints.
for(var/datum/organ/external/E in supporting_limbs)
E.status &= ~ ORGAN_SPLINTED
supporting_limbs = list()
///////////////////////////////////////////////////////////////////////
//Under clothing //Under clothing
/obj/item/clothing/under /obj/item/clothing/under
icon = 'icons/obj/clothing/uniforms.dmi' icon = 'icons/obj/clothing/uniforms.dmi'
@@ -356,6 +335,11 @@ BLIND // can't see anything
var/basecolor var/basecolor
sprite_sheets = list("Vox" = 'icons/mob/species/vox/uniform.dmi') sprite_sheets = list("Vox" = 'icons/mob/species/vox/uniform.dmi')
/obj/item/clothing/under/update_clothing_icon()
if (ismob(src.loc))
var/mob/M = src.loc
M.update_inv_w_uniform()
/obj/item/clothing/under/attackby(obj/item/I, mob/user) /obj/item/clothing/under/attackby(obj/item/I, mob/user)
if(hastie) if(hastie)
hastie.attackby(I, user) hastie.attackby(I, user)
@@ -480,7 +464,7 @@ BLIND // can't see anything
if(basecolor + "_d_s" in icon_states('icons/mob/uniform.dmi')) if(basecolor + "_d_s" in icon_states('icons/mob/uniform.dmi'))
body_parts_covered = "[basecolor]" ? LEGS|LOWER_TORSO : UPPER_TORSO|LOWER_TORSO|LEGS|ARMS body_parts_covered = "[basecolor]" ? LEGS|LOWER_TORSO : UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
item_color = item_color == "[basecolor]" ? "[basecolor]_d" : "[basecolor]" item_color = item_color == "[basecolor]" ? "[basecolor]_d" : "[basecolor]"
usr.update_inv_w_uniform() update_clothing_icon()
else else
usr << "<span class='notice'>You cannot roll down the uniform!</span>" usr << "<span class='notice'>You cannot roll down the uniform!</span>"
@@ -490,10 +474,7 @@ BLIND // can't see anything
hastie.on_removed(user) hastie.on_removed(user)
hastie = null hastie = null
update_clothing_icon()
if(istype(loc, /mob/living/carbon/human))
var/mob/living/carbon/human/H = loc
H.update_inv_w_uniform()
/obj/item/clothing/under/verb/removetie() /obj/item/clothing/under/verb/removetie()
set name = "Remove Accessory" set name = "Remove Accessory"

View File

@@ -156,7 +156,7 @@
icon_state = "[initial(icon_state)]up" icon_state = "[initial(icon_state)]up"
usr << "You push \the [src] up out of your face." usr << "You push \the [src] up out of your face."
usr.update_inv_glasses() update_clothing_icon()
/obj/item/clothing/glasses/welding/superior /obj/item/clothing/glasses/welding/superior
name = "superior welding goggles" name = "superior welding goggles"

View File

@@ -48,7 +48,7 @@
flags_inv &= ~(HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE) flags_inv &= ~(HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE)
icon_state = "[initial(icon_state)]up" icon_state = "[initial(icon_state)]up"
usr << "You push the [src] up out of your face." usr << "You push the [src] up out of your face."
usr.update_inv_head() //so our mob-overlays update update_clothing_icon() //so our mob-overlays update
/* /*

View File

@@ -26,7 +26,7 @@
else else
icon_state = "[item_color]soft" icon_state = "[item_color]soft"
usr << "You flip the hat back in normal position." usr << "You flip the hat back in normal position."
usr.update_inv_head() //so our mob-overlays update update_clothing_icon() //so our mob-overlays update
/obj/item/clothing/head/soft/red /obj/item/clothing/head/soft/red
name = "red cap" name = "red cap"

View File

@@ -34,7 +34,7 @@
flags |= MASKCOVERSMOUTH | MASKINTERNALS flags |= MASKCOVERSMOUTH | MASKINTERNALS
icon_state = "breath" icon_state = "breath"
usr << "You pull the mask up to cover your face." usr << "You pull the mask up to cover your face."
usr.update_inv_wear_mask() update_clothing_icon()
/obj/item/clothing/mask/breath/medical /obj/item/clothing/mask/breath/medical
desc = "A close-fitting sterile mask that can be connected to an air supply." desc = "A close-fitting sterile mask that can be connected to an air supply."

View File

@@ -0,0 +1,67 @@
//Spacesuit
//Note: Everything in modules/clothing/spacesuits should have the entire suit grouped together.
// Meaning the the suit is defined directly after the corrisponding helmet. Just like below!
/obj/item/clothing/head/helmet/space
name = "Space helmet"
icon_state = "space"
desc = "A special helmet designed for work in a hazardous, low-pressure environment."
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPSPRESSUREDMAGE | THICKMATERIAL
item_state = "space"
permeability_coefficient = 0.01
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50)
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
body_parts_covered = HEAD|FACE|EYES
cold_protection = HEAD
min_cold_protection_temperature = SPACE_HELMET_MIN_COLD_PROTECTION_TEMPERATURE
siemens_coefficient = 0.9
species_restricted = list("exclude","Diona","Vox")
/obj/item/clothing/suit/space
name = "Space suit"
desc = "A suit that protects against low pressure environments. \"NSS EXODUS\" is written in large block letters on the back."
icon_state = "space"
item_state = "s_suit"
w_class = 4//bulky item
gas_transfer_coefficient = 0.01
permeability_coefficient = 0.02
flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE | THICKMATERIAL
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen,/obj/item/device/suit_cooling_unit)
slowdown = 3
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50)
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE
siemens_coefficient = 0.9
species_restricted = list("exclude","Diona","Vox")
var/list/supporting_limbs //If not-null, automatically splints breaks. Checked when removing the suit.
/obj/item/clothing/suit/space/equipped(mob/M)
check_limb_support()
..()
/obj/item/clothing/suit/space/dropped()
check_limb_support()
..()
// Some space suits are equipped with reactive membranes that support
// broken limbs - at the time of writing, only the ninja suit, but
// I can see it being useful for other suits as we expand them. ~ Z
// The actual splinting occurs in /datum/organ/external/proc/fracture()
/obj/item/clothing/suit/space/proc/check_limb_support()
// If this isn't set, then we don't need to care.
if(!supporting_limbs || !supporting_limbs.len)
return
var/mob/living/carbon/human/H = src.loc
// If the holder isn't human, or the holder IS and is wearing the suit, it keeps supporting the limbs.
if(!istype(H) || H.wear_suit == src)
return
// Otherwise, remove the splints.
for(var/datum/organ/external/E in supporting_limbs)
E.status &= ~ ORGAN_SPLINTED
supporting_limbs = list()

View File

@@ -184,7 +184,7 @@
else else
usr << "You attempt to button-up the velcro on your [src], before promptly realising how retarded you are." usr << "You attempt to button-up the velcro on your [src], before promptly realising how retarded you are."
return return
usr.update_inv_wear_suit() //so our overlays update update_clothing_icon() //so our overlays update
//Medical //Medical
/obj/item/clothing/suit/storage/fr_jacket /obj/item/clothing/suit/storage/fr_jacket
@@ -212,7 +212,7 @@
if("fr_jacket") if("fr_jacket")
src.icon_state = "fr_jacket_open" src.icon_state = "fr_jacket_open"
usr << "You unbutton the jacket." usr << "You unbutton the jacket."
usr.update_inv_wear_suit() //so our overlays update update_clothing_icon() //so our overlays update
//Mime //Mime
/obj/item/clothing/suit/suspenders /obj/item/clothing/suit/suspenders

View File

@@ -2,7 +2,7 @@
name = "labcoat" name = "labcoat"
desc = "A suit that protects against minor chemical spills." desc = "A suit that protects against minor chemical spills."
icon_state = "labcoat_open" icon_state = "labcoat_open"
item_state = "labcoat" item_state = "labcoat" //Is this even used for anything?
blood_overlay_type = "coat" blood_overlay_type = "coat"
body_parts_covered = UPPER_TORSO|ARMS body_parts_covered = UPPER_TORSO|ARMS
allowed = list(/obj/item/device/analyzer,/obj/item/stack/medical,/obj/item/weapon/dnainjector,/obj/item/weapon/reagent_containers/dropper,/obj/item/weapon/reagent_containers/syringe,/obj/item/weapon/reagent_containers/hypospray,/obj/item/device/healthanalyzer,/obj/item/device/flashlight/pen,/obj/item/weapon/reagent_containers/glass/bottle,/obj/item/weapon/reagent_containers/glass/beaker,/obj/item/weapon/reagent_containers/pill,/obj/item/weapon/storage/pill_bottle,/obj/item/weapon/paper) allowed = list(/obj/item/device/analyzer,/obj/item/stack/medical,/obj/item/weapon/dnainjector,/obj/item/weapon/reagent_containers/dropper,/obj/item/weapon/reagent_containers/syringe,/obj/item/weapon/reagent_containers/hypospray,/obj/item/device/healthanalyzer,/obj/item/device/flashlight/pen,/obj/item/weapon/reagent_containers/glass/bottle,/obj/item/weapon/reagent_containers/glass/beaker,/obj/item/weapon/reagent_containers/pill,/obj/item/weapon/storage/pill_bottle,/obj/item/weapon/paper)
@@ -17,6 +17,7 @@
if(!usr.canmove || usr.stat || usr.restrained()) if(!usr.canmove || usr.stat || usr.restrained())
return 0 return 0
//Why???
switch(icon_state) switch(icon_state)
if("labcoat_open") if("labcoat_open")
src.icon_state = "labcoat" src.icon_state = "labcoat"
@@ -93,7 +94,7 @@
else else
usr << "You attempt to button-up the velcro on your [src], before promptly realising how silly you are." usr << "You attempt to button-up the velcro on your [src], before promptly realising how silly you are."
return return
usr.update_inv_wear_suit() //so our overlays update update_clothing_icon() //so our overlays update
/obj/item/clothing/suit/storage/labcoat/red /obj/item/clothing/suit/storage/labcoat/red
name = "red labcoat" name = "red labcoat"

View File

@@ -219,7 +219,7 @@
else else
usr << "You button-up some imaginary buttons on your [src]." usr << "You button-up some imaginary buttons on your [src]."
return return
usr.update_inv_wear_suit() update_clothing_icon()
//pyjamas //pyjamas
//originally intended to be pinstripes >.> //originally intended to be pinstripes >.>

View File

@@ -27,7 +27,7 @@
icon_state = "psyche" icon_state = "psyche"
item_color = "psyche" item_color = "psyche"
update_icon() update_icon()
usr.update_inv_w_uniform() update_clothing_icon()
verb/change() verb/change()
set name = "Change Jumpsuit Appearance" set name = "Change Jumpsuit Appearance"
@@ -49,8 +49,7 @@
item_state = A.item_state item_state = A.item_state
item_color = A.item_color item_color = A.item_color
body_parts_covered = A.body_parts_covered body_parts_covered = A.body_parts_covered
if(usr) update_clothing_icon() //so our overlays update.
usr.update_inv_w_uniform() //so our overlays update.
//***************** //*****************
//**Chameleon Hat** //**Chameleon Hat**
@@ -81,7 +80,7 @@
icon_state = "greysoft" icon_state = "greysoft"
item_color = "grey" item_color = "grey"
update_icon() update_icon()
usr.update_inv_head() update_clothing_icon()
verb/change() verb/change()
set name = "Change Hat/Helmet Appearance" set name = "Change Hat/Helmet Appearance"
@@ -104,8 +103,7 @@
item_color = A.item_color item_color = A.item_color
flags_inv = A.flags_inv flags_inv = A.flags_inv
body_parts_covered = A.body_parts_covered body_parts_covered = A.body_parts_covered
if(usr) update_clothing_icon() //so our overlays update.
usr.update_inv_head() //so our overlays update.
//****************** //******************
//**Chameleon Suit** //**Chameleon Suit**
@@ -135,7 +133,7 @@
icon_state = "armor" icon_state = "armor"
item_color = "armor" item_color = "armor"
update_icon() update_icon()
usr.update_inv_wear_suit() update_clothing_icon()
verb/change() verb/change()
set name = "Change Exosuit Appearance" set name = "Change Exosuit Appearance"
@@ -158,8 +156,7 @@
item_color = A.item_color item_color = A.item_color
flags_inv = A.flags_inv flags_inv = A.flags_inv
body_parts_covered = A.body_parts_covered body_parts_covered = A.body_parts_covered
if(usr) update_clothing_icon() //so our overlays update.
usr.update_inv_wear_suit() //so our overlays update.
//******************* //*******************
//**Chameleon Shoes** //**Chameleon Shoes**
@@ -189,7 +186,7 @@
item_state = "black" item_state = "black"
item_color = "black" item_color = "black"
update_icon() update_icon()
usr.update_inv_shoes() update_clothing_icon()
verb/change() verb/change()
set name = "Change Footwear Appearance" set name = "Change Footwear Appearance"
@@ -210,8 +207,7 @@
icon_state = A.icon_state icon_state = A.icon_state
item_state = A.item_state item_state = A.item_state
item_color = A.item_color item_color = A.item_color
if(usr) update_clothing_icon() //so our overlays update.
usr.update_inv_shoes() //so our overlays update.
//********************** //**********************
//**Chameleon Backpack** //**Chameleon Backpack**
@@ -238,7 +234,9 @@
icon_state = "backpack" icon_state = "backpack"
item_state = "backpack" item_state = "backpack"
update_icon() update_icon()
usr.update_inv_back() if (ismob(src.loc))
var/mob/M = src.loc
M.update_inv_back()
verb/change() verb/change()
set name = "Change Backpack Appearance" set name = "Change Backpack Appearance"
@@ -259,8 +257,11 @@
icon_state = A.icon_state icon_state = A.icon_state
item_state = A.item_state item_state = A.item_state
item_color = A.item_color item_color = A.item_color
if(usr)
usr.update_inv_back() //so our overlays update. //so our overlays update.
if (ismob(src.loc))
var/mob/M = src.loc
M.update_inv_back()
//******************** //********************
//**Chameleon Gloves** //**Chameleon Gloves**
@@ -289,7 +290,7 @@
icon_state = "black" icon_state = "black"
item_color = "brown" item_color = "brown"
update_icon() update_icon()
usr.update_inv_gloves() update_clothing_icon()
verb/change() verb/change()
set name = "Change Gloves Appearance" set name = "Change Gloves Appearance"
@@ -311,8 +312,7 @@
item_state = A.item_state item_state = A.item_state
item_color = A.item_color item_color = A.item_color
flags_inv = A.flags_inv flags_inv = A.flags_inv
if(usr) update_clothing_icon() //so our overlays update.
usr.update_inv_gloves() //so our overlays update.
//****************** //******************
//**Chameleon Mask** //**Chameleon Mask**
@@ -340,7 +340,8 @@
desc = "It's a gas mask." desc = "It's a gas mask."
icon_state = "gas_alt" icon_state = "gas_alt"
update_icon() update_icon()
usr.update_inv_wear_mask() update_clothing_icon()
verb/change() verb/change()
set name = "Change Mask Appearance" set name = "Change Mask Appearance"
set category = "Object" set category = "Object"
@@ -361,8 +362,7 @@
item_state = A.item_state item_state = A.item_state
flags_inv = A.flags_inv flags_inv = A.flags_inv
body_parts_covered = A.body_parts_covered body_parts_covered = A.body_parts_covered
if(usr) update_clothing_icon() //so our overlays update.
usr.update_inv_wear_mask() //so our overlays update.
//********************* //*********************
//**Chameleon Glasses** //**Chameleon Glasses**
@@ -389,7 +389,7 @@
desc = "It's a set of mesons." desc = "It's a set of mesons."
icon_state = "meson" icon_state = "meson"
update_icon() update_icon()
usr.update_inv_glasses() update_clothing_icon()
verb/change() verb/change()
set name = "Change Glasses Appearance" set name = "Change Glasses Appearance"
@@ -410,8 +410,7 @@
icon_state = A.icon_state icon_state = A.icon_state
item_state = A.item_state item_state = A.item_state
flags_inv = A.flags_inv flags_inv = A.flags_inv
if(usr) update_clothing_icon() //so our overlays update.
usr.update_inv_glasses() //so our overlays update.
//***************** //*****************
//**Chameleon Gun** //**Chameleon Gun**
@@ -441,8 +440,10 @@
desc = "It's a desert eagle." desc = "It's a desert eagle."
icon_state = "deagle" icon_state = "deagle"
update_icon() update_icon()
usr.update_inv_r_hand() if (ismob(src.loc))
usr.update_inv_l_hand() var/mob/M = src.loc
M.update_inv_r_hand()
M.update_inv_l_hand()
verb/change() verb/change()
set name = "Change Gun Appearance" set name = "Change Gun Appearance"
@@ -463,6 +464,9 @@
icon_state = A.icon_state icon_state = A.icon_state
item_state = A.item_state item_state = A.item_state
flags_inv = A.flags_inv flags_inv = A.flags_inv
if(usr)
usr.update_inv_r_hand() //so our overlays update.
usr.update_inv_l_hand() //so our overlays update. if (ismob(src.loc))
var/mob/M = src.loc
M.update_inv_r_hand()
M.update_inv_l_hand()

View File

@@ -936,7 +936,7 @@
if("lombardi_jacket_open") if("lombardi_jacket_open")
src.icon_state = "lombardi_jacket" src.icon_state = "lombardi_jacket"
usr << "You button up the jacket." usr << "You button up the jacket."
usr.update_inv_wear_suit() update_clothing_icon()
//////////// Uniforms //////////// //////////// Uniforms ////////////
@@ -1098,7 +1098,7 @@
src.icon_state = "[item_color]" src.icon_state = "[item_color]"
src.item_state = "[item_color]" src.item_state = "[item_color]"
usr.update_inv_w_uniform() update_clothing_icon()
////// Wyatt's Ex-Commander Jumpsuit - RawrTaicho ////// Wyatt's Ex-Commander Jumpsuit - RawrTaicho
/obj/item/clothing/under/fluff/wyatt_1 /obj/item/clothing/under/fluff/wyatt_1

View File

@@ -47,7 +47,9 @@
tank = null tank = null
icon_state = "pneumatic" icon_state = "pneumatic"
item_state = "pneumatic" item_state = "pneumatic"
usr.update_icons() if (ismob(src.loc))
var/mob/M = src.loc
M.update_icons()
else else
usr << "There's no tank in [src]." usr << "There's no tank in [src]."