Examining humans is now smarter and displays only the things you can see. Certain outerwear suits and helmets hide other pieces of clothing on you.

A diagram that displays what can hide what:
http://www.kamletos.si/inventory%20visibility%20hierarchy.png

Note that not all suits and helmets hide stuff.

Added this to the changelog.

Technical information:

Renamed gimmick.dm to z_gimmick.dm because whenever I doubleclicked on any piece of clothing in the object tree it always pointed me to some random gimmick item instead of the root definition. Now the file is at the bottom of the folder and so everything else is looked up first.

Created a bitflag variable which is used to determine which piece of clothing hides another. The variable is flags_inv and the flags it contains are:

#define HIDEGLOVES 1		//APPLIES ONLY TO THE EXTERIOR SUIT!!
#define HIDESUITSTORAGE 2	//APPLIES ONLY TO THE EXTERIOR SUIT!!
#define HIDEJUMPSUIT 4		//APPLIES ONLY TO THE EXTERIOR SUIT!!
#define HIDESHOES 8			//APPLIES ONLY TO THE EXTERIOR SUIT!!
#define HIDEMASK 1			//APPLIES ONLY TO HELMETS!!
#define HIDEEARS 2			//APPLIES ONLY TO HELMETS!!
#define HIDEEYES 4			//APPLIES ONLY TO HELMETS!!

The first 4 only apply to exterior suits and the last 3 only to helmets, so they can use the same numbers. 

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3031 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
baloh.matevz
2012-02-04 20:09:46 +00:00
parent 29db1914cd
commit 0fa1f3d924
21 changed files with 131 additions and 30 deletions

View File

@@ -8,6 +8,7 @@
var/on = 0
color = "yellow" //Determines used sprites: hardhat[on]_[color] and hardhat[on]_[color]2 (lying down sprite)
armor = list(melee = 30, bullet = 5, laser = 20,energy = 10, bomb = 20, bio = 10, rad = 20)
flags_inv = 0
/obj/item/clothing/head/helmet/hardhat/orange
icon_state = "hardhat0_orange"

View File

@@ -13,6 +13,7 @@ Space suit parts
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
/obj/item/clothing/suit/space
@@ -30,4 +31,5 @@ Space suit parts
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen)
slowdown = 3
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50)
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT

View File

@@ -24,3 +24,4 @@
allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy, /obj/item/weapon/gun/projectile, /obj/item/ammo_magazine, /obj/item/ammo_casing, /obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs)
slowdown = 1.5
armor = list(melee = 65, bullet = 50, laser = 50, energy = 25, bomb = 50, bio = 100, rad = 50)
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT

View File

@@ -4,21 +4,6 @@
flags = FPRINT | TABLEPASS
/obj/item/clothing/head/helmet
name = "helmet"
desc = "Standard Security gear. Protects the head from impacts."
icon_state = "helmet"
flags = FPRINT | TABLEPASS | SUITSPACE | HEADCOVERSEYES
item_state = "helmet"
armor = list(melee = 50, bullet = 15, laser = 50,energy = 10, bomb = 25, bio = 0, rad = 0)
protective_temperature = 500
heat_transfer_coefficient = 0.10
/obj/item/clothing/head/helmet/warden
name = "Warden Hat"
desc = "A special helmet issued to the Warden of a securiy force. Protects the head from impacts."
icon_state = "policehelm"
/obj/item/clothing/suit/armor/vest
@@ -43,6 +28,7 @@
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
slowdown = 1
armor = list(melee = 80, bullet = 10, laser = 10, energy = 10, bomb = 0, bio = 0, rad = 0)
flags_inv = HIDEJUMPSUIT
/obj/item/clothing/suit/armor/bulletproof

View File

@@ -5,6 +5,7 @@
permeability_coefficient = 0.01
flags = FPRINT|TABLEPASS|HEADSPACE|HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 20)
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES
/obj/item/clothing/suit/bio_suit
name = "bio suit"
@@ -20,6 +21,7 @@
slowdown = 1.0
allowed = list(/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/pen,/obj/item/device/flashlight/pen)
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 20)
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
/obj/item/clothing/head/bio_hood/general

View File

@@ -4,6 +4,7 @@
icon_state = "bombsuit"
flags = FPRINT|TABLEPASS|HEADSPACE|HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 100, bio = 0, rad = 0)
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES
/obj/item/clothing/suit/bomb_suit
name = "bomb suit"
@@ -18,6 +19,7 @@
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
slowdown = 2
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 100, bio = 0, rad = 0)
flags_inv = HIDEJUMPSUIT
/obj/item/clothing/head/bomb_hood/security

View File

