Skip to content

Commit 3f38a68

Browse files
committed
editor: Update coil and switch event descriptor.
1 parent 6387d4f commit 3f38a68

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

Editor/Descriptors/SetCoilUnitDescriptor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public SetCoilUnitDescriptor(SetCoilUnit target) : base(target)
2828

2929
protected override string DefinedSummary()
3030
{
31-
return "This node sets a given coil value to a coil, defined by its ID.";
31+
return "This node assigns a given value to a coil defined by its ID.";
3232
}
3333

3434
protected override EditorTexture DefinedIcon()
@@ -43,10 +43,10 @@ protected override void DefinedPort(IUnitPort port, UnitPortDescription desc)
4343

4444
switch (port.key) {
4545
case nameof(SetCoilUnit.Id):
46-
description.summary = "The ID of the coil to be set.";
46+
desc.summary = "The ID of the coil to be set.";
4747
break;
4848
case nameof(SetCoilUnit.IsEnabled):
49-
description.summary = "The value to assign to the coil.";
49+
desc.summary = "The value to assign to the coil.";
5050
break;
5151
}
5252
}

Editor/Descriptors/SwitchEventUnitDescriptor.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
// along with this program. If not, see <https://www.gnu.org/licenses/>.
1616

1717
using Unity.VisualScripting;
18-
using VisualPinball.Unity.Editor;
1918

2019
namespace VisualPinball.Unity.VisualScripting.Editor
2120
{
@@ -31,18 +30,18 @@ protected override string DefinedSummary()
3130
return "This node triggers an event when a switch with a given ID changes.";
3231
}
3332

34-
protected override EditorTexture DefinedIcon() => EditorTexture.Single(VisualPinball.Unity.Editor.Icons.SwitchEvent);
33+
protected override EditorTexture DefinedIcon() => EditorTexture.Single(Unity.Editor.Icons.SwitchEvent);
3534

3635
protected override void DefinedPort(IUnitPort port, UnitPortDescription desc)
3736
{
3837
base.DefinedPort(port, desc);
3938

4039
switch (port.key) {
41-
case nameof(SetCoilUnit.Id):
42-
description.summary = "The ID of the switch that changed its value.";
40+
case nameof(SwitchEventUnit.Id):
41+
desc.summary = "The ID of the switch that changed its value.";
4342
break;
44-
case nameof(SetCoilUnit.IsEnabled):
45-
description.summary = "The new value of the switch.";
43+
case nameof(SwitchEventUnit.IsEnabled):
44+
desc.summary = "The new value of the switch, true if enabled, false otherwise.";
4645
break;
4746
}
4847
}

0 commit comments

Comments
 (0)