Unstable 1.1.14.0

This commit is contained in:
Markus Isberg
2023-10-02 16:43:54 +03:00
parent 94f5a93a0c
commit cf8f0de659
606 changed files with 21906 additions and 11456 deletions
@@ -282,12 +282,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; }
@@ -295,7 +295,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;