Fixed a brainfart in property saving (i.e. saveable but non-editable properties not being saved)

This commit is contained in:
Regalis
2017-02-05 18:42:17 +02:00
parent b375422c4e
commit 7f661ce362

View File

@@ -259,11 +259,11 @@ namespace Barotrauma
{
//only save
// - if the attribute is saveable and it's different from the default value
// - or can be changed in the editor
// - or can be changed in-game or in the editor
bool save = false;
foreach (var attribute in property.Attributes.OfType<HasDefaultValue>())
{
if ((!attribute.isSaveable && !attribute.defaultValue.Equals(value)) ||
if ((attribute.isSaveable && !attribute.defaultValue.Equals(value)) ||
property.Attributes.OfType<Editable>().Any())
{
save = true;