mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-27 02:23:10 +00:00
Species type check for clothing adjustment.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user