Make more fields VV-writeable (#21754)
This commit is contained in:
@@ -43,7 +43,7 @@ namespace Content.Server.Atmos.Components
|
||||
/// <summary>
|
||||
/// Whether the entity is immuned to pressure (i.e possess the PressureImmunity component)
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool HasImmunity = false;
|
||||
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Content.Server.Forensics
|
||||
[RegisterComponent]
|
||||
public sealed partial class FingerprintComponent : Component
|
||||
{
|
||||
[DataField("fingerprint")]
|
||||
[DataField("fingerprint"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public string? Fingerprint;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ public sealed partial class GatewayComponent : Component
|
||||
/// <summary>
|
||||
/// Can the gateway be interacted with? If false then only settable via admins / mappers.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool Interactable = true;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -11,14 +11,14 @@ namespace Content.Shared.Access.Components
|
||||
[Access(typeof(SharedIdCardSystem), typeof(SharedPdaSystem), typeof(SharedAgentIdCardSystem), Other = AccessPermissions.ReadWrite)]
|
||||
public sealed partial class IdCardComponent : Component
|
||||
{
|
||||
[DataField("fullName")]
|
||||
[DataField("fullName"), ViewVariables(VVAccess.ReadWrite)]
|
||||
[AutoNetworkedField]
|
||||
// FIXME Friends
|
||||
public string? FullName;
|
||||
|
||||
[DataField("jobTitle")]
|
||||
[AutoNetworkedField]
|
||||
[Access(typeof(SharedIdCardSystem), typeof(SharedPdaSystem), typeof(SharedAgentIdCardSystem), Other = AccessPermissions.ReadWrite)]
|
||||
[Access(typeof(SharedIdCardSystem), typeof(SharedPdaSystem), typeof(SharedAgentIdCardSystem), Other = AccessPermissions.ReadWrite), ViewVariables(VVAccess.ReadWrite)]
|
||||
public string? JobTitle;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -44,10 +44,10 @@ public sealed partial class GhostComponent : Component
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField]
|
||||
public TimeSpan TimeOfDeath = TimeSpan.Zero;
|
||||
|
||||
[DataField("booRadius")]
|
||||
[DataField("booRadius"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public float BooRadius = 3;
|
||||
|
||||
[DataField("booMaxTargets")]
|
||||
[DataField("booMaxTargets"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public int BooMaxTargets = 3;
|
||||
|
||||
// TODO: instead of this funny stuff just give it access and update in system dirtying when needed
|
||||
|
||||
@@ -22,7 +22,7 @@ public sealed partial class MechComponent : Component
|
||||
/// <summary>
|
||||
/// The maximum amount of damage the mech can take.
|
||||
/// </summary>
|
||||
[DataField, AutoNetworkedField]
|
||||
[DataField, AutoNetworkedField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public FixedPoint2 MaxIntegrity = 250;
|
||||
|
||||
/// <summary>
|
||||
@@ -36,7 +36,7 @@ public sealed partial class MechComponent : Component
|
||||
/// The maximum amount of energy the mech can have.
|
||||
/// Derived from the currently inserted battery.
|
||||
/// </summary>
|
||||
[DataField, AutoNetworkedField]
|
||||
[DataField, AutoNetworkedField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public FixedPoint2 MaxEnergy = 0;
|
||||
|
||||
/// <summary>
|
||||
@@ -52,7 +52,7 @@ public sealed partial class MechComponent : Component
|
||||
/// A multiplier used to calculate how much of the damage done to a mech
|
||||
/// is transfered to the pilot
|
||||
/// </summary>
|
||||
[DataField]
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public float MechToPilotDamageMultiplier;
|
||||
|
||||
/// <summary>
|
||||
@@ -80,7 +80,7 @@ public sealed partial class MechComponent : Component
|
||||
/// <summary>
|
||||
/// The maximum amount of equipment items that can be installed in the mech
|
||||
/// </summary>
|
||||
[DataField("maxEquipmentAmount")]
|
||||
[DataField("maxEquipmentAmount"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public int MaxEquipmentAmount = 3;
|
||||
|
||||
/// <summary>
|
||||
@@ -104,20 +104,20 @@ public sealed partial class MechComponent : Component
|
||||
/// <summary>
|
||||
/// How long it takes to enter the mech.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public float EntryDelay = 3;
|
||||
|
||||
/// <summary>
|
||||
/// How long it takes to pull *another person*
|
||||
/// outside of the mech. You can exit instantly yourself.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public float ExitDelay = 3;
|
||||
|
||||
/// <summary>
|
||||
/// How long it takes to pull out the battery.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public float BatteryRemovalDelay = 2;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -13,16 +13,16 @@ namespace Content.Shared.Nutrition.Components
|
||||
/// <summary>
|
||||
/// Solution inhale amount per second.
|
||||
/// </summary>
|
||||
[DataField("inhaleAmount")]
|
||||
[DataField("inhaleAmount"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public FixedPoint2 InhaleAmount { get; private set; } = FixedPoint2.New(0.05f);
|
||||
|
||||
[DataField("state")]
|
||||
public SmokableState State { get; set; } = SmokableState.Unlit;
|
||||
|
||||
[DataField("exposeTemperature")]
|
||||
[DataField("exposeTemperature"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public float ExposeTemperature { get; set; } = 0;
|
||||
|
||||
[DataField("exposeVolume")]
|
||||
[DataField("exposeVolume"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public float ExposeVolume { get; set; } = 1f;
|
||||
|
||||
// clothing prefixes
|
||||
|
||||
@@ -19,10 +19,10 @@ public sealed partial class ThirstComponent : Component
|
||||
[AutoNetworkedField]
|
||||
public float ActualDecayRate;
|
||||
|
||||
[DataField, AutoNetworkedField]
|
||||
[DataField, AutoNetworkedField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public ThirstThreshold CurrentThirstThreshold;
|
||||
|
||||
[DataField, AutoNetworkedField]
|
||||
[DataField, AutoNetworkedField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public ThirstThreshold LastThirstThreshold;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Content.Shared.PDA
|
||||
[ViewVariables] public EntityUid? ContainedId;
|
||||
[ViewVariables] public bool FlashlightOn;
|
||||
|
||||
[ViewVariables] public string? OwnerName;
|
||||
[ViewVariables(VVAccess.ReadWrite)] public string? OwnerName;
|
||||
[ViewVariables] public string? StationName;
|
||||
[ViewVariables] public string? StationAlertLevel;
|
||||
[ViewVariables] public Color StationAlertColor = Color.White;
|
||||
|
||||
@@ -21,7 +21,7 @@ public sealed partial class LinkedEntityComponent : Component
|
||||
/// <summary>
|
||||
/// Should this entity be deleted if all of its links are removed?
|
||||
/// </summary>
|
||||
[DataField]
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool DeleteOnEmptyLinks;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ public sealed partial class PortalComponent : Component
|
||||
/// <summary>
|
||||
/// If no portals are linked, the subject will be teleported a random distance at maximum this far away.
|
||||
/// </summary>
|
||||
[DataField("maxRandomRadius")]
|
||||
[DataField("maxRandomRadius"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public float MaxRandomRadius = 7.0f;
|
||||
|
||||
/// <summary>
|
||||
@@ -45,12 +45,12 @@ public sealed partial class PortalComponent : Component
|
||||
/// <remarks>
|
||||
/// Obviously this should strictly be larger than <see cref="MaxRandomRadius"/> (or null)
|
||||
/// </remarks>
|
||||
[DataField("maxTeleportRadius")]
|
||||
[DataField("maxTeleportRadius"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public float? MaxTeleportRadius;
|
||||
|
||||
/// <summary>
|
||||
/// Should we teleport randomly if nothing is linked.
|
||||
/// </summary>
|
||||
[DataField, AutoNetworkedField]
|
||||
[DataField, AutoNetworkedField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool RandomTeleport = true;
|
||||
}
|
||||
|
||||
@@ -5,14 +5,14 @@ public abstract partial class BatteryAmmoProviderComponent : AmmoProviderCompone
|
||||
/// <summary>
|
||||
/// How much battery it costs to fire once.
|
||||
/// </summary>
|
||||
[DataField("fireCost")]
|
||||
[DataField("fireCost"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public float FireCost = 100;
|
||||
|
||||
// Batteries aren't predicted which means we need to track the battery and manually count it ourselves woo!
|
||||
|
||||
[ViewVariables]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public int Shots;
|
||||
|
||||
[ViewVariables]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public int Capacity;
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ public partial class GunComponent : Component
|
||||
/// Whether or not someone with the
|
||||
/// clumsy trait can shoot this
|
||||
/// </summary>
|
||||
[DataField("clumsyProof")]
|
||||
[DataField("clumsyProof"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool ClumsyProof = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user