@@ -11,6 +11,7 @@
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/weapon/extinguisher)
slowdown = 1.0
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
/obj/item/clothing/suit/fire/firefighter
@@ -50,3 +51,4 @@
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen)
slowdown = 1.5
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 100)
flags_inv = HIDEJUMPSUIT

View File

@@ -7,6 +7,7 @@
w_class = 4//bulky item
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen)
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
/obj/item/clothing/suit/armor/heavy
name = "heavy armor"
@@ -17,9 +18,11 @@
gas_transfer_coefficient = 0.90
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
slowdown = 3
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
/obj/item/clothing/suit/armor/tdome
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
/obj/item/clothing/suit/armor/tdome/red
name = "Thunderdome suit (red)"
@@ -47,13 +50,14 @@
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen)
slowdown = 1
armor = list(melee = 80, bullet = 60, laser = 50,energy = 25, bomb = 50, bio = 0, rad = 0)
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
/obj/item/clothing/suit/armor/swat/officer
name = "officer jacket"
desc = "An armored jacket used in special operations."
icon_state = "detective"
item_state = "det_suit"
flags_inv = 0

View File

@@ -5,6 +5,8 @@
icon_state = "hoscap"
flags = FPRINT | TABLEPASS | SUITSPACE | HEADCOVERSEYES
armor = list(melee = 80, bullet = 60, laser = 50,energy = 10, bomb = 25, bio = 10, rad = 0)
flags_inv = 0
flags_inv = HIDEEARS
/obj/item/clothing/head/helmet/HoS/dermal
name = "Dermal Armour Patch"
@@ -19,6 +21,7 @@
item_state = "hos"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS|LEGS
armor = list(melee = 65, bullet = 30, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0)
flags_inv = HIDEJUMPSUIT
/obj/item/clothing/suit/armor/hos/jensen
@@ -26,3 +29,4 @@
desc = "A trenchoat augmented with a special alloy for some protection and style"
icon_state = "jensencoat"
item_state = "jensencoat"
flags_inv = 0

View File

@@ -4,6 +4,7 @@
icon_state = "straight_jacket"
item_state = "straight_jacket"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
/obj/item/clothing/suit/wcoat
@@ -66,6 +67,7 @@
w_class = 3
flags = FPRINT | TABLEPASS
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen,/obj/item/toy)
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
/obj/item/clothing/suit/captunic
@@ -74,6 +76,7 @@
icon_state = "captunic"
item_state = "bio_suit"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
flags_inv = HIDEJUMPSUIT
/obj/item/clothing/suit/nun
@@ -82,6 +85,7 @@
icon_state = "nun"
item_state = "nun"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS|HANDS
flags_inv = HIDESHOES|HIDEJUMPSUIT
/obj/item/clothing/suit/chaplain_hoodie
@@ -98,6 +102,7 @@
icon_state = "hastur"
item_state = "hastur"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
/obj/item/clothing/suit/imperium_monk
@@ -106,6 +111,7 @@
icon_state = "imperium_monk"
item_state = "imperium_monk"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
flags_inv = HIDESHOES|HIDEJUMPSUIT
/obj/item/clothing/suit/chickensuit
@@ -114,6 +120,7 @@
icon_state = "chickensuit"
item_state = "chickensuit"
body_parts_covered = UPPER_TORSO|ARMS|LOWER_TORSO|LEGS|FEET|HEAD
flags_inv = HIDESHOES|HIDEJUMPSUIT
/obj/item/clothing/suit/monkeysuit
@@ -122,6 +129,7 @@
icon_state = "monkeysuit"
item_state = "monkeysuit"
body_parts_covered = UPPER_TORSO|ARMS|LOWER_TORSO|LEGS|FEET|HANDS
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
/obj/item/clothing/suit/holidaypriest
@@ -130,6 +138,7 @@
icon_state = "holidaypriest"
item_state = "holidaypriest"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
flags_inv = HIDEJUMPSUIT
// BubbleWrap - Nothing to see here
@@ -140,4 +149,5 @@
icon_state = "cardborg"
item_state = "cardborg"
body_parts_covered = UPPER_TORSO|LOWER_TORSO
flags_inv = HIDEJUMPSUIT

View File

@@ -37,6 +37,7 @@
body_parts_covered = FULL_BODY //It's magic, I ain't gotta explain shit. --NEO
armor = list(melee = 30, bullet = 20, laser = 20,energy = 20, bomb = 20, bio = 20, rad = 20)
allowed = list(/obj/item/weapon/teleportation_scroll)
flags_inv = HIDEJUMPSUIT
/obj/item/clothing/suit/wizrobe/red

View File

