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

Secret stash refractor #29396

Merged

Conversation

beck-thompson
Copy link
Contributor

About the PR

Added some additional functionality to the secret stash system and also removed the PottedPlantHide stuff because it is now redundant. Mainly the changes are mostly related to adding verbs to the system!

Why / Balance

Three main reasons:
1.) Adding the verbs allows you to now insert items that are used to close the stash inside of the stash.
2.) If there is ever some overlap with clicking, adding the verbs will always allow the stash to be accessible.
3.) This system allows more flexibility for some other things I want to add!

Technical details

Two things for whoever reviews this:
1.) Make sure what I did in FoodSystem makes sense. It makes sense to me (You are destroying the item) but I'm worried this is not quite how the event is supposed to be used.
2.) The UtensilSystem that an incorrect handled boolean (I think) that was messing up with the stash so I fixed it.

Media

toilet2.mp4
pottedplant.mp4

I can't show any more on video, my computer will stop recording after 13 seconds (No idea why?) and its painful...

Content.Server/Nutrition/EntitySystems/FoodSystem.cs Outdated Show resolved Hide resolved
Content.Shared/Storage/Components/SecretStashComponent.cs Outdated Show resolved Hide resolved
Content.Shared/Storage/Components/SecretStashComponent.cs Outdated Show resolved Hide resolved
}

[Serializable, NetSerializable]
public enum DoorVisualState : byte
public enum StashVisualState : byte
Copy link
Contributor

Choose a reason for hiding this comment

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

and this is just a bool

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'm not quite sure what your getting at with this! This is the way I've done it in other PRs and everything I can find also does it this way. Mind giving some more detail?

@deltanedas
Copy link
Contributor

stash prying can also be moved to its own component (ToolOpenable e.g.) in the far far future doors might use it

@beck-thompson
Copy link
Contributor Author

Delta I'm not sure that using the openable component is the correct approach! I've looked at it and many of the functions are related to drinking specifically, and I would also have to basically disable like 90% of is uses (Verbs, OnActivated, examine stuff, etc...) just so the ToolOpenableSystem will be able to use the TryOpen and TryClose functions (Or have tool openable make an event or something).

I could totally be wrong here but I feel like the better approach would be to just make the toolOpenableSystem independent from the openableSystem. Let me know what you think!

@beck-thompson
Copy link
Contributor Author

OK I "Resolved" the issues but I didn't get a response so I'm not sure if this is the right way. This is 100% better than before and a lot cleaner but maybe not quite what ya'll want!

@github-actions github-actions bot added the Status: Needs Review This PR requires new reviews before it can be merged. label Jul 2, 2024
@github-actions github-actions bot added the Merge Conflict This PR currently has conflicts that need to be addressed. label Jul 13, 2024
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@beck-thompson
Copy link
Contributor Author

Its starting... The evil merge conflicts 😭

@github-actions github-actions bot removed the Merge Conflict This PR currently has conflicts that need to be addressed. label Jul 26, 2024
@metalgearsloth metalgearsloth merged commit ad18c6e into space-wizards:master Aug 8, 2024
11 checks passed
themias pushed a commit to themias/space-station-14 that referenced this pull request Aug 9, 2024
* First commit

* Will do this in another PR!

* maybe?

* Moved stuff to ToolOpenableSystem because its smarter and cooler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Review This PR requires new reviews before it can be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants