Merge branch 'master' of https://github.com/Regalis11/Barotrauma into develop

This commit is contained in:
EvilFactory
2023-10-19 12:18:30 -03:00
613 changed files with 22122 additions and 11481 deletions
@@ -277,12 +277,12 @@ namespace Barotrauma.Networking
return length;
}
public static bool CanUseRadio(Character sender)
public static bool CanUseRadio(Character sender, bool ignoreJamming = false)
{
return CanUseRadio(sender, out _);
return CanUseRadio(sender, out _, ignoreJamming);
}
public static bool CanUseRadio(Character sender, out WifiComponent radio)
public static bool CanUseRadio(Character sender, out WifiComponent radio, bool ignoreJamming = false)
{
radio = null;
if (sender?.Inventory == null || sender.Removed) { return false; }
@@ -290,7 +290,7 @@ namespace Barotrauma.Networking
foreach (Item item in sender.Inventory.AllItems)
{
var wifiComponent = item.GetComponent<WifiComponent>();
if (wifiComponent == null || !wifiComponent.LinkToChat || !wifiComponent.CanTransmit() || !sender.HasEquippedItem(item)) { continue; }
if (wifiComponent == null || !wifiComponent.LinkToChat || !wifiComponent.CanTransmit(ignoreJamming) || !sender.HasEquippedItem(item)) { continue; }
if (radio == null || wifiComponent.Range > radio.Range)
{
radio = wifiComponent;