Skip to content

Commit 0c1f213

Browse files
authored
Set the name of implicit menus (#2453)
1 parent 27b102e commit 0c1f213

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

OpenDreamClient/Interface/InterfaceMenu.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ public override void AddChild(ElementDescriptor descriptor) {
4949
!MenuElementsByName.TryGetValue(elementDescriptor.Category.Value, out parentMenu)) {
5050
//if category is set but the parent element doesn't exist, create it
5151
var parentMenuDescriptor = new MenuElementDescriptor {
52-
Id = elementDescriptor.Category
52+
Id = elementDescriptor.Category,
53+
Name = elementDescriptor.Category
5354
};
5455

5556
parentMenu = new(parentMenuDescriptor, this);

OpenDreamShared/Interface/Descriptors/InterfaceDescriptor.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ public DMFPropertyString Id {
4242
init => _id = value;
4343
}
4444

45-
public DMFPropertyString Name => new(_name.Value);
45+
public DMFPropertyString Name {
46+
get => new(_name.Value);
47+
init => _name = value;
48+
}
4649

4750
public DMFPropertyString Type {
4851
get => _type;

0 commit comments

Comments
 (0)