Adds a hood to Kathira's cloak and changes how hoods works slightly (#13060)

This commit is contained in:
Casper3667
2022-02-18 12:06:36 +01:00
committed by GitHub
parent 6e4e295e8a
commit dc4c03d594
10 changed files with 153 additions and 92 deletions
+47 -18
View File
@@ -2102,6 +2102,35 @@ All custom items with worn sprites must follow the contained sprite system: http
var/desc2 = "A blue cloak with the symbol of the New Kingdom of Adhomai proudly displayed on the back.\nUpon closer examination it appears to be a patchwork of older textile and newer fabrics, with the inside of the cloak appearing to be colored differently."
var/changed = FALSE
var/hoodtype = /obj/item/clothing/head/winterhood/fluff/kathira_hood
/obj/item/clothing/accessory/poncho/tajarancloak/fluff/kathira_cloak/Initialize()
. = ..()
new hoodtype(src)
/obj/item/clothing/head/winterhood/fluff/kathira_hood
name = "handsewn hood"
desc = "A hood attached to a cloak."
icon = 'icons/obj/custom_items/kathira_cloak.dmi'
icon_override = 'icons/obj/custom_items/kathira_cloak.dmi'
icon_state = "idris_cloak_hood"
contained_sprite = TRUE
flags_inv = HIDEEARS | BLOCKHAIR | HIDEEARS
/obj/item/clothing/accessory/poncho/tajarancloak/fluff/kathira_cloak/update_icon(var/hooded = FALSE)
var/obj/item/clothing/accessory/poncho/tajarancloak/fluff/kathira_cloak/K = get_accessory(/obj/item/clothing/accessory/poncho/tajarancloak/fluff/kathira_cloak)
K.icon_state = "[K.changed ? K.style : initial(K.icon_state)]"
SEND_SIGNAL(K, COMSIG_ITEM_STATE_CHECK, args)
K.item_state = "[K.icon_state][hooded ? "_up" : ""]"
K.name = "[K.changed ? K.name2 : initial(K.name)]"
K.desc = "[K.changed ? K.desc2 : initial(K.desc)]"
K.accessory_mob_overlay = null
. = ..()
SEND_SIGNAL(K, COMSIG_ITEM_ICON_UPDATE)
if(usr)
usr.update_inv_w_uniform()
usr.update_inv_wear_suit()
/obj/item/clothing/accessory/poncho/tajarancloak/fluff/kathira_cloak/verb/change_cloak()
set name = "Change Cloak"
set category = "Object"
@@ -2110,38 +2139,40 @@ All custom items with worn sprites must follow the contained sprite system: http
if(use_check_and_message(usr))
return
var/obj/item/clothing/accessory/poncho/tajarancloak/fluff/kathira_cloak/K = null
if(istype(src, /obj/item/clothing/accessory/poncho/tajarancloak/fluff/kathira_cloak))
K = src
if(!K && isclothing(src))
var/obj/item/clothing/S = src
if(LAZYLEN(S.accessories))
K = locate() in S.accessories
var/obj/item/clothing/accessory/poncho/tajarancloak/fluff/kathira_cloak/K = get_accessory(/obj/item/clothing/accessory/poncho/tajarancloak/fluff/kathira_cloak)
if(!K)
return
usr.visible_message(SPAN_NOTICE("[usr] swiftly pulls \the [K] inside out, changing its appearance."))
K.icon_state = "[K.changed ? initial(K.icon_state) : K.style]"
K.item_state = K.icon_state
K.name = "[K.changed ? initial(K.name) : K.name2]"
K.desc = "[K.changed ? initial(K.desc) : K.desc2]"
K.accessory_mob_overlay = null
K.changed = !K.changed
K.update_icon()
usr.update_icon()
usr.update_inv_w_uniform()
usr.update_inv_wear_suit()
SEND_SIGNAL(K, COMSIG_ITEM_REMOVE, K)
/obj/item/clothing/accessory/poncho/tajarancloak/fluff/kathira_cloak/on_attached(obj/item/clothing/S, mob/user as mob)
..()
has_suit.verbs += /obj/item/clothing/accessory/poncho/tajarancloak/fluff/kathira_cloak/verb/change_cloak
has_suit.verbs += /obj/item/clothing/accessory/poncho/tajarancloak/fluff/kathira_cloak/verb/change_hood
/obj/item/clothing/accessory/poncho/tajarancloak/fluff/kathira_cloak/on_removed(mob/user as mob)
if(has_suit)
has_suit.verbs -= /obj/item/clothing/accessory/poncho/tajarancloak/fluff/kathira_cloak/verb/change_cloak
has_suit.verbs -= /obj/item/clothing/accessory/poncho/tajarancloak/fluff/kathira_cloak/verb/change_hood
..()
/obj/item/clothing/accessory/poncho/tajarancloak/fluff/kathira_cloak/verb/change_hood()
set name = "Toggle Hood"
set category = "Object"
set src in usr
if(use_check_and_message(usr))
return
var/obj/item/clothing/accessory/poncho/tajarancloak/fluff/kathira_cloak/K = get_accessory(/obj/item/clothing/accessory/poncho/tajarancloak/fluff/kathira_cloak)
if(!K)
return
SEND_SIGNAL(K, COMSIG_ITEM_UPDATE_STATE, K)
K.update_icon()
/obj/item/clothing/suit/storage/toggle/fluff/leonid_chokha //Old Rebel's Chokha - Leonid Myagmar - lucaken
name = "old rebel's chokha"
@@ -2154,7 +2185,6 @@ All custom items with worn sprites must follow the contained sprite system: http
item_state = "leonid_chokha"
contained_sprite = TRUE
/obj/item/clothing/suit/storage/toggle/fluff/sezrak_coat //red Domelkoan Coat - Sezrak Han'san - captaingecko
name = "red Domelkoan Coat"
desc = "A warm coat made in Domelkos. This red coat is stuffed with yupmi fur and made out of reinforced cloth-like synthetic materials, both to keep the wearer warm in the cold winters of \
@@ -2203,7 +2233,6 @@ All custom items with worn sprites must follow the contained sprite system: http
contained_sprite = TRUE
slot_flags = SLOT_EARS | SLOT_TIE
/obj/item/clothing/under/fluff/quoro_robes //Black Robes - Quoro Wurri'Til - witchbells
name = "black robes"
desc = "Some simple black robes, made to wear under something more elaborate. The fabric has a distinct texture to it, giving you the impression of activewear or swimsuits."