Unstable 0.1400.0.0

This commit is contained in:
Markus Isberg
2021-05-11 15:47:47 +03:00
parent 3f324b14e8
commit 92f0264af2
247 changed files with 8238 additions and 1911 deletions

View File

@@ -272,7 +272,9 @@ namespace Barotrauma
}
public SerializableEntityEditor(RectTransform parent, ISerializableEntity entity, bool inGame, bool showName, string style = "", int elementHeight = 24, ScalableFont titleFont = null)
: this(parent, entity, inGame ? SerializableProperty.GetProperties<InGameEditable>(entity) : SerializableProperty.GetProperties<Editable>(entity), showName, style, elementHeight, titleFont)
: this(parent, entity, inGame ?
SerializableProperty.GetProperties<InGameEditable>(entity).Union(SerializableProperty.GetProperties<ConditionallyEditable>(entity).Where(p => p.GetAttribute<ConditionallyEditable>()?.IsEditable() ?? false))
: SerializableProperty.GetProperties<Editable>(entity), showName, style, elementHeight, titleFont)
{
}
@@ -447,6 +449,13 @@ namespace Barotrauma
{
TrySendNetworkUpdate(entity, property);
}
// Ensure that the values stay in sync (could be that we force the value in the property accessor).
bool propertyValue = (bool)property.GetValue(entity);
if (tickBox.Selected != propertyValue)
{
tickBox.Selected = propertyValue;
tickBox.Flash(Color.Red);
}
return true;
}
};