Skip to content

Commit dc3d1f2

Browse files
committed
doc: Add descriptor for set coil node.
1 parent 30bdd84 commit dc3d1f2

File tree

3 files changed

+49
-8
lines changed

3 files changed

+49
-8
lines changed

Editor/Descriptors.meta

Lines changed: 3 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// Visual Pinball Engine
2+
// Copyright (C) 2021 freezy and VPE Team
3+
//
4+
// This program is free software: you can redistribute it and/or modify
5+
// it under the terms of the GNU General Public License as published by
6+
// the Free Software Foundation, either version 3 of the License, or
7+
// (at your option) any later version.
8+
//
9+
// This program is distributed in the hope that it will be useful,
10+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
// GNU General Public License for more details.
13+
//
14+
// You should have received a copy of the GNU General Public License
15+
// along with this program. If not, see <https://www.gnu.org/licenses/>.
16+
17+
using Unity.VisualScripting;
18+
19+
namespace VisualPinball.Unity.VisualScripting.Editor
20+
{
21+
[Descriptor(typeof(SetCoilUnit))]
22+
public class SetCoilUnitDescriptor : UnitDescriptor<SetCoilUnit>
23+
{
24+
public SetCoilUnitDescriptor(SetCoilUnit target) : base(target)
25+
{
26+
}
27+
28+
protected override void DefinedPort(IUnitPort port, UnitPortDescription description)
29+
{
30+
base.DefinedPort(port, description);
31+
32+
switch (port.key)
33+
{
34+
case nameof(SetCoilUnit.Id):
35+
description.summary = "The ID of the coil to be set.";
36+
break;
37+
case nameof(SetCoilUnit.IsEnabled):
38+
description.summary = "The value to assign to the coil.";
39+
break;
40+
}
41+
}
42+
}
43+
}

Editor/Descriptors/SetCoilUnitDescriptor.cs.meta

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)