Skip to content

Commit 558b201

Browse files
committed
Fix WireTriggerOutput not exiting early if oldValue == new
1 parent d9be76f commit 558b201

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

.sbproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"Title": "Wirebox",
33
"Type": "addon",
44
"Org": "wiremod",
5-
"Ident": "wirebox",
5+
"Ident": "wireboxaddon",
66
"Tags": "sandbox wirebox",
77
"Schema": 1,
88
"HasAssets": true,

wirelib/code/IWireOutputEntity.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,9 @@ public interface IWireOutputEntity : IWireEntity
6262
public void WireTriggerOutput<T>( string outputName, T value )
6363
{
6464
var output = GetOutput( outputName );
65-
var type = output.type;
6665

6766
// return early if new value is the same as current value, so nothing should trigger
68-
if (output.value == (object) value)
67+
if ( output.value.Equals( value ) )
6968
return;
7069

7170
output.value = value;

0 commit comments

Comments
 (0)