Remove field: from DataField attributes (#3932)
This commit is contained in:
@@ -26,7 +26,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Ammunition
|
||||
|
||||
public override string Name => "Ammo";
|
||||
|
||||
[field: DataField("caliber")]
|
||||
[DataField("caliber")]
|
||||
public BallisticCaliber Caliber { get; } = BallisticCaliber.Unspecified;
|
||||
|
||||
public bool Spent
|
||||
@@ -53,7 +53,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Ammunition
|
||||
/// <summary>
|
||||
/// Used for something that is deleted when the projectile is retrieved
|
||||
/// </summary>
|
||||
[field: DataField("caseless")]
|
||||
[DataField("caseless")]
|
||||
public bool Caseless { get; }
|
||||
|
||||
// Rather than managing bullet / case state seemed easier to just have 2 toggles
|
||||
@@ -62,26 +62,26 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Ammunition
|
||||
/// <summary>
|
||||
/// For shotguns where they might shoot multiple entities
|
||||
/// </summary>
|
||||
[field: DataField("projectilesFired")]
|
||||
[DataField("projectilesFired")]
|
||||
public int ProjectilesFired { get; } = 1;
|
||||
|
||||
[DataField("projectile")]
|
||||
private string? _projectileId;
|
||||
|
||||
// How far apart each entity is if multiple are shot
|
||||
[field: DataField("ammoSpread")]
|
||||
[DataField("ammoSpread")]
|
||||
public float EvenSpreadAngle { get; } = default;
|
||||
|
||||
/// <summary>
|
||||
/// How fast the shot entities travel
|
||||
/// </summary>
|
||||
[field: DataField("ammoVelocity")]
|
||||
[DataField("ammoVelocity")]
|
||||
public float Velocity { get; } = 20f;
|
||||
|
||||
[DataField("muzzleFlash")]
|
||||
private string _muzzleFlashSprite = "Objects/Weapons/Guns/Projectiles/bullet_muzzle.png";
|
||||
|
||||
[field: DataField("soundCollectionEject")]
|
||||
[DataField("soundCollectionEject")]
|
||||
public string? SoundCollectionEject { get; } = "CasingEject";
|
||||
|
||||
void ISerializationHooks.AfterDeserialization()
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
|
||||
}
|
||||
|
||||
private const int DefaultCapacity = 6;
|
||||
[field: DataField("capacity")]
|
||||
[DataField("capacity")]
|
||||
public override int Capacity { get; } = DefaultCapacity;
|
||||
|
||||
// Even a point having a chamber? I guess it makes some of the below code cleaner
|
||||
|
||||
@@ -10,7 +10,6 @@ using Content.Shared.GameObjects.Components.Damage;
|
||||
using Content.Shared.GameObjects.Components.Weapons.Ranged;
|
||||
using Content.Shared.GameObjects.EntitySystems;
|
||||
using Content.Shared.Interfaces.GameObjects.Components;
|
||||
using Robust.Shared.Asynchronous;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
@@ -51,7 +50,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
|
||||
[DataField("allSelectors")]
|
||||
private FireRateSelector _allRateSelectors;
|
||||
|
||||
[field: DataField("fireRate")]
|
||||
[DataField("fireRate")]
|
||||
public override float FireRate { get; } = 2f;
|
||||
|
||||
// _lastFire is when we actually fired (so if we hold the button then recoil doesn't build up if we're not firing)
|
||||
@@ -93,14 +92,14 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
|
||||
[DataField("ammoSpreadRatio")]
|
||||
public float SpreadRatio { get; private set; }
|
||||
|
||||
[field: DataField("canMuzzleFlash")]
|
||||
[DataField("canMuzzleFlash")]
|
||||
public bool CanMuzzleFlash { get; } = true;
|
||||
|
||||
// Sounds
|
||||
[field: DataField("soundGunshot")]
|
||||
[DataField("soundGunshot")]
|
||||
public string? SoundGunshot { get; set; }
|
||||
|
||||
[field: DataField("soundEmpty")]
|
||||
[DataField("soundEmpty")]
|
||||
public string SoundEmpty { get; } = "/Audio/Weapons/Guns/Empty/empty.ogg";
|
||||
|
||||
void ISerializationHooks.BeforeSerialization()
|
||||
|
||||
Reference in New Issue
Block a user