wifi wiring

This commit is contained in:
Evil Factory
2021-04-26 23:46:58 -03:00
parent b84d6a2872
commit 250163e1f5
2 changed files with 255 additions and 212 deletions
@@ -75,12 +75,28 @@ namespace Barotrauma
client.SpectatePos = pos;
}
public static void SetRadioRange(Character character, float range)
{
if(character.Inventory == null) { return; }
foreach(Item item in character.Inventory.AllItems)
{
if(item == null) { continue; }
if(item.Name == "Headset")
{
item.GetComponent<Items.Components.WifiComponent>().Range = range;
}
}
}
}
public class LuaGame
{
LuaSetup env;
public bool allowWifiChat = false;
public bool overrideTraitors = false;
public bool overrideRespawnSub = false;
@@ -119,6 +135,11 @@ namespace Barotrauma
overrideRespawnSub = o;
}
public void AllowWifiChat(bool o)
{
allowWifiChat = o;
}
public static void Log(string message, ServerLog.MessageType type)
{
GameServer.Log(message, type);