-
Notifications
You must be signed in to change notification settings - Fork 292
порнокопытные #3368
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
Open
Inconnu1337
wants to merge
2
commits into
AdventureTimeSS14:master
Choose a base branch
from
Inconnu1337:celecerns
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
порнокопытные #3368
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| using Content.Shared.Humanoid; | ||
|
|
||
| namespace Content.Client.ADT.Humanoid; | ||
|
|
||
| [RegisterComponent] | ||
| public sealed partial class MarkingLayerHiderComponent : Component | ||
| { | ||
| [ViewVariables] | ||
| public readonly Dictionary<HumanoidVisualLayers, HashSet<EntityUid>> HiddenBy = new(); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| using Content.Shared.Humanoid; | ||
| using Content.Shared.Humanoid.Markings; | ||
| using Robust.Client.GameObjects; | ||
|
|
||
| namespace Content.Client.ADT.Humanoid; | ||
|
|
||
| public sealed class MarkingLayerHiderSystem : EntitySystem | ||
| { | ||
| [Dependency] private readonly MarkingManager _marking = default!; | ||
| [Dependency] private readonly SpriteSystem _sprite = default!; | ||
|
|
||
| public void SetHiddenByOrgan(EntityUid body, EntityUid organ, List<Marking> applied) | ||
| { | ||
| var wanted = new HashSet<HumanoidVisualLayers>(); | ||
| foreach (var marking in applied) | ||
| { | ||
| if (!_marking.TryGetMarking(marking, out var proto) || proto.HidesLayers == null) | ||
| continue; | ||
|
|
||
| wanted.UnionWith(proto.HidesLayers); | ||
| } | ||
|
|
||
| var comp = CompOrNull<MarkingLayerHiderComponent>(body); | ||
|
|
||
| if (comp == null) | ||
| { | ||
| if (wanted.Count == 0) | ||
| return; | ||
|
|
||
| comp = AddComp<MarkingLayerHiderComponent>(body); | ||
| } | ||
|
|
||
| var touched = new HashSet<HumanoidVisualLayers>(wanted); | ||
|
|
||
| foreach (var (layer, organs) in comp.HiddenBy) | ||
| { | ||
| if (organs.Remove(organ)) | ||
| touched.Add(layer); | ||
| } | ||
|
|
||
| foreach (var layer in wanted) | ||
| { | ||
| if (!comp.HiddenBy.TryGetValue(layer, out var organs)) | ||
| { | ||
| organs = new HashSet<EntityUid>(); | ||
| comp.HiddenBy[layer] = organs; | ||
| } | ||
|
|
||
| organs.Add(organ); | ||
| } | ||
|
|
||
| foreach (var layer in touched) | ||
| { | ||
| Refresh(body, comp, layer); | ||
| } | ||
| } | ||
|
|
||
| private void Refresh(EntityUid body, MarkingLayerHiderComponent comp, HumanoidVisualLayers layer) | ||
| { | ||
| var hiddenByMarking = comp.HiddenBy.TryGetValue(layer, out var organs) && organs.Count > 0; | ||
|
|
||
| if (!hiddenByMarking) | ||
| comp.HiddenBy.Remove(layer); | ||
|
|
||
| var hiddenByClothing = CompOrNull<HideableHumanoidLayersComponent>(body)?.HiddenLayers is { } clothingLayers | ||
| && clothingLayers.ContainsKey(layer); | ||
|
|
||
| var visible = !hiddenByMarking && !hiddenByClothing; | ||
|
|
||
| if (_sprite.LayerMapTryGet(body, layer, out var index, false)) | ||
| _sprite.LayerSetVisible(body, index, visible); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| - files: ["sigh-1.ogg", "sigh-2.ogg", "sigh-3.ogg", "snort-1.ogg", "snort-2.ogg", "snort-3.ogg"] | ||
| license: "CC-BY-SA-3.0" | ||
| copyright: "ИСТОЧНИК НЕ УКАЗАН - уточнить автора звуков перед мержем" | ||
| source: "ИСТОЧНИК НЕ УКАЗАН - уточнить автора звуков перед мержем" |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: AdventureTimeSS14/space_station_ADT
Length of output: 12977
🤖 get_repo_knowledge executed:
get_repo_knowledge AdventureTimeSS14/space_station_ADT /tmp/coderabbit-repo-knowledge/adventuretimess14-space-station-adt-41a482d0/architecture /tmp/coderabbit-repo-knowledge/adventuretimess14-space-station-adt-41a482d0/learningsLength of output: 40850
🏁 Script executed:
Repository: AdventureTimeSS14/space_station_ADT
Length of output: 22012
🏁 Script executed:
Repository: AdventureTimeSS14/space_station_ADT
Length of output: 50391
Синхронизируйте видимость маркировок со слоями, скрытыми органом.
MarkingLayerHiderSystem.Refreshизменяет только базовый слой черезLayerSetVisible.VisualBodySystem.OnMarkingsChangedVisibilityобновляет слои маркировок только черезHumanoidLayerVisibilityChangedEvent, ноSetHiddenByOrganэто событие не отправляет. Поэтому маркировка на слое изHidesLayersможет остаться видимой, пока базовый слой скрыт. Передайте событие с вычисленным значениемvisibleпосле изменения слоя или вызовите общий обработчик видимости маркировок. Проверьте скрытие и восстановление обоих слоев при добавлении и удалении органа.🤖 Prompt for AI Agents