-
Notifications
You must be signed in to change notification settings - Fork 369
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
Hidden tiles #5102
Hidden tiles #5102
Conversation
I wonder how I should initialize this field in an object that is not in the engine? |
requires space-wizards/space-station-14#27666 |
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'd rename the property to EditorHidden
or something, so people don't mistake it for a rendering property or something.
Done |
@@ -146,6 +146,8 @@ private void BuildTileList(string? searchStr = null) | |||
|
|||
foreach (var entry in _shownTiles) | |||
{ | |||
if (entry.EditorHidden) continue; |
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.
Didn't realize this on the first pass: it's probably better to do this filter before the name filter and sort, i.e. put it on line 133 with a .Where()
.
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.
Ok, but tomorrow. Im sleeping now
(Loc.GetString(s.Name).Contains(searchStr, StringComparison.CurrentCultureIgnoreCase) || | ||
s.ID.Contains(searchStr, StringComparison.OrdinalIgnoreCase)) && !s.EditorHidden); |
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.
Doing it like this only applies the hidden when you have a search string.
So there's no breaking change
A small addition that allows you to hide some tiles from the spawn menu. This is useful for downstrimes, disabling the ability to see standard tiles, but not causing huge problems with cutting them from everywhere they are used.