no_dresscode variable but this time it doesn't override important slots (#2468)

* once again but better this time

* Makes it so that equipping them has no sound

* Update code/modules/mob/mob.dm

Co-authored-by: Azarak <azarak10@gmail.com>

Co-authored-by: Azarak <azarak10@gmail.com>
This commit is contained in:
Seris02
2021-01-19 07:02:51 +08:00
committed by GitHub
parent 21931a2c42
commit 3f8b268455
4 changed files with 25 additions and 8 deletions
+10 -2
View File
@@ -366,7 +366,8 @@
*
* returns 0 if it cannot, 1 if successful
*/
/mob/proc/equip_to_appropriate_slot(obj/item/W, qdel_on_fail = FALSE)
///mob/proc/equip_to_appropriate_slot(obj/item/W, qdel_on_fail = FALSE) (original) SKYRAT EDIT CHANGE - CUSTOMIZATION
/mob/proc/equip_to_appropriate_slot(obj/item/W, qdel_on_fail = FALSE, blacklist, initial)
if(!istype(W))
return FALSE
var/slot_priority = W.slot_equipment_priority
@@ -382,9 +383,16 @@
ITEM_SLOT_LPOCKET, ITEM_SLOT_RPOCKET,\
ITEM_SLOT_DEX_STORAGE\
)
//SKYRAT EDIT CHANGE BEGIN - CUSTOMIZATION
/*
for(var/slot in slot_priority)
if(equip_to_slot_if_possible(W, slot, FALSE, TRUE, TRUE, FALSE, FALSE)) //qdel_on_fail = FALSE; disable_warning = TRUE; redraw_mob = TRUE;
*/
if (blacklist)
slot_priority -= blacklist
for(var/slot in slot_priority)
if(equip_to_slot_if_possible(W, slot, FALSE, TRUE, TRUE, FALSE, initial)) //qdel_on_fail = FALSE; disable_warning = TRUE; redraw_mob = TRUE;
//SKYRAT EDIT CHANGE END
return TRUE
if(qdel_on_fail)