Skip to content

Rename "Visual Pinball" to "Pinball". #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Runtime/Gamelogic/VisualScriptingGamelogicBridge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace VisualPinball.Unity.VisualScripting
[DisallowMultipleComponent]
[RequireComponent(typeof(IGamelogicEngine))]
[RequireComponent(typeof(Player))]
[AddComponentMenu("Visual Pinball/Gamelogic Engine/Visual Scripting Bridge")]
[AddComponentMenu("Pinball/Gamelogic Engine/Visual Scripting Bridge")]
public class VisualScriptingGamelogicBridge : MonoBehaviour
{
private Player _player;
Expand Down
3 changes: 1 addition & 2 deletions Runtime/Gamelogic/VisualScriptingGamelogicEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
namespace VisualPinball.Unity.VisualScripting
{
[DisallowMultipleComponent]
[AddComponentMenu("Visual Pinball/Gamelogic Engine/Visual Scripting Game Logic")]
[AddComponentMenu("Pinball/Gamelogic Engine/Visual Scripting Game Logic")]
public class VisualScriptingGamelogicEngine : MonoBehaviour, IGamelogicEngine, ISerializationCallbackReceiver
{
public string Name => "Visual Scripting Gamelogic Engine";
Expand Down Expand Up @@ -253,4 +253,3 @@ public void OnAfterDeserialize()
}
}
}

