Remove redundant read-only VV from datafields (#12626)

This commit is contained in:
DrSmugleaf
2022-11-16 20:22:11 +01:00
committed by GitHub
parent fb892cb374
commit 7fbc2608e8
179 changed files with 171 additions and 462 deletions

View File

@@ -1,4 +1,3 @@
using System;
using Robust.Client.GameObjects; using Robust.Client.GameObjects;
using Robust.Client.Graphics; using Robust.Client.Graphics;
using Robust.Client.Utility; using Robust.Client.Utility;
@@ -13,7 +12,7 @@ namespace Content.Client.Clickable
[Dependency] private readonly IEyeManager _eyeManager = default!; [Dependency] private readonly IEyeManager _eyeManager = default!;
[Dependency] private readonly IEntityManager _entMan = default!; [Dependency] private readonly IEntityManager _entMan = default!;
[ViewVariables] [DataField("bounds")] public DirBoundData? Bounds; [DataField("bounds")] public DirBoundData? Bounds;
/// <summary> /// <summary>
/// Used to check whether a click worked. Will first check if the click falls inside of some explicit bounding /// Used to check whether a click worked. Will first check if the click falls inside of some explicit bounding
@@ -133,11 +132,11 @@ namespace Content.Client.Clickable
[DataDefinition] [DataDefinition]
public sealed class DirBoundData public sealed class DirBoundData
{ {
[ViewVariables] [DataField("all")] public Box2 All; [DataField("all")] public Box2 All;
[ViewVariables] [DataField("north")] public Box2 North; [DataField("north")] public Box2 North;
[ViewVariables] [DataField("south")] public Box2 South; [DataField("south")] public Box2 South;
[ViewVariables] [DataField("east")] public Box2 East; [DataField("east")] public Box2 East;
[ViewVariables] [DataField("west")] public Box2 West; [DataField("west")] public Box2 West;
} }
} }
} }

View File

@@ -39,7 +39,6 @@ public sealed class InstrumentComponent : SharedInstrumentComponent
/// <summary> /// <summary>
/// Whether this instrument is handheld or not. /// Whether this instrument is handheld or not.
/// </summary> /// </summary>
[ViewVariables]
[DataField("handheld")] [DataField("handheld")]
public bool Handheld { get; set; } // TODO: Replace this by simply checking if the entity has an ItemComponent. public bool Handheld { get; set; } // TODO: Replace this by simply checking if the entity has an ItemComponent.

View File

