Fixed modified clients being able to disconnect locked wires

This commit is contained in:
Joonas Rikkonen
2017-12-07 20:20:05 +02:00
parent 7026da2748
commit db7d5539e0
2 changed files with 11 additions and 0 deletions
@@ -1059,6 +1059,9 @@ namespace Barotrauma
Wire wire = item.GetComponent<Wire>();
if (wire != null)
{
//locked wires are never interactable
if (wire.Locked) return false;
//wires are interactable if the character has selected either of the items the wire is connected to
if (wire.Connections[0]?.Item != null && selectedConstruction == wire.Connections[0].Item) return true;
if (wire.Connections[1]?.Item != null && selectedConstruction == wire.Connections[1].Item) return true;