v1.5.7.0 (Summer Update)
This commit is contained in:
+17
-6
@@ -9,9 +9,6 @@ using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Xml.Linq;
|
||||
using Barotrauma.Networking;
|
||||
|
||||
//TODO: come back to this later, clever use of reflection would make this nicer >:)
|
||||
|
||||
namespace Barotrauma
|
||||
{
|
||||
@@ -45,14 +42,25 @@ namespace Barotrauma
|
||||
/// Setting the value to a non-empty string will let the user select the text from one whose tag starts with the given string (e.g. RoomName. would show all texts with a RoomName.* tag)</param>
|
||||
public Serialize(object defaultValue, IsPropertySaveable isSaveable, string description = "", string translationTextTag = "", bool alwaysUseInstanceValues = false)
|
||||
{
|
||||
this.DefaultValue = defaultValue;
|
||||
this.IsSaveable = isSaveable;
|
||||
this.TranslationTextTag = translationTextTag.ToIdentifier();
|
||||
DefaultValue = defaultValue;
|
||||
IsSaveable = isSaveable;
|
||||
TranslationTextTag = translationTextTag.ToIdentifier();
|
||||
Description = description;
|
||||
AlwaysUseInstanceValues = alwaysUseInstanceValues;
|
||||
}
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Property)]
|
||||
public sealed class Header : Attribute
|
||||
{
|
||||
public readonly LocalizedString Text;
|
||||
|
||||
public Header(string text = "", string localizedTextTag = null)
|
||||
{
|
||||
Text = localizedTextTag != null ? TextManager.Get(localizedTextTag) : text;
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class SerializableProperty
|
||||
{
|
||||
private static readonly ImmutableDictionary<Type, string> supportedTypes = new Dictionary<Type, string>
|
||||
@@ -754,6 +762,9 @@ namespace Barotrauma
|
||||
case nameof(Character.PropulsionSpeedMultiplier):
|
||||
{ if (parentObject is Character character) { character.PropulsionSpeedMultiplier = value; return true; } }
|
||||
break;
|
||||
case nameof(Character.ObstructVisionAmount):
|
||||
{ if (parentObject is Character character) { character.ObstructVisionAmount = value; return true; } }
|
||||
break;
|
||||
case nameof(Item.Scale):
|
||||
{ if (parentObject is Item item) { item.Scale = value; return true; } }
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user