@@ -1,13 +1,4 @@
using System.Collections.Generic;
using Content.Client.UserInterface.Controls;
using Content.Shared.Inventory; using Content.Shared.Inventory;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
namespace Content.Client.Inventory namespace Content.Client.Inventory
{ {
@@ -19,7 +10,6 @@ namespace Content.Client.Inventory
[Access(typeof(ClientInventorySystem))] [Access(typeof(ClientInventorySystem))]
public sealed class ClientInventoryComponent : InventoryComponent public sealed class ClientInventoryComponent : InventoryComponent
{ {
[ViewVariables]
[DataField("speciesId")] public string? SpeciesId { get; set; } [DataField("speciesId")] public string? SpeciesId { get; set; }
[ViewVariables] [ViewVariables]
public readonly Dictionary<string, ClientInventorySystem.SlotData> SlotData = new (); public readonly Dictionary<string, ClientInventorySystem.SlotData> SlotData = new ();

View File

@@ -1,19 +1,11 @@
using System; using System.Linq;
using System.Collections.Generic;
using System.Linq;
using Content.Shared.Light.Component; using Content.Shared.Light.Component;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Client.Animations; using Robust.Client.Animations;
using Robust.Client.GameObjects; using Robust.Client.GameObjects;
using Robust.Shared.Animations; using Robust.Shared.Animations;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Maths;
using Robust.Shared.Random; using Robust.Shared.Random;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
namespace Content.Client.Light.Components namespace Content.Client.Light.Components
{ {
@@ -29,25 +21,24 @@ namespace Content.Client.Light.Components
protected IEntityManager _entMan = default!; protected IEntityManager _entMan = default!;
protected IRobustRandom _random = default!; protected IRobustRandom _random = default!;
[DataField("id")] [ViewVariables] public string ID { get; set; } = string.Empty; [DataField("id")] public string ID { get; set; } = string.Empty;
[DataField("property")] [DataField("property")]
[ViewVariables]
public virtual string Property { get; protected set; } = "Radius"; public virtual string Property { get; protected set; } = "Radius";
[DataField("isLooped")] [ViewVariables] public bool IsLooped { get; set; } [DataField("isLooped")] public bool IsLooped { get; set; }
[DataField("enabled")] [ViewVariables] public bool Enabled { get; set; } [DataField("enabled")] public bool Enabled { get; set; }
[DataField("startValue")] [ViewVariables] public float StartValue { get; set; } = 0f; [DataField("startValue")] public float StartValue { get; set; } = 0f;
[DataField("endValue")] [ViewVariables] public float EndValue { get; set; } = 2f; [DataField("endValue")] public float EndValue { get; set; } = 2f;
[DataField("minDuration")] [ViewVariables] public float MinDuration { get; set; } = -1f; [DataField("minDuration")] public float MinDuration { get; set; } = -1f;
[DataField("maxDuration")] [ViewVariables] public float MaxDuration { get; set; } = 2f; [DataField("maxDuration")] public float MaxDuration { get; set; } = 2f;
[DataField("interpolate")] [ViewVariables] public AnimationInterpolationMode InterpolateMode { get; set; } = AnimationInterpolationMode.Linear; [DataField("interpolate")] public AnimationInterpolationMode InterpolateMode { get; set; } = AnimationInterpolationMode.Linear;
[ViewVariables] protected float MaxTime { get; set; } [ViewVariables] protected float MaxTime { get; set; }
@@ -182,7 +173,6 @@ namespace Content.Client.Light.Components
/// time of the full animation, including the reverse interpolation. /// time of the full animation, including the reverse interpolation.
/// </summary> /// </summary>
[DataField("reverseWhenFinished")] [DataField("reverseWhenFinished")]
[ViewVariables]
public bool ReverseWhenFinished { get; set; } public bool ReverseWhenFinished { get; set; }
public override (int KeyFrameIndex, float FramePlayingTime) AdvancePlayback( public override (int KeyFrameIndex, float FramePlayingTime) AdvancePlayback(
@@ -308,7 +298,6 @@ namespace Content.Client.Light.Components
public sealed class ColorCycleBehaviour : LightBehaviourAnimationTrack, ISerializationHooks public sealed class ColorCycleBehaviour : LightBehaviourAnimationTrack, ISerializationHooks
{ {
[DataField("property")] [DataField("property")]
[ViewVariables]
public override string Property { get; protected set; } = "Color"; public override string Property { get; protected set; } = "Color";
[DataField("colors")] public List<Color> ColorsToCycle { get; set; } = new(); [DataField("colors")] public List<Color> ColorsToCycle { get; set; } = new();

View File

@@ -6,7 +6,7 @@ namespace Content.Client.Weapons.Melee.Components;
[RegisterComponent] [RegisterComponent]
public sealed class WeaponArcVisualsComponent : Component public sealed class WeaponArcVisualsComponent : Component
{ {
[ViewVariables, DataField("animation")] [DataField("animation")]
public WeaponArcAnimation Animation = WeaponArcAnimation.None; public WeaponArcAnimation Animation = WeaponArcAnimation.None;
[ViewVariables(VVAccess.ReadWrite), DataField("fadeOut")] [ViewVariables(VVAccess.ReadWrite), DataField("fadeOut")]

View File

@@ -15,7 +15,6 @@ namespace Content.Server.Abilities.Mime
/// <summary> /// <summary>
/// Whether this component is active or not. /// Whether this component is active or not.
/// </summarY> /// </summarY>
[ViewVariables]
[DataField("enabled")] [DataField("enabled")]
public bool Enabled = true; public bool Enabled = true;

View File

@@ -1,5 +1,4 @@
using Content.Shared.Atmos; using Content.Shared.Atmos;
using Robust.Shared.Map;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Server.Atmos.Components namespace Content.Server.Atmos.Components
@@ -10,7 +9,6 @@ namespace Content.Server.Atmos.Components
public (EntityUid Grid, Vector2i Tile) LastPosition { get; set; } public (EntityUid Grid, Vector2i Tile) LastPosition { get; set; }
[DataField("airBlockedDirection", customTypeSerializer: typeof(FlagSerializer<AtmosDirectionFlags>))] [DataField("airBlockedDirection", customTypeSerializer: typeof(FlagSerializer<AtmosDirectionFlags>))]
[ViewVariables]
public int InitialAirBlockedDirection { get; set; } = (int) AtmosDirection.All; public int InitialAirBlockedDirection { get; set; } = (int) AtmosDirection.All;
[ViewVariables] [ViewVariables]
@@ -22,15 +20,12 @@ namespace Content.Server.Atmos.Components
[DataField("fixVacuum")] [DataField("fixVacuum")]
public bool FixVacuum { get; set; } = true; public bool FixVacuum { get; set; } = true;
[ViewVariables]
[DataField("rotateAirBlocked")] [DataField("rotateAirBlocked")]
public bool RotateAirBlocked { get; set; } = true; public bool RotateAirBlocked { get; set; } = true;
[ViewVariables]
[DataField("fixAirBlockedDirectionInitialize")] [DataField("fixAirBlockedDirectionInitialize")]
public bool FixAirBlockedDirectionInitialize { get; set; } = true; public bool FixAirBlockedDirectionInitialize { get; set; } = true;
[ViewVariables]
[DataField("noAirWhenFullyAirBlocked")] [DataField("noAirWhenFullyAirBlocked")]
public bool NoAirWhenFullyAirBlocked { get; set; } = true; public bool NoAirWhenFullyAirBlocked { get; set; } = true;

View File

@@ -3,6 +3,6 @@
[RegisterComponent] [RegisterComponent]
public sealed class GasMixtureHolderComponent : Component, IGasMixtureHolder public sealed class GasMixtureHolderComponent : Component, IGasMixtureHolder
{ {
[ViewVariables] [DataField("air")] public GasMixture Air { get; set; } = new GasMixture(); [DataField("air")] public GasMixture Air { get; set; } = new GasMixture();
} }
} }

View File

@@ -32,20 +32,18 @@ namespace Content.Server.Atmos.Components
public IPlayingAudioStream? ConnectStream; public IPlayingAudioStream? ConnectStream;
public IPlayingAudioStream? DisconnectStream; public IPlayingAudioStream? DisconnectStream;
[DataField("air")] [ViewVariables] public GasMixture Air { get; set; } = new(); [DataField("air")] public GasMixture Air { get; set; } = new();
/// <summary> /// <summary>
/// Pressure at which tank should be considered 'low' such as for internals. /// Pressure at which tank should be considered 'low' such as for internals.
/// </summary> /// </summary>
[DataField("tankLowPressure")] [DataField("tankLowPressure")]
[ViewVariables]
public float TankLowPressure { get; set; } = DefaultLowPressure; public float TankLowPressure { get; set; } = DefaultLowPressure;
/// <summary> /// <summary>
/// Distributed pressure. /// Distributed pressure.
/// </summary> /// </summary>
[DataField("outputPressure")] [DataField("outputPressure")]
[ViewVariables]
public float OutputPressure { get; set; } = DefaultOutputPressure; public float OutputPressure { get; set; } = DefaultOutputPressure;
/// <summary> /// <summary>

View File

@@ -13,7 +13,6 @@ namespace Content.Server.Atmos.Components
/// <summary> /// <summary>
/// Accumulates time when yeeted by high pressure deltas. /// Accumulates time when yeeted by high pressure deltas.
/// </summary> /// </summary>
[ViewVariables]
[DataField("accumulator")] [DataField("accumulator")]
public float Accumulator = 0f; public float Accumulator = 0f;

View File

@@ -1,7 +1,6 @@
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using System.Linq; using System.Linq;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using Content.Server.Atmos.EntitySystems;
using Content.Server.Atmos.Reactions; using Content.Server.Atmos.Reactions;
using Content.Shared.Atmos; using Content.Shared.Atmos;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
@@ -27,7 +26,6 @@ namespace Content.Server.Atmos
private float _temperature = Atmospherics.TCMB; private float _temperature = Atmospherics.TCMB;
[DataField("immutable")] [DataField("immutable")]
[ViewVariables]
public bool Immutable { get; private set; } public bool Immutable { get; private set; }
[ViewVariables] [ViewVariables]

View File

@@ -5,7 +5,6 @@ namespace Content.Server.Atmos.Piping.Binary.Components
[RegisterComponent] [RegisterComponent]
public sealed class GasValveComponent : Component public sealed class GasValveComponent : Component
{ {
[ViewVariables]
[DataField("open")] [DataField("open")]
public bool Open { get; set; } = true; public bool Open { get; set; } = true;

View File

@@ -1,6 +1,3 @@
using Content.Server.Atmos.Components;
using Robust.Shared.Map;
namespace Content.Server.Atmos.Piping.Components namespace Content.Server.Atmos.Piping.Components
{ {
/// <summary> /// <summary>
@@ -19,7 +16,6 @@ namespace Content.Server.Atmos.Piping.Components
/// <summary> /// <summary>
/// Whether this device will join an entity system to process when not in a grid. /// Whether this device will join an entity system to process when not in a grid.
/// </summary> /// </summary>
[ViewVariables]
[DataField("joinSystem")] [DataField("joinSystem")]
public bool JoinSystem { get; } = false; public bool JoinSystem { get; } = false;

View File

@@ -88,7 +88,6 @@ namespace Content.Server.Atmos
[Access(typeof(AtmosphereSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends [Access(typeof(AtmosphereSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends
public GasMixture? Air { get; set; } public GasMixture? Air { get; set; }
[ViewVariables]
[DataField("lastShare")] [DataField("lastShare")]
public float LastShare; public float LastShare;

View File

@@ -37,10 +37,8 @@ namespace Content.Server.Bible.Components
}; };
/// Used for respawning /// Used for respawning
[ViewVariables]
[DataField("accumulator")] [DataField("accumulator")]
public float Accumulator = 0f; public float Accumulator = 0f;
[ViewVariables]
[DataField("respawnTime")] [DataField("respawnTime")]
public float RespawnTime = 180f; public float RespawnTime = 180f;
} }

View File

@@ -9,28 +9,24 @@ public sealed class ThermalRegulatorComponent : Component
/// <summary> /// <summary>
/// Heat generated due to metabolism. It's generated via metabolism /// Heat generated due to metabolism. It's generated via metabolism
/// </summary> /// </summary>
[ViewVariables]
[DataField("metabolismHeat")] [DataField("metabolismHeat")]
public float MetabolismHeat { get; private set; } public float MetabolismHeat { get; private set; }
/// <summary> /// <summary>
/// Heat output via radiation. /// Heat output via radiation.
/// </summary> /// </summary>
[ViewVariables]
[DataField("radiatedHeat")] [DataField("radiatedHeat")]
public float RadiatedHeat { get; private set; } public float RadiatedHeat { get; private set; }
/// <summary> /// <summary>
/// Maximum heat regulated via sweat /// Maximum heat regulated via sweat
/// </summary> /// </summary>
[ViewVariables]
[DataField("sweatHeatRegulation")] [DataField("sweatHeatRegulation")]
public float SweatHeatRegulation { get; private set; } public float SweatHeatRegulation { get; private set; }
/// <summary> /// <summary>
/// Maximum heat regulated via shivering /// Maximum heat regulated via shivering
/// </summary> /// </summary>
[ViewVariables]
[DataField("shiveringHeatRegulation")] [DataField("shiveringHeatRegulation")]
public float ShiveringHeatRegulation { get; private set; } public float ShiveringHeatRegulation { get; private set; }
@@ -44,7 +40,6 @@ public sealed class ThermalRegulatorComponent : Component
/// <summary> /// <summary>
/// Normal body temperature /// Normal body temperature
/// </summary> /// </summary>
[ViewVariables]
[DataField("normalBodyTemperature")] [DataField("normalBodyTemperature")]
public float NormalBodyTemperature { get; private set; } public float NormalBodyTemperature { get; private set; }

View File

@@ -9,7 +9,6 @@ namespace Content.Server.Botany
public sealed class BotanySwabComponent : Component public sealed class BotanySwabComponent : Component
{ {
[DataField("swabDelay")] [DataField("swabDelay")]
[ViewVariables]
public float SwabDelay = 2f; public float SwabDelay = 2f;
/// <summary> /// <summary>

View File

@@ -37,6 +37,6 @@ public sealed class SeedExtractorComponent : Component
/// How much the machine part quality affects the amount of seeds outputted. /// How much the machine part quality affects the amount of seeds outputted.
/// Going up a tier will multiply the seed output by this amount. /// Going up a tier will multiply the seed output by this amount.
/// </summary> /// </summary>
[DataField("partRatingSeedAmountMultiplier"), ViewVariables] [DataField("partRatingSeedAmountMultiplier")]
public float PartRatingSeedAmountMultiplier = 1.5f; public float PartRatingSeedAmountMultiplier = 1.5f;
} }

View File

@@ -14,7 +14,6 @@ public sealed class BuckleComponent : SharedBuckleComponent
/// be able to unbuckle after recently buckling. /// be able to unbuckle after recently buckling.
/// </summary> /// </summary>
[DataField("delay")] [DataField("delay")]
[ViewVariables]
public TimeSpan UnbuckleDelay = TimeSpan.FromSeconds(0.25f); public TimeSpan UnbuckleDelay = TimeSpan.FromSeconds(0.25f);
/// <summary> /// <summary>
@@ -33,6 +32,5 @@ public sealed class BuckleComponent : SharedBuckleComponent
/// <see cref="StrapComponent"/>. /// <see cref="StrapComponent"/>.
/// </summary> /// </summary>
[DataField("size")] [DataField("size")]
[ViewVariables]
public int Size = 100; public int Size = 100;
} }

View File

@@ -16,13 +16,13 @@ namespace Content.Server.Buckle.Components
/// <summary> /// <summary>
/// The angle in degrees to rotate the player by when they get strapped /// The angle in degrees to rotate the player by when they get strapped
/// </summary> /// </summary>
[ViewVariables] [DataField("rotation")] [DataField("rotation")]
private int _rotation; private int _rotation;
/// <summary> /// <summary>
/// The size of the strap which is compared against when buckling entities /// The size of the strap which is compared against when buckling entities
/// </summary> /// </summary>
[ViewVariables] [DataField("size")] private int _size = 100; [DataField("size")] private int _size = 100;
private int _occupiedSize; private int _occupiedSize;
private bool _enabled = true; private bool _enabled = true;
@@ -49,21 +49,18 @@ namespace Content.Server.Buckle.Components
/// <summary> /// <summary>
/// The sound to be played when a mob is buckled /// The sound to be played when a mob is buckled
/// </summary> /// </summary>
[ViewVariables]
[DataField("buckleSound")] [DataField("buckleSound")]
public SoundSpecifier BuckleSound { get; } = new SoundPathSpecifier("/Audio/Effects/buckle.ogg"); public SoundSpecifier BuckleSound { get; } = new SoundPathSpecifier("/Audio/Effects/buckle.ogg");
/// <summary> /// <summary>
/// The sound to be played when a mob is unbuckled /// The sound to be played when a mob is unbuckled
/// </summary> /// </summary>
[ViewVariables]
[DataField("unbuckleSound")] [DataField("unbuckleSound")]
public SoundSpecifier UnbuckleSound { get; } = new SoundPathSpecifier("/Audio/Effects/unbuckle.ogg"); public SoundSpecifier UnbuckleSound { get; } = new SoundPathSpecifier("/Audio/Effects/unbuckle.ogg");
/// <summary> /// <summary>
/// ID of the alert to show when buckled /// ID of the alert to show when buckled
/// </summary> /// </summary>
[ViewVariables]
[DataField("buckledAlertType")] [DataField("buckledAlertType")]
public AlertType BuckledAlertType { get; } = AlertType.Buckled; public AlertType BuckledAlertType { get; } = AlertType.Buckled;

View File

@@ -26,7 +26,6 @@ namespace Content.Server.Cabinet
/// <summary> /// <summary>
/// Whether the cabinet is currently open or not. /// Whether the cabinet is currently open or not.
/// </summary> /// </summary>
[ViewVariables]
[DataField("opened")] [DataField("opened")]
public bool Opened { get; set; } = false; public bool Opened { get; set; } = false;
} }

View File

@@ -20,7 +20,6 @@ namespace Content.Server.Cargo.Components
/// <summary> /// <summary>
/// How much time we've accumulated until next teleport. /// How much time we've accumulated until next teleport.
/// </summary> /// </summary>
[ViewVariables]
[DataField("accumulator")] [DataField("accumulator")]
public float Accumulator = 0f; public float Accumulator = 0f;

View File

@@ -24,12 +24,12 @@ public sealed class StationCargoOrderDatabaseComponent : Component
/// </summary> /// </summary>
public int Index; public int Index;
[ViewVariables, DataField("cargoShuttleProto", customTypeSerializer:typeof(PrototypeIdSerializer<CargoShuttlePrototype>))] [DataField("cargoShuttleProto", customTypeSerializer:typeof(PrototypeIdSerializer<CargoShuttlePrototype>))]
public string? CargoShuttleProto = "CargoShuttle"; public string? CargoShuttleProto = "CargoShuttle";
/// <summary> /// <summary>
/// The cargo shuttle assigned to this station. /// The cargo shuttle assigned to this station.
/// </summary> /// </summary>
[ViewVariables, DataField("shuttle")] [DataField("shuttle")]
public EntityUid? Shuttle; public EntityUid? Shuttle;
} }

View File

@@ -1,9 +1,6 @@
using System.Threading; using System.Threading;
using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.Components;
using Content.Shared.FixedPoint; using Content.Shared.FixedPoint;
using Content.Server.UserInterface;
using Robust.Server.GameObjects;
using Content.Shared.Chemistry;
namespace Content.Server.Chemistry.Components namespace Content.Server.Chemistry.Components
{ {
@@ -21,7 +18,6 @@ namespace Content.Server.Chemistry.Components
/// Whether or not the injector is able to draw from containers or if it's a single use /// Whether or not the injector is able to draw from containers or if it's a single use
/// device that can only inject. /// device that can only inject.
/// </summary> /// </summary>
[ViewVariables]
[DataField("injectOnly")] [DataField("injectOnly")]
public bool InjectOnly; public bool InjectOnly;
@@ -31,7 +27,6 @@ namespace Content.Server.Chemistry.Components
/// <remarks> /// <remarks>
/// for example: droppers would ignore mobs /// for example: droppers would ignore mobs
/// </remarks> /// </remarks>
[ViewVariables]
[DataField("ignoreMobs")] [DataField("ignoreMobs")]
public bool IgnoreMobs = false; public bool IgnoreMobs = false;

View File

@@ -7,11 +7,9 @@ namespace Content.Server.Chemistry.Components
[RegisterComponent] [RegisterComponent]
public sealed class RehydratableComponent : Component public sealed class RehydratableComponent : Component
{ {
[ViewVariables]
[DataField("catalyst")] [DataField("catalyst")]
internal string CatalystPrototype = "Water"; internal string CatalystPrototype = "Water";
[ViewVariables]
[DataField("target")] [DataField("target")]
internal string? TargetPrototype = default!; internal string? TargetPrototype = default!;

View File

@@ -7,7 +7,6 @@ namespace Content.Server.Chemistry.Components.SolutionManager
[Access(typeof(SolutionContainerSystem))] [Access(typeof(SolutionContainerSystem))]
public sealed class SolutionContainerManagerComponent : Component public sealed class SolutionContainerManagerComponent : Component
{ {
[ViewVariables]
[DataField("solutions")] [DataField("solutions")]
[Access(typeof(SolutionContainerSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends [Access(typeof(SolutionContainerSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends
public readonly Dictionary<string, Solution> Solutions = new(); public readonly Dictionary<string, Solution> Solutions = new();

View File

@@ -1,6 +1,4 @@
using Content.Shared.FixedPoint; using Content.Shared.FixedPoint;
using Content.Shared.Vapor;
using Robust.Shared.Map;
namespace Content.Server.Chemistry.Components namespace Content.Server.Chemistry.Components
{ {
@@ -9,7 +7,6 @@ namespace Content.Server.Chemistry.Components
{ {
public const string SolutionName = "vapor"; public const string SolutionName = "vapor";
[ViewVariables]
[DataField("transferAmount")] [DataField("transferAmount")]
public FixedPoint2 TransferAmount = FixedPoint2.New(0.5); public FixedPoint2 TransferAmount = FixedPoint2.New(0.5);

View File

@@ -12,39 +12,38 @@ public sealed class ClimbableComponent : SharedClimbableComponent
/// <summary> /// <summary>
/// The time it takes to climb onto the entity. /// The time it takes to climb onto the entity.
/// </summary> /// </summary>
[ViewVariables]
[DataField("delay")] [DataField("delay")]
public float ClimbDelay = 0.8f; public float ClimbDelay = 0.8f;
/// <summary> /// <summary>
/// If set, people can bonk on this if <see cref="CCVars.GameTableBonk"/> is set or if they are clumsy. /// If set, people can bonk on this if <see cref="CCVars.GameTableBonk"/> is set or if they are clumsy.
/// </summary> /// </summary>
[ViewVariables] [DataField("bonk")] public bool Bonk = false; [DataField("bonk")] public bool Bonk = false;
/// <summary> /// <summary>
/// Chance of bonk triggering if the user is clumsy. /// Chance of bonk triggering if the user is clumsy.
/// </summary> /// </summary>
[ViewVariables] [DataField("bonkClumsyChance")] [DataField("bonkClumsyChance")]
public float BonkClumsyChance = 0.75f; public float BonkClumsyChance = 0.75f;
/// <summary> /// <summary>
/// Sound to play when bonking. /// Sound to play when bonking.
/// </summary> /// </summary>
/// <seealso cref="Bonk"/> /// <seealso cref="Bonk"/>
[ViewVariables] [DataField("bonkSound")] [DataField("bonkSound")]
public SoundSpecifier? BonkSound; public SoundSpecifier? BonkSound;
/// <summary> /// <summary>
/// How long to stun players on bonk, in seconds. /// How long to stun players on bonk, in seconds.
/// </summary> /// </summary>
/// <seealso cref="Bonk"/> /// <seealso cref="Bonk"/>
[ViewVariables] [DataField("bonkTime")] [DataField("bonkTime")]
public float BonkTime = 2; public float BonkTime = 2;
/// <summary> /// <summary>
/// How much damage to apply on bonk. /// How much damage to apply on bonk.
/// </summary> /// </summary>
/// <seealso cref="Bonk"/> /// <seealso cref="Bonk"/>
[ViewVariables] [DataField("bonkDamage")] [DataField("bonkDamage")]
public DamageSpecifier? BonkDamage; public DamageSpecifier? BonkDamage;
} }

View File

@@ -9,7 +9,6 @@ namespace Content.Server.Construction.Components
[RegisterComponent] [RegisterComponent]
public sealed class ComputerBoardComponent : Component public sealed class ComputerBoardComponent : Component
{ {
[ViewVariables]
[DataField("prototype", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))] [DataField("prototype", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
public string? Prototype { get; private set; } public string? Prototype { get; private set; }
} }

View File

@@ -6,7 +6,6 @@ namespace Content.Server.Construction.Components
[RegisterComponent, ComponentProtoName("Computer")] [RegisterComponent, ComponentProtoName("Computer")]
public sealed class ComputerComponent : Component public sealed class ComputerComponent : Component
{ {
[ViewVariables]
[DataField("board", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))] [DataField("board", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
public string? BoardPrototype; public string? BoardPrototype;
} }

View File

@@ -10,19 +10,15 @@ namespace Content.Server.Construction.Components
{ {
[Dependency] private readonly IPrototypeManager _prototypeManager = default!; [Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[ViewVariables]
[DataField("requirements", customTypeSerializer: typeof(PrototypeIdDictionarySerializer<int, MachinePartPrototype>))] [DataField("requirements", customTypeSerializer: typeof(PrototypeIdDictionarySerializer<int, MachinePartPrototype>))]
public readonly Dictionary<string, int> Requirements = new(); public readonly Dictionary<string, int> Requirements = new();
[ViewVariables]
[DataField("materialRequirements")] [DataField("materialRequirements")]
public readonly Dictionary<string, int> MaterialIdRequirements = new(); public readonly Dictionary<string, int> MaterialIdRequirements = new();
[ViewVariables]
[DataField("tagRequirements")] [DataField("tagRequirements")]
public readonly Dictionary<string, GenericPartInfo> TagRequirements = new(); public readonly Dictionary<string, GenericPartInfo> TagRequirements = new();
[ViewVariables]
[DataField("componentRequirements")] [DataField("componentRequirements")]
public readonly Dictionary<string, GenericPartInfo> ComponentRequirements = new(); public readonly Dictionary<string, GenericPartInfo> ComponentRequirements = new();

View File

@@ -1,9 +1,4 @@
using System.Threading.Tasks; using Content.Shared.Construction.Prototypes;
using Content.Server.Stack;
using Content.Shared.Construction;
using Content.Shared.Construction.Prototypes;
using Content.Shared.Interaction;
using Content.Shared.Tag;
using Robust.Shared.Containers; using Robust.Shared.Containers;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary;
@@ -18,7 +13,7 @@ namespace Content.Server.Construction.Components
[ViewVariables] [ViewVariables]
public bool HasBoard => BoardContainer?.ContainedEntities.Count != 0; public bool HasBoard => BoardContainer?.ContainedEntities.Count != 0;
[DataField("progress", customTypeSerializer: typeof(PrototypeIdDictionarySerializer<int, MachinePartPrototype>)), ViewVariables] [DataField("progress", customTypeSerializer: typeof(PrototypeIdDictionarySerializer<int, MachinePartPrototype>))]
public readonly Dictionary<string, int> Progress = new(); public readonly Dictionary<string, int> Progress = new();
[ViewVariables] [ViewVariables]
@@ -30,7 +25,7 @@ namespace Content.Server.Construction.Components
[ViewVariables] [ViewVariables]
public readonly Dictionary<string, int> TagProgress = new(); public readonly Dictionary<string, int> TagProgress = new();
[DataField("requirements", customTypeSerializer: typeof(PrototypeIdDictionarySerializer<int, MachinePartPrototype>)),ViewVariables] [DataField("requirements", customTypeSerializer: typeof(PrototypeIdDictionarySerializer<int, MachinePartPrototype>))]
public Dictionary<string, int> Requirements = new(); public Dictionary<string, int> Requirements = new();
[ViewVariables] [ViewVariables]

View File

@@ -6,7 +6,6 @@ namespace Content.Server.Construction.Components
[RegisterComponent] [RegisterComponent]
public sealed class MachinePartComponent : Component public sealed class MachinePartComponent : Component
{ {
[ViewVariables]
[DataField("part", required: true, customTypeSerializer: typeof(PrototypeIdSerializer<MachinePartPrototype>))] [DataField("part", required: true, customTypeSerializer: typeof(PrototypeIdSerializer<MachinePartPrototype>))]
public string PartType { get; private set; } = default!; public string PartType { get; private set; } = default!;

View File

@@ -6,7 +6,6 @@ namespace Content.Server.Containers
[RegisterComponent] [RegisterComponent]
public sealed class EmptyOnMachineDeconstructComponent : Component public sealed class EmptyOnMachineDeconstructComponent : Component
{ {
[ViewVariables]
[DataField("containers")] [DataField("containers")]
public HashSet<string> Containers { get; set; } = new(); public HashSet<string> Containers { get; set; } = new();
} }

View File

@@ -1,11 +1,8 @@
using System.Threading.Tasks;
using Content.Server.Administration.Components; using Content.Server.Administration.Components;
using Content.Server.Administration.Logs; using Content.Server.Administration.Logs;
using Content.Server.DoAfter; using Content.Server.DoAfter;
using Content.Server.Hands.Components;
using Content.Shared.Cuffs.Components; using Content.Shared.Cuffs.Components;
using Content.Shared.Database; using Content.Shared.Database;
using Content.Shared.Interaction;
using Content.Shared.Popups; using Content.Shared.Popups;
using Content.Shared.Stunnable; using Content.Shared.Stunnable;
using Robust.Shared.Audio; using Robust.Shared.Audio;
@@ -26,63 +23,54 @@ namespace Content.Server.Cuffs.Components
/// <summary> /// <summary>
/// The time it takes to apply a <see cref="CuffedComponent"/> to an entity. /// The time it takes to apply a <see cref="CuffedComponent"/> to an entity.
/// </summary> /// </summary>
[ViewVariables]
[DataField("cuffTime")] [DataField("cuffTime")]
public float CuffTime { get; set; } = 3.5f; public float CuffTime { get; set; } = 3.5f;
/// <summary> /// <summary>
/// The time it takes to remove a <see cref="CuffedComponent"/> from an entity. /// The time it takes to remove a <see cref="CuffedComponent"/> from an entity.
/// </summary> /// </summary>
[ViewVariables]
[DataField("uncuffTime")] [DataField("uncuffTime")]
public float UncuffTime { get; set; } = 3.5f; public float UncuffTime { get; set; } = 3.5f;
/// <summary> /// <summary>
/// The time it takes for a cuffed entity to remove <see cref="CuffedComponent"/> from itself. /// The time it takes for a cuffed entity to remove <see cref="CuffedComponent"/> from itself.
/// </summary> /// </summary>
[ViewVariables]
[DataField("breakoutTime")] [DataField("breakoutTime")]
public float BreakoutTime { get; set; } = 30f; public float BreakoutTime { get; set; } = 30f;
/// <summary> /// <summary>
/// If an entity being cuffed is stunned, this amount of time is subtracted from the time it takes to add/remove their cuffs. /// If an entity being cuffed is stunned, this amount of time is subtracted from the time it takes to add/remove their cuffs.
/// </summary> /// </summary>
[ViewVariables]
[DataField("stunBonus")] [DataField("stunBonus")]
public float StunBonus { get; set; } = 2f; public float StunBonus { get; set; } = 2f;
/// <summary> /// <summary>
/// Will the cuffs break when removed? /// Will the cuffs break when removed?
/// </summary> /// </summary>
[ViewVariables]
[DataField("breakOnRemove")] [DataField("breakOnRemove")]
public bool BreakOnRemove { get; set; } public bool BreakOnRemove { get; set; }
/// <summary> /// <summary>
/// The path of the RSI file used for the player cuffed overlay. /// The path of the RSI file used for the player cuffed overlay.
/// </summary> /// </summary>
[ViewVariables]
[DataField("cuffedRSI")] [DataField("cuffedRSI")]
public string? CuffedRSI { get; set; } = "Objects/Misc/handcuffs.rsi"; public string? CuffedRSI { get; set; } = "Objects/Misc/handcuffs.rsi";
/// <summary> /// <summary>
/// The iconstate used with the RSI file for the player cuffed overlay. /// The iconstate used with the RSI file for the player cuffed overlay.
/// </summary> /// </summary>
[ViewVariables]
[DataField("bodyIconState")] [DataField("bodyIconState")]
public string? OverlayIconState { get; set; } = "body-overlay"; public string? OverlayIconState { get; set; } = "body-overlay";
/// <summary> /// <summary>
/// The iconstate used for broken handcuffs /// The iconstate used for broken handcuffs
/// </summary> /// </summary>
[ViewVariables]
[DataField("brokenIconState")] [DataField("brokenIconState")]
public string? BrokenState { get; set; } public string? BrokenState { get; set; }
/// <summary> /// <summary>
/// The iconstate used for broken handcuffs /// The iconstate used for broken handcuffs
/// </summary> /// </summary>
[ViewVariables]
[DataField("brokenName", readOnly: true)] [DataField("brokenName", readOnly: true)]
public string BrokenName public string BrokenName
{ {
@@ -93,7 +81,6 @@ namespace Content.Server.Cuffs.Components
/// <summary> /// <summary>
/// The iconstate used for broken handcuffs /// The iconstate used for broken handcuffs
/// </summary> /// </summary>
[ViewVariables]
[DataField("brokenDesc", readOnly: true)] [DataField("brokenDesc", readOnly: true)]
public string BrokenDesc public string BrokenDesc
{ {

View File

@@ -9,7 +9,6 @@ namespace Content.Server.Destructible
[RegisterComponent] [RegisterComponent]
public sealed class DestructibleComponent : Component public sealed class DestructibleComponent : Component
{ {
[ViewVariables]
[DataField("thresholds")] [DataField("thresholds")]
public List<DamageThreshold> Thresholds = new(); public List<DamageThreshold> Thresholds = new();

View File

@@ -19,7 +19,6 @@ namespace Content.Server.Destructible.Thresholds
/// <summary> /// <summary>
/// Whether or not this threshold has already been triggered. /// Whether or not this threshold has already been triggered.
/// </summary> /// </summary>
[ViewVariables]
[DataField("triggered")] [DataField("triggered")]
public bool Triggered { get; private set; } public bool Triggered { get; private set; }
@@ -29,14 +28,12 @@ namespace Content.Server.Destructible.Thresholds
/// and then damaged to reach this threshold once again. /// and then damaged to reach this threshold once again.
/// It will not repeatedly trigger as damage rises beyond that. /// It will not repeatedly trigger as damage rises beyond that.
/// </summary> /// </summary>
[ViewVariables]
[DataField("triggersOnce")] [DataField("triggersOnce")]
public bool TriggersOnce { get; set; } public bool TriggersOnce { get; set; }
/// <summary> /// <summary>
/// The trigger that decides if this threshold has been reached. /// The trigger that decides if this threshold has been reached.
/// </summary> /// </summary>
[ViewVariables]
[DataField("trigger")] [DataField("trigger")]
public IThresholdTrigger? Trigger { get; set; } public IThresholdTrigger? Trigger { get; set; }

View File

@@ -4,11 +4,9 @@
[DataDefinition] [DataDefinition]
public struct MinMax public struct MinMax
{ {
[ViewVariables]
[DataField("min")] [DataField("min")]
public int Min; public int Min;
[ViewVariables]
[DataField("max")] [DataField("max")]
public int Max; public int Max;
} }

View File

@@ -5,15 +5,12 @@ namespace Content.Server.Dice
[RegisterComponent, Access(typeof(DiceSystem))] [RegisterComponent, Access(typeof(DiceSystem))]
public sealed class DiceComponent : Component public sealed class DiceComponent : Component
{ {
[ViewVariables]
[DataField("sound")] [DataField("sound")]
public SoundSpecifier Sound { get; } = new SoundCollectionSpecifier("Dice"); public SoundSpecifier Sound { get; } = new SoundCollectionSpecifier("Dice");
[ViewVariables]
[DataField("step")] [DataField("step")]
public int Step { get; } = 1; public int Step { get; } = 1;
[ViewVariables]
[DataField("sides")] [DataField("sides")]
public int Sides { get; } = 20; public int Sides { get; } = 20;

View File

@@ -42,7 +42,7 @@ namespace Content.Server.Disease.Components
/// exhibit direct symptoms from. They still transmit /// exhibit direct symptoms from. They still transmit
/// these diseases, just without symptoms. /// these diseases, just without symptoms.
/// </summary> /// </summary>
[ViewVariables, DataField("carrierDiseases", customTypeSerializer: typeof(PrototypeIdHashSetSerializer<DiseasePrototype>))] [DataField("carrierDiseases", customTypeSerializer: typeof(PrototypeIdHashSetSerializer<DiseasePrototype>))]
public HashSet<string>? CarrierDiseases; public HashSet<string>? CarrierDiseases;
/// <summary> /// <summary>

View File

@@ -15,7 +15,6 @@ namespace Content.Server.Disease.Components
/// <summary> /// <summary>
/// How much time we've accumulated processing /// How much time we've accumulated processing
/// </summary> /// </summary>
[ViewVariables]
[DataField("accumulator")] [DataField("accumulator")]
public float Accumulator = 0f; public float Accumulator = 0f;
/// <summary> /// <summary>

View File

@@ -14,7 +14,6 @@ namespace Content.Server.Disease.Components
/// How long it takes to swab someone. /// How long it takes to swab someone.
/// </summary> /// </summary>
[DataField("swabDelay")] [DataField("swabDelay")]
[ViewVariables]
public float SwabDelay = 2f; public float SwabDelay = 2f;
/// <summary> /// <summary>
/// If this swab has been used /// If this swab has been used

View File

@@ -13,7 +13,6 @@ namespace Content.Server.Disease.Components
/// How long it takes to inject someone /// How long it takes to inject someone
/// </summary> /// </summary>
[DataField("injectDelay")] [DataField("injectDelay")]
[ViewVariables]
public float InjectDelay = 2f; public float InjectDelay = 2f;
/// <summary> /// <summary>
/// If this vaccine has been used /// If this vaccine has been used

View File

@@ -18,7 +18,6 @@ namespace Content.Server.Disposal.Tube.Components
/// <summary> /// <summary>
/// The angles to connect to. /// The angles to connect to.
/// </summary> /// </summary>
[ViewVariables]
[DataField("degrees")] [DataField("degrees")]
private List<Angle> _degrees = new(); private List<Angle> _degrees = new();

View File

@@ -54,7 +54,6 @@ namespace Content.Server.Disposal.Unit.Components
[ViewVariables] [ViewVariables]
public HashSet<string> Tags { get; set; } = new(); public HashSet<string> Tags { get; set; } = new();
[ViewVariables]
[DataField("air")] [DataField("air")]
public GasMixture Air { get; set; } = new (70); public GasMixture Air { get; set; } = new (70);

View File

@@ -20,11 +20,9 @@ namespace Content.Server.Disposal.Unit.Components
/// The current pressure of this disposal unit. /// The current pressure of this disposal unit.
/// Prevents it from flushing if it is not equal to or bigger than 1. /// Prevents it from flushing if it is not equal to or bigger than 1.
/// </summary> /// </summary>
[ViewVariables]
[DataField("pressure")] [DataField("pressure")]
public float Pressure = 1f; public float Pressure = 1f;
[ViewVariables]
[DataField("autoEngageEnabled")] [DataField("autoEngageEnabled")]
public bool AutomaticEngage = true; public bool AutomaticEngage = true;

View File

@@ -1,11 +1,10 @@
using Content.Shared.Actions.ActionTypes;
using Robust.Shared.Containers;
using System.Threading; using System.Threading;
using Content.Shared.Actions; using Content.Shared.Actions;
using Content.Shared.Actions.ActionTypes;
using Content.Shared.Chemistry.Reagent; using Content.Shared.Chemistry.Reagent;
using Content.Shared.Storage;
using Content.Shared.Whitelist; using Content.Shared.Whitelist;
using Robust.Shared.Audio; using Robust.Shared.Audio;
using Robust.Shared.Containers;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
@@ -35,7 +34,7 @@ namespace Content.Server.Dragon
/// <summary> /// <summary>
/// If we have active rifts. /// If we have active rifts.
/// </summary> /// </summary>
[ViewVariables, DataField("rifts")] [DataField("rifts")]
public List<EntityUid> Rifts = new(); public List<EntityUid> Rifts = new();
public bool Weakened => WeakenedAccumulator > 0f; public bool Weakened => WeakenedAccumulator > 0f;
@@ -63,7 +62,7 @@ namespace Content.Server.Dragon
/// <summary> /// <summary>
/// Spawns a rift which can summon more mobs. /// Spawns a rift which can summon more mobs.
/// </summary> /// </summary>
[ViewVariables, DataField("spawnRiftAction")] [DataField("spawnRiftAction")]
public InstantAction? SpawnRiftAction; public InstantAction? SpawnRiftAction;
[ViewVariables(VVAccess.ReadWrite), DataField("riftPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))] [ViewVariables(VVAccess.ReadWrite), DataField("riftPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]

View File

@@ -10,7 +10,7 @@ public sealed class DragonRiftComponent : SharedDragonRiftComponent
/// <summary> /// <summary>
/// Dragon that spawned this rift. /// Dragon that spawned this rift.
/// </summary> /// </summary>
[ViewVariables, DataField("dragon")] public EntityUid Dragon; [DataField("dragon")] public EntityUid Dragon;
/// <summary> /// <summary>
/// How long the rift has been active. /// How long the rift has been active.

View File

@@ -7,11 +7,9 @@ namespace Content.Server.Engineering.Components
[RegisterComponent] [RegisterComponent]
public sealed class DisassembleOnAltVerbComponent : Component public sealed class DisassembleOnAltVerbComponent : Component
{ {
[ViewVariables]
[DataField("prototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))] [DataField("prototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string? Prototype { get; } public string? Prototype { get; }
[ViewVariables]
[DataField("doAfter")] [DataField("doAfter")]
public float DoAfterTime = 0; public float DoAfterTime = 0;

View File

@@ -6,19 +6,15 @@ namespace Content.Server.Engineering.Components
[RegisterComponent] [RegisterComponent]
public sealed class SpawnAfterInteractComponent : Component public sealed class SpawnAfterInteractComponent : Component
{ {
[ViewVariables]
[DataField("prototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))] [DataField("prototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string? Prototype { get; } public string? Prototype { get; }
[ViewVariables]
[DataField("ignoreDistance")] [DataField("ignoreDistance")]
public bool IgnoreDistance { get; } public bool IgnoreDistance { get; }
[ViewVariables]
[DataField("doAfter")] [DataField("doAfter")]
public float DoAfterTime = 0; public float DoAfterTime = 0;
[ViewVariables]
[DataField("removeOnInteract")] [DataField("removeOnInteract")]
public bool RemoveOnInteract = false; public bool RemoveOnInteract = false;
} }

View File

@@ -9,7 +9,6 @@ public sealed class EnsnareableComponent : SharedEnsnareableComponent
/// <summary> /// <summary>
/// The container where the <see cref="EnsnaringComponent"/> entity will be stored /// The container where the <see cref="EnsnaringComponent"/> entity will be stored
/// </summary> /// </summary>
[ViewVariables]
[DataField("container")] [DataField("container")]
public Container Container = default!; public Container Container = default!;
} }

View File

@@ -13,7 +13,7 @@ namespace Content.Server.Explosion.Components
/// <summary> /// <summary>
/// What we fill our prototype with if we want to pre-spawn with grenades. /// What we fill our prototype with if we want to pre-spawn with grenades.
/// </summary> /// </summary>
[ViewVariables] [DataField("fillPrototype", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))] [DataField("fillPrototype", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
public string? FillPrototype; public string? FillPrototype;
/// <summary> /// <summary>
@@ -24,7 +24,7 @@ namespace Content.Server.Explosion.Components
/// <summary> /// <summary>
/// Maximum grenades in the container. /// Maximum grenades in the container.
/// </summary> /// </summary>
[ViewVariables] [DataField("maxGrenadesCount")] [DataField("maxGrenadesCount")]
public int MaxGrenades = 3; public int MaxGrenades = 3;
/// <summary> /// <summary>

View File

@@ -1,6 +1,6 @@
using Content.Server.Explosion.EntitySystems; using Content.Server.Explosion.EntitySystems;
using Robust.Shared.Physics.Collision.Shapes;
using Content.Shared.Explosion; using Content.Shared.Explosion;
using Robust.Shared.Physics.Collision.Shapes;
using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Components;
namespace Content.Server.Explosion.Components namespace Content.Server.Explosion.Components
@@ -22,18 +22,15 @@ namespace Content.Server.Explosion.Components
/// <summary> /// <summary>
/// How long the the proximity trigger animation plays for. /// How long the the proximity trigger animation plays for.
/// </summary> /// </summary>
[ViewVariables]
[DataField("animationDuration")] [DataField("animationDuration")]
public float AnimationDuration = 0.3f; public float AnimationDuration = 0.3f;
/// <summary> /// <summary>
/// Whether the entity needs to be anchored for the proximity to work. /// Whether the entity needs to be anchored for the proximity to work.
/// </summary> /// </summary>
[ViewVariables]
[DataField("requiresAnchored")] [DataField("requiresAnchored")]
public bool RequiresAnchored { get; set; } = true; public bool RequiresAnchored { get; set; } = true;
[ViewVariables]
[DataField("enabled")] [DataField("enabled")]
public bool Enabled = true; public bool Enabled = true;

View File

@@ -36,7 +36,6 @@ public sealed class AbsorbentComponent : Component
/// <summary> /// <summary>
/// Multiplier for the do_after delay for how quickly the mopping happens. /// Multiplier for the do_after delay for how quickly the mopping happens.
/// </summary> /// </summary>
[ViewVariables]
[DataField("mopSpeed")] public float MopSpeed = 1; [DataField("mopSpeed")] public float MopSpeed = 1;
/// <summary> /// <summary>

View File

@@ -46,7 +46,7 @@ namespace Content.Server.Fluids.Components
[ViewVariables(VVAccess.ReadOnly)] [ViewVariables(VVAccess.ReadOnly)]
public FixedPoint2 CurrentVolume => EntitySystem.Get<PuddleSystem>().CurrentVolume(Owner); public FixedPoint2 CurrentVolume => EntitySystem.Get<PuddleSystem>().CurrentVolume(Owner);
[ViewVariables] [DataField("overflowVolume")] [DataField("overflowVolume")]
public FixedPoint2 OverflowVolume = DefaultOverflowVolume; public FixedPoint2 OverflowVolume = DefaultOverflowVolume;
/// <summary> /// <summary>

View File

@@ -10,7 +10,6 @@ public sealed class GatherableComponent : Component
/// Whitelist for specifying the kind of tools can be used on a resource /// Whitelist for specifying the kind of tools can be used on a resource
/// Supports multiple tags. /// Supports multiple tags.
/// </summary> /// </summary>
[ViewVariables]
[DataField("whitelist", required: true)] [DataField("whitelist", required: true)]
public EntityWhitelist? ToolWhitelist; public EntityWhitelist? ToolWhitelist;

View File

@@ -14,14 +14,12 @@ namespace Content.Server.Guardian
/// <summary> /// <summary>
/// Percentage of damage reflected from the guardian to the host /// Percentage of damage reflected from the guardian to the host
/// </summary> /// </summary>
[ViewVariables]
[DataField("damageShare")] [DataField("damageShare")]
public float DamageShare { get; set; } = 0.85f; public float DamageShare { get; set; } = 0.85f;
/// <summary> /// <summary>
/// Maximum distance the guardian can travel before it's forced to recall, use YAML to set /// Maximum distance the guardian can travel before it's forced to recall, use YAML to set
/// </summary> /// </summary>
[ViewVariables]
[DataField("distanceAllowed")] [DataField("distanceAllowed")]
public float DistanceAllowed { get; set; } = 5f; public float DistanceAllowed { get; set; } = 5f;

View File

@@ -20,7 +20,6 @@ namespace Content.Server.Guardian
/// <summary> /// <summary>
/// The prototype of the guardian entity which will be created /// The prototype of the guardian entity which will be created
/// </summary> /// </summary>
[ViewVariables]
[DataField("guardianProto", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>), required: true)] [DataField("guardianProto", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>), required: true)]
public string GuardianProto { get; set; } = default!; public string GuardianProto { get; set; } = default!;

View File

@@ -9,41 +9,37 @@ namespace Content.Server.Holiday
[Prototype("holiday")] [Prototype("holiday")]
public sealed class HolidayPrototype : IPrototype public sealed class HolidayPrototype : IPrototype
{ {
[ViewVariables] [DataField("name")] public string Name { get; private set; } = string.Empty; [DataField("name")] public string Name { get; private set; } = string.Empty;
[ViewVariables] [ViewVariables]
[IdDataFieldAttribute] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
[ViewVariables]
[DataField("beginDay")] [DataField("beginDay")]
public byte BeginDay { get; set; } = 1; public byte BeginDay { get; set; } = 1;
[ViewVariables]
[DataField("beginMonth")] [DataField("beginMonth")]
public Month BeginMonth { get; set; } = Month.Invalid; public Month BeginMonth { get; set; } = Month.Invalid;
/// <summary> /// <summary>
/// Day this holiday will end. Zero means it lasts a single day. /// Day this holiday will end. Zero means it lasts a single day.
/// </summary> /// </summary>
[ViewVariables]
[DataField("endDay")] [DataField("endDay")]
public byte EndDay { get; set; } public byte EndDay { get; set; }
/// <summary> /// <summary>
/// Month this holiday will end in. Invalid means it lasts a single month. /// Month this holiday will end in. Invalid means it lasts a single month.
/// </summary> /// </summary>
[ViewVariables]
[DataField("endMonth")] [DataField("endMonth")]
public Month EndMonth { get; set; } = Month.Invalid; public Month EndMonth { get; set; } = Month.Invalid;
[ViewVariables] [DataField("shouldCelebrate")] [DataField("shouldCelebrate")]
private readonly IHolidayShouldCelebrate _shouldCelebrate = new DefaultHolidayShouldCelebrate(); private readonly IHolidayShouldCelebrate _shouldCelebrate = new DefaultHolidayShouldCelebrate();
[ViewVariables] [DataField("greet")] [DataField("greet")]
private readonly IHolidayGreet _greet = new DefaultHolidayGreet(); private readonly IHolidayGreet _greet = new DefaultHolidayGreet();
[ViewVariables] [DataField("celebrate")] [DataField("celebrate")]
private readonly IHolidayCelebrate _celebrate = new DefaultHolidayCelebrate(); private readonly IHolidayCelebrate _celebrate = new DefaultHolidayCelebrate();
public bool ShouldCelebrate(DateTime date) public bool ShouldCelebrate(DateTime date)

View File

@@ -10,11 +10,9 @@ namespace Content.Server.Kitchen.Components
[Access(typeof(ReagentGrinderSystem))] [Access(typeof(ReagentGrinderSystem))]
public sealed class ExtractableComponent : Component public sealed class ExtractableComponent : Component
{ {
[ViewVariables]
[DataField("juiceSolution")] [DataField("juiceSolution")]
public Solution? JuiceSolution; public Solution? JuiceSolution;
[ViewVariables]
[DataField("grindableSolutionName")] [DataField("grindableSolutionName")]
public string? GrindableSolution; public string? GrindableSolution;
} }

View File

@@ -1,5 +1,5 @@
using Content.Shared.Smoking;
using Content.Server.Light.EntitySystems; using Content.Server.Light.EntitySystems;
using Content.Shared.Smoking;
using Robust.Shared.Audio; using Robust.Shared.Audio;
namespace Content.Server.Light.Components namespace Content.Server.Light.Components
@@ -11,7 +11,6 @@ namespace Content.Server.Light.Components
/// <summary> /// <summary>
/// Current state to matchstick. Can be <code>Unlit</code>, <code>Lit</code> or <code>Burnt</code>. /// Current state to matchstick. Can be <code>Unlit</code>, <code>Lit</code> or <code>Burnt</code>.
/// </summary> /// </summary>
[ViewVariables]
[DataField("state")] [DataField("state")]
public SmokableState CurrentState = SmokableState.Unlit; public SmokableState CurrentState = SmokableState.Unlit;

View File

@@ -1,12 +1,12 @@
using System.Threading;
using Content.Server.Light.EntitySystems; using Content.Server.Light.EntitySystems;
using Content.Shared.Damage; using Content.Shared.Damage;
using Content.Shared.Light; using Content.Shared.Light;
using Robust.Shared.Containers;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.Prototypes;
using Content.Shared.MachineLinking; using Content.Shared.MachineLinking;
using System.Threading;
using Robust.Shared.Audio; using Robust.Shared.Audio;
using Robust.Shared.Containers;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.Light.Components namespace Content.Server.Light.Components
{ {
@@ -28,7 +28,6 @@ namespace Content.Server.Light.Components
[DataField("bulb")] [DataField("bulb")]
public LightBulbType BulbType; public LightBulbType BulbType;
[ViewVariables]
[DataField("on")] [DataField("on")]
public bool On = true; public bool On = true;
@@ -36,15 +35,12 @@ namespace Content.Server.Light.Components
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]
public DamageSpecifier Damage = default!; public DamageSpecifier Damage = default!;
[ViewVariables]
[DataField("ignoreGhostsBoo")] [DataField("ignoreGhostsBoo")]
public bool IgnoreGhostsBoo; public bool IgnoreGhostsBoo;
[ViewVariables]
[DataField("ghostBlinkingTime")] [DataField("ghostBlinkingTime")]
public TimeSpan GhostBlinkingTime = TimeSpan.FromSeconds(10); public TimeSpan GhostBlinkingTime = TimeSpan.FromSeconds(10);
[ViewVariables]
[DataField("ghostBlinkingCooldown")] [DataField("ghostBlinkingCooldown")]
public TimeSpan GhostBlinkingCooldown = TimeSpan.FromSeconds(60); public TimeSpan GhostBlinkingCooldown = TimeSpan.FromSeconds(60);

View File

@@ -28,7 +28,6 @@ public sealed class SpellbookComponent : Component
[DataField("instantSpells", customTypeSerializer: typeof(PrototypeIdDictionarySerializer<int, InstantActionPrototype>))] [DataField("instantSpells", customTypeSerializer: typeof(PrototypeIdDictionarySerializer<int, InstantActionPrototype>))]
public readonly Dictionary<string, int> InstantSpells = new(); public readonly Dictionary<string, int> InstantSpells = new();
[ViewVariables]
[DataField("learnTime")] [DataField("learnTime")]
public float LearnTime = .75f; public float LearnTime = .75f;

View File

@@ -12,7 +12,7 @@ public sealed class InstantSpawnSpellEvent : InstantActionEvent
[DataField("prototype", required: true, customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))] [DataField("prototype", required: true, customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string Prototype = default!; public string Prototype = default!;
[ViewVariables, DataField("preventCollide")] [DataField("preventCollide")]
public bool PreventCollideWithCaster = true; public bool PreventCollideWithCaster = true;
/// <summary> /// <summary>

View File

@@ -1,6 +1,6 @@
using Content.Shared.Storage;
using System.Threading; using System.Threading;
using Content.Shared.Construction.Prototypes; using Content.Shared.Construction.Prototypes;
using Content.Shared.Storage;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
@@ -64,7 +64,7 @@ namespace Content.Server.Medical.BiomassReclaimer
/// <summary> /// <summary>
/// The base yield per mass unit when no components are upgraded. /// The base yield per mass unit when no components are upgraded.
/// </summary> /// </summary>
[ViewVariables, DataField("baseYieldPerUnitMass")] [DataField("baseYieldPerUnitMass")]
public float BaseYieldPerUnitMass = 0.4f; public float BaseYieldPerUnitMass = 0.4f;
/// <summary> /// <summary>
@@ -90,7 +90,7 @@ namespace Content.Server.Medical.BiomassReclaimer
/// The base time per mass unit that it takes to process a mob /// The base time per mass unit that it takes to process a mob
/// when no components are upgraded. /// when no components are upgraded.
/// </summary> /// </summary>
[ViewVariables, DataField("baseProcessingTimePerUnitMass")] [DataField("baseProcessingTimePerUnitMass")]
public float BaseProcessingTimePerUnitMass = 0.5f; public float BaseProcessingTimePerUnitMass = 0.5f;
/// <summary> /// <summary>
@@ -103,7 +103,7 @@ namespace Content.Server.Medical.BiomassReclaimer
/// How much the machine part quality affects the yield. /// How much the machine part quality affects the yield.
/// Going up a tier will multiply the speed by this amount. /// Going up a tier will multiply the speed by this amount.
/// </summary> /// </summary>
[ViewVariables, DataField("partRatingSpeedMultiplier")] [DataField("partRatingSpeedMultiplier")]
public float PartRatingSpeedMultiplier = 1.35f; public float PartRatingSpeedMultiplier = 1.35f;
/// <summary> /// <summary>

View File

@@ -1,7 +1,7 @@
using System.Threading; using System.Threading;
using Content.Server.UserInterface; using Content.Server.UserInterface;
using Content.Shared.MedicalScanner;
using Content.Shared.Disease; using Content.Shared.Disease;
using Content.Shared.MedicalScanner;
using Robust.Server.GameObjects; using Robust.Server.GameObjects;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
@@ -18,7 +18,6 @@ namespace Content.Server.Medical.Components
/// How long it takes to scan someone. /// How long it takes to scan someone.
/// </summary> /// </summary>
[DataField("scanDelay")] [DataField("scanDelay")]
[ViewVariables]
public float ScanDelay = 0.8f; public float ScanDelay = 0.8f;
/// <summary> /// <summary>
/// Token for interrupting scanning do after. /// Token for interrupting scanning do after.

View File

@@ -7,7 +7,7 @@ namespace Content.Server.NPC.Components
/// <summary> /// <summary>
/// Contains all of the world data for a particular NPC in terms of how it sees the world. /// Contains all of the world data for a particular NPC in terms of how it sees the world.
/// </summary> /// </summary>
[ViewVariables, DataField("blackboard", customTypeSerializer: typeof(NPCBlackboardSerializer))] [DataField("blackboard", customTypeSerializer: typeof(NPCBlackboardSerializer))]
public NPCBlackboard Blackboard = new(); public NPCBlackboard Blackboard = new();
} }
} }

View File

@@ -9,7 +9,7 @@ namespace Content.Server.NPC.HTN;
public sealed class HTNBranch public sealed class HTNBranch
{ {
// Made this its own class if we ever need to change it. // Made this its own class if we ever need to change it.
[ViewVariables, DataField("preconditions")] [DataField("preconditions")]
public List<HTNPrecondition> Preconditions = new(); public List<HTNPrecondition> Preconditions = new();
[ViewVariables] public List<HTNTask> Tasks = new(); [ViewVariables] public List<HTNTask> Tasks = new();
@@ -17,6 +17,6 @@ public sealed class HTNBranch
/// <summary> /// <summary>
/// Due to how serv3 works we need to defer getting the actual tasks until after they have all been serialized. /// Due to how serv3 works we need to defer getting the actual tasks until after they have all been serialized.
/// </summary> /// </summary>
[ViewVariables, DataField("tasks", required: true, customTypeSerializer:typeof(HTNTaskListSerializer))] [DataField("tasks", required: true, customTypeSerializer:typeof(HTNTaskListSerializer))]
public List<string> TaskPrototypes = default!; public List<string> TaskPrototypes = default!;
} }

View File

@@ -9,9 +9,9 @@ public sealed class CoordinatesInRangePrecondition : HTNPrecondition
{ {
[Dependency] private readonly IEntityManager _entManager = default!; [Dependency] private readonly IEntityManager _entManager = default!;
[ViewVariables, DataField("targetKey", required: true)] public string TargetKey = default!; [DataField("targetKey", required: true)] public string TargetKey = default!;
[ViewVariables, DataField("rangeKey", required: true)] [DataField("rangeKey", required: true)]
public string RangeKey = default!; public string RangeKey = default!;
public override bool IsMet(NPCBlackboard blackboard) public override bool IsMet(NPCBlackboard blackboard)

View File

@@ -9,9 +9,9 @@ public sealed class CoordinatesNotInRangePrecondition : HTNPrecondition
{ {
[Dependency] private readonly IEntityManager _entManager = default!; [Dependency] private readonly IEntityManager _entManager = default!;
[ViewVariables, DataField("targetKey", required: true)] public string TargetKey = default!; [DataField("targetKey", required: true)] public string TargetKey = default!;
[ViewVariables, DataField("rangeKey", required: true)] [DataField("rangeKey", required: true)]
public string RangeKey = default!; public string RangeKey = default!;
public override bool IsMet(NPCBlackboard blackboard) public override bool IsMet(NPCBlackboard blackboard)

View File

@@ -6,10 +6,10 @@ public sealed class TargetInLOSPrecondition : HTNPrecondition
{ {
private InteractionSystem _interaction = default!; private InteractionSystem _interaction = default!;
[ViewVariables, DataField("targetKey")] [DataField("targetKey")]
public string TargetKey = "CombatTarget"; public string TargetKey = "CombatTarget";
[ViewVariables, DataField("rangeKey")] [DataField("rangeKey")]
public string RangeKey = "RangeKey"; public string RangeKey = "RangeKey";
public override void Initialize(IEntitySystemManager sysManager) public override void Initialize(IEntitySystemManager sysManager)

View File

@@ -9,9 +9,9 @@ public sealed class TargetInRangePrecondition : HTNPrecondition
{ {
[Dependency] private readonly IEntityManager _entManager = default!; [Dependency] private readonly IEntityManager _entManager = default!;
[ViewVariables, DataField("targetKey", required: true)] public string TargetKey = default!; [DataField("targetKey", required: true)] public string TargetKey = default!;
[ViewVariables, DataField("rangeKey", required: true)] [DataField("rangeKey", required: true)]
public string RangeKey = default!; public string RangeKey = default!;
public override bool IsMet(NPCBlackboard blackboard) public override bool IsMet(NPCBlackboard blackboard)

View File

@@ -1,6 +1,5 @@
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Content.Server.MobState;
using Content.Server.NPC.Components; using Content.Server.NPC.Components;
using Content.Shared.MobState; using Content.Shared.MobState;
using Content.Shared.MobState.Components; using Content.Shared.MobState.Components;
@@ -17,13 +16,13 @@ public sealed class MeleeOperator : HTNOperator
/// <summary> /// <summary>
/// Key that contains the target entity. /// Key that contains the target entity.
/// </summary> /// </summary>
[ViewVariables, DataField("targetKey", required: true)] [DataField("targetKey", required: true)]
public string TargetKey = default!; public string TargetKey = default!;
/// <summary> /// <summary>
/// Minimum damage state that the target has to be in for us to consider attacking. /// Minimum damage state that the target has to be in for us to consider attacking.
/// </summary> /// </summary>
[ViewVariables, DataField("targetState")] [DataField("targetState")]
public DamageState TargetState = DamageState.Alive; public DamageState TargetState = DamageState.Alive;
// Like movement we add a component and pass it off to the dedicated system. // Like movement we add a component and pass it off to the dedicated system.

View File

@@ -3,10 +3,8 @@ using System.Threading.Tasks;
using Content.Server.NPC.Components; using Content.Server.NPC.Components;
using Content.Server.NPC.Pathfinding; using Content.Server.NPC.Pathfinding;
using Content.Server.NPC.Systems; using Content.Server.NPC.Systems;
using Content.Shared.NPC;
using Robust.Shared.Map; using Robust.Shared.Map;
using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Components;
using YamlDotNet.Core.Tokens;
namespace Content.Server.NPC.HTN.PrimitiveTasks.Operators; namespace Content.Server.NPC.HTN.PrimitiveTasks.Operators;
@@ -23,31 +21,31 @@ public sealed class MoveToOperator : HTNOperator
/// <summary> /// <summary>
/// Should we assume the MovementTarget is reachable during planning or should we pathfind to it? /// Should we assume the MovementTarget is reachable during planning or should we pathfind to it?
/// </summary> /// </summary>
[ViewVariables, DataField("pathfindInPlanning")] [DataField("pathfindInPlanning")]
public bool PathfindInPlanning = true; public bool PathfindInPlanning = true;
/// <summary> /// <summary>
/// When we're finished moving to the target should we remove its key? /// When we're finished moving to the target should we remove its key?
/// </summary> /// </summary>
[ViewVariables, DataField("removeKeyOnFinish")] [DataField("removeKeyOnFinish")]
public bool RemoveKeyOnFinish = true; public bool RemoveKeyOnFinish = true;
/// <summary> /// <summary>
/// Target Coordinates to move to. This gets removed after execution. /// Target Coordinates to move to. This gets removed after execution.
/// </summary> /// </summary>
[ViewVariables, DataField("targetKey")] [DataField("targetKey")]
public string TargetKey = "MovementTarget"; public string TargetKey = "MovementTarget";
/// <summary> /// <summary>
/// Where the pathfinding result will be stored (if applicable). This gets removed after execution. /// Where the pathfinding result will be stored (if applicable). This gets removed after execution.
/// </summary> /// </summary>
[ViewVariables, DataField("pathfindKey")] [DataField("pathfindKey")]
public string PathfindKey = NPCBlackboard.PathfindKey; public string PathfindKey = NPCBlackboard.PathfindKey;
/// <summary> /// <summary>
/// How close we need to get before considering movement finished. /// How close we need to get before considering movement finished.
/// </summary> /// </summary>
[ViewVariables, DataField("rangeKey")] [DataField("rangeKey")]
public string RangeKey = "MovementRange"; public string RangeKey = "MovementRange";
private const string MovementCancelToken = "MovementCancelToken"; private const string MovementCancelToken = "MovementCancelToken";

View File

@@ -18,12 +18,12 @@ public abstract class NPCCombatOperator : HTNOperator
protected InteractionSystem Interaction = default!; protected InteractionSystem Interaction = default!;
private PathfindingSystem _pathfinding = default!; private PathfindingSystem _pathfinding = default!;
[ViewVariables, DataField("key")] public string Key = "CombatTarget"; [DataField("key")] public string Key = "CombatTarget";
/// <summary> /// <summary>
/// The EntityCoordinates of the specified target. /// The EntityCoordinates of the specified target.
/// </summary> /// </summary>
[ViewVariables, DataField("keyCoordinates")] [DataField("keyCoordinates")]
public string KeyCoordinates = "CombatTargetCoordinates"; public string KeyCoordinates = "CombatTargetCoordinates";
/// <summary> /// <summary>

View File

@@ -3,7 +3,6 @@ using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Content.Server.NPC.Pathfinding; using Content.Server.NPC.Pathfinding;
using Robust.Shared.Map; using Robust.Shared.Map;
using Robust.Shared.Random;
namespace Content.Server.NPC.HTN.PrimitiveTasks.Operators; namespace Content.Server.NPC.HTN.PrimitiveTasks.Operators;
@@ -20,16 +19,16 @@ public sealed class PickAccessibleComponentOperator : HTNOperator
[DataField("rangeKey", required: true)] [DataField("rangeKey", required: true)]
public string RangeKey = string.Empty; public string RangeKey = string.Empty;
[ViewVariables, DataField("targetKey", required: true)] [DataField("targetKey", required: true)]
public string TargetKey = string.Empty; public string TargetKey = string.Empty;
[ViewVariables, DataField("component", required: true)] [DataField("component", required: true)]
public string Component = string.Empty; public string Component = string.Empty;
/// <summary> /// <summary>
/// Where the pathfinding result will be stored (if applicable). This gets removed after execution. /// Where the pathfinding result will be stored (if applicable). This gets removed after execution.
/// </summary> /// </summary>
[ViewVariables, DataField("pathfindKey")] [DataField("pathfindKey")]
public string PathfindKey = NPCBlackboard.PathfindKey; public string PathfindKey = NPCBlackboard.PathfindKey;
public override void Initialize(IEntitySystemManager sysManager) public override void Initialize(IEntitySystemManager sysManager)

View File

@@ -2,7 +2,6 @@ using System.Linq;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Content.Server.NPC.Pathfinding; using Content.Server.NPC.Pathfinding;
using Robust.Shared.Random;
namespace Content.Server.NPC.HTN.PrimitiveTasks.Operators; namespace Content.Server.NPC.HTN.PrimitiveTasks.Operators;
@@ -16,13 +15,13 @@ public sealed class PickAccessibleOperator : HTNOperator
[DataField("rangeKey", required: true)] [DataField("rangeKey", required: true)]
public string RangeKey = string.Empty; public string RangeKey = string.Empty;
[ViewVariables, DataField("targetKey", required: true)] [DataField("targetKey", required: true)]
public string TargetKey = string.Empty; public string TargetKey = string.Empty;
/// <summary> /// <summary>
/// Where the pathfinding result will be stored (if applicable). This gets removed after execution. /// Where the pathfinding result will be stored (if applicable). This gets removed after execution.
/// </summary> /// </summary>
[ViewVariables, DataField("pathfindKey")] [DataField("pathfindKey")]
public string PathfindKey = NPCBlackboard.PathfindKey; public string PathfindKey = NPCBlackboard.PathfindKey;
public override void Initialize(IEntitySystemManager sysManager) public override void Initialize(IEntitySystemManager sysManager)

View File

@@ -8,7 +8,7 @@ public sealed class PickRandomRotationOperator : HTNOperator
{ {
[Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly IRobustRandom _random = default!;
[ViewVariables, DataField("targetKey")] [DataField("targetKey")]
public string TargetKey = "RotateTarget"; public string TargetKey = "RotateTarget";
public override async Task<(bool Valid, Dictionary<string, object>? Effects)> Plan(NPCBlackboard blackboard, public override async Task<(bool Valid, Dictionary<string, object>? Effects)> Plan(NPCBlackboard blackboard,

View File

@@ -14,13 +14,13 @@ public sealed class RangedOperator : HTNOperator
/// <summary> /// <summary>
/// Key that contains the target entity. /// Key that contains the target entity.
/// </summary> /// </summary>
[ViewVariables, DataField("targetKey", required: true)] [DataField("targetKey", required: true)]
public string TargetKey = default!; public string TargetKey = default!;
/// <summary> /// <summary>
/// Minimum damage state that the target has to be in for us to consider attacking. /// Minimum damage state that the target has to be in for us to consider attacking.
/// </summary> /// </summary>
[ViewVariables, DataField("targetState")] [DataField("targetState")]
public DamageState TargetState = DamageState.Alive; public DamageState TargetState = DamageState.Alive;
// Like movement we add a component and pass it off to the dedicated system. // Like movement we add a component and pass it off to the dedicated system.

View File

@@ -7,14 +7,14 @@ public sealed class RotateToTargetOperator : HTNOperator
[Dependency] private readonly IEntityManager _entityManager = default!; [Dependency] private readonly IEntityManager _entityManager = default!;
private RotateToFaceSystem _rotate = default!; private RotateToFaceSystem _rotate = default!;
[ViewVariables, DataField("targetKey")] [DataField("targetKey")]
public string TargetKey = "RotateTarget"; public string TargetKey = "RotateTarget";
[ViewVariables, DataField("rotateSpeedKey")] [DataField("rotateSpeedKey")]
public string RotationSpeedKey = NPCBlackboard.RotateSpeed; public string RotationSpeedKey = NPCBlackboard.RotateSpeed;
// Didn't use a key because it's likely the same between all NPCs // Didn't use a key because it's likely the same between all NPCs
[ViewVariables, DataField("tolerance")] [DataField("tolerance")]
public Angle Tolerance = Angle.FromDegrees(1); public Angle Tolerance = Angle.FromDegrees(1);
public override void Initialize(IEntitySystemManager sysManager) public override void Initialize(IEntitySystemManager sysManager)

View File

@@ -6,7 +6,7 @@ public sealed class SpeakOperator : HTNOperator
{ {
private ChatSystem _chat = default!; private ChatSystem _chat = default!;
[ViewVariables, DataField("speech", required: true)] [DataField("speech", required: true)]
public string Speech = string.Empty; public string Speech = string.Empty;
public override void Initialize(IEntitySystemManager sysManager) public override void Initialize(IEntitySystemManager sysManager)

View File

@@ -21,7 +21,7 @@ public sealed class MedibotInjectOperator : HTNOperator
/// <summary> /// <summary>
/// Target entity to inject. /// Target entity to inject.
/// </summary> /// </summary>
[ViewVariables, DataField("targetKey", required: true)] [DataField("targetKey", required: true)]
public string TargetKey = string.Empty; public string TargetKey = string.Empty;
public override void Initialize(IEntitySystemManager sysManager) public override void Initialize(IEntitySystemManager sysManager)

View File

@@ -15,18 +15,18 @@ public sealed class PickNearbyInjectableOperator : HTNOperator
private EntityLookupSystem _lookup = default!; private EntityLookupSystem _lookup = default!;
private PathfindingSystem _pathfinding = default!; private PathfindingSystem _pathfinding = default!;
[ViewVariables, DataField("rangeKey")] public string RangeKey = NPCBlackboard.MedibotInjectRange; [DataField("rangeKey")] public string RangeKey = NPCBlackboard.MedibotInjectRange;
/// <summary> /// <summary>
/// Target entity to inject /// Target entity to inject
/// </summary> /// </summary>
[ViewVariables, DataField("targetKey", required: true)] [DataField("targetKey", required: true)]
public string TargetKey = string.Empty; public string TargetKey = string.Empty;
/// <summary> /// <summary>
/// Target entitycoordinates to move to. /// Target entitycoordinates to move to.
/// </summary> /// </summary>
[ViewVariables, DataField("targetMoveKey", required: true)] [DataField("targetMoveKey", required: true)]
public string TargetMoveKey = string.Empty; public string TargetMoveKey = string.Empty;
public override void Initialize(IEntitySystemManager sysManager) public override void Initialize(IEntitySystemManager sysManager)

View File

@@ -8,7 +8,7 @@ public sealed class WaitOperator : HTNOperator
/// <summary> /// <summary>
/// Blackboard key for the time we'll wait for. /// Blackboard key for the time we'll wait for.
/// </summary> /// </summary>
[ViewVariables, DataField("key", required: true)] public string Key = string.Empty; [DataField("key", required: true)] public string Key = string.Empty;
public override HTNOperatorStatus Update(NPCBlackboard blackboard, float frameTime) public override HTNOperatorStatus Update(NPCBlackboard blackboard, float frameTime)
{ {

View File

@@ -10,7 +10,7 @@ namespace Content.Server.NodeContainer
public sealed class NodeContainerComponent : Component public sealed class NodeContainerComponent : Component
{ {
//HACK: THIS BEING readOnly IS A FILTHY HACK AND I HATE IT --moony //HACK: THIS BEING readOnly IS A FILTHY HACK AND I HATE IT --moony
[DataField("nodes", readOnly: true)] [ViewVariables] public Dictionary<string, Node> Nodes { get; } = new(); [DataField("nodes", readOnly: true)] public Dictionary<string, Node> Nodes { get; } = new();
[DataField("examinable")] public bool Examinable = false; [DataField("examinable")] public bool Examinable = false;

View File

@@ -15,7 +15,6 @@ namespace Content.Server.NodeContainer.Nodes
/// An ID used as a criteria for combining into groups. Determines which <see cref="INodeGroup"/> /// An ID used as a criteria for combining into groups. Determines which <see cref="INodeGroup"/>
/// implementation is used as a group, detailed in <see cref="INodeGroupFactory"/>. /// implementation is used as a group, detailed in <see cref="INodeGroupFactory"/>.
/// </summary> /// </summary>
[ViewVariables]
[DataField("nodeGroupID")] [DataField("nodeGroupID")]
public NodeGroupID NodeGroupID { get; private set; } = NodeGroupID.Default; public NodeGroupID NodeGroupID { get; private set; } = NodeGroupID.Default;

View File

@@ -18,7 +18,6 @@ namespace Content.Server.NodeContainer.Nodes
/// <summary> /// <summary>
/// The directions in which this pipe can connect to other pipes around it. /// The directions in which this pipe can connect to other pipes around it.
/// </summary> /// </summary>
[ViewVariables]
[DataField("pipeDirection")] [DataField("pipeDirection")]
private PipeDirection _originalPipeDirection; private PipeDirection _originalPipeDirection;
@@ -97,7 +96,6 @@ namespace Content.Server.NodeContainer.Nodes
} }
} }
[ViewVariables]
[DataField("volume")] [DataField("volume")]
public float Volume { get; set; } = DefaultVolume; public float Volume { get; set; } = DefaultVolume;

View File

@@ -1,7 +1,7 @@
using JetBrains.Annotations; using System.Threading;
using Content.Server.Nutrition.EntitySystems; using Content.Server.Nutrition.EntitySystems;
using Content.Shared.FixedPoint; using Content.Shared.FixedPoint;
using System.Threading; using JetBrains.Annotations;
using Robust.Shared.Audio; using Robust.Shared.Audio;
namespace Content.Server.Nutrition.Components namespace Content.Server.Nutrition.Components
@@ -14,11 +14,9 @@ namespace Content.Server.Nutrition.Components
public string SolutionName { get; set; } = DefaultSolutionName; public string SolutionName { get; set; } = DefaultSolutionName;
public const string DefaultSolutionName = "drink"; public const string DefaultSolutionName = "drink";
[ViewVariables]
[DataField("useSound")] [DataField("useSound")]
public SoundSpecifier UseSound = new SoundPathSpecifier("/Audio/Items/drink.ogg"); public SoundSpecifier UseSound = new SoundPathSpecifier("/Audio/Items/drink.ogg");
[ViewVariables]
[DataField("isOpen")] [DataField("isOpen")]
internal bool DefaultToOpened; internal bool DefaultToOpened;

View File

@@ -14,15 +14,12 @@ namespace Content.Server.Nutrition.Components
[DataField("solution")] [DataField("solution")]
public string SolutionName { get; set; } = "food"; public string SolutionName { get; set; } = "food";
[ViewVariables]
[DataField("useSound")] [DataField("useSound")]
public SoundSpecifier UseSound { get; set; } = new SoundPathSpecifier("/Audio/Items/eatfood.ogg"); public SoundSpecifier UseSound { get; set; } = new SoundPathSpecifier("/Audio/Items/eatfood.ogg");
[ViewVariables]
[DataField("trash", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))] [DataField("trash", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string? TrashPrototype { get; set; } public string? TrashPrototype { get; set; }
[ViewVariables]
[DataField("transferAmount")] [DataField("transferAmount")]
public FixedPoint2? TransferAmount { get; set; } = FixedPoint2.New(5); public FixedPoint2? TransferAmount { get; set; } = FixedPoint2.New(5);

View File

@@ -10,7 +10,7 @@ namespace Content.Server.Nutrition.Components
/// <summary> /// <summary>
/// The name of the solution of which to check emptiness /// The name of the solution of which to check emptiness
/// </summary> /// </summary>
[ViewVariables] [DataField("solution")] [DataField("solution")]
public string Solution { get; set; } = string.Empty; public string Solution { get; set; } = string.Empty;
} }
} }

View File

@@ -26,14 +26,12 @@ namespace Content.Server.Nutrition.Components
/// The chance that the utensil has to break with each use. /// The chance that the utensil has to break with each use.
/// A value of 0 means that it is unbreakable. /// A value of 0 means that it is unbreakable.
/// </summary> /// </summary>
[ViewVariables]
[DataField("breakChance")] [DataField("breakChance")]
public float BreakChance; public float BreakChance;
/// <summary> /// <summary>
/// The sound to be played if the utensil breaks. /// The sound to be played if the utensil breaks.
/// </summary> /// </summary>
[ViewVariables]
[DataField("breakSound")] [DataField("breakSound")]
public SoundSpecifier BreakSound = new SoundPathSpecifier("/Audio/Items/snap.ogg"); public SoundSpecifier BreakSound = new SoundPathSpecifier("/Audio/Items/snap.ogg");
} }

View File

@@ -1,4 +1,3 @@
using Content.Server.Containers;
using Content.Server.Objectives.Interfaces; using Content.Server.Objectives.Interfaces;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Containers; using Robust.Shared.Containers;
@@ -20,7 +19,6 @@ namespace Content.Server.Objectives.Conditions
/// Help newer players by saying e.g. "steal the chief engineer's advanced magboots" /// Help newer players by saying e.g. "steal the chief engineer's advanced magboots"
/// instead of "steal advanced magboots. Should be a loc string. /// instead of "steal advanced magboots. Should be a loc string.
/// </summary> /// </summary>
[ViewVariables]
[DataField("owner")] private string? _owner = null; [DataField("owner")] private string? _owner = null;
public IObjectiveCondition GetAssigned(Mind.Mind mind) public IObjectiveCondition GetAssigned(Mind.Mind mind)

View File

@@ -11,9 +11,9 @@ namespace Content.Server.Objectives
[IdDataFieldAttribute] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
[ViewVariables] [DataField("issuer")] public string Issuer { get; private set; } = "Unknown"; [DataField("issuer")] public string Issuer { get; private set; } = "Unknown";
[ViewVariables] [DataField("prob")] public float Probability { get; private set; } = 0.3f; [DataField("prob")] public float Probability { get; private set; } = 0.3f;
[ViewVariables] [ViewVariables]
public float Difficulty => _difficultyOverride ?? _conditions.Sum(c => c.Difficulty); public float Difficulty => _difficultyOverride ?? _conditions.Sum(c => c.Difficulty);
@@ -26,7 +26,6 @@ namespace Content.Server.Objectives
[ViewVariables] [ViewVariables]
public IReadOnlyList<IObjectiveCondition> Conditions => _conditions; public IReadOnlyList<IObjectiveCondition> Conditions => _conditions;
[ViewVariables]
[DataField("canBeDuplicate")] [DataField("canBeDuplicate")]
public bool CanBeDuplicateAssignment { get; private set; } public bool CanBeDuplicateAssignment { get; private set; }

View File

@@ -5,7 +5,6 @@ namespace Content.Server.PDA.Ringer
[RegisterComponent] [RegisterComponent]
public sealed class RingerComponent : Component public sealed class RingerComponent : Component
{ {
[ViewVariables]
[DataField("ringtone")] [DataField("ringtone")]
public Note[] Ringtone = new Note[SharedRingerSystem.RingtoneLength]; public Note[] Ringtone = new Note[SharedRingerSystem.RingtoneLength];

View File

@@ -1,4 +1,3 @@
using Content.Server.Power.EntitySystems;
using Content.Server.Power.NodeGroups; using Content.Server.Power.NodeGroups;
using Content.Shared.APC; using Content.Shared.APC;
using Robust.Shared.Audio; using Robust.Shared.Audio;
@@ -18,7 +17,6 @@ public sealed class ApcComponent : BaseApcNetComponent
/// <summary> /// <summary>
/// Is the panel open for this entity's APC? /// Is the panel open for this entity's APC?
/// </summary> /// </summary>
[ViewVariables]
[DataField("open")] [DataField("open")]
public bool IsApcOpen { get; set; } public bool IsApcOpen { get; set; }

View File

@@ -28,7 +28,7 @@ namespace Content.Server.Power.Components
[ViewVariables] [ViewVariables]
private bool _needsNet => _net != null; private bool _needsNet => _net != null;
[DataField("node")] [ViewVariables] public string? NodeId { get; set; } [DataField("node")] public string? NodeId { get; set; }
protected override void Initialize() protected override void Initialize()
{ {

View File

@@ -6,11 +6,9 @@ namespace Content.Server.Power.Components
[RegisterComponent] [RegisterComponent]
public sealed class CablePlacerComponent : Component public sealed class CablePlacerComponent : Component
{ {
[ViewVariables]
[DataField("cablePrototypeID", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))] [DataField("cablePrototypeID", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
public string? CablePrototypeId = "CableHV"; public string? CablePrototypeId = "CableHV";
[ViewVariables]
[DataField("blockingWireType")] [DataField("blockingWireType")]
public CableType BlockingCableType = CableType.HighVoltage; public CableType BlockingCableType = CableType.HighVoltage;
} }

View File

@@ -1,4 +1,3 @@
using Content.Shared.Containers.ItemSlots;
using Content.Shared.Power; using Content.Shared.Power;
namespace Content.Server.Power.Components namespace Content.Server.Power.Components
@@ -9,11 +8,9 @@ namespace Content.Server.Power.Components
[ViewVariables] [ViewVariables]
public CellChargerStatus Status; public CellChargerStatus Status;
[ViewVariables]
[DataField("chargeRate")] [DataField("chargeRate")]
public int ChargeRate = 20; public int ChargeRate = 20;
[ViewVariables]
[DataField("slotId", required: true)] [DataField("slotId", required: true)]
public string SlotId = string.Empty; public string SlotId = string.Empty;
} }

View File

@@ -31,7 +31,6 @@ namespace Content.Server.RCD.Components
/// <summary> /// <summary>
/// What mode are we on? Can be floors, walls, deconstruct. /// What mode are we on? Can be floors, walls, deconstruct.
/// </summary> /// </summary>
[ViewVariables]
[DataField("mode")] [DataField("mode")]
public RcdMode Mode = RcdMode.Floors; public RcdMode Mode = RcdMode.Floors;

View File

@@ -28,7 +28,7 @@ namespace Content.Server.RatKing
/// <summary> /// <summary>
/// The action for the Domain ability /// The action for the Domain ability
/// </summary> /// </summary>
[ViewVariables, DataField("actionDomain", required: true)] [DataField("actionDomain", required: true)]
public InstantAction ActionDomain = new(); public InstantAction ActionDomain = new();
/// <summary> /// <summary>
@@ -40,7 +40,7 @@ namespace Content.Server.RatKing
/// <summary> /// <summary>
/// How many moles of Miasma are released after one us of Domain /// How many moles of Miasma are released after one us of Domain
/// </summary> /// </summary>
[ViewVariables, DataField("molesMiasmaPerDomain")] [DataField("molesMiasmaPerDomain")]
public float MolesMiasmaPerDomain = 100f; public float MolesMiasmaPerDomain = 100f;
} }
}; };

Some files were not shown because too many files have changed in this diff Show More