Remove redundant read-only VV from datafields (#12626)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
using System;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.Utility;
|
||||
@@ -13,7 +12,7 @@ namespace Content.Client.Clickable
|
||||
[Dependency] private readonly IEyeManager _eyeManager = default!;
|
||||
[Dependency] private readonly IEntityManager _entMan = default!;
|
||||
|
||||
[ViewVariables] [DataField("bounds")] public DirBoundData? Bounds;
|
||||
[DataField("bounds")] public DirBoundData? Bounds;
|
||||
|
||||
/// <summary>
|
||||
/// 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]
|
||||
public sealed class DirBoundData
|
||||
{
|
||||
[ViewVariables] [DataField("all")] public Box2 All;
|
||||
[ViewVariables] [DataField("north")] public Box2 North;
|
||||
[ViewVariables] [DataField("south")] public Box2 South;
|
||||
[ViewVariables] [DataField("east")] public Box2 East;
|
||||
[ViewVariables] [DataField("west")] public Box2 West;
|
||||
[DataField("all")] public Box2 All;
|
||||
[DataField("north")] public Box2 North;
|
||||
[DataField("south")] public Box2 South;
|
||||
[DataField("east")] public Box2 East;
|
||||
[DataField("west")] public Box2 West;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,6 @@ public sealed class InstrumentComponent : SharedInstrumentComponent
|
||||
/// <summary>
|
||||
/// Whether this instrument is handheld or not.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("handheld")]
|
||||
public bool Handheld { get; set; } // TODO: Replace this by simply checking if the entity has an ItemComponent.
|
||||
|
||||
|
||||
@@ -1,13 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using Content.Client.UserInterface.Controls;
|
||||
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
|
||||
{
|
||||
@@ -19,7 +10,6 @@ namespace Content.Client.Inventory
|
||||
[Access(typeof(ClientInventorySystem))]
|
||||
public sealed class ClientInventoryComponent : InventoryComponent
|
||||
{
|
||||
[ViewVariables]
|
||||
[DataField("speciesId")] public string? SpeciesId { get; set; }
|
||||
[ViewVariables]
|
||||
public readonly Dictionary<string, ClientInventorySystem.SlotData> SlotData = new ();
|
||||
|
||||
@@ -1,19 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using Content.Shared.Light.Component;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Client.Animations;
|
||||
using Robust.Client.GameObjects;
|
||||
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.Serialization;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Client.Light.Components
|
||||
{
|
||||
@@ -29,25 +21,24 @@ namespace Content.Client.Light.Components
|
||||
protected IEntityManager _entMan = 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")]
|
||||
[ViewVariables]
|
||||
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; }
|
||||
|
||||
@@ -182,7 +173,6 @@ namespace Content.Client.Light.Components
|
||||
/// time of the full animation, including the reverse interpolation.
|
||||
/// </summary>
|
||||
[DataField("reverseWhenFinished")]
|
||||
[ViewVariables]
|
||||
public bool ReverseWhenFinished { get; set; }
|
||||
|
||||
public override (int KeyFrameIndex, float FramePlayingTime) AdvancePlayback(
|
||||
@@ -308,7 +298,6 @@ namespace Content.Client.Light.Components
|
||||
public sealed class ColorCycleBehaviour : LightBehaviourAnimationTrack, ISerializationHooks
|
||||
{
|
||||
[DataField("property")]
|
||||
[ViewVariables]
|
||||
public override string Property { get; protected set; } = "Color";
|
||||
|
||||
[DataField("colors")] public List<Color> ColorsToCycle { get; set; } = new();
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Content.Client.Weapons.Melee.Components;
|
||||
[RegisterComponent]
|
||||
public sealed class WeaponArcVisualsComponent : Component
|
||||
{
|
||||
[ViewVariables, DataField("animation")]
|
||||
[DataField("animation")]
|
||||
public WeaponArcAnimation Animation = WeaponArcAnimation.None;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("fadeOut")]
|
||||
|
||||
@@ -15,7 +15,6 @@ namespace Content.Server.Abilities.Mime
|
||||
/// <summary>
|
||||
/// Whether this component is active or not.
|
||||
/// </summarY>
|
||||
[ViewVariables]
|
||||
[DataField("enabled")]
|
||||
public bool Enabled = true;
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using Content.Shared.Atmos;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
||||
|
||||
namespace Content.Server.Atmos.Components
|
||||
@@ -10,7 +9,6 @@ namespace Content.Server.Atmos.Components
|
||||
public (EntityUid Grid, Vector2i Tile) LastPosition { get; set; }
|
||||
|
||||
[DataField("airBlockedDirection", customTypeSerializer: typeof(FlagSerializer<AtmosDirectionFlags>))]
|
||||
[ViewVariables]
|
||||
public int InitialAirBlockedDirection { get; set; } = (int) AtmosDirection.All;
|
||||
|
||||
[ViewVariables]
|
||||
@@ -22,15 +20,12 @@ namespace Content.Server.Atmos.Components
|
||||
[DataField("fixVacuum")]
|
||||
public bool FixVacuum { get; set; } = true;
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("rotateAirBlocked")]
|
||||
public bool RotateAirBlocked { get; set; } = true;
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("fixAirBlockedDirectionInitialize")]
|
||||
public bool FixAirBlockedDirectionInitialize { get; set; } = true;
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("noAirWhenFullyAirBlocked")]
|
||||
public bool NoAirWhenFullyAirBlocked { get; set; } = true;
|
||||
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
[RegisterComponent]
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,20 +32,18 @@ namespace Content.Server.Atmos.Components
|
||||
public IPlayingAudioStream? ConnectStream;
|
||||
public IPlayingAudioStream? DisconnectStream;
|
||||
|
||||
[DataField("air")] [ViewVariables] public GasMixture Air { get; set; } = new();
|
||||
[DataField("air")] public GasMixture Air { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Pressure at which tank should be considered 'low' such as for internals.
|
||||
/// </summary>
|
||||
[DataField("tankLowPressure")]
|
||||
[ViewVariables]
|
||||
public float TankLowPressure { get; set; } = DefaultLowPressure;
|
||||
|
||||
/// <summary>
|
||||
/// Distributed pressure.
|
||||
/// </summary>
|
||||
[DataField("outputPressure")]
|
||||
[ViewVariables]
|
||||
public float OutputPressure { get; set; } = DefaultOutputPressure;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -13,7 +13,6 @@ namespace Content.Server.Atmos.Components
|
||||
/// <summary>
|
||||
/// Accumulates time when yeeted by high pressure deltas.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("accumulator")]
|
||||
public float Accumulator = 0f;
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Content.Server.Atmos.EntitySystems;
|
||||
using Content.Server.Atmos.Reactions;
|
||||
using Content.Shared.Atmos;
|
||||
using Robust.Shared.Serialization;
|
||||
@@ -27,7 +26,6 @@ namespace Content.Server.Atmos
|
||||
private float _temperature = Atmospherics.TCMB;
|
||||
|
||||
[DataField("immutable")]
|
||||
[ViewVariables]
|
||||
public bool Immutable { get; private set; }
|
||||
|
||||
[ViewVariables]
|
||||
|
||||
@@ -5,7 +5,6 @@ namespace Content.Server.Atmos.Piping.Binary.Components
|
||||
[RegisterComponent]
|
||||
public sealed class GasValveComponent : Component
|
||||
{
|
||||
[ViewVariables]
|
||||
[DataField("open")]
|
||||
public bool Open { get; set; } = true;
|
||||
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
using Content.Server.Atmos.Components;
|
||||
using Robust.Shared.Map;
|
||||
|
||||
namespace Content.Server.Atmos.Piping.Components
|
||||
{
|
||||
/// <summary>
|
||||
@@ -19,7 +16,6 @@ namespace Content.Server.Atmos.Piping.Components
|
||||
/// <summary>
|
||||
/// Whether this device will join an entity system to process when not in a grid.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("joinSystem")]
|
||||
public bool JoinSystem { get; } = false;
|
||||
|
||||
|
||||
@@ -88,7 +88,6 @@ namespace Content.Server.Atmos
|
||||
[Access(typeof(AtmosphereSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends
|
||||
public GasMixture? Air { get; set; }
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("lastShare")]
|
||||
public float LastShare;
|
||||
|
||||
|
||||
@@ -37,10 +37,8 @@ namespace Content.Server.Bible.Components
|
||||
};
|
||||
|
||||
/// Used for respawning
|
||||
[ViewVariables]
|
||||
[DataField("accumulator")]
|
||||
public float Accumulator = 0f;
|
||||
[ViewVariables]
|
||||
[DataField("respawnTime")]
|
||||
public float RespawnTime = 180f;
|
||||
}
|
||||
|
||||
@@ -9,28 +9,24 @@ public sealed class ThermalRegulatorComponent : Component
|
||||
/// <summary>
|
||||
/// Heat generated due to metabolism. It's generated via metabolism
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("metabolismHeat")]
|
||||
public float MetabolismHeat { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Heat output via radiation.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("radiatedHeat")]
|
||||
public float RadiatedHeat { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Maximum heat regulated via sweat
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("sweatHeatRegulation")]
|
||||
public float SweatHeatRegulation { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Maximum heat regulated via shivering
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("shiveringHeatRegulation")]
|
||||
public float ShiveringHeatRegulation { get; private set; }
|
||||
|
||||
@@ -44,7 +40,6 @@ public sealed class ThermalRegulatorComponent : Component
|
||||
/// <summary>
|
||||
/// Normal body temperature
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("normalBodyTemperature")]
|
||||
public float NormalBodyTemperature { get; private set; }
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ namespace Content.Server.Botany
|
||||
public sealed class BotanySwabComponent : Component
|
||||
{
|
||||
[DataField("swabDelay")]
|
||||
[ViewVariables]
|
||||
public float SwabDelay = 2f;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -37,6 +37,6 @@ public sealed class SeedExtractorComponent : Component
|
||||
/// How much the machine part quality affects the amount of seeds outputted.
|
||||
/// Going up a tier will multiply the seed output by this amount.
|
||||
/// </summary>
|
||||
[DataField("partRatingSeedAmountMultiplier"), ViewVariables]
|
||||
[DataField("partRatingSeedAmountMultiplier")]
|
||||
public float PartRatingSeedAmountMultiplier = 1.5f;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ public sealed class BuckleComponent : SharedBuckleComponent
|
||||
/// be able to unbuckle after recently buckling.
|
||||
/// </summary>
|
||||
[DataField("delay")]
|
||||
[ViewVariables]
|
||||
public TimeSpan UnbuckleDelay = TimeSpan.FromSeconds(0.25f);
|
||||
|
||||
/// <summary>
|
||||
@@ -33,6 +32,5 @@ public sealed class BuckleComponent : SharedBuckleComponent
|
||||
/// <see cref="StrapComponent"/>.
|
||||
/// </summary>
|
||||
[DataField("size")]
|
||||
[ViewVariables]
|
||||
public int Size = 100;
|
||||
}
|
||||
|
||||
@@ -16,13 +16,13 @@ namespace Content.Server.Buckle.Components
|
||||
/// <summary>
|
||||
/// The angle in degrees to rotate the player by when they get strapped
|
||||
/// </summary>
|
||||
[ViewVariables] [DataField("rotation")]
|
||||
[DataField("rotation")]
|
||||
private int _rotation;
|
||||
|
||||
/// <summary>
|
||||
/// The size of the strap which is compared against when buckling entities
|
||||
/// </summary>
|
||||
[ViewVariables] [DataField("size")] private int _size = 100;
|
||||
[DataField("size")] private int _size = 100;
|
||||
private int _occupiedSize;
|
||||
|
||||
private bool _enabled = true;
|
||||
@@ -49,21 +49,18 @@ namespace Content.Server.Buckle.Components
|
||||
/// <summary>
|
||||
/// The sound to be played when a mob is buckled
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("buckleSound")]
|
||||
public SoundSpecifier BuckleSound { get; } = new SoundPathSpecifier("/Audio/Effects/buckle.ogg");
|
||||
|
||||
/// <summary>
|
||||
/// The sound to be played when a mob is unbuckled
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("unbuckleSound")]
|
||||
public SoundSpecifier UnbuckleSound { get; } = new SoundPathSpecifier("/Audio/Effects/unbuckle.ogg");
|
||||
|
||||
/// <summary>
|
||||
/// ID of the alert to show when buckled
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("buckledAlertType")]
|
||||
public AlertType BuckledAlertType { get; } = AlertType.Buckled;
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ namespace Content.Server.Cabinet
|
||||
/// <summary>
|
||||
/// Whether the cabinet is currently open or not.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("opened")]
|
||||
public bool Opened { get; set; } = false;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ namespace Content.Server.Cargo.Components
|
||||
/// <summary>
|
||||
/// How much time we've accumulated until next teleport.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("accumulator")]
|
||||
public float Accumulator = 0f;
|
||||
|
||||
|
||||
@@ -24,12 +24,12 @@ public sealed class StationCargoOrderDatabaseComponent : Component
|
||||
/// </summary>
|
||||
public int Index;
|
||||
|
||||
[ViewVariables, DataField("cargoShuttleProto", customTypeSerializer:typeof(PrototypeIdSerializer<CargoShuttlePrototype>))]
|
||||
[DataField("cargoShuttleProto", customTypeSerializer:typeof(PrototypeIdSerializer<CargoShuttlePrototype>))]
|
||||
public string? CargoShuttleProto = "CargoShuttle";
|
||||
|
||||
/// <summary>
|
||||
/// The cargo shuttle assigned to this station.
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("shuttle")]
|
||||
[DataField("shuttle")]
|
||||
public EntityUid? Shuttle;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
using System.Threading;
|
||||
using Content.Shared.Chemistry.Components;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Server.UserInterface;
|
||||
using Robust.Server.GameObjects;
|
||||
using Content.Shared.Chemistry;
|
||||
|
||||
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
|
||||
/// device that can only inject.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("injectOnly")]
|
||||
public bool InjectOnly;
|
||||
|
||||
@@ -31,7 +27,6 @@ namespace Content.Server.Chemistry.Components
|
||||
/// <remarks>
|
||||
/// for example: droppers would ignore mobs
|
||||
/// </remarks>
|
||||
[ViewVariables]
|
||||
[DataField("ignoreMobs")]
|
||||
public bool IgnoreMobs = false;
|
||||
|
||||
|
||||
@@ -7,11 +7,9 @@ namespace Content.Server.Chemistry.Components
|
||||
[RegisterComponent]
|
||||
public sealed class RehydratableComponent : Component
|
||||
{
|
||||
[ViewVariables]
|
||||
[DataField("catalyst")]
|
||||
internal string CatalystPrototype = "Water";
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("target")]
|
||||
internal string? TargetPrototype = default!;
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ namespace Content.Server.Chemistry.Components.SolutionManager
|
||||
[Access(typeof(SolutionContainerSystem))]
|
||||
public sealed class SolutionContainerManagerComponent : Component
|
||||
{
|
||||
[ViewVariables]
|
||||
[DataField("solutions")]
|
||||
[Access(typeof(SolutionContainerSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends
|
||||
public readonly Dictionary<string, Solution> Solutions = new();
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Shared.Vapor;
|
||||
using Robust.Shared.Map;
|
||||
|
||||
namespace Content.Server.Chemistry.Components
|
||||
{
|
||||
@@ -9,7 +7,6 @@ namespace Content.Server.Chemistry.Components
|
||||
{
|
||||
public const string SolutionName = "vapor";
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("transferAmount")]
|
||||
public FixedPoint2 TransferAmount = FixedPoint2.New(0.5);
|
||||
|
||||
|
||||
@@ -12,39 +12,38 @@ public sealed class ClimbableComponent : SharedClimbableComponent
|
||||
/// <summary>
|
||||
/// The time it takes to climb onto the entity.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("delay")]
|
||||
public float ClimbDelay = 0.8f;
|
||||
|
||||
/// <summary>
|
||||
/// If set, people can bonk on this if <see cref="CCVars.GameTableBonk"/> is set or if they are clumsy.
|
||||
/// </summary>
|
||||
[ViewVariables] [DataField("bonk")] public bool Bonk = false;
|
||||
[DataField("bonk")] public bool Bonk = false;
|
||||
|
||||
/// <summary>
|
||||
/// Chance of bonk triggering if the user is clumsy.
|
||||
/// </summary>
|
||||
[ViewVariables] [DataField("bonkClumsyChance")]
|
||||
[DataField("bonkClumsyChance")]
|
||||
public float BonkClumsyChance = 0.75f;
|
||||
|
||||
/// <summary>
|
||||
/// Sound to play when bonking.
|
||||
/// </summary>
|
||||
/// <seealso cref="Bonk"/>
|
||||
[ViewVariables] [DataField("bonkSound")]
|
||||
[DataField("bonkSound")]
|
||||
public SoundSpecifier? BonkSound;
|
||||
|
||||
/// <summary>
|
||||
/// How long to stun players on bonk, in seconds.
|
||||
/// </summary>
|
||||
/// <seealso cref="Bonk"/>
|
||||
[ViewVariables] [DataField("bonkTime")]
|
||||
[DataField("bonkTime")]
|
||||
public float BonkTime = 2;
|
||||
|
||||
/// <summary>
|
||||
/// How much damage to apply on bonk.
|
||||
/// </summary>
|
||||
/// <seealso cref="Bonk"/>
|
||||
[ViewVariables] [DataField("bonkDamage")]
|
||||
[DataField("bonkDamage")]
|
||||
public DamageSpecifier? BonkDamage;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Server.Construction.Completions
|
||||
public sealed class SpriteChange : IGraphAction
|
||||
{
|
||||
[DataField("layer")] public int Layer { get; private set; } = 0;
|
||||
[DataField("specifier")] public SpriteSpecifier? SpriteSpecifier { get; private set; } = SpriteSpecifier.Invalid;
|
||||
[DataField("specifier")] public SpriteSpecifier? SpriteSpecifier { get; private set; } = SpriteSpecifier.Invalid;
|
||||
|
||||
public void PerformAction(EntityUid uid, EntityUid? userUid, IEntityManager entityManager)
|
||||
{
|
||||
|
||||
@@ -9,7 +9,6 @@ namespace Content.Server.Construction.Components
|
||||
[RegisterComponent]
|
||||
public sealed class ComputerBoardComponent : Component
|
||||
{
|
||||
[ViewVariables]
|
||||
[DataField("prototype", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string? Prototype { get; private set; }
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ namespace Content.Server.Construction.Components
|
||||
[RegisterComponent, ComponentProtoName("Computer")]
|
||||
public sealed class ComputerComponent : Component
|
||||
{
|
||||
[ViewVariables]
|
||||
[DataField("board", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string? BoardPrototype;
|
||||
}
|
||||
|
||||
@@ -10,19 +10,15 @@ namespace Content.Server.Construction.Components
|
||||
{
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("requirements", customTypeSerializer: typeof(PrototypeIdDictionarySerializer<int, MachinePartPrototype>))]
|
||||
public readonly Dictionary<string, int> Requirements = new();
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("materialRequirements")]
|
||||
public readonly Dictionary<string, int> MaterialIdRequirements = new();
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("tagRequirements")]
|
||||
public readonly Dictionary<string, GenericPartInfo> TagRequirements = new();
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("componentRequirements")]
|
||||
public readonly Dictionary<string, GenericPartInfo> ComponentRequirements = new();
|
||||
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System.Threading.Tasks;
|
||||
using Content.Server.Stack;
|
||||
using Content.Shared.Construction;
|
||||
using Content.Shared.Construction.Prototypes;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Tag;
|
||||
using Content.Shared.Construction.Prototypes;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary;
|
||||
|
||||
@@ -18,7 +13,7 @@ namespace Content.Server.Construction.Components
|
||||
[ViewVariables]
|
||||
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();
|
||||
|
||||
[ViewVariables]
|
||||
@@ -30,7 +25,7 @@ namespace Content.Server.Construction.Components
|
||||
[ViewVariables]
|
||||
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();
|
||||
|
||||
[ViewVariables]
|
||||
|
||||
@@ -6,7 +6,6 @@ namespace Content.Server.Construction.Components
|
||||
[RegisterComponent]
|
||||
public sealed class MachinePartComponent : Component
|
||||
{
|
||||
[ViewVariables]
|
||||
[DataField("part", required: true, customTypeSerializer: typeof(PrototypeIdSerializer<MachinePartPrototype>))]
|
||||
public string PartType { get; private set; } = default!;
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ namespace Content.Server.Containers
|
||||
[RegisterComponent]
|
||||
public sealed class EmptyOnMachineDeconstructComponent : Component
|
||||
{
|
||||
[ViewVariables]
|
||||
[DataField("containers")]
|
||||
public HashSet<string> Containers { get; set; } = new();
|
||||
}
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
using System.Threading.Tasks;
|
||||
using Content.Server.Administration.Components;
|
||||
using Content.Server.Administration.Logs;
|
||||
using Content.Server.DoAfter;
|
||||
using Content.Server.Hands.Components;
|
||||
using Content.Shared.Cuffs.Components;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Stunnable;
|
||||
using Robust.Shared.Audio;
|
||||
@@ -26,63 +23,54 @@ namespace Content.Server.Cuffs.Components
|
||||
/// <summary>
|
||||
/// The time it takes to apply a <see cref="CuffedComponent"/> to an entity.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("cuffTime")]
|
||||
public float CuffTime { get; set; } = 3.5f;
|
||||
|
||||
/// <summary>
|
||||
/// The time it takes to remove a <see cref="CuffedComponent"/> from an entity.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("uncuffTime")]
|
||||
public float UncuffTime { get; set; } = 3.5f;
|
||||
|
||||
/// <summary>
|
||||
/// The time it takes for a cuffed entity to remove <see cref="CuffedComponent"/> from itself.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("breakoutTime")]
|
||||
public float BreakoutTime { get; set; } = 30f;
|
||||
|
||||
/// <summary>
|
||||
/// If an entity being cuffed is stunned, this amount of time is subtracted from the time it takes to add/remove their cuffs.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("stunBonus")]
|
||||
public float StunBonus { get; set; } = 2f;
|
||||
|
||||
/// <summary>
|
||||
/// Will the cuffs break when removed?
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("breakOnRemove")]
|
||||
public bool BreakOnRemove { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The path of the RSI file used for the player cuffed overlay.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("cuffedRSI")]
|
||||
public string? CuffedRSI { get; set; } = "Objects/Misc/handcuffs.rsi";
|
||||
|
||||
/// <summary>
|
||||
/// The iconstate used with the RSI file for the player cuffed overlay.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("bodyIconState")]
|
||||
public string? OverlayIconState { get; set; } = "body-overlay";
|
||||
|
||||
/// <summary>
|
||||
/// The iconstate used for broken handcuffs
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("brokenIconState")]
|
||||
public string? BrokenState { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The iconstate used for broken handcuffs
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("brokenName", readOnly: true)]
|
||||
public string BrokenName
|
||||
{
|
||||
@@ -93,7 +81,6 @@ namespace Content.Server.Cuffs.Components
|
||||
/// <summary>
|
||||
/// The iconstate used for broken handcuffs
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("brokenDesc", readOnly: true)]
|
||||
public string BrokenDesc
|
||||
{
|
||||
|
||||
@@ -9,7 +9,6 @@ namespace Content.Server.Destructible
|
||||
[RegisterComponent]
|
||||
public sealed class DestructibleComponent : Component
|
||||
{
|
||||
[ViewVariables]
|
||||
[DataField("thresholds")]
|
||||
public List<DamageThreshold> Thresholds = new();
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ namespace Content.Server.Destructible.Thresholds
|
||||
/// <summary>
|
||||
/// Whether or not this threshold has already been triggered.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("triggered")]
|
||||
public bool Triggered { get; private set; }
|
||||
|
||||
@@ -29,14 +28,12 @@ namespace Content.Server.Destructible.Thresholds
|
||||
/// and then damaged to reach this threshold once again.
|
||||
/// It will not repeatedly trigger as damage rises beyond that.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("triggersOnce")]
|
||||
public bool TriggersOnce { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The trigger that decides if this threshold has been reached.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("trigger")]
|
||||
public IThresholdTrigger? Trigger { get; set; }
|
||||
|
||||
|
||||
@@ -4,11 +4,9 @@
|
||||
[DataDefinition]
|
||||
public struct MinMax
|
||||
{
|
||||
[ViewVariables]
|
||||
[DataField("min")]
|
||||
public int Min;
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("max")]
|
||||
public int Max;
|
||||
}
|
||||
|
||||
@@ -5,15 +5,12 @@ namespace Content.Server.Dice
|
||||
[RegisterComponent, Access(typeof(DiceSystem))]
|
||||
public sealed class DiceComponent : Component
|
||||
{
|
||||
[ViewVariables]
|
||||
[DataField("sound")]
|
||||
public SoundSpecifier Sound { get; } = new SoundCollectionSpecifier("Dice");
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("step")]
|
||||
public int Step { get; } = 1;
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("sides")]
|
||||
public int Sides { get; } = 20;
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace Content.Server.Disease.Components
|
||||
/// exhibit direct symptoms from. They still transmit
|
||||
/// these diseases, just without symptoms.
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("carrierDiseases", customTypeSerializer: typeof(PrototypeIdHashSetSerializer<DiseasePrototype>))]
|
||||
[DataField("carrierDiseases", customTypeSerializer: typeof(PrototypeIdHashSetSerializer<DiseasePrototype>))]
|
||||
public HashSet<string>? CarrierDiseases;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -15,7 +15,6 @@ namespace Content.Server.Disease.Components
|
||||
/// <summary>
|
||||
/// How much time we've accumulated processing
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("accumulator")]
|
||||
public float Accumulator = 0f;
|
||||
/// <summary>
|
||||
|
||||
@@ -14,7 +14,6 @@ namespace Content.Server.Disease.Components
|
||||
/// How long it takes to swab someone.
|
||||
/// </summary>
|
||||
[DataField("swabDelay")]
|
||||
[ViewVariables]
|
||||
public float SwabDelay = 2f;
|
||||
/// <summary>
|
||||
/// If this swab has been used
|
||||
|
||||
@@ -13,7 +13,6 @@ namespace Content.Server.Disease.Components
|
||||
/// How long it takes to inject someone
|
||||
/// </summary>
|
||||
[DataField("injectDelay")]
|
||||
[ViewVariables]
|
||||
public float InjectDelay = 2f;
|
||||
/// <summary>
|
||||
/// If this vaccine has been used
|
||||
|
||||
@@ -18,7 +18,6 @@ namespace Content.Server.Disposal.Tube.Components
|
||||
/// <summary>
|
||||
/// The angles to connect to.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("degrees")]
|
||||
private List<Angle> _degrees = new();
|
||||
|
||||
@@ -39,7 +38,7 @@ namespace Content.Server.Disposal.Tube.Components
|
||||
{
|
||||
return _random.Pick(directions);
|
||||
}
|
||||
|
||||
|
||||
return next;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,6 @@ namespace Content.Server.Disposal.Unit.Components
|
||||
[ViewVariables]
|
||||
public HashSet<string> Tags { get; set; } = new();
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("air")]
|
||||
public GasMixture Air { get; set; } = new (70);
|
||||
|
||||
|
||||
@@ -20,11 +20,9 @@ namespace Content.Server.Disposal.Unit.Components
|
||||
/// The current pressure of this disposal unit.
|
||||
/// Prevents it from flushing if it is not equal to or bigger than 1.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("pressure")]
|
||||
public float Pressure = 1f;
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("autoEngageEnabled")]
|
||||
public bool AutomaticEngage = true;
|
||||
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
using Content.Shared.Actions.ActionTypes;
|
||||
using Robust.Shared.Containers;
|
||||
using System.Threading;
|
||||
using Content.Shared.Actions;
|
||||
using Content.Shared.Actions.ActionTypes;
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Content.Shared.Storage;
|
||||
using Content.Shared.Whitelist;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
@@ -35,7 +34,7 @@ namespace Content.Server.Dragon
|
||||
/// <summary>
|
||||
/// If we have active rifts.
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("rifts")]
|
||||
[DataField("rifts")]
|
||||
public List<EntityUid> Rifts = new();
|
||||
|
||||
public bool Weakened => WeakenedAccumulator > 0f;
|
||||
@@ -63,7 +62,7 @@ namespace Content.Server.Dragon
|
||||
/// <summary>
|
||||
/// Spawns a rift which can summon more mobs.
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("spawnRiftAction")]
|
||||
[DataField("spawnRiftAction")]
|
||||
public InstantAction? SpawnRiftAction;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("riftPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
|
||||
@@ -10,7 +10,7 @@ public sealed class DragonRiftComponent : SharedDragonRiftComponent
|
||||
/// <summary>
|
||||
/// Dragon that spawned this rift.
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("dragon")] public EntityUid Dragon;
|
||||
[DataField("dragon")] public EntityUid Dragon;
|
||||
|
||||
/// <summary>
|
||||
/// How long the rift has been active.
|
||||
|
||||
@@ -7,11 +7,9 @@ namespace Content.Server.Engineering.Components
|
||||
[RegisterComponent]
|
||||
public sealed class DisassembleOnAltVerbComponent : Component
|
||||
{
|
||||
[ViewVariables]
|
||||
[DataField("prototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string? Prototype { get; }
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("doAfter")]
|
||||
public float DoAfterTime = 0;
|
||||
|
||||
|
||||
@@ -6,19 +6,15 @@ namespace Content.Server.Engineering.Components
|
||||
[RegisterComponent]
|
||||
public sealed class SpawnAfterInteractComponent : Component
|
||||
{
|
||||
[ViewVariables]
|
||||
[DataField("prototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string? Prototype { get; }
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("ignoreDistance")]
|
||||
public bool IgnoreDistance { get; }
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("doAfter")]
|
||||
public float DoAfterTime = 0;
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("removeOnInteract")]
|
||||
public bool RemoveOnInteract = false;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ public sealed class EnsnareableComponent : SharedEnsnareableComponent
|
||||
/// <summary>
|
||||
/// The container where the <see cref="EnsnaringComponent"/> entity will be stored
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("container")]
|
||||
public Container Container = default!;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace Content.Server.Explosion.Components
|
||||
/// <summary>
|
||||
/// What we fill our prototype with if we want to pre-spawn with grenades.
|
||||
/// </summary>
|
||||
[ViewVariables] [DataField("fillPrototype", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
[DataField("fillPrototype", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string? FillPrototype;
|
||||
|
||||
/// <summary>
|
||||
@@ -24,7 +24,7 @@ namespace Content.Server.Explosion.Components
|
||||
/// <summary>
|
||||
/// Maximum grenades in the container.
|
||||
/// </summary>
|
||||
[ViewVariables] [DataField("maxGrenadesCount")]
|
||||
[DataField("maxGrenadesCount")]
|
||||
public int MaxGrenades = 3;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Content.Server.Explosion.EntitySystems;
|
||||
using Robust.Shared.Physics.Collision.Shapes;
|
||||
using Content.Shared.Explosion;
|
||||
using Robust.Shared.Physics.Collision.Shapes;
|
||||
using Robust.Shared.Physics.Components;
|
||||
|
||||
namespace Content.Server.Explosion.Components
|
||||
@@ -22,18 +22,15 @@ namespace Content.Server.Explosion.Components
|
||||
/// <summary>
|
||||
/// How long the the proximity trigger animation plays for.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("animationDuration")]
|
||||
public float AnimationDuration = 0.3f;
|
||||
|
||||
/// <summary>
|
||||
/// Whether the entity needs to be anchored for the proximity to work.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("requiresAnchored")]
|
||||
public bool RequiresAnchored { get; set; } = true;
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("enabled")]
|
||||
public bool Enabled = true;
|
||||
|
||||
|
||||
@@ -36,7 +36,6 @@ public sealed class AbsorbentComponent : Component
|
||||
/// <summary>
|
||||
/// Multiplier for the do_after delay for how quickly the mopping happens.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("mopSpeed")] public float MopSpeed = 1;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace Content.Server.Fluids.Components
|
||||
[ViewVariables(VVAccess.ReadOnly)]
|
||||
public FixedPoint2 CurrentVolume => EntitySystem.Get<PuddleSystem>().CurrentVolume(Owner);
|
||||
|
||||
[ViewVariables] [DataField("overflowVolume")]
|
||||
[DataField("overflowVolume")]
|
||||
public FixedPoint2 OverflowVolume = DefaultOverflowVolume;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -10,7 +10,6 @@ public sealed class GatherableComponent : Component
|
||||
/// Whitelist for specifying the kind of tools can be used on a resource
|
||||
/// Supports multiple tags.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("whitelist", required: true)]
|
||||
public EntityWhitelist? ToolWhitelist;
|
||||
|
||||
|
||||
@@ -14,14 +14,12 @@ namespace Content.Server.Guardian
|
||||
/// <summary>
|
||||
/// Percentage of damage reflected from the guardian to the host
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("damageShare")]
|
||||
public float DamageShare { get; set; } = 0.85f;
|
||||
|
||||
/// <summary>
|
||||
/// Maximum distance the guardian can travel before it's forced to recall, use YAML to set
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("distanceAllowed")]
|
||||
public float DistanceAllowed { get; set; } = 5f;
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ namespace Content.Server.Guardian
|
||||
/// <summary>
|
||||
/// The prototype of the guardian entity which will be created
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("guardianProto", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>), required: true)]
|
||||
public string GuardianProto { get; set; } = default!;
|
||||
|
||||
|
||||
@@ -9,41 +9,37 @@ namespace Content.Server.Holiday
|
||||
[Prototype("holiday")]
|
||||
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]
|
||||
[IdDataFieldAttribute]
|
||||
public string ID { get; } = default!;
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("beginDay")]
|
||||
public byte BeginDay { get; set; } = 1;
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("beginMonth")]
|
||||
public Month BeginMonth { get; set; } = Month.Invalid;
|
||||
|
||||
/// <summary>
|
||||
/// Day this holiday will end. Zero means it lasts a single day.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("endDay")]
|
||||
public byte EndDay { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Month this holiday will end in. Invalid means it lasts a single month.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("endMonth")]
|
||||
public Month EndMonth { get; set; } = Month.Invalid;
|
||||
|
||||
[ViewVariables] [DataField("shouldCelebrate")]
|
||||
[DataField("shouldCelebrate")]
|
||||
private readonly IHolidayShouldCelebrate _shouldCelebrate = new DefaultHolidayShouldCelebrate();
|
||||
|
||||
[ViewVariables] [DataField("greet")]
|
||||
[DataField("greet")]
|
||||
private readonly IHolidayGreet _greet = new DefaultHolidayGreet();
|
||||
|
||||
[ViewVariables] [DataField("celebrate")]
|
||||
[DataField("celebrate")]
|
||||
private readonly IHolidayCelebrate _celebrate = new DefaultHolidayCelebrate();
|
||||
|
||||
public bool ShouldCelebrate(DateTime date)
|
||||
|
||||
@@ -10,11 +10,9 @@ namespace Content.Server.Kitchen.Components
|
||||
[Access(typeof(ReagentGrinderSystem))]
|
||||
public sealed class ExtractableComponent : Component
|
||||
{
|
||||
[ViewVariables]
|
||||
[DataField("juiceSolution")]
|
||||
public Solution? JuiceSolution;
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("grindableSolutionName")]
|
||||
public string? GrindableSolution;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Content.Shared.Smoking;
|
||||
using Content.Server.Light.EntitySystems;
|
||||
using Content.Shared.Smoking;
|
||||
using Robust.Shared.Audio;
|
||||
|
||||
namespace Content.Server.Light.Components
|
||||
@@ -11,7 +11,6 @@ namespace Content.Server.Light.Components
|
||||
/// <summary>
|
||||
/// Current state to matchstick. Can be <code>Unlit</code>, <code>Lit</code> or <code>Burnt</code>.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("state")]
|
||||
public SmokableState CurrentState = SmokableState.Unlit;
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using System.Threading;
|
||||
using Content.Server.Light.EntitySystems;
|
||||
using Content.Shared.Damage;
|
||||
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 System.Threading;
|
||||
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
|
||||
{
|
||||
@@ -28,7 +28,6 @@ namespace Content.Server.Light.Components
|
||||
[DataField("bulb")]
|
||||
public LightBulbType BulbType;
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("on")]
|
||||
public bool On = true;
|
||||
|
||||
@@ -36,15 +35,12 @@ namespace Content.Server.Light.Components
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public DamageSpecifier Damage = default!;
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("ignoreGhostsBoo")]
|
||||
public bool IgnoreGhostsBoo;
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("ghostBlinkingTime")]
|
||||
public TimeSpan GhostBlinkingTime = TimeSpan.FromSeconds(10);
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("ghostBlinkingCooldown")]
|
||||
public TimeSpan GhostBlinkingCooldown = TimeSpan.FromSeconds(60);
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@ public sealed class SpellbookComponent : Component
|
||||
[DataField("instantSpells", customTypeSerializer: typeof(PrototypeIdDictionarySerializer<int, InstantActionPrototype>))]
|
||||
public readonly Dictionary<string, int> InstantSpells = new();
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("learnTime")]
|
||||
public float LearnTime = .75f;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ public sealed class InstantSpawnSpellEvent : InstantActionEvent
|
||||
[DataField("prototype", required: true, customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string Prototype = default!;
|
||||
|
||||
[ViewVariables, DataField("preventCollide")]
|
||||
[DataField("preventCollide")]
|
||||
public bool PreventCollideWithCaster = true;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Content.Shared.Storage;
|
||||
using System.Threading;
|
||||
using Content.Shared.Construction.Prototypes;
|
||||
using Content.Shared.Storage;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace Content.Server.Medical.BiomassReclaimer
|
||||
/// <summary>
|
||||
/// The base yield per mass unit when no components are upgraded.
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("baseYieldPerUnitMass")]
|
||||
[DataField("baseYieldPerUnitMass")]
|
||||
public float BaseYieldPerUnitMass = 0.4f;
|
||||
|
||||
/// <summary>
|
||||
@@ -90,7 +90,7 @@ namespace Content.Server.Medical.BiomassReclaimer
|
||||
/// The base time per mass unit that it takes to process a mob
|
||||
/// when no components are upgraded.
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("baseProcessingTimePerUnitMass")]
|
||||
[DataField("baseProcessingTimePerUnitMass")]
|
||||
public float BaseProcessingTimePerUnitMass = 0.5f;
|
||||
|
||||
/// <summary>
|
||||
@@ -103,7 +103,7 @@ namespace Content.Server.Medical.BiomassReclaimer
|
||||
/// How much the machine part quality affects the yield.
|
||||
/// Going up a tier will multiply the speed by this amount.
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("partRatingSpeedMultiplier")]
|
||||
[DataField("partRatingSpeedMultiplier")]
|
||||
public float PartRatingSpeedMultiplier = 1.35f;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Threading;
|
||||
using Content.Server.UserInterface;
|
||||
using Content.Shared.MedicalScanner;
|
||||
using Content.Shared.Disease;
|
||||
using Content.Shared.MedicalScanner;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
@@ -18,7 +18,6 @@ namespace Content.Server.Medical.Components
|
||||
/// How long it takes to scan someone.
|
||||
/// </summary>
|
||||
[DataField("scanDelay")]
|
||||
[ViewVariables]
|
||||
public float ScanDelay = 0.8f;
|
||||
/// <summary>
|
||||
/// Token for interrupting scanning do after.
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Content.Server.NPC.Components
|
||||
/// <summary>
|
||||
/// Contains all of the world data for a particular NPC in terms of how it sees the world.
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("blackboard", customTypeSerializer: typeof(NPCBlackboardSerializer))]
|
||||
[DataField("blackboard", customTypeSerializer: typeof(NPCBlackboardSerializer))]
|
||||
public NPCBlackboard Blackboard = new();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Content.Server.NPC.HTN;
|
||||
public sealed class HTNBranch
|
||||
{
|
||||
// Made this its own class if we ever need to change it.
|
||||
[ViewVariables, DataField("preconditions")]
|
||||
[DataField("preconditions")]
|
||||
public List<HTNPrecondition> Preconditions = new();
|
||||
|
||||
[ViewVariables] public List<HTNTask> Tasks = new();
|
||||
@@ -17,6 +17,6 @@ public sealed class HTNBranch
|
||||
/// <summary>
|
||||
/// Due to how serv3 works we need to defer getting the actual tasks until after they have all been serialized.
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("tasks", required: true, customTypeSerializer:typeof(HTNTaskListSerializer))]
|
||||
[DataField("tasks", required: true, customTypeSerializer:typeof(HTNTaskListSerializer))]
|
||||
public List<string> TaskPrototypes = default!;
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@ public sealed class CoordinatesInRangePrecondition : HTNPrecondition
|
||||
{
|
||||
[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 override bool IsMet(NPCBlackboard blackboard)
|
||||
|
||||
@@ -9,9 +9,9 @@ public sealed class CoordinatesNotInRangePrecondition : HTNPrecondition
|
||||
{
|
||||
[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 override bool IsMet(NPCBlackboard blackboard)
|
||||
|
||||
@@ -6,10 +6,10 @@ public sealed class TargetInLOSPrecondition : HTNPrecondition
|
||||
{
|
||||
private InteractionSystem _interaction = default!;
|
||||
|
||||
[ViewVariables, DataField("targetKey")]
|
||||
[DataField("targetKey")]
|
||||
public string TargetKey = "CombatTarget";
|
||||
|
||||
[ViewVariables, DataField("rangeKey")]
|
||||
[DataField("rangeKey")]
|
||||
public string RangeKey = "RangeKey";
|
||||
|
||||
public override void Initialize(IEntitySystemManager sysManager)
|
||||
|
||||
@@ -9,9 +9,9 @@ public sealed class TargetInRangePrecondition : HTNPrecondition
|
||||
{
|
||||
[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 override bool IsMet(NPCBlackboard blackboard)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Content.Server.MobState;
|
||||
using Content.Server.NPC.Components;
|
||||
using Content.Shared.MobState;
|
||||
using Content.Shared.MobState.Components;
|
||||
@@ -17,13 +16,13 @@ public sealed class MeleeOperator : HTNOperator
|
||||
/// <summary>
|
||||
/// Key that contains the target entity.
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("targetKey", required: true)]
|
||||
[DataField("targetKey", required: true)]
|
||||
public string TargetKey = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Minimum damage state that the target has to be in for us to consider attacking.
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("targetState")]
|
||||
[DataField("targetState")]
|
||||
public DamageState TargetState = DamageState.Alive;
|
||||
|
||||
// Like movement we add a component and pass it off to the dedicated system.
|
||||
|
||||
@@ -3,10 +3,8 @@ using System.Threading.Tasks;
|
||||
using Content.Server.NPC.Components;
|
||||
using Content.Server.NPC.Pathfinding;
|
||||
using Content.Server.NPC.Systems;
|
||||
using Content.Shared.NPC;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Physics.Components;
|
||||
using YamlDotNet.Core.Tokens;
|
||||
|
||||
namespace Content.Server.NPC.HTN.PrimitiveTasks.Operators;
|
||||
|
||||
@@ -23,31 +21,31 @@ public sealed class MoveToOperator : HTNOperator
|
||||
/// <summary>
|
||||
/// Should we assume the MovementTarget is reachable during planning or should we pathfind to it?
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("pathfindInPlanning")]
|
||||
[DataField("pathfindInPlanning")]
|
||||
public bool PathfindInPlanning = true;
|
||||
|
||||
/// <summary>
|
||||
/// When we're finished moving to the target should we remove its key?
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("removeKeyOnFinish")]
|
||||
[DataField("removeKeyOnFinish")]
|
||||
public bool RemoveKeyOnFinish = true;
|
||||
|
||||
/// <summary>
|
||||
/// Target Coordinates to move to. This gets removed after execution.
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("targetKey")]
|
||||
[DataField("targetKey")]
|
||||
public string TargetKey = "MovementTarget";
|
||||
|
||||
/// <summary>
|
||||
/// Where the pathfinding result will be stored (if applicable). This gets removed after execution.
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("pathfindKey")]
|
||||
[DataField("pathfindKey")]
|
||||
public string PathfindKey = NPCBlackboard.PathfindKey;
|
||||
|
||||
/// <summary>
|
||||
/// How close we need to get before considering movement finished.
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("rangeKey")]
|
||||
[DataField("rangeKey")]
|
||||
public string RangeKey = "MovementRange";
|
||||
|
||||
private const string MovementCancelToken = "MovementCancelToken";
|
||||
|
||||
@@ -18,12 +18,12 @@ public abstract class NPCCombatOperator : HTNOperator
|
||||
protected InteractionSystem Interaction = default!;
|
||||
private PathfindingSystem _pathfinding = default!;
|
||||
|
||||
[ViewVariables, DataField("key")] public string Key = "CombatTarget";
|
||||
[DataField("key")] public string Key = "CombatTarget";
|
||||
|
||||
/// <summary>
|
||||
/// The EntityCoordinates of the specified target.
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("keyCoordinates")]
|
||||
[DataField("keyCoordinates")]
|
||||
public string KeyCoordinates = "CombatTargetCoordinates";
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -3,7 +3,6 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Content.Server.NPC.Pathfinding;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Random;
|
||||
|
||||
namespace Content.Server.NPC.HTN.PrimitiveTasks.Operators;
|
||||
|
||||
@@ -20,16 +19,16 @@ public sealed class PickAccessibleComponentOperator : HTNOperator
|
||||
[DataField("rangeKey", required: true)]
|
||||
public string RangeKey = string.Empty;
|
||||
|
||||
[ViewVariables, DataField("targetKey", required: true)]
|
||||
[DataField("targetKey", required: true)]
|
||||
public string TargetKey = string.Empty;
|
||||
|
||||
[ViewVariables, DataField("component", required: true)]
|
||||
[DataField("component", required: true)]
|
||||
public string Component = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Where the pathfinding result will be stored (if applicable). This gets removed after execution.
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("pathfindKey")]
|
||||
[DataField("pathfindKey")]
|
||||
public string PathfindKey = NPCBlackboard.PathfindKey;
|
||||
|
||||
public override void Initialize(IEntitySystemManager sysManager)
|
||||
|
||||
@@ -2,7 +2,6 @@ using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Content.Server.NPC.Pathfinding;
|
||||
using Robust.Shared.Random;
|
||||
|
||||
namespace Content.Server.NPC.HTN.PrimitiveTasks.Operators;
|
||||
|
||||
@@ -16,13 +15,13 @@ public sealed class PickAccessibleOperator : HTNOperator
|
||||
[DataField("rangeKey", required: true)]
|
||||
public string RangeKey = string.Empty;
|
||||
|
||||
[ViewVariables, DataField("targetKey", required: true)]
|
||||
[DataField("targetKey", required: true)]
|
||||
public string TargetKey = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Where the pathfinding result will be stored (if applicable). This gets removed after execution.
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("pathfindKey")]
|
||||
[DataField("pathfindKey")]
|
||||
public string PathfindKey = NPCBlackboard.PathfindKey;
|
||||
|
||||
public override void Initialize(IEntitySystemManager sysManager)
|
||||
|
||||
@@ -8,7 +8,7 @@ public sealed class PickRandomRotationOperator : HTNOperator
|
||||
{
|
||||
[Dependency] private readonly IRobustRandom _random = default!;
|
||||
|
||||
[ViewVariables, DataField("targetKey")]
|
||||
[DataField("targetKey")]
|
||||
public string TargetKey = "RotateTarget";
|
||||
|
||||
public override async Task<(bool Valid, Dictionary<string, object>? Effects)> Plan(NPCBlackboard blackboard,
|
||||
|
||||
@@ -14,13 +14,13 @@ public sealed class RangedOperator : HTNOperator
|
||||
/// <summary>
|
||||
/// Key that contains the target entity.
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("targetKey", required: true)]
|
||||
[DataField("targetKey", required: true)]
|
||||
public string TargetKey = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Minimum damage state that the target has to be in for us to consider attacking.
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("targetState")]
|
||||
[DataField("targetState")]
|
||||
public DamageState TargetState = DamageState.Alive;
|
||||
|
||||
// Like movement we add a component and pass it off to the dedicated system.
|
||||
|
||||
@@ -7,14 +7,14 @@ public sealed class RotateToTargetOperator : HTNOperator
|
||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||
private RotateToFaceSystem _rotate = default!;
|
||||
|
||||
[ViewVariables, DataField("targetKey")]
|
||||
[DataField("targetKey")]
|
||||
public string TargetKey = "RotateTarget";
|
||||
|
||||
[ViewVariables, DataField("rotateSpeedKey")]
|
||||
[DataField("rotateSpeedKey")]
|
||||
public string RotationSpeedKey = NPCBlackboard.RotateSpeed;
|
||||
|
||||
// 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 override void Initialize(IEntitySystemManager sysManager)
|
||||
|
||||
@@ -6,7 +6,7 @@ public sealed class SpeakOperator : HTNOperator
|
||||
{
|
||||
private ChatSystem _chat = default!;
|
||||
|
||||
[ViewVariables, DataField("speech", required: true)]
|
||||
[DataField("speech", required: true)]
|
||||
public string Speech = string.Empty;
|
||||
|
||||
public override void Initialize(IEntitySystemManager sysManager)
|
||||
|
||||
@@ -21,7 +21,7 @@ public sealed class MedibotInjectOperator : HTNOperator
|
||||
/// <summary>
|
||||
/// Target entity to inject.
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("targetKey", required: true)]
|
||||
[DataField("targetKey", required: true)]
|
||||
public string TargetKey = string.Empty;
|
||||
|
||||
public override void Initialize(IEntitySystemManager sysManager)
|
||||
|
||||
@@ -15,18 +15,18 @@ public sealed class PickNearbyInjectableOperator : HTNOperator
|
||||
private EntityLookupSystem _lookup = default!;
|
||||
private PathfindingSystem _pathfinding = default!;
|
||||
|
||||
[ViewVariables, DataField("rangeKey")] public string RangeKey = NPCBlackboard.MedibotInjectRange;
|
||||
[DataField("rangeKey")] public string RangeKey = NPCBlackboard.MedibotInjectRange;
|
||||
|
||||
/// <summary>
|
||||
/// Target entity to inject
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("targetKey", required: true)]
|
||||
[DataField("targetKey", required: true)]
|
||||
public string TargetKey = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Target entitycoordinates to move to.
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("targetMoveKey", required: true)]
|
||||
[DataField("targetMoveKey", required: true)]
|
||||
public string TargetMoveKey = string.Empty;
|
||||
|
||||
public override void Initialize(IEntitySystemManager sysManager)
|
||||
|
||||
@@ -8,7 +8,7 @@ public sealed class WaitOperator : HTNOperator
|
||||
/// <summary>
|
||||
/// Blackboard key for the time we'll wait for.
|
||||
/// </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)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Server.NodeContainer
|
||||
public sealed class NodeContainerComponent : Component
|
||||
{
|
||||
//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;
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ namespace Content.Server.NodeContainer.Nodes
|
||||
/// 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"/>.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("nodeGroupID")]
|
||||
public NodeGroupID NodeGroupID { get; private set; } = NodeGroupID.Default;
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ namespace Content.Server.NodeContainer.Nodes
|
||||
/// <summary>
|
||||
/// The directions in which this pipe can connect to other pipes around it.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("pipeDirection")]
|
||||
private PipeDirection _originalPipeDirection;
|
||||
|
||||
@@ -97,7 +96,6 @@ namespace Content.Server.NodeContainer.Nodes
|
||||
}
|
||||
}
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("volume")]
|
||||
public float Volume { get; set; } = DefaultVolume;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using JetBrains.Annotations;
|
||||
using System.Threading;
|
||||
using Content.Server.Nutrition.EntitySystems;
|
||||
using Content.Shared.FixedPoint;
|
||||
using System.Threading;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Audio;
|
||||
|
||||
namespace Content.Server.Nutrition.Components
|
||||
@@ -14,11 +14,9 @@ namespace Content.Server.Nutrition.Components
|
||||
public string SolutionName { get; set; } = DefaultSolutionName;
|
||||
public const string DefaultSolutionName = "drink";
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("useSound")]
|
||||
public SoundSpecifier UseSound = new SoundPathSpecifier("/Audio/Items/drink.ogg");
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("isOpen")]
|
||||
internal bool DefaultToOpened;
|
||||
|
||||
|
||||
@@ -14,15 +14,12 @@ namespace Content.Server.Nutrition.Components
|
||||
[DataField("solution")]
|
||||
public string SolutionName { get; set; } = "food";
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("useSound")]
|
||||
public SoundSpecifier UseSound { get; set; } = new SoundPathSpecifier("/Audio/Items/eatfood.ogg");
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("trash", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string? TrashPrototype { get; set; }
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("transferAmount")]
|
||||
public FixedPoint2? TransferAmount { get; set; } = FixedPoint2.New(5);
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Server.Nutrition.Components
|
||||
/// <summary>
|
||||
/// The name of the solution of which to check emptiness
|
||||
/// </summary>
|
||||
[ViewVariables] [DataField("solution")]
|
||||
[DataField("solution")]
|
||||
public string Solution { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,14 +26,12 @@ namespace Content.Server.Nutrition.Components
|
||||
/// The chance that the utensil has to break with each use.
|
||||
/// A value of 0 means that it is unbreakable.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("breakChance")]
|
||||
public float BreakChance;
|
||||
|
||||
/// <summary>
|
||||
/// The sound to be played if the utensil breaks.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("breakSound")]
|
||||
public SoundSpecifier BreakSound = new SoundPathSpecifier("/Audio/Items/snap.ogg");
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using Content.Server.Containers;
|
||||
using Content.Server.Objectives.Interfaces;
|
||||
using JetBrains.Annotations;
|
||||
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"
|
||||
/// instead of "steal advanced magboots. Should be a loc string.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("owner")] private string? _owner = null;
|
||||
|
||||
public IObjectiveCondition GetAssigned(Mind.Mind mind)
|
||||
|
||||
@@ -11,9 +11,9 @@ namespace Content.Server.Objectives
|
||||
[IdDataFieldAttribute]
|
||||
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]
|
||||
public float Difficulty => _difficultyOverride ?? _conditions.Sum(c => c.Difficulty);
|
||||
@@ -26,7 +26,6 @@ namespace Content.Server.Objectives
|
||||
[ViewVariables]
|
||||
public IReadOnlyList<IObjectiveCondition> Conditions => _conditions;
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("canBeDuplicate")]
|
||||
public bool CanBeDuplicateAssignment { get; private set; }
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ namespace Content.Server.PDA.Ringer
|
||||
[RegisterComponent]
|
||||
public sealed class RingerComponent : Component
|
||||
{
|
||||
[ViewVariables]
|
||||
[DataField("ringtone")]
|
||||
public Note[] Ringtone = new Note[SharedRingerSystem.RingtoneLength];
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using Content.Server.Power.EntitySystems;
|
||||
using Content.Server.Power.NodeGroups;
|
||||
using Content.Shared.APC;
|
||||
using Robust.Shared.Audio;
|
||||
@@ -18,7 +17,6 @@ public sealed class ApcComponent : BaseApcNetComponent
|
||||
/// <summary>
|
||||
/// Is the panel open for this entity's APC?
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("open")]
|
||||
public bool IsApcOpen { get; set; }
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Content.Server.Power.Components
|
||||
[ViewVariables]
|
||||
private bool _needsNet => _net != null;
|
||||
|
||||
[DataField("node")] [ViewVariables] public string? NodeId { get; set; }
|
||||
[DataField("node")] public string? NodeId { get; set; }
|
||||
|
||||
protected override void Initialize()
|
||||
{
|
||||
|
||||
@@ -6,11 +6,9 @@ namespace Content.Server.Power.Components
|
||||
[RegisterComponent]
|
||||
public sealed class CablePlacerComponent : Component
|
||||
{
|
||||
[ViewVariables]
|
||||
[DataField("cablePrototypeID", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string? CablePrototypeId = "CableHV";
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("blockingWireType")]
|
||||
public CableType BlockingCableType = CableType.HighVoltage;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using Content.Shared.Containers.ItemSlots;
|
||||
using Content.Shared.Power;
|
||||
|
||||
namespace Content.Server.Power.Components
|
||||
@@ -9,11 +8,9 @@ namespace Content.Server.Power.Components
|
||||
[ViewVariables]
|
||||
public CellChargerStatus Status;
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("chargeRate")]
|
||||
public int ChargeRate = 20;
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("slotId", required: true)]
|
||||
public string SlotId = string.Empty;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,6 @@ namespace Content.Server.RCD.Components
|
||||
/// <summary>
|
||||
/// What mode are we on? Can be floors, walls, deconstruct.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
[DataField("mode")]
|
||||
public RcdMode Mode = RcdMode.Floors;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user