Coding Hooded Apparel

How, what and why to code in BYOND.
Post Reply
User avatar
Farquaar
Joined: Sat Apr 07, 2018 7:20 am
Byond Username: Farquaar
Location: Delta Quadrant

Coding Hooded Apparel

Post by Farquaar » #497618

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 1054 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
► Show Spoiler
User avatar
Mickyan
Github User
Joined: Tue Oct 14, 2014 11:59 pm
Byond Username: Mickyan
Github Username: Mickyan

Re: Coding Hooded Apparel

Post by Mickyan » #497623

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
ImageI play on Manuel as Swanni, the brain-damaged moth.
Be nice to each other.
Image
Image
Image
Image
Image
User avatar
PKPenguin321
Site Admin
Joined: Tue Jul 01, 2014 7:02 pm
Byond Username: PKPenguin321
Github Username: PKPenguin321
Location: U S A, U S A, U S A

Re: Coding Hooded Apparel

Post by PKPenguin321 » #497646

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
i play Lauser McMauligan. clown name is Cold-Ass Honkey
i have three other top secret characters as well.
tell the best admin how good he is
Spoiler:
Image
Post Reply

Who is online

Users browsing this forum: No registered users