mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-14 01:18:40 +01:00
Adds a hood to Kathira's cloak and changes how hoods works slightly (#13060)
This commit is contained in:
@@ -33,5 +33,13 @@
|
||||
// /mob signals
|
||||
|
||||
// /obj signals
|
||||
/// when a hood is unequipped
|
||||
#define COMSIG_ITEM_REMOVE "item_remove"
|
||||
/// checks an item's state
|
||||
#define COMSIG_ITEM_STATE_CHECK "state_check"
|
||||
/// updates an item between several states
|
||||
#define COMSIG_ITEM_UPDATE_STATE "update_state"
|
||||
/// updates sprites
|
||||
#define COMSIG_ITEM_ICON_UPDATE "icon_update"
|
||||
|
||||
/*******Component Specific Signals*******/
|
||||
|
||||
@@ -38,6 +38,7 @@ var/datum/observ/item_equipped/item_equipped_event = new()
|
||||
. = ..()
|
||||
mob_equipped_event.raise_event(user, src, slot)
|
||||
item_equipped_event.raise_event(src, user, slot)
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_REMOVE, src)
|
||||
|
||||
/obj/item/proc/check_equipped(var/mob/user, var/slot, var/assisted_equip = FALSE)
|
||||
return TRUE
|
||||
@@ -336,6 +336,7 @@
|
||||
/obj/item/proc/dropped(var/mob/user)
|
||||
if(zoom)
|
||||
zoom(user) //binoculars, scope, etc
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_REMOVE, src)
|
||||
|
||||
// Called whenever an object is moved around inside the mob's contents.
|
||||
// Linker proc: mob/proc/prepare_for_slotmove, which is referenced in proc/handle_item_insertion and obj/item/attack_hand.
|
||||
@@ -343,6 +344,7 @@
|
||||
/obj/item/proc/on_slotmove(var/mob/user, slot)
|
||||
if(zoom)
|
||||
zoom(user)
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_REMOVE, src)
|
||||
|
||||
// called just as an item is picked up (loc is not yet changed)
|
||||
/obj/item/proc/pickup(mob/user)
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
|
||||
var/move_trail = /obj/effect/decal/cleanable/blood/tracks/footprints
|
||||
|
||||
|
||||
/obj/item/clothing/Initialize(var/mapload, var/material_key)
|
||||
. = ..(mapload)
|
||||
if(!material_key)
|
||||
@@ -292,6 +291,15 @@
|
||||
siemens_coefficient = between(0, material.conductivity / 10, 10)
|
||||
slowdown = between(0, round(material.weight / 10, 0.1), 6)
|
||||
|
||||
/obj/item/clothing/proc/get_accessory(var/typepath)
|
||||
if(istype(src, typepath))
|
||||
return src
|
||||
if(LAZYLEN(accessories))
|
||||
var/accessory = locate(typepath) in accessories
|
||||
if(accessory)
|
||||
return accessory
|
||||
return null
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
// Ears: headsets, earmuffs and tiny objects
|
||||
/obj/item/clothing/ears
|
||||
|
||||
@@ -1,51 +1,23 @@
|
||||
//Hoods for winter coats and chaplain hoodie etc
|
||||
|
||||
/obj/item/clothing/suit/storage/hooded
|
||||
var/obj/item/clothing/head/winterhood/hood
|
||||
var/hoodtype = null
|
||||
var/suittoggled = FALSE
|
||||
var/opened = FALSE
|
||||
sprite_sheets = list(
|
||||
BODYTYPE_VAURCA_BULWARK = 'icons/mob/species/bulwark/hoodie.dmi'
|
||||
)
|
||||
var/hoodtype = /obj/item/clothing/head/winterhood
|
||||
|
||||
/obj/item/clothing/suit/storage/hooded/Initialize()
|
||||
. = ..()
|
||||
MakeHood()
|
||||
new hoodtype(src)
|
||||
|
||||
/obj/item/clothing/suit/storage/hooded/Destroy()
|
||||
QDEL_NULL(hood)
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/suit/storage/hooded/proc/MakeHood()
|
||||
if(!hood)
|
||||
hood = new hoodtype(src)
|
||||
|
||||
/obj/item/clothing/suit/storage/hooded/equipped(mob/user, slot)
|
||||
if(slot != slot_wear_suit)
|
||||
RemoveHood()
|
||||
..()
|
||||
|
||||
/obj/item/clothing/suit/storage/hooded/proc/RemoveHood()
|
||||
suittoggled = FALSE
|
||||
icon_state = "[initial(icon_state)][opened ? "_open" : ""][suittoggled ? "_t" : ""]"
|
||||
/obj/item/clothing/suit/storage/hooded/update_icon(var/hooded = FALSE)
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_STATE_CHECK, args)
|
||||
icon_state = "[initial(icon_state)][hooded ? "_t" : ""]"
|
||||
item_state = icon_state
|
||||
// Hood got nuked. Probably because of RIGs or the like.
|
||||
if(!hood)
|
||||
MakeHood()
|
||||
return
|
||||
|
||||
if(ishuman(hood.loc))
|
||||
var/mob/living/carbon/H = hood.loc
|
||||
H.unEquip(hood, 1)
|
||||
H.update_inv_wear_suit()
|
||||
hood.forceMove(src)
|
||||
|
||||
/obj/item/clothing/suit/storage/hooded/dropped()
|
||||
RemoveHood()
|
||||
|
||||
/obj/item/clothing/suit/storage/hooded/on_slotmove()
|
||||
RemoveHood()
|
||||
. = ..()
|
||||
if(usr)
|
||||
usr.update_inv_wear_suit()
|
||||
|
||||
/obj/item/clothing/suit/storage/hooded/verb/ToggleHood()
|
||||
set name = "Toggle Coat Hood"
|
||||
@@ -55,31 +27,7 @@
|
||||
if(use_check_and_message(usr))
|
||||
return 0
|
||||
|
||||
if(!suittoggled)
|
||||
if(ishuman(loc))
|
||||
var/mob/living/carbon/human/H = src.loc
|
||||
if(H.wear_suit != src)
|
||||
to_chat(H, "<span class='warning'>You must be wearing [src] to put up the hood!</span>")
|
||||
return
|
||||
if(H.head)
|
||||
to_chat(H, "<span class='warning'>You're already wearing something on your head!</span>")
|
||||
return
|
||||
else
|
||||
suittoggled = TRUE
|
||||
icon_state = "[initial(icon_state)][opened ? "_open" : ""]"
|
||||
//spawn appropriate hood.
|
||||
CreateHood()
|
||||
H.equip_to_slot_if_possible(hood,slot_head,0,0,1)
|
||||
H.update_inv_wear_suit()
|
||||
else
|
||||
RemoveHood()
|
||||
|
||||
/obj/item/clothing/suit/storage/hooded/proc/CreateHood()
|
||||
hood.color = src.color
|
||||
hood.icon_state = "[icon_state]_hood"
|
||||
hood.item_state = "[icon_state]_hood"
|
||||
icon_state = "[icon_state][suittoggled ? "_t" : ""]"
|
||||
item_state = icon_state
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_UPDATE_STATE)
|
||||
update_icon()
|
||||
|
||||
//hoodies and the like
|
||||
@@ -98,7 +46,6 @@
|
||||
bio = ARMOR_BIO_MINOR
|
||||
)
|
||||
siemens_coefficient = 0.75
|
||||
hoodtype = /obj/item/clothing/head/winterhood
|
||||
|
||||
/obj/item/clothing/head/winterhood
|
||||
name = "winter hood"
|
||||
@@ -112,6 +59,75 @@
|
||||
flags_inv = HIDEEARS | BLOCKHAIR | HIDEEARS
|
||||
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE
|
||||
canremove = 0
|
||||
var/hooded = FALSE
|
||||
|
||||
/obj/item/clothing/head/winterhood/Initialize(mapload, material_key)
|
||||
. = ..()
|
||||
if(isclothing(loc))
|
||||
RegisterSignal(loc, COMSIG_ITEM_REMOVE, .proc/RemoveHood)
|
||||
RegisterSignal(loc, COMSIG_PARENT_QDELETING, /datum/.proc/Destroy)
|
||||
RegisterSignal(loc, COMSIG_ITEM_STATE_CHECK, .proc/hooded)
|
||||
RegisterSignal(loc, COMSIG_ITEM_UPDATE_STATE, .proc/change_hood)
|
||||
RegisterSignal(loc, COMSIG_ITEM_ICON_UPDATE, /atom/.proc/update_icon)
|
||||
color = loc.color
|
||||
icon_state = "[loc.icon_state]_hood"
|
||||
item_state = "[loc.icon_state]_hood"
|
||||
|
||||
/obj/item/clothing/head/winterhood/update_icon(mob/user)
|
||||
. = ..()
|
||||
if(isclothing(loc))
|
||||
color = loc.color
|
||||
icon_state = "[loc.icon_state]_hood"
|
||||
item_state = "[loc.icon_state]_hood"
|
||||
|
||||
/obj/item/clothing/head/winterhood/proc/hooded(var/hood, list/arguments)
|
||||
arguments[1] = hooded
|
||||
|
||||
/obj/item/clothing/head/winterhood/proc/change_hood(var/parent)
|
||||
if(!hooded)
|
||||
if(CheckSlot(parent))
|
||||
var/mob/living/carbon/human/H = get_human(parent)
|
||||
hooded = TRUE
|
||||
update_icon(H)
|
||||
H.equip_to_slot_if_possible(src,slot_head,0,0,1)
|
||||
usr.visible_message(SPAN_NOTICE("[usr] pulls up the hood on \the [src]."))
|
||||
else
|
||||
RemoveHood(parent)
|
||||
usr.visible_message(SPAN_NOTICE("[usr] pulls down the hood on \the [src]."))
|
||||
|
||||
/obj/item/clothing/head/winterhood/proc/RemoveHood(var/parent)
|
||||
if(ishuman(loc))
|
||||
var/mob/living/carbon/H = loc
|
||||
H.unEquip(src, 1)
|
||||
forceMove(parent)
|
||||
update_icon(H)
|
||||
hooded = FALSE
|
||||
|
||||
/obj/item/clothing/head/winterhood/proc/get_human(var/obj/parent)
|
||||
var/mob/living/carbon/human/H
|
||||
if(isclothing(parent.loc))
|
||||
if(ishuman(parent.loc.loc))
|
||||
H = parent.loc.loc
|
||||
else if(ishuman(parent.loc))
|
||||
H = parent.loc
|
||||
return H
|
||||
|
||||
/obj/item/clothing/head/winterhood/proc/CheckSlot(var/parent)
|
||||
var/mob/living/carbon/human/H = get_human(parent)
|
||||
var/obj/base_item = loc
|
||||
if(isclothing(loc.loc))
|
||||
base_item = loc.loc
|
||||
|
||||
if(H)
|
||||
if(H.wear_suit != base_item && H.w_uniform != base_item)
|
||||
to_chat(H, SPAN_WARNING("You must be wearing [base_item] to put up the hood!"))
|
||||
return FALSE
|
||||
else if(H.head)
|
||||
to_chat(H, SPAN_WARNING("You're already wearing something on your head!"))
|
||||
return FALSE
|
||||
else
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/clothing/suit/storage/hooded/wintercoat/red
|
||||
name = "red winter coat"
|
||||
@@ -210,8 +226,6 @@
|
||||
playsound(src, 'sound/items/zip.ogg', EQUIP_SOUND_VOLUME, TRUE)
|
||||
icon_state = "[initial(icon_state)][opened ? "_open" : ""]"
|
||||
item_state = icon_state
|
||||
if(suittoggled)
|
||||
CreateHood() //rebuild the hood with open/closed version
|
||||
update_icon()
|
||||
update_clothing_icon()
|
||||
usr.update_inv_head()
|
||||
|
||||
@@ -108,7 +108,6 @@
|
||||
contained_sprite = TRUE
|
||||
flags_inv = HIDETAIL
|
||||
no_overheat = TRUE
|
||||
hoodtype = /obj/item/clothing/head/winterhood
|
||||
desc_fluff = "Today the fashion that dominates Adhomai shares few similarities to the clothing of old Furs, linen, hemp, silk and other such fabrics were traded for \
|
||||
synthetic versions, creating a massive boom in the nylon industry and textile industry in the cities. Jeans, overcoats, army uniforms, parade uniforms, flags, pants, shirts, ties, \
|
||||
suspenders, overalls are now the fashion of every Tajara from Nal'Tor to Kaltir. The protests of \"Old fashion\" supporters can't stand against how undeniably effective and cheap \
|
||||
|
||||
@@ -116,14 +116,8 @@
|
||||
if(usr.stat) return
|
||||
|
||||
//can't we just use src here?
|
||||
var/obj/item/clothing/accessory/holster/H = null
|
||||
if(istype(src, /obj/item/clothing/accessory/holster))
|
||||
H = src
|
||||
if(!H && istype(src, /obj/item/clothing))
|
||||
var/obj/item/clothing/S = src
|
||||
if(LAZYLEN(S.accessories))
|
||||
H = locate() in S.accessories
|
||||
if(!H && istype(src, /obj/item/clothing/suit/armor/tactical)) // This armor is a snowflake and has an integrated holster.
|
||||
var/obj/item/clothing/accessory/holster/H = get_accessory(/obj/item/clothing/accessory/holster)
|
||||
if(!H && istype(src, /obj/item/clothing/suit/armor/tactical)) // This armor is a snowflake and has an integrated holster.
|
||||
var/obj/item/clothing/suit/armor/tactical/tacticool = src
|
||||
H = tacticool.holster
|
||||
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
author: TheGreyWolf
|
||||
|
||||
delete-after: True
|
||||
|
||||
changes:
|
||||
- tweak: "Changed how hoods works slightly. Shouldn't be any player-facing changes."
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 5.4 KiB |
Reference in New Issue
Block a user