Remove redundant read-only VV from datafields (#12626)
This commit is contained in:
@@ -2,7 +2,6 @@ using Robust.Shared.Audio;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Shared.Weapons.Ranged.Components;
|
||||
|
||||
@@ -45,9 +44,9 @@ public sealed class CartridgeAmmoComponent : AmmoComponent
|
||||
/// <summary>
|
||||
/// Caseless ammunition.
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("deleteOnSpawn")]
|
||||
[DataField("deleteOnSpawn")]
|
||||
public bool DeleteOnSpawn;
|
||||
|
||||
[ViewVariables, DataField("soundEject")]
|
||||
[DataField("soundEject")]
|
||||
public SoundSpecifier? EjectSound = new SoundCollectionSpecifier("CasingEject");
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ public sealed class BallisticAmmoProviderComponent : Component
|
||||
public Container Container = default!;
|
||||
|
||||
// TODO: Make this use stacks when the typeserializer is done.
|
||||
[ViewVariables, DataField("entities")]
|
||||
[DataField("entities")]
|
||||
public List<EntityUid> Entities = new();
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -5,7 +5,7 @@ public abstract class BatteryAmmoProviderComponent : AmmoProviderComponent
|
||||
/// <summary>
|
||||
/// How much battery it costs to fire once.
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("fireCost")]
|
||||
[DataField("fireCost")]
|
||||
public float FireCost = 100;
|
||||
|
||||
// Batteries aren't predicted which means we need to track the battery and manually count it ourselves woo!
|
||||
|
||||
@@ -21,5 +21,5 @@ public sealed class FlyBySoundComponent : Component
|
||||
Params = AudioParams.Default,
|
||||
};
|
||||
|
||||
[ViewVariables, DataField("range")] public float Range = 1.5f;
|
||||
[DataField("range")] public float Range = 1.5f;
|
||||
}
|
||||
|
||||
@@ -32,13 +32,13 @@ public class GunComponent : Component
|
||||
/// Last time the gun fired.
|
||||
/// Used for recoil purposes.
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("lastFire")]
|
||||
[DataField("lastFire")]
|
||||
public TimeSpan LastFire = TimeSpan.Zero;
|
||||
|
||||
/// <summary>
|
||||
/// What the current spread is for shooting. This gets changed every time the gun fires.
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("currentAngle")]
|
||||
[DataField("currentAngle")]
|
||||
public Angle CurrentAngle;
|
||||
|
||||
/// <summary>
|
||||
@@ -50,7 +50,7 @@ public class GunComponent : Component
|
||||
/// <summary>
|
||||
/// How much the <see cref="CurrentAngle"/> decreases per second.
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("angleDecay")]
|
||||
[DataField("angleDecay")]
|
||||
public Angle AngleDecay = Angle.FromDegrees(4);
|
||||
|
||||
/// <summary>
|
||||
@@ -95,7 +95,7 @@ public class GunComponent : Component
|
||||
/// When the gun is next available to be shot.
|
||||
/// Can be set multiple times in a single tick due to guns firing faster than a single tick time.
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("nextFire")]
|
||||
[DataField("nextFire")]
|
||||
public TimeSpan NextFire = TimeSpan.Zero;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -16,15 +16,15 @@ public sealed class RevolverAmmoProviderComponent : AmmoProviderComponent
|
||||
* for example 7 entities when revolver spawns (1 for the revolver and 6 cylinders) we can instead defer it.
|
||||
*/
|
||||
|
||||
[ViewVariables, DataField("whitelist")]
|
||||
[DataField("whitelist")]
|
||||
public EntityWhitelist? Whitelist;
|
||||
|
||||
public Container AmmoContainer = default!;
|
||||
|
||||
[ViewVariables, DataField("currentSlot")]
|
||||
[DataField("currentSlot")]
|
||||
public int CurrentIndex;
|
||||
|
||||
[ViewVariables, DataField("capacity")]
|
||||
[DataField("capacity")]
|
||||
public int Capacity = 6;
|
||||
|
||||
// Like BallisticAmmoProvider we defer spawning until necessary
|
||||
@@ -40,12 +40,12 @@ public sealed class RevolverAmmoProviderComponent : AmmoProviderComponent
|
||||
[DataField("proto", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string? FillPrototype = "CartridgeMagnum";
|
||||
|
||||
[ViewVariables, DataField("soundEject")]
|
||||
[DataField("soundEject")]
|
||||
public SoundSpecifier? SoundEject = new SoundPathSpecifier("/Audio/Weapons/Guns/MagOut/revolver_magout.ogg");
|
||||
|
||||
[ViewVariables, DataField("soundInsert")]
|
||||
[DataField("soundInsert")]
|
||||
public SoundSpecifier? SoundInsert = new SoundPathSpecifier("/Audio/Weapons/Guns/MagIn/revolver_magin.ogg");
|
||||
|
||||
[ViewVariables, DataField("soundSpin")]
|
||||
[DataField("soundSpin")]
|
||||
public SoundSpecifier? SoundSpin = new SoundPathSpecifier("/Audio/Weapons/Guns/Misc/revolver_spin.ogg");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user