Species type check for clothing adjustment.

This commit is contained in:
Zuhayr
2013-08-29 00:03:16 -07:00
parent 73de46e979
commit f378dfa350
2 changed files with 19 additions and 8 deletions

View File

@@ -4,16 +4,28 @@
//BS12: Species-restricted clothing check.
/obj/item/clothing/mob_can_equip(M as mob, slot)
if(species_restricted && istype(M,/mob/living/carbon/human))
var/wearable = null
var/exclusive = null
var/mob/living/carbon/human/H = M
for(var/str in species_restricted)
if(H.species && H.species.name == str)
wearable = 1
break
if(!wearable)
M << "\red Your species cannot wear [src]."
return 0
if("exclude" in species_restricted)
exclusive = 1
if(H.species)
if(exclusive)
if(!(H.species.name in species_restricted))
wearable = 1
else
if(H.species.name in species_restricted)
wearable = 1
if(!wearable)
M << "\red Your species cannot wear [src]."
return 0
return ..()
//Ears: currently only used for headsets and earmuffs

View File

@@ -108,7 +108,6 @@
flags_inv = HIDEEARS
siemens_coefficient = 0.8
/obj/item/clothing/suit/armor/hos
name = "armored coat"
desc = "A greatcoat enhanced with a special alloy for some protection and style."