diff --git a/Content.Client/GameObjects/EntitySystems/VerbSystem.cs b/Content.Client/GameObjects/EntitySystems/VerbSystem.cs index 403cc6f6a3..05fc585389 100644 --- a/Content.Client/GameObjects/EntitySystems/VerbSystem.cs +++ b/Content.Client/GameObjects/EntitySystems/VerbSystem.cs @@ -223,10 +223,9 @@ namespace Content.Client.GameObjects.EntitySystems first = false; - if (groupIcons.TryGetValue(category, out var icon)) - { - vBox.AddChild(CreateCategoryButton(category, verbs, icon)); - } + groupIcons.TryGetValue(category, out var icon); + + vBox.AddChild(CreateCategoryButton(category, verbs, icon)); } if (buttons.ContainsKey("")) @@ -290,7 +289,7 @@ namespace Content.Client.GameObjects.EntitySystems return button; } - private Control CreateCategoryButton(string text, List verbButtons, SpriteSpecifier icon) + private Control CreateCategoryButton(string text, List verbButtons, SpriteSpecifier? icon) { verbButtons.Sort((a, b) => string.Compare(a.Text, b.Text, StringComparison.CurrentCulture)); @@ -411,7 +410,7 @@ namespace Content.Client.GameObjects.EntitySystems set => _icon.Texture = value; } - public VerbGroupButton(VerbSystem system, List verbButtons, SpriteSpecifier icon) + public VerbGroupButton(VerbSystem system, List verbButtons, SpriteSpecifier? icon) { _system = system; VerbButtons = verbButtons; diff --git a/Resources/Changelog/Parts/rotatable.yml b/Resources/Changelog/Parts/rotatable.yml new file mode 100644 index 0000000000..381654a2c4 --- /dev/null +++ b/Resources/Changelog/Parts/rotatable.yml @@ -0,0 +1,4 @@ +author: Zumorica +changes: + - type: Fix + message: Fixes rotatable verbs not showing in the context menu.