OBT/1.2.0(Spring Update)
Sync with Upstream
This commit is contained in:
@@ -27,6 +27,11 @@ namespace Barotrauma.Items.Components
|
||||
private init => _displayName = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Display name ignoring <see cref="DisplayNameOverride"/>
|
||||
/// </summary>
|
||||
public LocalizedString DefaultDisplayName => _displayName;
|
||||
|
||||
public LocalizedString DisplayNameOverride;
|
||||
|
||||
private readonly HashSet<Wire> wires;
|
||||
@@ -350,15 +355,11 @@ namespace Barotrauma.Items.Components
|
||||
wire.RegisterSignal(signal, source: this);
|
||||
#endif
|
||||
SendSignalIntoConnection(signal, recipient);
|
||||
GameMain.LuaCs.Hook.Call("signalReceived", signal, recipient);
|
||||
GameMain.LuaCs.Hook.Call("signalReceived." + recipient.item.Prefab.Identifier, signal, recipient);
|
||||
}
|
||||
|
||||
foreach (CircuitBoxConnection connection in CircuitBoxConnections)
|
||||
{
|
||||
connection.ReceiveSignal(signal);
|
||||
GameMain.LuaCs.Hook.Call("signalReceived", signal, connection.Connection);
|
||||
GameMain.LuaCs.Hook.Call("signalReceived." + connection.Connection.Item.Prefab.Identifier, signal, connection);
|
||||
}
|
||||
enumeratingWires = false;
|
||||
foreach (var removedWire in removedWires)
|
||||
|
||||
@@ -296,6 +296,7 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
#endif
|
||||
CheckIfNeedsUpdate();
|
||||
SetLightSourceTransformProjSpecific();
|
||||
}
|
||||
|
||||
public void CheckIfNeedsUpdate()
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
using Barotrauma.Networking;
|
||||
using Barotrauma.LuaCs.Events;
|
||||
using Barotrauma.Networking;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Xml.Linq;
|
||||
using static Barotrauma.CharacterHealth;
|
||||
using static Barotrauma.MedicalClinic;
|
||||
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
@@ -228,8 +231,8 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
public void TransmitSignal(Signal signal, bool sentFromChat)
|
||||
{
|
||||
var should = GameMain.LuaCs.Hook.Call<bool?>("wifiSignalTransmitted", this, signal, sentFromChat);
|
||||
|
||||
bool? should = null;
|
||||
LuaCsSetup.Instance.EventService.PublishEvent<IEventWifiSignalTransmitted>(x => should = x.OnWifiSignalTransmitted(this, signal, sentFromChat) ?? should);
|
||||
if (should != null && should.Value) { return; }
|
||||
|
||||
bool chatMsgSent = false;
|
||||
|
||||
Reference in New Issue
Block a user