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

View File

@@ -390,7 +390,7 @@ namespace Barotrauma
}
if (toolTip.IsNullOrEmpty())
{
toolTip = TextManager.Get($"{propertyTag}.description", $"sp.{fallbackTag}.description");
toolTip = TextManager.Get($"{propertyTag}.description", $"{fallbackTag}.description", $"sp.{fallbackTag}.description");
}
if (toolTip.IsNullOrEmpty())
{
@@ -1334,9 +1334,11 @@ namespace Barotrauma
}
}
}
private static void TrySendNetworkUpdate(ISerializableEntity entity, SerializableProperty property)
{
if (IsEntityRemoved(entity)) { return; }
if (GameMain.Client != null)
{
if (entity is Item item)
@@ -1352,7 +1354,7 @@ namespace Barotrauma
private bool SetPropertyValue(SerializableProperty property, object entity, object value)
{
if (LockEditing) { return false; }
if (LockEditing || IsEntityRemoved(entity)) { return false; }
object oldData = property.GetValue(entity);
// some properties have null as the default string value
@@ -1403,6 +1405,9 @@ namespace Barotrauma
return property.TrySetValue(entity, value);
}
public static bool IsEntityRemoved(object entity)
=> entity is Entity { Removed: true } or ItemComponent { Item.Removed: true };
public static void CommitCommandBuffer()
{
if (CommandBuffer != null)