-
Notifications
You must be signed in to change notification settings - Fork 518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
icon_state QoL improvements #19915
icon_state QoL improvements #19915
Conversation
!review |
@@ -370,6 +370,8 @@ BLIND // can't see anything | |||
desc = "A stylish pair of tactical goggles that protect the eyes from aerosolized chemicals, debris and bright flashes." | |||
var/brand_name | |||
icon = 'icons/clothing/eyes/goon_goggles.dmi' | |||
icon_state = "military_goggles" | |||
item_state = "military_goggles" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember to check for inhands when changing item_state.
If none are present, use a generic parent one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None of the goggles changed here seem to have inhands and the closest thing to a generic parent variant is in safety.dmi, rather than goon_goggles.dmi. Would it be proper to just omit an item_state for them, or is there a good way to pull the generic inhands from the other file to use here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. That's fine then. I'd suggest migrating goon_goggles.dmi entirely inside of safety.dmi since they are a subset of regular safety goggles and the sprites are the exact same anyway, so you can get rid of the icon variable as well.
After digging in the files for a while, I now see the goggles are contained sprites. There isn't an easy way to pull the generic inhands, but you can simply copy and paste the generic version and rename the icons in the dmi to match. The icons aren't your responsibility, so you don't have to worry about changing the color. This is up to you, but it's just good practice to do so.
That aside, since they are contained sprites, you do not need to change the item_state. However, this still applies to non-contained sprite objects, so be sure to check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've migrated all the icons in goon_goggles.dmi over to safety.dmi, all the items inherit the icon from there now. I've also found a way to overwrite the item_state for the right and left hand slots to use the generic goggle inhands, now that they're all in the same file, which seems to work fine ingame. Does that all look good to you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The goggles also have a funny initialisation that defines the item state off the sprite state, so I've removed the item_state definitions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
A few items now show up with appropriate sprites in StrongDMM. Achieved by adding an icon_state if one was lacking, or by adding a generic icon variant in the case of the energy weapons for the icon_state to reference.
Added a crude sprite for the wasteland goggles whenever toggled off the eyes, so it doesn't disappear when a player does so.