Release v0.15.12.0

This commit is contained in:
Joonas Rikkonen
2021-10-27 18:50:57 +03:00
parent bf95e82d80
commit 234fb6bc06
450 changed files with 26042 additions and 10457 deletions
@@ -0,0 +1,20 @@
using Barotrauma.Networking;
namespace Barotrauma.Items.Components
{
partial class GeneticMaterial : ItemComponent
{
public void ServerWrite(IWriteMessage msg, Client c, object[] extraData = null)
{
msg.Write(tainted);
if (tainted)
{
msg.Write(selectedTaintedEffect?.UIntIdentifier ?? 0);
}
else
{
msg.Write(selectedEffect?.UIntIdentifier ?? 0);
}
}
}
}
@@ -16,6 +16,12 @@ namespace Barotrauma.Items.Components
set { unsentChanges = value; }
}
protected override void RemoveComponentSpecific()
{
base.RemoveComponentSpecific();
pathFinder = null;
}
public void ServerRead(ClientNetObject type, IReadMessage msg, Barotrauma.Networking.Client c)
{
@@ -38,6 +38,8 @@ namespace Barotrauma.Items.Components
msg.Write(deteriorationTimer);
msg.Write(deteriorateAlwaysResetTimer);
msg.Write(DeteriorateAlways);
msg.Write(tinkeringDuration);
msg.Write(tinkeringStrength);
msg.Write(CurrentFixer == null ? (ushort)0 : CurrentFixer.ID);
msg.WriteRangedInteger((int)currentFixerAction, 0, 2);
}
@@ -0,0 +1,14 @@
using Barotrauma.Networking;
namespace Barotrauma.Items.Components
{
partial class Scanner : ItemComponent, IServerSerializable
{
private float LastSentScanTimer { get; set; }
public void ServerWrite(IWriteMessage msg, Client c, object[] extraData = null)
{
msg.Write(scanTimer);
}
}
}
@@ -0,0 +1,21 @@
using Barotrauma.Networking;
namespace Barotrauma.Items.Components
{
partial class ButtonTerminal : ItemComponent, IClientSerializable, IServerSerializable
{
public void ServerRead(ClientNetObject type, IReadMessage msg, Client c)
{
int signalIndex = msg.ReadRangedInteger(0, Signals.Length - 1);
if (!item.CanClientAccess(c)) { return; }
if (!SendSignal(signalIndex)) { return; }
GameServer.Log($"{GameServer.CharacterLogName(c.Character)} sent a signal \"{Signals[signalIndex]}\" from {item.Name}", ServerLog.MessageType.ItemInteraction);
item.CreateServerEvent(this, new object[] { signalIndex });
}
public void ServerWrite(IWriteMessage msg, Client c, object[] extraData = null)
{
Write(msg, extraData);
}
}
}
@@ -76,7 +76,7 @@ namespace Barotrauma.Items.Components
var panel2 = selectedWire.Connections[1]?.ConnectionPanel;
if (panel2 != null && panel2 != this) { panel2.item.CreateServerEvent(panel2); }
CoroutineManager.InvokeAfter(() =>
CoroutineManager.Invoke(() =>
{
item.CreateServerEvent(this);
if (panel1 != null && panel1 != this) { panel1.item.CreateServerEvent(panel1); }
@@ -19,13 +19,13 @@ namespace Barotrauma.Items.Components
GameServer.Log(GameServer.CharacterLogName(c.Character) + " entered \"" + newOutputValue + "\" on " + item.Name,
ServerLog.MessageType.ItemInteraction);
OutputValue = newOutputValue;
ShowOnDisplay(newOutputValue);
ShowOnDisplay(newOutputValue, addToHistory: true);
item.SendSignal(newOutputValue, "signal_out");
item.CreateServerEvent(this);
}
}
partial void ShowOnDisplay(string input, bool addToHistory = true)
partial void ShowOnDisplay(string input, bool addToHistory)
{
if (addToHistory)
{