Kathira El-Hashem Custom Item (#11897)

This commit is contained in:
Geeves
2021-05-21 17:18:07 +02:00
committed by GitHub
parent 1385457bfa
commit 2d2f1a1889
6 changed files with 51 additions and 6 deletions
+10 -1
View File
@@ -249,7 +249,7 @@
/proc/equip_custom_item_to_mob(var/datum/custom_item/citem, var/mob/living/carbon/human/M)
// Check for required job title.
if(citem.req_titles && length(citem.req_titles) > 0)
if(length(citem.req_titles))
var/has_title
var/current_title = M.mind.role_alt_title ? M.mind.role_alt_title : M.mind.assigned_role
for(var/title in citem.req_titles)
@@ -260,6 +260,15 @@
to_chat(M, "A custom item could not be equipped as you have joined with the wrong role.")
return FALSE
if(ispath(citem.item_path, /obj/item/organ/internal/augment/fluff))
var/obj/item/organ/internal/augment/fluff/aug = citem.spawn_item(M)
var/obj/item/organ/external/affected = M.get_organ(aug.parent_organ)
aug.replaced(M, affected)
M.update_body()
M.updatehealth()
M.UpdateDamageIcon()
return
// ID cards and MCs are applied directly to the existing object rather than spawned fresh.
var/obj/item/existing_item
if(citem.item_path == /obj/item/card/id)