Merge remote-tracking branch 'upstream/master' into develop

This commit is contained in:
EvilFactory
2024-12-11 10:44:53 -03:00
257 changed files with 4793 additions and 1653 deletions
@@ -231,17 +231,22 @@ namespace Barotrauma.Items.Components
{
var should = GameMain.LuaCs.Hook.Call<bool?>("wifiSignalTransmitted", this, signal, sentFromChat);
if (should != null && should.Value)
return;
if (sentFromChat)
{
item.LastSentSignalRecipients.Clear();
}
if (should != null && should.Value) { return; }
bool chatMsgSent = false;
var receivers = GetReceiversInRange();
if (sentFromChat)
{
//if sent from chat, we need to reset the "signal chain" at this point
//so we can correctly detect which components the signal has already passed through to avoid infinite loops
//only relevant for signals originating from the chat - normally this is handled in Item.SendSignal
item.LastSentSignalRecipients.Clear();
foreach (WifiComponent receiver in receivers)
{
receiver.item.LastSentSignalRecipients.Clear();
}
}
foreach (WifiComponent wifiComp in receivers)
{
if (sentFromChat && !wifiComp.LinkToChat) { continue; }