]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Make more fields VV-writeable (#21754)
authorLordEclipse <106132477+LordEclipse@users.noreply.github.com>
Sun, 19 Nov 2023 20:17:53 +0000 (15:17 -0500)
committerGitHub <noreply@github.com>
Sun, 19 Nov 2023 20:17:53 +0000 (12:17 -0800)
13 files changed:
Content.Server/Atmos/Components/BarotraumaComponent.cs
Content.Server/Forensics/Components/FingerprintComponent.cs
Content.Server/Gateway/Components/GatewayComponent.cs
Content.Shared/Access/Components/IdCardComponent.cs
Content.Shared/Ghost/GhostComponent.cs
Content.Shared/Mech/Components/MechComponent.cs
Content.Shared/Nutrition/Components/SmokableComponent.cs
Content.Shared/Nutrition/Components/ThirstComponent.cs
Content.Shared/PDA/PdaComponent.cs
Content.Shared/Teleportation/Components/LinkedEntityComponent.cs
Content.Shared/Teleportation/Components/PortalComponent.cs
Content.Shared/Weapons/Ranged/Components/BatteryAmmoProviderComponent.cs
Content.Shared/Weapons/Ranged/Components/GunComponent.cs

index 1e421f0a12e939ef9bbc010708e503a1345c19c8..4e29699872e706e7d296ad5ed8b42d56476c051c 100644 (file)
@@ -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;
 
     }
index 96f8042ddfc9497ee353b3db561420519ce8fad1..97d138119e20e3b62bb449016fbc5cbfac547688 100644 (file)
@@ -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;
     }
 }
index aa3e3b4cb84c818fd719c5c9c64ea4591e76164f..71d070f699094a528c8a8742c1629c2f1bc98126 100644 (file)
@@ -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>
index 31ded30ebd18877f72f572fa5a2d09fb2a3278ba..975f0e6b51e528bc8b9ec50c18caca0b2c6c8d91 100644 (file)
@@ -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>
index 15d177f069c6afa99b33fc44c90aaf531ee0d18e..f7717e8d232ca46daad43687cbf82cf6687d3e9b 100644 (file)
@@ -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
index 9bf25f4164443894806d0216d5f27b031b659afd..ba380492bc93dbe5b6508ea08b63d4ae56657540 100644 (file)
@@ -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>
index 320b3dd31f8107c84c4f51ca066a26be87e3edf4..e5cbd27242c40f7bdb15190e9fb591563c9b191f 100644 (file)
@@ -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
index 1e3f1398079da658d3b761486577710426999466..35eb4d261492df0507464cd18af8dff88f6e25fa 100644 (file)
@@ -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)]
index 46c85ee39e8ae1db300e95c359e215543d39753a..d81fa1532fa7d4b348a88e56d16761e9146b16a8 100644 (file)
@@ -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;
index 104136fb7bd4f2339ca195b96ad9bcb431aaf869..b1df6f4ee7e63f08967c407fc24e7a99cb5a2a97 100644 (file)
@@ -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;
 }
 
index 26c0328e4759560755b38a6925fc463b2671666c..42fe8e5b70c1eb090377e8d894ccfe5af6915f9a 100644 (file)
@@ -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;
 }
index dfe2e9cf4fa5d55f7f0566f66eac7535c7efcbde..605e169c38dd7b65946c74d8654db1dceb7e38af 100644 (file)
@@ -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;
 }
index 515582b51b244fe0396a52916ae8359ed4a44e92..fb52870df8e694f79723597c19f2263de00f53df 100644 (file)
@@ -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;
 }