mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 15:37:36 +01:00
Clothes now only support 5 accessories at once (#18343)
* implementing changes * Update clothing.dm
This commit is contained in:
@@ -40,6 +40,8 @@
|
||||
#define ACCESSORY_SLOT_UTILITY 2
|
||||
#define ACCESSORY_SLOT_ARMBAND 3
|
||||
|
||||
///max number of accessories that can be equiped to one piece of clothing
|
||||
#define MAX_EQUIPABLE_ACCESSORIES 5
|
||||
//Cant seem to find a mob bitflags area other than the powers one
|
||||
|
||||
// bitflags for clothing parts
|
||||
|
||||
@@ -654,7 +654,8 @@ BLIND // can't see anything
|
||||
"Grey" = 'icons/mob/clothing/species/grey/uniform.dmi'
|
||||
)
|
||||
|
||||
var/has_sensor = TRUE//For the crew computer 2 = unable to change mode
|
||||
///For the crew computer 2 = unable to change mode
|
||||
var/has_sensor = TRUE
|
||||
var/sensor_mode = SENSOR_OFF
|
||||
var/random_sensor = TRUE
|
||||
/*
|
||||
@@ -664,7 +665,7 @@ BLIND // can't see anything
|
||||
*/
|
||||
var/list/accessories = list()
|
||||
var/displays_id = 1
|
||||
var/rolled_down = 0
|
||||
var/rolled_down = FALSE
|
||||
var/basecolor
|
||||
|
||||
/obj/item/clothing/under/rank/New()
|
||||
@@ -677,17 +678,14 @@ BLIND // can't see anything
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/under/proc/can_attach_accessory(obj/item/clothing/accessory/A)
|
||||
if(istype(A))
|
||||
. = TRUE
|
||||
else
|
||||
if(length(accessories) >= MAX_EQUIPABLE_ACCESSORIES) //this is neccesary to prevent chat spam when examining clothing
|
||||
return FALSE
|
||||
|
||||
if(accessories.len)
|
||||
for(var/obj/item/clothing/accessory/AC in accessories)
|
||||
if((A.slot in list(ACCESSORY_SLOT_UTILITY, ACCESSORY_SLOT_ARMBAND)) && AC.slot == A.slot)
|
||||
return FALSE
|
||||
if(!A.allow_duplicates && AC.type == A.type)
|
||||
return FALSE
|
||||
for(var/obj/item/clothing/accessory/AC in accessories)
|
||||
if((A.slot in list(ACCESSORY_SLOT_UTILITY, ACCESSORY_SLOT_ARMBAND)) && AC.slot == A.slot)
|
||||
return FALSE
|
||||
if(!A.allow_duplicates && AC.type == A.type)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/clothing/under/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/clothing/accessory))
|
||||
@@ -756,7 +754,7 @@ BLIND // can't see anything
|
||||
. += "Its vital tracker appears to be enabled."
|
||||
if(3)
|
||||
. += "Its vital tracker and tracking beacon appear to be enabled."
|
||||
if(accessories.len)
|
||||
if(length(accessories))
|
||||
for(var/obj/item/clothing/accessory/A in accessories)
|
||||
. += "\A [A] is attached to it."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user