Merge pull request #101 from WoolyAypa/master

Papal stuff and hats on wigs
This commit is contained in:
projectkepler-RU
2023-03-31 11:29:03 +07:00
committed by GitHub
10 changed files with 118 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
/obj/item/nullrod/papal_staff
name = "papal staff"
desc = "A staff used by traditional bishops and popes."
icon = 'modular_zubbers/icons/obj/items_and_weapons.dmi'
icon_state = "papal_staff"
inhand_icon_state = "papal_staff"
lefthand_file = 'modular_zubbers/icons/mob/inhands/weapons/melee_lefthand.dmi'
righthand_file = 'modular_zubbers/icons/mob/inhands/weapons/melee_righthand.dmi'
w_class = WEIGHT_CLASS_BULKY
attack_verb_continuous = list("smacks", "strucks", "cracks", "beats", "purifies")
attack_verb_simple = list("smack", "struck", "crack", "beat", "purify")
/obj/item/nullrod/papal_staff/get_belt_overlay()
return mutable_appearance('icons/blanks/32x32.dmi', "nothing")
/obj/item/clothing/head/mitre
name = "papal mitre"
desc = "A traditional headdress, worn by bishops and popes in traditional Christianity"
icon = 'modular_zubbers/icons/mob/clothing/hats.dmi'
worn_icon = 'modular_zubbers/icons/mob/clothing/32x48_head.dmi'
icon_state = "mitre"
/obj/item/clothing/suit/chaplainsuit/armor/papal
name = "papal robe"
desc = "A short cape over a cassock, worn by bishops and popes in traditional Christianity"
icon = 'modular_zubbers/icons/obj/clothing/suits.dmi'
worn_icon = 'modular_zubbers/icons/mob/clothing/suits.dmi'
icon_state = "papalrobe"
body_parts_covered = CHEST|GROIN|LEGS|ARMS
supports_variations_flags = CLOTHING_DIGITIGRADE_VARIATION_NO_NEW_ICON
/obj/item/storage/box/holy/papal
name = "Papal Kit"
typepath_for_preview = /obj/item/clothing/suit/chaplainsuit/armor/papal
/obj/item/storage/box/holy/papal/PopulateContents()
new /obj/item/clothing/head/mitre(src)
new /obj/item/clothing/suit/chaplainsuit/armor/papal(src)

View File

@@ -0,0 +1,7 @@
#define HEAD_ACCESSORIES_PATHS list(\
/obj/item/clothing/head,\
/obj/item/clothing/glasses,\
/obj/item/reagent_containers/cup/bucket,\
/obj/item/paper,\
/obj/item/nullrod/fedora,\
)

View File

@@ -0,0 +1,73 @@
/obj/item/clothing/head/wig
var/obj/item/clothing/head/head_accessory
var/mutable_appearance/head_accessory_MA
var/overlay_on = FALSE
var/mob/living/carbon/holder
var/item_path
/obj/item/clothing/head/wig/attackby(obj/item/attachment, mob/living/user)
. = ..()
//Checks if the item is in the list of items available
for(var/type in HEAD_ACCESSORIES_PATHS)
if(istype(attachment, type))
item_path = type
break
if(item_path && !head_accessory)
add_head_accessory(attachment)
else
to_chat(user, span_notice("You can't put \the [attachment.name] on the head of \the [holder.name]"))
return
/obj/item/clothing/head/wig/proc/add_head_accessory(obj/item/clothing/attachment)
//Get the mutable_appearance ready
head_accessory_MA = mutable_appearance(attachment.worn_icon)
head_accessory_MA.icon_state = attachment.icon_state
attachment.forceMove(src) //Put the item in the wig
if(holder)
holder.add_overlay(head_accessory_MA)
overlay_on = TRUE
head_accessory = attachment
/obj/item/clothing/head/wig/attack_hand_secondary(mob/user)
..()
. = SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
if(head_accessory)
remove_head_accessory(user)
/obj/item/clothing/head/wig/proc/remove_head_accessory(mob/user)
user.put_in_active_hand(head_accessory)
head_accessory = null
item_path = null
if(holder)
holder.cut_overlay(head_accessory_MA)
overlay_on = FALSE
head_accessory_MA = null
/obj/item/clothing/head/wig/equipped(user, slot)
. = ..()
if(!(slot_flags & slot))
return
holder = user
if(head_accessory && !overlay_on)
holder.add_overlay(head_accessory_MA)
overlay_on = TRUE
/obj/item/clothing/head/wig/dropped(mob/user)
if(holder && overlay_on)
holder.cut_overlay(head_accessory_MA)
overlay_on = FALSE
holder = null
. = ..()

Binary file not shown.

After

Width:  |  Height:  |  Size: 635 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 659 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B