2 changes: 1 addition & 1 deletion Runtime/Nodes/Coils/AllCoilsEnabledEventUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace VisualPinball.Unity.VisualScripting
{
[UnitTitle("On All Coils Enabled")]
[UnitSurtitle("Gamelogic Engine")]
[UnitCategory("Events\\Visual Pinball")]
[UnitCategory("Events\\Pinball")]
public class AllCoilsEnabledEventUnit : GleEventUnit<CoilEventArgs>, IMultiInputUnit
{
[SerializeAs(nameof(inputCount))]
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Nodes/Coils/CoilEnabledEventUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace VisualPinball.Unity.VisualScripting
{
[UnitTitle("On Coil Enabled")]
[UnitSurtitle("Gamelogic Engine")]
[UnitCategory("Events\\Visual Pinball")]
[UnitCategory("Events\\Pinball")]
public class CoilEnabledEventUnit : GleEventUnit<CoilEventArgs>, IMultiInputUnit
{
[SerializeAs(nameof(inputCount))]
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Nodes/Coils/CoilEventUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace VisualPinball.Unity.VisualScripting
{
[UnitTitle("On Coil Changed")]
[UnitSurtitle("Gamelogic Engine")]
[UnitCategory("Events\\Visual Pinball")]
[UnitCategory("Events\\Pinball")]
public class CoilEventUnit : GleEventUnit<CoilEventArgs>, IMultiInputUnit
{
[SerializeAs(nameof(inputCount))]
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Nodes/Coils/GetCoilUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace VisualPinball.Unity.VisualScripting
{
[UnitTitle("Get Coil Value")]
[UnitSurtitle("Gamelogic Engine")]
[UnitCategory("Visual Pinball")]
[UnitCategory("Pinball")]
public class GetCoilUnit : GleUnit
{
[DoNotSerialize]
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Nodes/Coils/PulseCoilUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace VisualPinball.Unity.VisualScripting
{
[UnitTitle("Pulse Coil")]
[UnitSurtitle("Gamelogic Engine")]
[UnitCategory("Visual Pinball")]
[UnitCategory("Pinball")]
public class PulseCoilUnit : GleUnit, IMultiInputUnit
{
[DoNotSerialize]
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Nodes/Coils/SetCoilUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace VisualPinball.Unity.VisualScripting
{
[UnitTitle("Set Coil")]
[UnitSurtitle("Gamelogic Engine")]
[UnitCategory("Visual Pinball")]
[UnitCategory("Pinball")]
public class SetCoilUnit : GleUnit, IMultiInputUnit
{
[DoNotSerialize]
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Nodes/CreateBallUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace VisualPinball.Unity.VisualScripting
{

[UnitTitle("Create Ball")]
[UnitCategory("Visual Pinball")]
[UnitCategory("Pinball")]
public class CreateBallUnit : GleUnit
{
[DoNotSerialize]
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Nodes/Display/ClearDisplayUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace VisualPinball.Unity.VisualScripting
{
[UnitTitle("Clear Display")]
[UnitSurtitle("Gamelogic Engine")]
[UnitCategory("Visual Pinball")]
[UnitCategory("Pinball")]
public class ClearDisplayUnit : GleUnit
{
[Serialize, Inspectable, UnitHeaderInspectable("ID")]
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Nodes/Display/DisplayEventUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace VisualPinball.Unity.VisualScripting
{
[UnitTitle("On Display Changed")]
[UnitSurtitle("Gamelogic Engine")]
[UnitCategory("Events\\Visual Pinball")]
[UnitCategory("Events\\Pinball")]
public class DisplayEventUnit : GleEventUnit<DisplayChangedEventArgs>
{
[Serialize]
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Nodes/Display/UpdateDisplayUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace VisualPinball.Unity.VisualScripting
{
[UnitTitle("Update Display")]
[UnitSurtitle("Gamelogic Engine")]
[UnitCategory("Visual Pinball")]
[UnitCategory("Pinball")]
public class UpdateDisplayUnit : GleUnit
{
[Serialize, Inspectable, UnitHeaderInspectable("ID")]
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Nodes/Event/PinballEventUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace VisualPinball.Unity.VisualScripting
/// A special named event with any amount of parameters called manually with the 'Trigger Custom Event' unit.
/// </summary>
[UnitTitle("On Pinball Event")]
[UnitCategory("Events/Visual Pinball")]
[UnitCategory("Events/Pinball")]
public class PinballEventUnit : GleEventUnit<PinballEventArgs>
{
[Serialize, Inspectable, UnitHeaderInspectable]
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Nodes/Event/TriggerPinballEventUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace VisualPinball.Unity.VisualScripting
[UnitSurtitle("Pinball Event")]
[UnitShortTitle("Trigger")]
[TypeIcon(typeof(CustomEvent))]
[UnitCategory("Events/Visual Pinball")]
[UnitCategory("Events/Pinball")]
public sealed class TriggerPinballEventUnit : GleUnit
{
[Serialize, Inspectable, UnitHeaderInspectable]
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Nodes/GleStartedEventUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
namespace VisualPinball.Unity.VisualScripting
{
[UnitTitle("On Gamelogic Engine Started Event")]
[UnitCategory("Events\\Visual Pinball")]
[UnitCategory("Events\\Pinball")]
public sealed class GleStartedEventUnit : GleEventUnit<EventArgs>
{
protected override bool register => true;
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Nodes/Lamps/GetLampUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace VisualPinball.Unity.VisualScripting
{
[UnitTitle("Get Lamp Value")]
[UnitSurtitle("Gamelogic Engine")]
[UnitCategory("Visual Pinball")]
[UnitCategory("Pinball")]
public class GetLampUnit : GleUnit
{
[Serialize, Inspectable, UnitHeaderInspectable]
Expand Down
70 changes: 35 additions & 35 deletions Runtime/Nodes/Lamps/LampEventUnit.cs
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
// Visual Pinball Engine
// Copyright (C) 2022 freezy and VPE Team
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
using System.Collections.Generic;
using System.Collections.ObjectModel;
// Visual Pinball Engine
// Copyright (C) 2022 freezy and VPE Team
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

using System.Collections.Generic;
using System.Collections.ObjectModel;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine;

namespace VisualPinball.Unity.VisualScripting
{
[UnitTitle("On Lamp Changed")]
[UnitSurtitle("Gamelogic Engine")]
[UnitCategory("Events\\Visual Pinball")]
[UnitCategory("Events\\Pinball")]
public sealed class LampEventUnit : GleEventUnit<LampEventArgs>, IMultiInputUnit
{
[SerializeAs(nameof(inputCount))]
Expand Down Expand Up @@ -59,26 +59,26 @@ protected override void Definition()
{
base.Definition();

var _multiInputs = new List<ValueInput>();
multiInputs = _multiInputs.AsReadOnly();
for (var i = 0; i < inputCount; i++) {
_multiInputs.Add(ValueInput(i.ToString(), string.Empty));
var _multiInputs = new List<ValueInput>();

multiInputs = _multiInputs.AsReadOnly();

for (var i = 0; i < inputCount; i++) {
_multiInputs.Add(ValueInput(i.ToString(), string.Empty));
}

Value = ValueOutput<float>(nameof(Value));
IsEnabled = ValueOutput<bool>(nameof(IsEnabled));
}
}

protected override bool ShouldTrigger(Flow flow, LampEventArgs args)
{
foreach (var input in multiInputs) {
if (flow.GetValue<string>(input) == args.Id) {
return true;
}
}
foreach (var input in multiInputs) {
if (flow.GetValue<string>(input) == args.Id) {
return true;
}
}

return false;
}

Expand Down
2 changes: 1 addition & 1 deletion Runtime/Nodes/Lamps/LampSequenceUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public struct LightComponentMapping

[UnitTitle("Lamp Sequence")]
[UnitSurtitle("Gamelogic Engine")]
[UnitCategory("Visual Pinball")]
[UnitCategory("Pinball")]
public class LampSequenceUnit : GleUnit, IMultiInputUnit
{
[Serialize, Inspectable, UnitHeaderInspectable("Value")]
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Nodes/Lamps/SetLampUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace VisualPinball.Unity.VisualScripting
[UnitShortTitle("Set Lamp")]
[UnitTitle("Set Lamp")]
[UnitSurtitle("Gamelogic Engine")]
[UnitCategory("Visual Pinball")]
[UnitCategory("Pinball")]
public class SetLampUnit : GleUnit, IMultiInputUnit
{
[Serialize, Inspectable, UnitHeaderInspectable]
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Nodes/Lamps/SwitchLampUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace VisualPinball.Unity.VisualScripting
[UnitShortTitle("Switch Lamp")]
[UnitTitle("Switch Lamp (ID, match value)")]
[UnitSurtitle("Gamelogic Engine")]
[UnitCategory("Visual Pinball")]
[UnitCategory("Pinball")]
public class SwitchLampUnit : GleUnit, IMultiInputUnit
{
[Serialize, Inspectable, UnitHeaderInspectable("Match")]
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Nodes/PlayerState/ChangePlayerStateUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace VisualPinball.Unity.VisualScripting
{
[UnitTitle("Change Player State")]
[UnitSurtitle("Player State")]
[UnitCategory("Visual Pinball/Variables")]
[UnitCategory("Pinball/Variables")]
public class ChangePlayerStateUnit : GleUnit
{
[Serialize, Inspectable, UnitHeaderInspectable("Next Player")]
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Nodes/PlayerState/CreatePlayerStateUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace VisualPinball.Unity.VisualScripting
{
[UnitTitle("Create Player State")]
[UnitSurtitle("Player State")]
[UnitCategory("Visual Pinball/Variables")]
[UnitCategory("Pinball/Variables")]
public class CreatePlayerStateUnit : GleUnit
{
[Serialize, Inspectable, UnitHeaderInspectable("Auto-increment")]
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Nodes/PlayerState/GetPlayerIdUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace VisualPinball.Unity.VisualScripting
{
[UnitTitle("Get Player ID")]
[UnitSurtitle("Player State")]
[UnitCategory("Visual Pinball/Variables")]
[UnitCategory("Pinball/Variables")]
public class GetPlayerIdUnit : GleUnit
{
[Serialize, Inspectable, UnitHeaderInspectable]
Expand Down
4 changes: 2 additions & 2 deletions Runtime/Nodes/PlayerState/GetVariableUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace VisualPinball.Unity.VisualScripting
{
[UnitTitle("Get Player Variable")]
[UnitSurtitle("Player State")]
[UnitCategory("Visual Pinball/Variables")]
[UnitCategory("Pinball/Variables")]
public class GetPlayerVariableUnit : GetVariableUnit
{
[Serialize, Inspectable, UnitHeaderInspectable]
Expand All @@ -33,7 +33,7 @@ public class GetPlayerVariableUnit : GetVariableUnit

[UnitTitle("Get Table Variable")]
[UnitSurtitle("Table State")]
[UnitCategory("Visual Pinball/Variables")]
[UnitCategory("Pinball/Variables")]
public class GetTableVariableUnit : GetVariableUnit
{
[Serialize, Inspectable, UnitHeaderInspectable]
Expand Down
4 changes: 2 additions & 2 deletions Runtime/Nodes/PlayerState/IncreaseVariableUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace VisualPinball.Unity.VisualScripting
{
[UnitTitle("Increase Player Variable")]
[UnitSurtitle("Player State")]
[UnitCategory("Visual Pinball/Variables")]
[UnitCategory("Pinball/Variables")]
public class IncreasePlayerVariableUnit : IncreaseVariableUnit
{
[Serialize, Inspectable, UnitHeaderInspectable]
Expand All @@ -33,7 +33,7 @@ public class IncreasePlayerVariableUnit : IncreaseVariableUnit

[UnitTitle("Increase Table Variable")]
[UnitSurtitle("Table State")]
[UnitCategory("Visual Pinball/Variables")]
[UnitCategory("Pinball/Variables")]
public class IncreaseTableVariableUnit : IncreaseVariableUnit
{
[Serialize, Inspectable, UnitHeaderInspectable]
Expand Down
4 changes: 2 additions & 2 deletions Runtime/Nodes/PlayerState/SetVariableUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace VisualPinball.Unity.VisualScripting
{
[UnitTitle("Set Player Variable")]
[UnitSurtitle("Player State")]
[UnitCategory("Visual Pinball/Variables")]
[UnitCategory("Pinball/Variables")]
public class SetPlayerVariableUnit : SetVariableUnit
{
[Serialize, Inspectable, UnitHeaderInspectable]
Expand All @@ -34,7 +34,7 @@ public class SetPlayerVariableUnit : SetVariableUnit

[UnitTitle("Set Table Variable")]
[UnitSurtitle("Table State")]
[UnitCategory("Visual Pinball/Variables")]
[UnitCategory("Pinball/Variables")]
public class SetTableVariableUnit : SetVariableUnit
{
[Serialize, Inspectable, UnitHeaderInspectable]
Expand Down
4 changes: 2 additions & 2 deletions Runtime/Nodes/PlayerState/VariableChangedEventUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace VisualPinball.Unity.VisualScripting
{
[UnitTitle("On Player Variable Changed")]
[UnitSurtitle("Player State")]
[UnitCategory("Events\\Visual Pinball")]
[UnitCategory("Events\\Pinball")]
public class PlayerVariableChangedEventUnit : VariableChangedEventUnit
{
[Serialize, Inspectable, UnitHeaderInspectable]
Expand All @@ -34,7 +34,7 @@ public class PlayerVariableChangedEventUnit : VariableChangedEventUnit

[UnitTitle("On Table Variable Changed")]
[UnitSurtitle("Table State")]
[UnitCategory("Events\\Visual Pinball")]
[UnitCategory("Events\\Pinball")]
public class TableVariableChangedEventUnit : VariableChangedEventUnit
{
[Serialize, Inspectable, UnitHeaderInspectable]
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Nodes/Switches/AllSwitchesEnabledEventUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace VisualPinball.Unity.VisualScripting
{
[UnitTitle("On All Switches Enabled")]
[UnitSurtitle("Gamelogic Engine")]
[UnitCategory("Events\\Visual Pinball")]
[UnitCategory("Events\\Pinball")]
public class AllSwitchesEnabledEventUnit : GleEventUnit<SwitchEventArgs2>, IMultiInputUnit
{
[SerializeAs(nameof(inputCount))]
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Nodes/Switches/GetSwitchUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace VisualPinball.Unity.VisualScripting
{
[UnitTitle("Get Switch Value")]
[UnitSurtitle("Gamelogic Engine")]
[UnitCategory("Visual Pinball")]
[UnitCategory("Pinball")]
public class GetSwitchUnit : GleUnit
{
[DoNotSerialize]
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Nodes/Switches/PulseSwitchUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace VisualPinball.Unity.VisualScripting
{
[UnitTitle("Pulse Switch")]
[UnitSurtitle("Gamelogic Engine")]
[UnitCategory("Visual Pinball")]
[UnitCategory("Pinball")]
public class PulseSwitchUnit : GleUnit, IMultiInputUnit
{
[DoNotSerialize]
Expand Down
Loading