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

Make Glasses Fragile and Damage On Slip #34184

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

thetolbean
Copy link
Contributor

@thetolbean thetolbean commented Jan 2, 2025

About the PR

This PR gives vision correcting glasses a very small chance, 1%, to break when slipping.
This also adds a new pair of glasses: Broken Glasses.
Broken glasses still provide a small amount of vision correction, but only a fraction compared to standard glasses.
This also adds a crafting recipe to replace the glass in a pair of broken glasses.

In general, the DamageOnSlip component can be used in general for any piece of clothing and can be customized with a different damage, chance, and multiplier range.
This utilizes the destructible component and a damage threshold to handle the end effects, and the damageonslip component to damage the clothing.

This is my first attempt at making a sprite, so I will accept any critique, especially with the meta.json

Why / Balance

image

Adds RP potential around glasses as they are a notoriously fragile piece of clothing.
Makes glasses and their care more vital.
Gives the ability to repair broken glasses with a very simple recipe in order to prevent some frustration with them breaking.

Media

velma-2-reduced.mp4

This video does not showcase the glass break sound when the glasses shatter

Requirements

Changelog

🆑

  • add: Vision correcting glasses are now fragile and have a chance to break when thrown or slipped.
  • add: Broken glasses can now be repaired via the crafting menu.

@github-actions github-actions bot added S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. size/M Denotes a PR that changes 100-999 lines. Changes: Sprites Changes: Might require knowledge of spriting or visual design. labels Jan 2, 2025
Copy link
Contributor

github-actions bot commented Jan 2, 2025

RSI Diff Bot; head commit 8571aaa merging into a13076b
This PR makes changes to 1 or more RSIs. Here is a summary of all changes:

Resources/Textures/Clothing/Eyes/Glasses/brokenglasses.rsi

State Old New Status
equipped-EYES-hamster Added
equipped-EYES Added
icon Added
inhand-left Added
inhand-right Added

Edit: diff updated after 8571aaa

@ps3moira
Copy link
Contributor

ps3moira commented Jan 2, 2025

Would be cool if there was a visual change to the glasses when they break

@thetolbean
Copy link
Contributor Author

thetolbean commented Jan 2, 2025

Would be cool if there was a visual change to the glasses when they break

There is a very subtle change to the glasses which isn't shown in the videos.
My goal was to just have a crack in each lens. but each lens is only a 2x2 sprite when worn
The sprites are so small differences are hard to notice

image
image

@Hrosts
Copy link
Contributor

Hrosts commented Jan 3, 2025

The sprites are so small differences are hard to notice

You can make it as if they got somewhat bent around the bridge, shift one of the eyes a pixel lower.

@beck-thompson
Copy link
Contributor

I can finally make velma 😆
super fun pr

@beck-thompson beck-thompson added P2: Raised Priority: Item has a raised priority, indicating it might get increased maintainer attention. T: New Feature Type: New feature or content, or extending existing content D2: Medium Difficulty: A good amount of codebase knowledge required. S: Needs Review Status: Requires additional reviews before being fully accepted A: Character/Species Area: Player characters and species features and content. and removed S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. labels Jan 4, 2025
@thetolbean thetolbean marked this pull request as draft January 4, 2025 07:30
@thetolbean thetolbean changed the title Give glasses a small chance to break when slipping Make Glasses Fragile Jan 4, 2025
@thetolbean thetolbean changed the title Make Glasses Fragile Make Glasses Fragile and Damage On Slip Jan 4, 2025
@thetolbean thetolbean requested a review from TheShuEd January 4, 2025 21:21
@thetolbean thetolbean marked this pull request as ready for review January 4, 2025 21:21
behaviors:
- !type:SpawnEntitiesBehavior
spawn:
ClothingEyesGlassesBroken:
Copy link
Member

Choose a reason for hiding this comment

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

image
you can try did it like this with Breakage, and also add Repairable component, io be able to fix the glasses back up. But that's up to you, I don't require it.

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 glasses are currently "repairable" via a crafting recipe using the broken glasses and a piece of glass. I'll experiment with using the breakage and repairable

Copy link
Member

Choose a reason for hiding this comment

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

I think making them repairable would be the nicer way to do this rather than adding a crafting recipe specifically for glasses.

/// Damage multiplier maximum
/// </summary>
/// <remarks>
/// Will multiply the damage specifier by a random integer from 1 to maximum (non inclusive)
Copy link
Member

Choose a reason for hiding this comment

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

why a random integer and not a float?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My intention was to give the possibility of slipping once to shatter your glasses despite not damaging them previously by doubling the damage. This only required a multiplier of 1 or 2. Otherwise, it very much could be a float.

Content.Shared/Inventory/InventorySystem.Relay.cs Outdated Show resolved Hide resolved
Resources/Locale/en-US/clothing/glasses.ftl Outdated Show resolved Hide resolved
behaviors:
- !type:SpawnEntitiesBehavior
spawn:
ClothingEyesGlassesBroken:
Copy link
Member

Choose a reason for hiding this comment

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

I think making them repairable would be the nicer way to do this rather than adding a crafting recipe specifically for glasses.

@slarticodefast slarticodefast self-assigned this Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: Character/Species Area: Player characters and species features and content. Changes: Sprites Changes: Might require knowledge of spriting or visual design. D2: Medium Difficulty: A good amount of codebase knowledge required. P2: Raised Priority: Item has a raised priority, indicating it might get increased maintainer attention. S: Needs Review Status: Requires additional reviews before being fully accepted size/M Denotes a PR that changes 100-999 lines. T: New Feature Type: New feature or content, or extending existing content
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants