Implement some field-level deltas (#28242)
* Update GasTileOverlayState * Update DecalGridState * Update NavMapState * poke * poke2 * poke3 * Implement field deltas for guns * Content done * Update --------- Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
This commit is contained in:
@@ -5,38 +5,38 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy
|
||||
|
||||
namespace Content.Shared.Weapons.Ranged.Components;
|
||||
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(SharedGunSystem))]
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(fieldDeltas: true), Access(typeof(SharedGunSystem))]
|
||||
public sealed partial class SolutionAmmoProviderComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The solution where reagents are extracted from for the projectile.
|
||||
/// </summary>
|
||||
[DataField("solutionId", required: true), AutoNetworkedField]
|
||||
[DataField(required: true), AutoNetworkedField]
|
||||
public string SolutionId = default!;
|
||||
|
||||
/// <summary>
|
||||
/// How much reagent it costs to fire once.
|
||||
/// </summary>
|
||||
[DataField("fireCost"), ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
[DataField, AutoNetworkedField]
|
||||
public float FireCost = 5;
|
||||
|
||||
/// <summary>
|
||||
/// The amount of shots currently available.
|
||||
/// used for network predictions.
|
||||
/// </summary>
|
||||
[DataField("shots"), ViewVariables, AutoNetworkedField]
|
||||
[DataField, AutoNetworkedField]
|
||||
public int Shots;
|
||||
|
||||
/// <summary>
|
||||
/// The max amount of shots the gun can fire.
|
||||
/// used for network prediction
|
||||
/// </summary>
|
||||
[DataField("maxShots"), ViewVariables, AutoNetworkedField]
|
||||
[DataField, AutoNetworkedField]
|
||||
public int MaxShots;
|
||||
|
||||
/// <summary>
|
||||
/// The prototype that's fired by the gun.
|
||||
/// </summary>
|
||||
[DataField("proto", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>)), ViewVariables(VVAccess.ReadWrite)]
|
||||
public string Prototype = default!;
|
||||
[DataField("proto")]
|
||||
public EntProtoId Prototype;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user