Skip to content
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

Merged
merged 4 commits into from
Sep 27, 2024
Merged

Conversation

hazelrat
Copy link
Contributor

@hazelrat hazelrat commented Sep 19, 2024

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.

image

Added a crude sprite for the wasteland goggles whenever toggled off the eyes, so it doesn't disappear when a player does so.

@BotBOREALIS BotBOREALIS added the Sprites Adds new or changes existing sprites. label Sep 19, 2024
@hazelrat
Copy link
Contributor Author

!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"
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor Author

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.

Copy link
Contributor

@FluffyGhoster FluffyGhoster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@NonQueueingMatt NonQueueingMatt added this pull request to the merge queue Sep 27, 2024
Merged via the queue into Aurorastation:master with commit ea510ef Sep 27, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Merge Sprites Adds new or changes existing sprites.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants