Coding Hooded Apparel

How, what and why to code in BYOND.

Moderators: MisterPerson, Code Maintainers

User avatar
Farquaar
 
Joined: Sat Apr 07, 2018 7:20 am
Location: Somewhere north of Hogtown
Byond Username: Farquaar

Coding Hooded Apparel

Postby Farquaar » Tue Jun 11, 2019 3:42 pm #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)
broken hood.png
Left: Default, Right: Hood pulled up
broken hood.png (15.42 KiB) Viewed 222 times
broken hood inv.png
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



User avatar
Mickyan
Github User
 
Joined: Tue Oct 14, 2014 11:59 pm
Byond Username: Mickyan
Github Username: Mickyan

Re: Coding Hooded Apparel

Postby Mickyan » Tue Jun 11, 2019 4:44 pm #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
I play as Swanni, the brain-damaged moth.

Be nice to each other.

User avatar
PKPenguin321
In-Game Game Master
 
Joined: Tue Jul 01, 2014 7:02 pm
Location: U S A, U S A, U S A
Byond Username: PKPenguin321
Github Username: PKPenguin321

Re: Coding Hooded Apparel

Postby PKPenguin321 » Tue Jun 11, 2019 6:01 pm #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


Return to Coding

Who is online

Users browsing this forum: No registered users