Unstable 0.16.1.0

This commit is contained in:
Markus Isberg
2022-01-27 00:30:32 +09:00
parent 7d6421a548
commit b259af5911
161 changed files with 1913 additions and 638 deletions
@@ -8,12 +8,15 @@ using System.Xml.Linq;
namespace Barotrauma.Items.Components
{
partial class WifiComponent : ItemComponent
partial class WifiComponent : ItemComponent, IServerSerializable
{
private static readonly List<WifiComponent> list = new List<WifiComponent>();
const int ChannelMemorySize = 10;
private const int MinChannel = 0;
private const int MaxChannel = 10000;
private float range;
private int channel;
@@ -49,7 +52,7 @@ namespace Barotrauma.Items.Components
get { return channel; }
set
{
channel = MathHelper.Clamp(value, 0, 10000);
channel = MathHelper.Clamp(value, MinChannel, MaxChannel);
}
}
@@ -295,7 +298,14 @@ namespace Barotrauma.Items.Components
case "set_channel":
if (int.TryParse(signal.value, out int newChannel))
{
int prevChannel = Channel;
Channel = newChannel;
if (prevChannel != Channel)
{
#if SERVER
item.CreateServerEvent(this);
#endif
}
}
break;
case "set_range":