Page 1 of 1

Coding Hooded Apparel

Posted: Tue Jun 11, 2019 3:42 pm
by Farquaar
I'm having some trouble fixing an item that I added to the game not too long ago, and I was wondering if anyone had any suggestions. (See #43928)
Left: Default, Right: Hood pulled up
Left: Default, Right: Hood pulled up
broken hood.png (15.42 KiB) Viewed 1053 times
Left: Default, Right: Hood pulled up
Left: Default, Right: Hood pulled up
My understanding of datums is quite poor, but I feel that the issue is with the hood's directory. I'd sincerely appreciate any advice before I open another PR.

Code: Select all

/obj/item/clothing/suit/hooded/chaplainsuit/monkfrock
	name = "monk's frock"
	desc = "A few steps above rended sackcloth."
	icon_state = "monkfrock"
	item_state = "monkfrock"
	body_parts_covered = CHEST|GROIN|LEGS|ARMS
	hoodtype = /obj/item/clothing/head/hooded/monkfrock

Code: Select all

/obj/item/clothing/head/hooded/monkfrock
	name = "monk's hood"
	desc = "For when a man wants to cover up his tonsure."
	icon_state = "monkhood"
	item_state = "monkhood"
	body_parts_covered = HEAD
	flags_inv = HIDEHAIR|HIDEEARS
Here's the code for the Chaplain's Hoodie.
Spoiler:

Code: Select all

/obj/item/clothing/suit/hooded/chaplain_hoodie
	name = "follower hoodie"
	desc = "Hoodie made for acolytes of the chaplain."
	icon_state = "chaplain_hoodie"
	item_state = "chaplain_hoodie"
	body_parts_covered = CHEST|GROIN|LEGS|ARMS
	allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman)
	hoodtype = /obj/item/clothing/head/hooded/chaplain_hood

Code: Select all

/obj/item/clothing/head/hooded/chaplain_hood
	name = "follower hood"
	desc = "Hood made for acolytes of the chaplain."
	icon_state = "chaplain_hood"
	body_parts_covered = HEAD
flags_inv = HIDEHAIR|HIDEFACE|HIDEEARS

Re: Coding Hooded Apparel

Posted: Tue Jun 11, 2019 4:44 pm
by Mickyan
From a quick glance, hooded apparel (suit part) requires two icons, one for when the hood is down and one when it's pulled up

ex.
monkfrock - hood down
monkfrock_t - hood up

It looks like you are missing monkfrock_t, hence your suit doesn't have an icon when you pull up the hood

This applies to both the mob and object icon

Re: Coding Hooded Apparel

Posted: Tue Jun 11, 2019 6:01 pm
by PKPenguin321
yeah, the bugged icon where you appear naked with the word "SUIT" is a debug icon that replaces missing ones. think of the missing texture in gmod
Spoiler:
Image
basically it indicates that the code calls for a sprite that doesnt exist, meaning you are either missing a sprite or entered the wrong sprite name when calling it in the code