Unstable 0.17.0.0

This commit is contained in:
Markus Isberg
2022-02-26 02:43:01 +09:00
parent a83f375681
commit 3974067915
913 changed files with 32472 additions and 32364 deletions
@@ -9,11 +9,11 @@ namespace Barotrauma.SpriteDeformations
class CustomDeformationParams : SpriteDeformationParams
{
[Editable(MinValueFloat = 0.0f, MaxValueFloat = 10.0f),
Serialize(0.0f, true, description: "How fast the deformation \"oscillates\" back and forth. " +
Serialize(0.0f, IsPropertySaveable.Yes, description: "How fast the deformation \"oscillates\" back and forth. " +
"For example, if the sprite is stretched up, setting this value above zero would make it do a wave-like movement up and down.")]
public override float Frequency { get; set; } = 1;
[Serialize(1.0f, true, description: "The \"strength\" of the deformation."), Editable(MinValueFloat = 0.0f, MaxValueFloat = 10.0f)]
[Serialize(1.0f, IsPropertySaveable.Yes, description: "The \"strength\" of the deformation."), Editable(MinValueFloat = 0.0f, MaxValueFloat = 10.0f)]
public float Amplitude { get; set; }
public CustomDeformationParams(XElement element) : base(element)
@@ -6,9 +6,9 @@ namespace Barotrauma.SpriteDeformations
{
class InflateParams : SpriteDeformationParams
{
[Serialize(0.0f, true), Editable(MinValueFloat = 0.0f, MaxValueFloat = 100.0f, DecimalCount = 2, ValueStep = 1)]
[Serialize(0.0f, IsPropertySaveable.Yes), Editable(MinValueFloat = 0.0f, MaxValueFloat = 100.0f, DecimalCount = 2, ValueStep = 1)]
public override float Frequency { get; set; } = 1;
[Serialize(1.0f, true), Editable(MinValueFloat = 0.01f, MaxValueFloat = 10.0f, DecimalCount = 2, ValueStep = 0.1f)]
[Serialize(1.0f, IsPropertySaveable.Yes), Editable(MinValueFloat = 0.01f, MaxValueFloat = 10.0f, DecimalCount = 2, ValueStep = 0.1f)]
public float Scale { get; set; }
public InflateParams(XElement element) : base(element)
@@ -5,13 +5,13 @@ namespace Barotrauma.SpriteDeformations
{
class NoiseDeformationParams : SpriteDeformationParams
{
[Serialize(0.0f, true, description: "The frequency of the noise."), Editable(MinValueFloat = 0.0f, MaxValueFloat = 100.0f, DecimalCount = 2, ValueStep = 1f)]
[Serialize(0.0f, IsPropertySaveable.Yes, description: "The frequency of the noise."), Editable(MinValueFloat = 0.0f, MaxValueFloat = 100.0f, DecimalCount = 2, ValueStep = 1f)]
public override float Frequency { get; set; }
[Serialize(1.0f, true, description: "How much the noise distorts the sprite."), Editable(MinValueFloat = 0.0f, MaxValueFloat = 10.0f, DecimalCount = 2, ValueStep = 0.01f)]
[Serialize(1.0f, IsPropertySaveable.Yes, description: "How much the noise distorts the sprite."), Editable(MinValueFloat = 0.0f, MaxValueFloat = 10.0f, DecimalCount = 2, ValueStep = 0.01f)]
public float Amplitude { get; set; }
[Serialize(0.0f, true, description: "How fast the noise changes."), Editable(MinValueFloat = 0.0f, MaxValueFloat = 10.0f, DecimalCount = 2, ValueStep = 0.01f)]
[Serialize(0.0f, IsPropertySaveable.Yes, description: "How fast the noise changes."), Editable(MinValueFloat = 0.0f, MaxValueFloat = 10.0f, DecimalCount = 2, ValueStep = 0.01f)]
public float ChangeSpeed { get; set; }
public NoiseDeformationParams(XElement element) : base(element)
@@ -10,26 +10,26 @@ namespace Barotrauma.SpriteDeformations
/// 0 = no falloff, the entire sprite is stretched
/// 1 = stretching the center of the sprite has no effect at the edges
/// </summary>
[Serialize(0.0f, true, description: "0 = no falloff, the entire sprite is stretched, 1 = stretching the center of the sprite has no effect at the edges."), Editable(MinValueFloat = 0.0f, MaxValueFloat = 1.0f)]
[Serialize(0.0f, IsPropertySaveable.Yes, description: "0 = no falloff, the entire sprite is stretched, 1 = stretching the center of the sprite has no effect at the edges."), Editable(MinValueFloat = 0.0f, MaxValueFloat = 1.0f)]
public float Falloff { get; set; }
/// <summary>
/// Maximum stretch per vertex (1 = the size of the sprite)
/// </summary>
[Serialize(1.0f, true, description: "Maximum stretch per vertex (1 = the size of the sprite)"), Editable(MinValueFloat = 0.0f, MaxValueFloat = 10.0f)]
[Serialize(1.0f, IsPropertySaveable.Yes, description: "Maximum stretch per vertex (1 = the size of the sprite)"), Editable(MinValueFloat = 0.0f, MaxValueFloat = 10.0f)]
public float MaxDeformation { get; set; }
/// <summary>
/// How fast the sprite reacts to being stretched
/// </summary>
[Serialize(10.0f, true, description: "How fast the sprite reacts to being stretched"), Editable(MinValueFloat = 0.0f, MaxValueFloat = 10.0f)]
[Serialize(10.0f, IsPropertySaveable.Yes, description: "How fast the sprite reacts to being stretched"), Editable(MinValueFloat = 0.0f, MaxValueFloat = 10.0f)]
public float ReactionSpeed { get; set; }
/// <summary>
/// How fast the sprite returns back to normal after stretching ends
/// </summary>
[Serialize(0.05f, true, description: "How fast the sprite returns back to normal after stretching ends"), Editable(MinValueFloat = 0.0f, MaxValueFloat = 10.0f)]
[Serialize(0.05f, IsPropertySaveable.Yes, description: "How fast the sprite returns back to normal after stretching ends"), Editable(MinValueFloat = 0.0f, MaxValueFloat = 10.0f)]
public float RecoverSpeed { get; set; }
public PositionalDeformationParams(XElement element) : base(element)
@@ -14,21 +14,21 @@ namespace Barotrauma.SpriteDeformations
/// A positive value means that this deformation is or could be used for multiple sprites.
/// This behaviour is not automatic, and has to be implemented for any particular case separately (currently only used in Limbs).
/// </summary>
[Serialize(-1, true), Editable(minValue: -1, maxValue: 100)]
[Serialize(-1, IsPropertySaveable.Yes), Editable(minValue: -1, maxValue: 100)]
public int Sync
{
get;
private set;
}
[Serialize("", true)]
[Serialize("", IsPropertySaveable.Yes)]
public string TypeName
{
get;
set;
}
[Serialize(SpriteDeformation.DeformationBlendMode.Add, true), Editable]
[Serialize(SpriteDeformation.DeformationBlendMode.Add, IsPropertySaveable.Yes), Editable]
public SpriteDeformation.DeformationBlendMode BlendMode
{
get;
@@ -37,30 +37,30 @@ namespace Barotrauma.SpriteDeformations
public string Name => $"Deformation ({TypeName})";
[Serialize(1.0f, true), Editable(MinValueFloat = 0, MaxValueFloat = 10, DecimalCount = 2, ValueStep = 0.01f)]
[Serialize(1.0f, IsPropertySaveable.Yes), Editable(MinValueFloat = 0, MaxValueFloat = 10, DecimalCount = 2, ValueStep = 0.01f)]
public float Strength { get; private set; }
[Serialize(90f, true), Editable(MinValueFloat = 0, MaxValueFloat = 90)]
[Serialize(90f, IsPropertySaveable.Yes), Editable(MinValueFloat = 0, MaxValueFloat = 90)]
public float MaxRotation { get; private set; }
[Serialize(false, true), Editable]
[Serialize(false, IsPropertySaveable.Yes), Editable]
public bool UseMovementSine { get; set; }
[Serialize(false, true), Editable]
[Serialize(false, IsPropertySaveable.Yes), Editable]
public bool StopWhenHostIsDead { get; set; }
[Serialize(false, true), Editable]
[Serialize(false, IsPropertySaveable.Yes), Editable]
public bool OnlyInWater { get; set; }
/// <summary>
/// Only used if UseMovementSine is enabled. Multiplier for Pi.
/// </summary>
[Serialize(0f, true), Editable]
[Serialize(0f, IsPropertySaveable.Yes), Editable]
public float SineOffset { get; set; }
public virtual float Frequency { get; set; } = 1;
public Dictionary<string, SerializableProperty> SerializableProperties
public Dictionary<Identifier, SerializableProperty> SerializableProperties
{
get;
set;
@@ -72,7 +72,7 @@ namespace Barotrauma.SpriteDeformations
public static readonly Point ShaderMaxResolution = new Point(15, 15);
private Point _resolution;
[Serialize("2,2", true)]
[Serialize("2,2", IsPropertySaveable.Yes)]
public Point Resolution
{
get { return _resolution; }