@@ -62,3 +62,4 @@
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
allowed = list(/obj/item/weapon/cigpacket,/obj/item/weapon/spacecash)
flags_inv = HIDEJUMPSUIT

View File

@@ -15,25 +15,50 @@
t_his = "her"
t_him = "her"
if (src.w_uniform)
var/skipgloves = 0
var/skipsuitstorage = 0
var/skipjumpsuit = 0
var/skipshoes = 0
var/skipmask = 0
var/skipears = 0
var/skipeyes = 0
if (src.wear_suit)
skipgloves = src.wear_suit.flags_inv & HIDEGLOVES
skipsuitstorage = src.wear_suit.flags_inv & HIDESUITSTORAGE
skipjumpsuit = src.wear_suit.flags_inv & HIDEJUMPSUIT
skipshoes = src.wear_suit.flags_inv & HIDESHOES
if (src.head)
skipmask = src.head.flags_inv & HIDEMASK
skipeyes = src.head.flags_inv & HIDEEYES
skipears = src.head.flags_inv & HIDEEARS
if (src.w_uniform && !skipjumpsuit)
if (src.w_uniform.blood_DNA)
usr << "\red [src.name] is wearing a[src.w_uniform.blood_DNA ? " bloody " : " "] \icon[src.w_uniform] [src.w_uniform.name]!"
else
usr << "\blue [src.name] is wearing a \icon[src.w_uniform] [src.w_uniform.name]."
if (src.handcuffed)
usr << "\blue [src.name] is \icon[src.handcuffed] handcuffed!"
if (src.wear_suit)
if (src.wear_suit.blood_DNA)
usr << "\red [src.name] has a[src.wear_suit.blood_DNA ? " bloody " : " "] \icon[src.wear_suit] [src.wear_suit.name] on!"
else
usr << "\blue [src.name] has a \icon[src.wear_suit] [src.wear_suit.name] on."
if (src.ears)
if (src.head)
if (src.head.blood_DNA)
usr << "\red [src.name] has a[src.head.blood_DNA ? " bloody " : " "] \icon[src.head] [src.head.name] on his head!"
else
usr << "\blue [src.name] has a \icon[src.head] [src.head.name] on."
if (src.handcuffed)
usr << "\blue [src.name] is \icon[src.handcuffed] handcuffed!"
if (src.ears && !skipears)
usr << "\blue [src.name] has a \icon[src.ears] [src.ears.name] by [t_his] mouth."
if (src.wear_mask)
if (src.wear_mask && !skipmask)
if (src.wear_mask.blood_DNA)
usr << "\red [src.name] has a[src.wear_mask.blood_DNA ? " bloody " : " "] \icon[src.wear_mask] [src.wear_mask.name] on [t_his] face!"
else
@@ -56,16 +81,16 @@
usr << "\red [src.name] has a[src.belt.blood_DNA ? " bloody " : " "] \icon[src.belt] [src.belt.name] on [t_his] belt!"
else
usr << "\blue [src.name] has a \icon[src.belt] [src.belt.name] on [t_his] belt."
if(src.s_store)
if(src.s_store && !skipsuitstorage)
if(src.s_store.blood_DNA)
usr << "\red [src.name] has a[src.s_store.blood_DNA ? " bloody " : " "] \icon[src.s_store] [src.s_store.name] on [t_his][src.wear_suit.blood_DNA ? " bloody " : " "] \icon[src.wear_suit] [src.wear_suit.name]!"
else
usr << "\blue [src.name] has a \icon[src.s_store] [src.s_store.name] on [t_his][src.wear_suit.blood_DNA ? " bloody " : " "] \icon[src.wear_suit] [src.wear_suit.name]."
if (src.shoes)
if (src.shoes && !skipshoes)
usr << "[src.shoes.blood_DNA ? "\red" : "\blue"] [src.name] is wearing[src.shoes.blood_DNA ? " bloody " : " "] \icon[src.shoes] [src.shoes.name] on [t_his] feet."
if (src.gloves)
if (src.gloves && !skipgloves)
if (src.gloves.blood_DNA)
usr << "\red [src.name] has bloody \icon[src.gloves] [src.gloves.name] on [t_his] hands!"
else
@@ -73,6 +98,12 @@
else if (src.blood_DNA)
usr << "\red [src.name] has[src.blood_DNA ? " bloody " : " "] hands!"
if (src.glasses && !skipeyes)
if (src.glasses.blood_DNA)
usr << "\red [src.name] has bloody \icon[src.glasses] [src.glasses.name] on [t_his] eyes!"
else
usr << "\blue [src.name] has \icon[src.glasses] [src.glasses.name] on [t_his] eyes."
if (src.back)
usr << "\blue [src.name] has a \icon[src.back] [src.back.name] on [t_his] back."