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

View File

@@ -2177,4 +2177,28 @@ All custom items with worn sprites must follow the contained sprite system: http
icon = 'icons/obj/custom_items/godard_cape.dmi'
icon_state = "godard_cape"
item_state = "godard_cape"
contained_sprite = TRUE
contained_sprite = TRUE
/obj/item/organ/internal/augment/fluff/kath_legbrace // Leg Support Augment - Kathira El-Hashem - TheGreyWolf
name = "leg support augment"
desc = "A leg augment to aid in the mobility of an otherwise disabled leg."
icon = 'icons/obj/custom_items/kathira_legbrace.dmi'
on_mob_icon = 'icons/obj/custom_items/kathira_legbrace.dmi'
icon_state = "kathira_legbrace"
item_state = "kathira_legbrace_onmob"
parent_organ = BP_R_LEG
supports_limb = TRUE
min_broken_damage = 15
var/last_drop = 0
/obj/item/organ/internal/augment/fluff/kath_legbrace/process()
if(QDELETED(src) || !owner)
return
if(last_drop + 6 SECONDS > world.time)
return
if(is_bruised() && prob(20))
owner.Weaken(2)
last_drop = world.time
else if(is_broken() && prob(40))
owner.Weaken(3)
last_drop = world.time

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)