Fix midi verb (#6880)
This commit is contained in:
@@ -40,6 +40,9 @@ namespace Content.Server.UserInterface
|
|||||||
[DataField("key", readOnly: true, required: true)]
|
[DataField("key", readOnly: true, required: true)]
|
||||||
private string _keyRaw = default!;
|
private string _keyRaw = default!;
|
||||||
|
|
||||||
|
[DataField("verbText")]
|
||||||
|
public string VerbText = "ui-verb-toggle-open";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The client channel currently using the object, or null if there's none/not single user.
|
/// The client channel currently using the object, or null if there's none/not single user.
|
||||||
/// NOTE: DO NOT DIRECTLY SET, USE ActivatableUISystem.SetCurrentSingleUser
|
/// NOTE: DO NOT DIRECTLY SET, USE ActivatableUISystem.SetCurrentSingleUser
|
||||||
|
|||||||
@@ -34,12 +34,15 @@ namespace Content.Server.UserInterface
|
|||||||
if (!args.CanAccess)
|
if (!args.CanAccess)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (component.InHandsOnly && args.Using != uid)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!args.CanInteract && !HasComp<GhostComponent>(args.User))
|
if (!args.CanInteract && !HasComp<GhostComponent>(args.User))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ActivationVerb verb = new();
|
ActivationVerb verb = new();
|
||||||
verb.Act = () => InteractUI(args.User, component);
|
verb.Act = () => InteractUI(args.User, component);
|
||||||
verb.Text = Loc.GetString("ui-verb-toggle-open");
|
verb.Text = Loc.GetString(component.VerbText);
|
||||||
// TODO VERBS add "open UI" icon?
|
// TODO VERBS add "open UI" icon?
|
||||||
args.Verbs.Add(verb);
|
args.Verbs.Add(verb);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
### Loc for the various UI-related verbs
|
### Loc for the various UI-related verbs
|
||||||
ui-verb-toggle-open = Toggle UI
|
ui-verb-toggle-open = Toggle UI
|
||||||
|
verb-instrument-openui = Play Music
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
- type: ActivatableUI
|
- type: ActivatableUI
|
||||||
inHandsOnly: true
|
inHandsOnly: true
|
||||||
singleUser: true
|
singleUser: true
|
||||||
|
verbText: verb-instrument-openui
|
||||||
key: enum.InstrumentUiKey.Key
|
key: enum.InstrumentUiKey.Key
|
||||||
- type: UserInterface
|
- type: UserInterface
|
||||||
interfaces:
|
interfaces:
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
- type: ActivatableUI
|
- type: ActivatableUI
|
||||||
inHandsOnly: false
|
inHandsOnly: false
|
||||||
singleUser: true
|
singleUser: true
|
||||||
|
verbText: verb-instrument-openui
|
||||||
key: enum.InstrumentUiKey.Key
|
key: enum.InstrumentUiKey.Key
|
||||||
- type: InteractionOutline
|
- type: InteractionOutline
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
|
|||||||
Reference in New Issue
Block a user