Refactor serialization copying to use source generators (#19412)

This commit is contained in:
DrSmugleaf
2023-08-22 18:14:33 -07:00
committed by GitHub
parent 08b43990ab
commit a88e747a0b
1737 changed files with 2532 additions and 2521 deletions

View File

@@ -11,7 +11,7 @@ using Robust.Shared.Reflection;
namespace Content.Benchmarks namespace Content.Benchmarks
{ {
[Virtual] [Virtual]
public class EntityManagerGetAllComponents public partial class EntityManagerGetAllComponents
{ {
private IEntityManager _entityManager; private IEntityManager _entityManager;
@@ -87,7 +87,7 @@ namespace Content.Benchmarks
return count; return count;
} }
private sealed class DummyComponent : Component private sealed partial class DummyComponent : Component
{ {
} }
} }

View File

@@ -4,7 +4,7 @@ using Robust.Shared.GameStates;
namespace Content.Client.Administration.Components; namespace Content.Client.Administration.Components;
[RegisterComponent, NetworkedComponent] [RegisterComponent, NetworkedComponent]
public sealed class HeadstandComponent : SharedHeadstandComponent public sealed partial class HeadstandComponent : SharedHeadstandComponent
{ {
} }

View File

@@ -4,5 +4,5 @@ using Robust.Shared.GameStates;
namespace Content.Client.Administration.Components; namespace Content.Client.Administration.Components;
[NetworkedComponent, RegisterComponent] [NetworkedComponent, RegisterComponent]
public sealed class KillSignComponent : SharedKillSignComponent public sealed partial class KillSignComponent : SharedKillSignComponent
{ } { }

View File

@@ -5,7 +5,7 @@ namespace Content.Client.Atmos.Components;
/// accumulated. /// accumulated.
/// </summary> /// </summary>
[RegisterComponent] [RegisterComponent]
public sealed class FireVisualsComponent : Component public sealed partial class FireVisualsComponent : Component
{ {
[DataField("fireStackAlternateState")] [DataField("fireStackAlternateState")]
public int FireStackAlternateState = 3; public int FireStackAlternateState = 3;

View File

@@ -3,7 +3,7 @@ using Content.Shared.Atmos.Components;
namespace Content.Client.Atmos.Components; namespace Content.Client.Atmos.Components;
[RegisterComponent] [RegisterComponent]
public sealed class MapAtmosphereComponent : SharedMapAtmosphereComponent public sealed partial class MapAtmosphereComponent : SharedMapAtmosphereComponent
{ {
} }

View File

@@ -3,6 +3,6 @@ using Robust.Shared.GameObjects;
namespace Content.Client.Atmos.Components; namespace Content.Client.Atmos.Components;
[RegisterComponent] [RegisterComponent]
public sealed class PipeColorVisualsComponent : Component public sealed partial class PipeColorVisualsComponent : Component
{ {
} }

View File

@@ -3,18 +3,18 @@ using Content.Shared.Atmos.Monitor;
namespace Content.Client.Atmos.Monitor; namespace Content.Client.Atmos.Monitor;
[RegisterComponent] [RegisterComponent]
public sealed class AtmosAlarmableVisualsComponent : Component public sealed partial class AtmosAlarmableVisualsComponent : Component
{ {
[DataField("layerMap")] [DataField("layerMap")]
public string LayerMap { get; } = string.Empty; public string LayerMap { get; private set; } = string.Empty;
[DataField("alarmStates")] [DataField("alarmStates")]
public readonly Dictionary<AtmosAlarmType, string> AlarmStates = new(); public Dictionary<AtmosAlarmType, string> AlarmStates = new();
[DataField("hideOnDepowered")] [DataField("hideOnDepowered")]
public readonly List<string>? HideOnDepowered; public List<string>? HideOnDepowered;
// eh... // eh...
[DataField("setOnDepowered")] [DataField("setOnDepowered")]
public readonly Dictionary<string, string>? SetOnDepowered; public Dictionary<string, string>? SetOnDepowered;
} }

View File

@@ -5,7 +5,7 @@ namespace Content.Client.Atmos.Visualizers;
/// the ready / full pair controls the color of the light. /// the ready / full pair controls the color of the light.
/// </summary> /// </summary>
[RegisterComponent] [RegisterComponent]
public sealed class PortableScrubberVisualsComponent : Component public sealed partial class PortableScrubberVisualsComponent : Component
{ {
[DataField("idleState", required: true)] [DataField("idleState", required: true)]
public string IdleState = default!; public string IdleState = default!;

View File

@@ -8,7 +8,7 @@ namespace Content.Client.Audio;
/// Samples nearby <see cref="AmbientSoundComponent"/> and plays audio. /// Samples nearby <see cref="AmbientSoundComponent"/> and plays audio.
/// </summary> /// </summary>
[RegisterComponent] [RegisterComponent]
public sealed class AmbientSoundTreeComponent : Component, IComponentTreeComponent<AmbientSoundComponent> public sealed partial class AmbientSoundTreeComponent : Component, IComponentTreeComponent<AmbientSoundComponent>
{ {
public DynamicTree<ComponentTreeEntry<AmbientSoundComponent>> Tree { get; set; } = default!; public DynamicTree<ComponentTreeEntry<AmbientSoundComponent>> Tree { get; set; } = default!;
} }

View File

@@ -2,7 +2,7 @@
namespace Content.Client.Beam.Components; namespace Content.Client.Beam.Components;
[RegisterComponent] [RegisterComponent]
public sealed class BeamComponent : SharedBeamComponent public sealed partial class BeamComponent : SharedBeamComponent
{ {
} }

View File

@@ -1,5 +1,5 @@
namespace Content.Client.Bed; namespace Content.Client.Bed;
[RegisterComponent] [RegisterComponent]
public sealed class StasisBedVisualsComponent : Component public sealed partial class StasisBedVisualsComponent : Component
{} {}

View File

@@ -1,6 +1,6 @@
namespace Content.Client.Botany.Components; namespace Content.Client.Botany.Components;
[RegisterComponent] [RegisterComponent]
public sealed class PlantHolderVisualsComponent : Component public sealed partial class PlantHolderVisualsComponent : Component
{ {
} }

View File

@@ -1,7 +1,7 @@
namespace Content.Client.Botany.Components; namespace Content.Client.Botany.Components;
[RegisterComponent] [RegisterComponent]
public sealed class PotencyVisualsComponent : Component public sealed partial class PotencyVisualsComponent : Component
{ {
[DataField("minimumScale")] [DataField("minimumScale")]
public float MinimumScale = 1f; public float MinimumScale = 1f;

View File

@@ -5,7 +5,7 @@ using Robust.Client.UserInterface;
namespace Content.Client.CartridgeLoader.Cartridges; namespace Content.Client.CartridgeLoader.Cartridges;
public sealed class CrewManifestUi : UIFragment public sealed partial class CrewManifestUi : UIFragment
{ {
private CrewManifestUiFragment? _fragment; private CrewManifestUiFragment? _fragment;

View File

@@ -5,7 +5,7 @@ using Robust.Client.UserInterface;
namespace Content.Client.CartridgeLoader.Cartridges; namespace Content.Client.CartridgeLoader.Cartridges;
public sealed class NetProbeUi : UIFragment public sealed partial class NetProbeUi : UIFragment
{ {
private NetProbeUiFragment? _fragment; private NetProbeUiFragment? _fragment;

View File

@@ -6,7 +6,7 @@ using Robust.Client.UserInterface;
namespace Content.Client.CartridgeLoader.Cartridges; namespace Content.Client.CartridgeLoader.Cartridges;
public sealed class NewsReadUi : UIFragment public sealed partial class NewsReadUi : UIFragment
{ {
private NewsReadUiFragment? _fragment; private NewsReadUiFragment? _fragment;

View File

@@ -6,7 +6,7 @@ using Robust.Client.UserInterface;
namespace Content.Client.CartridgeLoader.Cartridges; namespace Content.Client.CartridgeLoader.Cartridges;
public sealed class NotekeeperUi : UIFragment public sealed partial class NotekeeperUi : UIFragment
{ {
private NotekeeperUiFragment? _fragment; private NotekeeperUiFragment? _fragment;

View File

@@ -18,7 +18,7 @@ using Robust.Shared.Utility;
namespace Content.Client.Changelog namespace Content.Client.Changelog
{ {
public sealed class ChangelogManager public sealed partial class ChangelogManager
{ {
[Dependency] private readonly IResourceManager _resource = default!; [Dependency] private readonly IResourceManager _resource = default!;
[Dependency] private readonly ISerializationManager _serialization = default!; [Dependency] private readonly ISerializationManager _serialization = default!;
@@ -86,20 +86,20 @@ namespace Content.Client.Changelog
} }
[DataDefinition] [DataDefinition]
public sealed class ChangelogEntry : ISerializationHooks public sealed partial class ChangelogEntry : ISerializationHooks
{ {
[DataField("id")] [DataField("id")]
public int Id { get; private set; } public int Id { get; private set; }
[DataField("author")] [DataField("author")]
public string Author { get; } = ""; public string Author { get; private set; } = "";
[DataField("time")] private string _time = default!; [DataField("time")] private string _time = default!;
public DateTime Time { get; private set; } public DateTime Time { get; private set; }
[DataField("changes")] [DataField("changes")]
public List<ChangelogChange> Changes { get; } = default!; public List<ChangelogChange> Changes { get; private set; } = default!;
void ISerializationHooks.AfterDeserialization() void ISerializationHooks.AfterDeserialization()
{ {
@@ -108,7 +108,7 @@ namespace Content.Client.Changelog
} }
[DataDefinition] [DataDefinition]
public sealed class ChangelogChange : ISerializationHooks public sealed partial class ChangelogChange : ISerializationHooks
{ {
[DataField("type")] [DataField("type")]
public ChangelogLineType Type { get; private set; } public ChangelogLineType Type { get; private set; }

View File

@@ -4,7 +4,7 @@ using Content.Shared.FixedPoint;
namespace Content.Client.Chemistry.Components namespace Content.Client.Chemistry.Components
{ {
[RegisterComponent] [RegisterComponent]
public sealed class HyposprayComponent : SharedHyposprayComponent public sealed partial class HyposprayComponent : SharedHyposprayComponent
{ {
[ViewVariables] [ViewVariables]
public FixedPoint2 CurrentVolume; public FixedPoint2 CurrentVolume;

View File

@@ -17,7 +17,7 @@ namespace Content.Client.Chemistry.Components
/// Client behavior for injectors & syringes. Used for item status on injectors /// Client behavior for injectors & syringes. Used for item status on injectors
/// </summary> /// </summary>
[RegisterComponent] [RegisterComponent]
public sealed class InjectorComponent : SharedInjectorComponent public sealed partial class InjectorComponent : SharedInjectorComponent
{ {
[ViewVariables] [ViewVariables]
public FixedPoint2 CurrentVolume; public FixedPoint2 CurrentVolume;

View File

@@ -8,7 +8,7 @@ namespace Content.Client.Chemistry.Visualizers;
/// </summary> /// </summary>
[RegisterComponent] [RegisterComponent]
[Access(typeof(FoamVisualizerSystem))] [Access(typeof(FoamVisualizerSystem))]
public sealed class FoamVisualsComponent : Component public sealed partial class FoamVisualsComponent : Component
{ {
/// <summary> /// <summary>
/// The id of the animation used when the foam dissolves. /// The id of the animation used when the foam dissolves.

View File

@@ -7,4 +7,4 @@ namespace Content.Client.Chemistry.Visualizers;
/// </summary> /// </summary>
[RegisterComponent] [RegisterComponent]
[Access(typeof(SmokeVisualizerSystem))] [Access(typeof(SmokeVisualizerSystem))]
public sealed class SmokeVisualsComponent : Component {} public sealed partial class SmokeVisualsComponent : Component {}

View File

@@ -11,7 +11,7 @@ using Robust.Shared.Utility;
namespace Content.Client.Chemistry.Visualizers namespace Content.Client.Chemistry.Visualizers
{ {
[RegisterComponent] [RegisterComponent]
public sealed class SolutionContainerVisualsComponent : Component public sealed partial class SolutionContainerVisualsComponent : Component
{ {
[DataField("maxFillLevels")] [DataField("maxFillLevels")]
public int MaxFillLevels = 0; public int MaxFillLevels = 0;

View File

@@ -7,7 +7,7 @@ namespace Content.Client.Chemistry.Visualizers;
/// </summary> /// </summary>
[RegisterComponent] [RegisterComponent]
[Access(typeof(VaporVisualizerSystem))] [Access(typeof(VaporVisualizerSystem))]
public sealed class VaporVisualsComponent : Component public sealed partial class VaporVisualsComponent : Component
{ {
/// <summary> /// <summary>
/// The id of the animation played when the vapor spawns in. /// The id of the animation played when the vapor spawns in.

View File

@@ -7,7 +7,7 @@ using static Robust.Client.GameObjects.SpriteComponent;
namespace Content.Client.Clickable namespace Content.Client.Clickable
{ {
[RegisterComponent] [RegisterComponent]
public sealed class ClickableComponent : Component public sealed partial class ClickableComponent : Component
{ {
[Dependency] private readonly IClickMapManager _clickMapManager = default!; [Dependency] private readonly IClickMapManager _clickMapManager = default!;
@@ -131,7 +131,7 @@ namespace Content.Client.Clickable
} }
[DataDefinition] [DataDefinition]
public sealed class DirBoundData public sealed partial class DirBoundData
{ {
[DataField("all")] public Box2 All; [DataField("all")] public Box2 All;
[DataField("north")] public Box2 North; [DataField("north")] public Box2 North;

View File

@@ -5,7 +5,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Client.Construction namespace Content.Client.Construction
{ {
[RegisterComponent] [RegisterComponent]
public sealed class ConstructionGhostComponent : Component public sealed partial class ConstructionGhostComponent : Component
{ {
[ViewVariables] public ConstructionPrototype? Prototype { get; set; } [ViewVariables] public ConstructionPrototype? Prototype { get; set; }
[ViewVariables] public int GhostId { get; set; } [ViewVariables] public int GhostId { get; set; }

View File

@@ -5,7 +5,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Client.Crayon namespace Content.Client.Crayon
{ {
[RegisterComponent] [RegisterComponent]
public sealed class CrayonComponent : SharedCrayonComponent public sealed partial class CrayonComponent : SharedCrayonComponent
{ {
[ViewVariables(VVAccess.ReadWrite)] public bool UIUpdateNeeded; [ViewVariables(VVAccess.ReadWrite)] public bool UIUpdateNeeded;
[ViewVariables] public int Charges { get; set; } [ViewVariables] public int Charges { get; set; }

View File

@@ -3,7 +3,7 @@ using Content.Shared.FixedPoint;
namespace Content.Client.Damage; namespace Content.Client.Damage;
[RegisterComponent] [RegisterComponent]
public sealed class DamageVisualsComponent : Component public sealed partial class DamageVisualsComponent : Component
{ {
/// <summary> /// <summary>
/// Damage thresholds between damage state changes. /// Damage thresholds between damage state changes.
@@ -55,7 +55,7 @@ public sealed class DamageVisualsComponent : Component
/// (for example, Brute), and has a value /// (for example, Brute), and has a value
/// of a DamageVisualizerSprite (see below) /// of a DamageVisualizerSprite (see below)
/// </summary> /// </summary>
[DataField("damageOverlayGroups")] public readonly Dictionary<string, DamageVisualizerSprite>? DamageOverlayGroups; [DataField("damageOverlayGroups")] public Dictionary<string, DamageVisualizerSprite>? DamageOverlayGroups;
/// <summary> /// <summary>
/// Sets if you want sprites to overlay the /// Sets if you want sprites to overlay the
@@ -68,7 +68,7 @@ public sealed class DamageVisualsComponent : Component
/// - There are no target layers /// - There are no target layers
/// - There is no damage group /// - There is no damage group
/// </summary> /// </summary>
[DataField("overlay")] public readonly bool Overlay = true; [DataField("overlay")] public bool Overlay = true;
/// <summary> /// <summary>
/// A single damage group to target. /// A single damage group to target.
@@ -84,7 +84,7 @@ public sealed class DamageVisualsComponent : Component
/// what kind of damage combination /// what kind of damage combination
/// you would want, on which threshold. /// you would want, on which threshold.
/// </remarks> /// </remarks>
[DataField("damageGroup")] public readonly string? DamageGroup; [DataField("damageGroup")] public string? DamageGroup;
/// <summary> /// <summary>
/// Set this if you want incoming damage to be /// Set this if you want incoming damage to be
@@ -106,14 +106,14 @@ public sealed class DamageVisualsComponent : Component
/// This will only work if you have damageOverlay /// This will only work if you have damageOverlay
/// defined - otherwise, it will not work. /// defined - otherwise, it will not work.
/// </remarks> /// </remarks>
[DataField("trackAllDamage")] public readonly bool TrackAllDamage; [DataField("trackAllDamage")] public bool TrackAllDamage;
/// <summary> /// <summary>
/// This is the overlay sprite used, if _trackAllDamage is /// This is the overlay sprite used, if _trackAllDamage is
/// enabled. Supports no complex per-group layering, /// enabled. Supports no complex per-group layering,
/// just an actually simple damage overlay. See /// just an actually simple damage overlay. See
/// DamageVisualizerSprite for more information. /// DamageVisualizerSprite for more information.
/// </summary> /// </summary>
[DataField("damageOverlay")] public readonly DamageVisualizerSprite? DamageOverlay; [DataField("damageOverlay")] public DamageVisualizerSprite? DamageOverlay;
public readonly List<Enum> TargetLayerMapKeys = new(); public readonly List<Enum> TargetLayerMapKeys = new();
public bool Disabled = false; public bool Disabled = false;
@@ -128,7 +128,7 @@ public sealed class DamageVisualsComponent : Component
// deals with the edge case of human damage visuals not // deals with the edge case of human damage visuals not
// being in color without making a Dict<Dict<Dict<Dict<Dict<Dict... // being in color without making a Dict<Dict<Dict<Dict<Dict<Dict...
[DataDefinition] [DataDefinition]
public sealed class DamageVisualizerSprite public sealed partial class DamageVisualizerSprite
{ {
/// <summary> /// <summary>
/// The RSI path for the damage visualizer /// The RSI path for the damage visualizer
@@ -151,11 +151,11 @@ public sealed class DamageVisualizerSprite
/// - DamageOverlay_{threshold} if not targeting /// - DamageOverlay_{threshold} if not targeting
/// a layer. /// a layer.
/// </remarks> /// </remarks>
[DataField("sprite", required: true)] public readonly string Sprite = default!; [DataField("sprite", required: true)] public string Sprite = default!;
/// <summary> /// <summary>
/// The color of this sprite overlay. /// The color of this sprite overlay.
/// Supports only hexadecimal format. /// Supports only hexadecimal format.
/// </summary> /// </summary>
[DataField("color")] public readonly string? Color; [DataField("color")] public string? Color;
} }

View File

@@ -3,7 +3,7 @@ using Content.Shared.Mobs;
namespace Content.Client.DamageState; namespace Content.Client.DamageState;
[RegisterComponent] [RegisterComponent]
public sealed class DamageStateVisualsComponent : Component public sealed partial class DamageStateVisualsComponent : Component
{ {
public int? OriginalDrawDepth; public int? OriginalDrawDepth;

View File

@@ -195,7 +195,7 @@ public sealed class DecalPlacementSystem : EntitySystem
} }
} }
public sealed class PlaceDecalActionEvent : WorldTargetActionEvent public sealed partial class PlaceDecalActionEvent : WorldTargetActionEvent
{ {
[DataField("decalId", customTypeSerializer:typeof(PrototypeIdSerializer<DecalPrototype>), required:true)] [DataField("decalId", customTypeSerializer:typeof(PrototypeIdSerializer<DecalPrototype>), required:true)]
public string DecalId = string.Empty; public string DecalId = string.Empty;

View File

@@ -4,7 +4,7 @@ namespace Content.Client.Disposal;
[RegisterComponent] [RegisterComponent]
[ComponentReference(typeof(SharedDisposalUnitComponent))] [ComponentReference(typeof(SharedDisposalUnitComponent))]
public sealed class DisposalUnitComponent : SharedDisposalUnitComponent public sealed partial class DisposalUnitComponent : SharedDisposalUnitComponent
{ {
} }

View File

@@ -3,7 +3,7 @@ using Content.Shared.Dragon;
namespace Content.Client.Dragon; namespace Content.Client.Dragon;
[RegisterComponent] [RegisterComponent]
public sealed class DragonRiftComponent : SharedDragonRiftComponent public sealed partial class DragonRiftComponent : SharedDragonRiftComponent
{ {
} }

View File

@@ -4,4 +4,4 @@ namespace Content.Client.Effects;
/// Deletes the attached entity whenever any animation completes. Used for temporary client-side entities. /// Deletes the attached entity whenever any animation completes. Used for temporary client-side entities.
/// </summary> /// </summary>
[RegisterComponent] [RegisterComponent]
public sealed class EffectVisualsComponent : Component {} public sealed partial class EffectVisualsComponent : Component {}

View File

@@ -2,7 +2,7 @@ namespace Content.Client.Explosion;
[RegisterComponent] [RegisterComponent]
[Access(typeof(ClusterGrenadeVisualizerSystem))] [Access(typeof(ClusterGrenadeVisualizerSystem))]
public sealed class ClusterGrenadeVisualsComponent : Component public sealed partial class ClusterGrenadeVisualsComponent : Component
{ {
[DataField("state")] [DataField("state")]
public string? State; public string? State;

View File

@@ -3,7 +3,7 @@ using Robust.Client.Graphics;
namespace Content.Client.Explosion; namespace Content.Client.Explosion;
[RegisterComponent] [RegisterComponent]
public sealed class ExplosionVisualsTexturesComponent : Component public sealed partial class ExplosionVisualsTexturesComponent : Component
{ {
/// <summary> /// <summary>
/// Uid of the client-side point light entity for this explosion. /// Uid of the client-side point light entity for this explosion.

View File

@@ -3,4 +3,4 @@ using Content.Shared.Explosion;
namespace Content.Client.Explosion; namespace Content.Client.Explosion;
[RegisterComponent, Access(typeof(TriggerSystem))] [RegisterComponent, Access(typeof(TriggerSystem))]
public sealed class TriggerOnProximityComponent : SharedTriggerOnProximityComponent {} public sealed partial class TriggerOnProximityComponent : SharedTriggerOnProximityComponent {}

View File

@@ -4,6 +4,6 @@ using Robust.Shared.GameStates;
namespace Content.Client.Extinguisher; namespace Content.Client.Extinguisher;
[NetworkedComponent, RegisterComponent] [NetworkedComponent, RegisterComponent]
public sealed class FireExtinguisherComponent : SharedFireExtinguisherComponent public sealed partial class FireExtinguisherComponent : SharedFireExtinguisherComponent
{ {
} }

View File

@@ -4,7 +4,7 @@ namespace Content.Client.Eye;
/// Component for keeping track of client-side eye lerping. This component should only be added or removed via the <see cref="EyeLerpingSystem"/>. /// Component for keeping track of client-side eye lerping. This component should only be added or removed via the <see cref="EyeLerpingSystem"/>.
/// </summary> /// </summary>
[RegisterComponent] [RegisterComponent]
public sealed class LerpingEyeComponent : Component public sealed partial class LerpingEyeComponent : Component
{ {
/// <summary> /// <summary>
/// False if this eye was automatically added when a player was attached to this entity. /// False if this eye was automatically added when a player was attached to this entity.

View File

@@ -3,7 +3,7 @@ using Content.Shared.GPS;
namespace Content.Client.GPS.Components namespace Content.Client.GPS.Components
{ {
[RegisterComponent] [RegisterComponent]
public sealed class HandheldGPSComponent : SharedHandheldGPSComponent public sealed partial class HandheldGPSComponent : SharedHandheldGPSComponent
{ {
} }
} }

View File

@@ -7,7 +7,7 @@ namespace Content.Client.Ghost
{ {
[RegisterComponent] [RegisterComponent]
[ComponentReference(typeof(SharedGhostComponent))] [ComponentReference(typeof(SharedGhostComponent))]
public sealed class GhostComponent : SharedGhostComponent public sealed partial class GhostComponent : SharedGhostComponent
{ {
public bool IsAttached { get; set; } public bool IsAttached { get; set; }
@@ -42,9 +42,9 @@ namespace Content.Client.Ghost
}; };
} }
public sealed class ToggleLightingActionEvent : InstantActionEvent { }; public sealed partial class ToggleLightingActionEvent : InstantActionEvent { };
public sealed class ToggleFoVActionEvent : InstantActionEvent { }; public sealed partial class ToggleFoVActionEvent : InstantActionEvent { };
public sealed class ToggleGhostsActionEvent : InstantActionEvent { }; public sealed partial class ToggleGhostsActionEvent : InstantActionEvent { };
} }

View File

@@ -7,7 +7,7 @@ namespace Content.Client.Guidebook.Components;
/// </summary> /// </summary>
[RegisterComponent] [RegisterComponent]
[Access(typeof(GuidebookSystem))] [Access(typeof(GuidebookSystem))]
public sealed class GuideHelpComponent : Component public sealed partial class GuideHelpComponent : Component
{ {
/// <summary> /// <summary>
/// What guides to include show when opening the guidebook. The first entry will be used to select the currently /// What guides to include show when opening the guidebook. The first entry will be used to select the currently

View File

@@ -4,7 +4,7 @@
/// This is used for the guidebook monkey. /// This is used for the guidebook monkey.
/// </summary> /// </summary>
[RegisterComponent] [RegisterComponent]
public sealed class GuidebookControlsTestComponent : Component public sealed partial class GuidebookControlsTestComponent : Component
{ {
} }

View File

@@ -13,7 +13,7 @@ namespace Content.Client.IconSmoothing
/// Any objects with the same <c>key</c> will connect. /// Any objects with the same <c>key</c> will connect.
/// </remarks> /// </remarks>
[RegisterComponent] [RegisterComponent]
public sealed class IconSmoothComponent : Component public sealed partial class IconSmoothComponent : Component
{ {
[ViewVariables(VVAccess.ReadWrite), DataField("enabled")] [ViewVariables(VVAccess.ReadWrite), DataField("enabled")]
public bool Enabled = true; public bool Enabled = true;
@@ -24,13 +24,13 @@ namespace Content.Client.IconSmoothing
/// We will smooth with other objects with the same key. /// We will smooth with other objects with the same key.
/// </summary> /// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("key")] [ViewVariables(VVAccess.ReadWrite), DataField("key")]
public string? SmoothKey { get; } public string? SmoothKey { get; private set; }
/// <summary> /// <summary>
/// Prepended to the RSI state. /// Prepended to the RSI state.
/// </summary> /// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("base")] [ViewVariables(VVAccess.ReadWrite), DataField("base")]
public string StateBase { get; } = string.Empty; public string StateBase { get; private set; } = string.Empty;
[DataField("shader", customTypeSerializer:typeof(PrototypeIdSerializer<ShaderPrototype>))] [DataField("shader", customTypeSerializer:typeof(PrototypeIdSerializer<ShaderPrototype>))]
public string? Shader; public string? Shader;

View File

@@ -5,7 +5,7 @@ using Robust.Shared.Audio.Midi;
namespace Content.Client.Instruments; namespace Content.Client.Instruments;
[RegisterComponent, ComponentReference(typeof(SharedInstrumentComponent))] [RegisterComponent, ComponentReference(typeof(SharedInstrumentComponent))]
public sealed class InstrumentComponent : SharedInstrumentComponent public sealed partial class InstrumentComponent : SharedInstrumentComponent
{ {
public event Action? OnMidiPlaybackEnded; public event Action? OnMidiPlaybackEnded;

View File

@@ -5,7 +5,7 @@ using Robust.Shared.Prototypes;
namespace Content.Client.Interactable.Components namespace Content.Client.Interactable.Components
{ {
[RegisterComponent] [RegisterComponent]
public sealed class InteractionOutlineComponent : Component public sealed partial class InteractionOutlineComponent : Component
{ {
[Dependency] private readonly IPrototypeManager _prototypeManager = default!; [Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly IEntityManager _entMan = default!; [Dependency] private readonly IEntityManager _entMan = default!;

View File

@@ -5,7 +5,7 @@ namespace Content.Client.Inventory;
/// </summary> /// </summary>
[RegisterComponent] [RegisterComponent]
[Access(typeof(ClientInventorySystem))] [Access(typeof(ClientInventorySystem))]
public sealed class InventorySlotsComponent : Component public sealed partial class InventorySlotsComponent : Component
{ {
[ViewVariables] [ViewVariables]
public readonly Dictionary<string, ClientInventorySystem.SlotData> SlotData = new (); public readonly Dictionary<string, ClientInventorySystem.SlotData> SlotData = new ();

View File

@@ -3,7 +3,7 @@ using Robust.Shared.GameObjects;
namespace Content.Client.Items.Components namespace Content.Client.Items.Components
{ {
[RegisterComponent] [RegisterComponent]
public sealed class ItemStatusComponent : Component public sealed partial class ItemStatusComponent : Component
{ {
} }
} }

View File

@@ -1,10 +1,10 @@
namespace Content.Client.Kudzu namespace Content.Client.Kudzu
{ {
[RegisterComponent] [RegisterComponent]
public sealed class KudzuVisualsComponent : Component public sealed partial class KudzuVisualsComponent : Component
{ {
[DataField("layer")] [DataField("layer")]
public int Layer { get; } = 0; public int Layer { get; private set; } = 0;
} }
} }

View File

@@ -6,7 +6,7 @@ namespace Content.Client.Light.Components;
[RegisterComponent] [RegisterComponent]
[NetworkedComponent] [NetworkedComponent]
public sealed class EmergencyLightComponent : SharedEmergencyLightComponent public sealed partial class EmergencyLightComponent : SharedEmergencyLightComponent
{ {
} }

View File

@@ -8,7 +8,7 @@ namespace Content.Client.Light.Components;
/// Component that represents a handheld expendable light which can be activated and eventually dies over time. /// Component that represents a handheld expendable light which can be activated and eventually dies over time.
/// </summary> /// </summary>
[RegisterComponent] [RegisterComponent]
public sealed class ExpendableLightComponent : SharedExpendableLightComponent public sealed partial class ExpendableLightComponent : SharedExpendableLightComponent
{ {
/// <summary> /// <summary>
/// The icon state used by expendable lights when the they have been completely expended. /// The icon state used by expendable lights when the they have been completely expended.

View File

@@ -16,7 +16,7 @@ namespace Content.Client.Light.Components
/// </summary> /// </summary>
[Serializable] [Serializable]
[ImplicitDataDefinitionForInheritors] [ImplicitDataDefinitionForInheritors]
public abstract class LightBehaviourAnimationTrack : AnimationTrackProperty public abstract partial class LightBehaviourAnimationTrack : AnimationTrackProperty
{ {
protected IEntityManager _entMan = default!; protected IEntityManager _entMan = default!;
protected IRobustRandom _random = default!; protected IRobustRandom _random = default!;
@@ -111,7 +111,7 @@ namespace Content.Client.Light.Components
/// A light behaviour that alternates between StartValue and EndValue /// A light behaviour that alternates between StartValue and EndValue
/// </summary> /// </summary>
[UsedImplicitly] [UsedImplicitly]
public sealed class PulseBehaviour : LightBehaviourAnimationTrack public sealed partial class PulseBehaviour : LightBehaviourAnimationTrack
{ {
public override (int KeyFrameIndex, float FramePlayingTime) AdvancePlayback( public override (int KeyFrameIndex, float FramePlayingTime) AdvancePlayback(
object context, int prevKeyFrameIndex, float prevPlayingTime, float frameTime) object context, int prevKeyFrameIndex, float prevPlayingTime, float frameTime)
@@ -166,7 +166,7 @@ namespace Content.Client.Light.Components
/// A light behaviour that interpolates from StartValue to EndValue /// A light behaviour that interpolates from StartValue to EndValue
/// </summary> /// </summary>
[UsedImplicitly] [UsedImplicitly]
public sealed class FadeBehaviour : LightBehaviourAnimationTrack public sealed partial class FadeBehaviour : LightBehaviourAnimationTrack
{ {
/// <summary> /// <summary>
/// Automatically reverse the animation when EndValue is reached. In this particular case, MaxTime specifies the /// Automatically reverse the animation when EndValue is reached. In this particular case, MaxTime specifies the
@@ -229,7 +229,7 @@ namespace Content.Client.Light.Components
/// A light behaviour that interpolates using random values chosen between StartValue and EndValue. /// A light behaviour that interpolates using random values chosen between StartValue and EndValue.
/// </summary> /// </summary>
[UsedImplicitly] [UsedImplicitly]
public sealed class RandomizeBehaviour : LightBehaviourAnimationTrack public sealed partial class RandomizeBehaviour : LightBehaviourAnimationTrack
{ {
private float _randomValue1; private float _randomValue1;
private float _randomValue2; private float _randomValue2;
@@ -295,7 +295,7 @@ namespace Content.Client.Light.Components
/// </summary> /// </summary>
[UsedImplicitly] [UsedImplicitly]
[DataDefinition] [DataDefinition]
public sealed class ColorCycleBehaviour : LightBehaviourAnimationTrack, ISerializationHooks public sealed partial class ColorCycleBehaviour : LightBehaviourAnimationTrack, ISerializationHooks
{ {
[DataField("property")] [DataField("property")]
public override string Property { get; protected set; } = "Color"; public override string Property { get; protected set; } = "Color";
@@ -357,7 +357,7 @@ namespace Content.Client.Light.Components
/// A component which applies a specific behaviour to a PointLightComponent on its owner. /// A component which applies a specific behaviour to a PointLightComponent on its owner.
/// </summary> /// </summary>
[RegisterComponent] [RegisterComponent]
public sealed class LightBehaviourComponent : SharedLightBehaviourComponent, ISerializationHooks public sealed partial class LightBehaviourComponent : SharedLightBehaviourComponent, ISerializationHooks
{ {
[Dependency] private readonly IEntityManager _entMan = default!; [Dependency] private readonly IEntityManager _entMan = default!;
[Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly IRobustRandom _random = default!;
@@ -381,7 +381,7 @@ namespace Content.Client.Light.Components
[ViewVariables(VVAccess.ReadOnly)] [ViewVariables(VVAccess.ReadOnly)]
[DataField("behaviours")] [DataField("behaviours")]
public readonly List<LightBehaviourAnimationTrack> Behaviours = new(); public List<LightBehaviourAnimationTrack> Behaviours = new();
[ViewVariables(VVAccess.ReadOnly)] [ViewVariables(VVAccess.ReadOnly)]
public readonly List<AnimationContainer> Animations = new(); public readonly List<AnimationContainer> Animations = new();

View File

@@ -4,7 +4,7 @@ namespace Content.Client.Light.Components;
/// Fades out the <see cref="SharedPointLightComponent"/> attached to this entity. /// Fades out the <see cref="SharedPointLightComponent"/> attached to this entity.
/// </summary> /// </summary>
[RegisterComponent] [RegisterComponent]
public sealed class LightFadeComponent : Component public sealed partial class LightFadeComponent : Component
{ {
[ViewVariables(VVAccess.ReadWrite), DataField("duration")] [ViewVariables(VVAccess.ReadWrite), DataField("duration")]
public float Duration = 0.5f; public float Duration = 0.5f;

View File

@@ -5,14 +5,14 @@ namespace Content.Client.Light.Visualizers;
[RegisterComponent] [RegisterComponent]
[Access(typeof(PoweredLightVisualizerSystem))] [Access(typeof(PoweredLightVisualizerSystem))]
public sealed class PoweredLightVisualsComponent : Component public sealed partial class PoweredLightVisualsComponent : Component
{ {
/// <summary> /// <summary>
/// A map of the sprite states used by this visualizer indexed by the light state they correspond to. /// A map of the sprite states used by this visualizer indexed by the light state they correspond to.
/// </summary> /// </summary>
[DataField("spriteStateMap")] [DataField("spriteStateMap")]
[ViewVariables(VVAccess.ReadOnly)] [ViewVariables(VVAccess.ReadOnly)]
public readonly Dictionary<PoweredLightState, string> SpriteStateMap = new() public Dictionary<PoweredLightState, string> SpriteStateMap = new()
{ {
[PoweredLightState.Empty] = "empty", [PoweredLightState.Empty] = "empty",
[PoweredLightState.Off] = "off", [PoweredLightState.Off] = "off",

View File

@@ -2,7 +2,7 @@
namespace Content.Client.Lightning.Components; namespace Content.Client.Lightning.Components;
[RegisterComponent] [RegisterComponent]
public sealed class LightningComponent : SharedLightningComponent public sealed partial class LightningComponent : SharedLightningComponent
{ {
} }

View File

@@ -141,7 +141,7 @@ public sealed partial class MappingSystem : EntitySystem
} }
} }
public sealed class StartPlacementActionEvent : InstantActionEvent public sealed partial class StartPlacementActionEvent : InstantActionEvent
{ {
[DataField("entityType")] [DataField("entityType")]
public string? EntityType; public string? EntityType;

View File

@@ -5,7 +5,7 @@ using Robust.Shared.IoC;
namespace Content.Client.Markers namespace Content.Client.Markers
{ {
[RegisterComponent] [RegisterComponent]
public sealed class MarkerComponent : Component public sealed partial class MarkerComponent : Component
{ {
} }
} }

View File

@@ -4,7 +4,7 @@
/// This is used for visualizing mech constructions /// This is used for visualizing mech constructions
/// </summary> /// </summary>
[RegisterComponent] [RegisterComponent]
public sealed class MechAssemblyVisualsComponent : Component public sealed partial class MechAssemblyVisualsComponent : Component
{ {
/// <summary> /// <summary>
/// The prefix that is followed by the number which /// The prefix that is followed by the number which

View File

@@ -5,7 +5,7 @@ using Robust.Client.UserInterface;
namespace Content.Client.Mech.Ui.Equipment; namespace Content.Client.Mech.Ui.Equipment;
public sealed class MechGrabberUi : UIFragment public sealed partial class MechGrabberUi : UIFragment
{ {
private MechGrabberUiFragment? _fragment; private MechGrabberUiFragment? _fragment;

View File

@@ -5,7 +5,7 @@ using Robust.Client.UserInterface;
namespace Content.Client.Mech.Ui.Equipment; namespace Content.Client.Mech.Ui.Equipment;
public sealed class MechSoundboardUi : UIFragment public sealed partial class MechSoundboardUi : UIFragment
{ {
private MechSoundboardUiFragment? _fragment; private MechSoundboardUiFragment? _fragment;

View File

@@ -3,6 +3,6 @@
namespace Content.Client.MedicalScanner; namespace Content.Client.MedicalScanner;
[RegisterComponent] [RegisterComponent]
public sealed class MedicalScannerComponent : SharedMedicalScannerComponent public sealed partial class MedicalScannerComponent : SharedMedicalScannerComponent
{ {
} }

View File

@@ -1,7 +1,7 @@
namespace Content.Client.NPC.HTN; namespace Content.Client.NPC.HTN;
[RegisterComponent] [RegisterComponent]
public sealed class HTNComponent : NPCComponent public sealed partial class HTNComponent : NPCComponent
{ {
public string DebugText = string.Empty; public string DebugText = string.Empty;
} }

View File

@@ -2,7 +2,7 @@ using Content.Shared.NPC;
namespace Content.Client.NPC; namespace Content.Client.NPC;
public abstract class NPCComponent : SharedNPCComponent public abstract partial class NPCComponent : SharedNPCComponent
{ {
} }

View File

@@ -3,7 +3,7 @@ using System.Numerics;
namespace Content.Client.NPC; namespace Content.Client.NPC;
[RegisterComponent] [RegisterComponent]
public sealed class NPCSteeringComponent : Component public sealed partial class NPCSteeringComponent : Component
{ {
/* Not hooked up to the server component as it's used for debugging only. /* Not hooked up to the server component as it's used for debugging only.
*/ */

View File

@@ -4,7 +4,7 @@ namespace Content.Client.NetworkConfigurator;
/// This is used for... /// This is used for...
/// </summary> /// </summary>
[RegisterComponent] [RegisterComponent]
public sealed class NetworkConfiguratorActiveLinkOverlayComponent : Component public sealed partial class NetworkConfiguratorActiveLinkOverlayComponent : Component
{ {
/// <summary> /// <summary>
/// The entities linked to this network configurator. /// The entities linked to this network configurator.

View File

@@ -4,7 +4,7 @@
/// Used for specifying the pda windows border colors /// Used for specifying the pda windows border colors
/// </summary> /// </summary>
[RegisterComponent] [RegisterComponent]
public sealed class PdaBorderColorComponent : Component public sealed partial class PdaBorderColorComponent : Component
{ {
[DataField("borderColor", required: true)] [DataField("borderColor", required: true)]
public string? BorderColor; public string? BorderColor;

View File

@@ -4,6 +4,6 @@ using Robust.Shared.GameStates;
namespace Content.Client.Paper; namespace Content.Client.Paper;
[NetworkedComponent, RegisterComponent] [NetworkedComponent, RegisterComponent]
public sealed class PaperComponent : SharedPaperComponent public sealed partial class PaperComponent : SharedPaperComponent
{ {
} }

View File

@@ -3,7 +3,7 @@ using System.Numerics;
namespace Content.Client.Paper; namespace Content.Client.Paper;
[RegisterComponent] [RegisterComponent]
public sealed class PaperVisualsComponent : Component public sealed partial class PaperVisualsComponent : Component
{ {
/// <summary> /// <summary>
/// The path to the image which will be used as a background for the paper itself /// The path to the image which will be used as a background for the paper itself

View File

@@ -16,14 +16,14 @@ namespace Content.Client.Parallax.Data;
[UsedImplicitly] [UsedImplicitly]
[DataDefinition] [DataDefinition]
public sealed class GeneratedParallaxTextureSource : IParallaxTextureSource public sealed partial class GeneratedParallaxTextureSource : IParallaxTextureSource
{ {
/// <summary> /// <summary>
/// Parallax config path (the TOML file). /// Parallax config path (the TOML file).
/// In client resources. /// In client resources.
/// </summary> /// </summary>
[DataField("configPath")] [DataField("configPath")]
public ResPath ParallaxConfigPath { get; } = new("/parallax_config.toml"); public ResPath ParallaxConfigPath { get; private set; } = new("/parallax_config.toml");
/// <summary> /// <summary>
/// ID for debugging, caching, and so forth. /// ID for debugging, caching, and so forth.
@@ -31,7 +31,7 @@ public sealed class GeneratedParallaxTextureSource : IParallaxTextureSource
/// It is advisible to provide a roughly unique ID for any unique config contents. /// It is advisible to provide a roughly unique ID for any unique config contents.
/// </summary> /// </summary>
[DataField("id")] [DataField("id")]
public string Identifier { get; } = "other"; public string Identifier { get; private set; } = "other";
/// <summary> /// <summary>
/// Cached path. /// Cached path.

View File

@@ -5,7 +5,7 @@ using Robust.Client.Graphics;
namespace Content.Client.Parallax.Data namespace Content.Client.Parallax.Data
{ {
[ImplicitDataDefinitionForInheritors] [ImplicitDataDefinitionForInheritors]
public interface IParallaxTextureSource public partial interface IParallaxTextureSource
{ {
/// <summary> /// <summary>
/// Generates or loads the texture. /// Generates or loads the texture.

View File

@@ -10,13 +10,13 @@ namespace Content.Client.Parallax.Data;
[UsedImplicitly] [UsedImplicitly]
[DataDefinition] [DataDefinition]
public sealed class ImageParallaxTextureSource : IParallaxTextureSource public sealed partial class ImageParallaxTextureSource : IParallaxTextureSource
{ {
/// <summary> /// <summary>
/// Texture path. /// Texture path.
/// </summary> /// </summary>
[DataField("path", required: true)] [DataField("path", required: true)]
public ResPath Path { get; } = default!; public ResPath Path { get; private set; } = default!;
Task<Texture> IParallaxTextureSource.GenerateTexture(CancellationToken cancel) Task<Texture> IParallaxTextureSource.GenerateTexture(CancellationToken cancel)
{ {

View File

@@ -6,7 +6,7 @@ namespace Content.Client.Parallax.Data;
/// The configuration for a parallax layer. /// The configuration for a parallax layer.
/// </summary> /// </summary>
[DataDefinition] [DataDefinition]
public sealed class ParallaxLayerConfig public sealed partial class ParallaxLayerConfig
{ {
/// <summary> /// <summary>
/// The texture source for this layer. /// The texture source for this layer.

View File

@@ -15,23 +15,23 @@ public sealed class ParallaxPrototype : IPrototype
{ {
/// <inheritdoc/> /// <inheritdoc/>
[IdDataField] [IdDataField]
public string ID { get; } = default!; public string ID { get; private set; } = default!;
/// <summary> /// <summary>
/// Parallax layers. /// Parallax layers.
/// </summary> /// </summary>
[DataField("layers")] [DataField("layers")]
public List<ParallaxLayerConfig> Layers { get; } = new(); public List<ParallaxLayerConfig> Layers { get; private set; } = new();
/// <summary> /// <summary>
/// Parallax layers, low-quality. /// Parallax layers, low-quality.
/// </summary> /// </summary>
[DataField("layersLQ")] [DataField("layersLQ")]
public List<ParallaxLayerConfig> LayersLQ { get; } = new(); public List<ParallaxLayerConfig> LayersLQ { get; private set; } = new();
/// <summary> /// <summary>
/// If low-quality layers don't exist for this parallax and high-quality should be used instead. /// If low-quality layers don't exist for this parallax and high-quality should be used instead.
/// </summary> /// </summary>
[DataField("layersLQUseHQ")] [DataField("layersLQUseHQ")]
public bool LayersLQUseHQ { get; } = true; public bool LayersLQUseHQ { get; private set; } = true;
} }

View File

@@ -4,7 +4,7 @@ namespace Content.Client.ParticleAccelerator;
[RegisterComponent] [RegisterComponent]
[Access(typeof(ParticleAcceleratorPartVisualizerSystem))] [Access(typeof(ParticleAcceleratorPartVisualizerSystem))]
public sealed class ParticleAcceleratorPartVisualsComponent : Component public sealed partial class ParticleAcceleratorPartVisualsComponent : Component
{ {
[DataField("stateBase", required: true)] [DataField("stateBase", required: true)]
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]
@@ -12,7 +12,7 @@ public sealed class ParticleAcceleratorPartVisualsComponent : Component
[DataField("stateSuffixes")] [DataField("stateSuffixes")]
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]
public readonly Dictionary<ParticleAcceleratorVisualState, string> StatesSuffixes = new() public Dictionary<ParticleAcceleratorVisualState, string> StatesSuffixes = new()
{ {
{ParticleAcceleratorVisualState.Powered, "p"}, {ParticleAcceleratorVisualState.Powered, "p"},
{ParticleAcceleratorVisualState.Level0, "p0"}, {ParticleAcceleratorVisualState.Level0, "p0"},

View File

@@ -3,21 +3,21 @@ using Content.Shared.Pointing.Components;
namespace Content.Client.Pointing.Components; namespace Content.Client.Pointing.Components;
[RegisterComponent] [RegisterComponent]
public sealed class PointingArrowComponent : SharedPointingArrowComponent public sealed partial class PointingArrowComponent : SharedPointingArrowComponent
{ {
/// <summary> /// <summary>
/// How long it takes to go from the bottom of the animation to the top. /// How long it takes to go from the bottom of the animation to the top.
/// </summary> /// </summary>
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]
[DataField("animationTime")] [DataField("animationTime")]
public readonly float AnimationTime = 0.5f; public float AnimationTime = 0.5f;
/// <summary> /// <summary>
/// How far it goes in any direction. /// How far it goes in any direction.
/// </summary> /// </summary>
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]
[DataField("offset")] [DataField("offset")]
public readonly Vector2 Offset = new(0, 0.25f); public Vector2 Offset = new(0, 0.25f);
public readonly string AnimationKey = "pointingarrow"; public readonly string AnimationKey = "pointingarrow";
} }

View File

@@ -7,7 +7,7 @@ using DrawDepth = Content.Shared.DrawDepth.DrawDepth;
namespace Content.Client.Pointing.Components namespace Content.Client.Pointing.Components
{ {
[RegisterComponent] [RegisterComponent]
public sealed class RoguePointingArrowComponent : SharedRoguePointingArrowComponent public sealed partial class RoguePointingArrowComponent : SharedRoguePointingArrowComponent
{ {
} }
} }

View File

@@ -4,7 +4,7 @@ namespace Content.Client.Power.APC;
[RegisterComponent] [RegisterComponent]
[Access(typeof(ApcVisualizerSystem))] [Access(typeof(ApcVisualizerSystem))]
public sealed class ApcVisualsComponent : Component public sealed partial class ApcVisualsComponent : Component
{ {
#region Indicators #region Indicators

View File

@@ -2,7 +2,7 @@
/// <seealso cref="TegSystem"/> /// <seealso cref="TegSystem"/>
[RegisterComponent] [RegisterComponent]
public sealed class TegCirculatorComponent : Component public sealed partial class TegCirculatorComponent : Component
{ {
} }

View File

@@ -1,7 +1,7 @@
namespace Content.Client.Power.SMES; namespace Content.Client.Power.SMES;
[RegisterComponent] [RegisterComponent]
public sealed class SmesComponent : Component public sealed partial class SmesComponent : Component
{ {
/// <summary> /// <summary>
/// The prefix used for the RSI states of the sprite layers indicating the charge level of the SMES. /// The prefix used for the RSI states of the sprite layers indicating the charge level of the SMES.
@@ -9,7 +9,7 @@ public sealed class SmesComponent : Component
[DataField("chargeOverlayPrefix")] [DataField("chargeOverlayPrefix")]
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]
public string ChargeOverlayPrefix = "smes-og"; public string ChargeOverlayPrefix = "smes-og";
/// <summary> /// <summary>
/// The prefix used for the RSI states of the sprite layers indicating the input state of the SMES. /// The prefix used for the RSI states of the sprite layers indicating the input state of the SMES.
/// Actually bundled together with the output indicator light. /// Actually bundled together with the output indicator light.
@@ -17,7 +17,7 @@ public sealed class SmesComponent : Component
[DataField("inputOverlayPrefix")] [DataField("inputOverlayPrefix")]
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]
public string InputOverlayPrefix = "smes-oc"; public string InputOverlayPrefix = "smes-oc";
/// <summary> /// <summary>
/// The prefix used for the RSI states of the sprite layers indicating the output state of the SMES. /// The prefix used for the RSI states of the sprite layers indicating the output state of the SMES.
/// Actually bundled together with the input indicator light. /// Actually bundled together with the input indicator light.

View File

@@ -1,7 +1,7 @@
namespace Content.Client.Power.Visualizers; namespace Content.Client.Power.Visualizers;
[RegisterComponent] [RegisterComponent]
public sealed class CableVisualizerComponent : Component public sealed partial class CableVisualizerComponent : Component
{ {
[DataField("statePrefix")] [DataField("statePrefix")]
public string? StatePrefix; public string? StatePrefix;

View File

@@ -1,4 +1,4 @@
namespace Content.Client.PowerCell; namespace Content.Client.PowerCell;
[RegisterComponent] [RegisterComponent]
public sealed class PowerCellVisualsComponent : Component {} public sealed partial class PowerCellVisualsComponent : Component {}

View File

@@ -4,7 +4,7 @@ namespace Content.Client.PowerCell;
[RegisterComponent] [RegisterComponent]
[Access(typeof(PowerChargerVisualizerSystem))] [Access(typeof(PowerChargerVisualizerSystem))]
public sealed class PowerChargerVisualsComponent : Component public sealed partial class PowerChargerVisualsComponent : Component
{ {
/// <summary> /// <summary>
/// The base sprite state used if the power cell charger does not contain a power cell. /// The base sprite state used if the power cell charger does not contain a power cell.
@@ -12,14 +12,14 @@ public sealed class PowerChargerVisualsComponent : Component
[DataField("emptyState")] [DataField("emptyState")]
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]
public string EmptyState = "empty"; public string EmptyState = "empty";
/// <summary> /// <summary>
/// The base sprite state used if the power cell charger contains a power cell. /// The base sprite state used if the power cell charger contains a power cell.
/// </summary> /// </summary>
[DataField("occupiedState")] [DataField("occupiedState")]
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]
public string OccupiedState = "full"; public string OccupiedState = "full";
/// <summary> /// <summary>
/// A mapping of the indicator light overlays for the power cell charger. /// A mapping of the indicator light overlays for the power cell charger.
/// <see cref="CellChargerStatus.Off"/> Maps to the state used when the charger is out of power/disabled. /// <see cref="CellChargerStatus.Off"/> Maps to the state used when the charger is out of power/disabled.
@@ -29,7 +29,7 @@ public sealed class PowerChargerVisualsComponent : Component
/// </summary> /// </summary>
[DataField("lightStates")] [DataField("lightStates")]
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]
public readonly Dictionary<CellChargerStatus, string> LightStates = new() public Dictionary<CellChargerStatus, string> LightStates = new()
{ {
[CellChargerStatus.Off] = "light-off", [CellChargerStatus.Off] = "light-off",
[CellChargerStatus.Empty] = "light-empty", [CellChargerStatus.Empty] = "light-empty",

View File

@@ -4,6 +4,6 @@ namespace Content.Client.Replay.Spectator;
/// This component indicates that this entity currently has a replay spectator/observer attached to it. /// This component indicates that this entity currently has a replay spectator/observer attached to it.
/// </summary> /// </summary>
[RegisterComponent] [RegisterComponent]
public sealed class ReplaySpectatorComponent : Component public sealed partial class ReplaySpectatorComponent : Component
{ {
} }

View File

@@ -1,11 +1,11 @@
namespace Content.Client.Rotation; namespace Content.Client.Rotation;
[RegisterComponent] [RegisterComponent]
public sealed class RotationVisualsComponent : Component public sealed partial class RotationVisualsComponent : Component
{ {
[DataField("defaultRotation")] [DataField("defaultRotation")]
[ViewVariables(VVAccess.ReadOnly)] [ViewVariables(VVAccess.ReadOnly)]
public readonly Angle DefaultRotation = Angle.FromDegrees(90); public Angle DefaultRotation = Angle.FromDegrees(90);
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]
public Angle VerticalRotation = 0; public Angle VerticalRotation = 0;

View File

@@ -3,7 +3,7 @@ using Content.Shared.Salvage.Expeditions;
namespace Content.Client.Salvage; namespace Content.Client.Salvage;
[RegisterComponent] [RegisterComponent]
public sealed class SalvageExpeditionComponent : SharedSalvageExpeditionComponent public sealed partial class SalvageExpeditionComponent : SharedSalvageExpeditionComponent
{ {
} }

View File

@@ -4,4 +4,4 @@ using Robust.Shared.GameStates;
namespace Content.Client.Salvage; namespace Content.Client.Salvage;
[NetworkedComponent, RegisterComponent] [NetworkedComponent, RegisterComponent]
public sealed class SalvageMagnetComponent : SharedSalvageMagnetComponent {} public sealed partial class SalvageMagnetComponent : SharedSalvageMagnetComponent {}

View File

@@ -3,5 +3,5 @@ using Content.Shared.Shuttles.Components;
namespace Content.Client.Shuttles namespace Content.Client.Shuttles
{ {
[RegisterComponent] [RegisterComponent]
public sealed class ShuttleConsoleComponent : SharedShuttleConsoleComponent {} public sealed partial class ShuttleConsoleComponent : SharedShuttleConsoleComponent {}
} }

View File

@@ -7,6 +7,6 @@ namespace Content.Client.Shuttles;
/// Managed by <see cref="ThrusterSystem"/> /// Managed by <see cref="ThrusterSystem"/>
/// </summary> /// </summary>
[RegisterComponent, NetworkedComponent, Access(typeof(ThrusterSystem))] [RegisterComponent, NetworkedComponent, Access(typeof(ThrusterSystem))]
public sealed class ThrusterComponent : Component public sealed partial class ThrusterComponent : Component
{ {
} }

View File

@@ -8,7 +8,7 @@ namespace Content.Client.Singularity.Visualizers;
/// </summary> /// </summary>
[RegisterComponent] [RegisterComponent]
[Access(typeof(RadiationCollectorSystem))] [Access(typeof(RadiationCollectorSystem))]
public sealed class RadiationCollectorComponent : Component public sealed partial class RadiationCollectorComponent : Component
{ {
/// <summary> /// <summary>
/// The key used to index the (de)activation animations played when turning a radiation collector on/off. /// The key used to index the (de)activation animations played when turning a radiation collector on/off.

View File

@@ -1,7 +1,7 @@
namespace Content.Client.Smoking; namespace Content.Client.Smoking;
[RegisterComponent] [RegisterComponent]
public sealed class BurnStateVisualsComponent : Component public sealed partial class BurnStateVisualsComponent : Component
{ {
[DataField("burntIcon")] [DataField("burntIcon")]
public string BurntIcon = "burnt-icon"; public string BurntIcon = "burnt-icon";

View File

@@ -6,7 +6,7 @@ namespace Content.Client.Sprite;
/// The non-networked client-only component to track active <see cref="SpriteFadeComponent"/> /// The non-networked client-only component to track active <see cref="SpriteFadeComponent"/>
/// </summary> /// </summary>
[RegisterComponent, Access(typeof(SpriteFadeSystem))] [RegisterComponent, Access(typeof(SpriteFadeSystem))]
public sealed class FadingSpriteComponent : Component public sealed partial class FadingSpriteComponent : Component
{ {
[ViewVariables] [ViewVariables]
public float OriginalAlpha; public float OriginalAlpha;

View File

@@ -9,7 +9,7 @@ namespace Content.Client.Storage
/// </summary> /// </summary>
[RegisterComponent] [RegisterComponent]
[ComponentReference(typeof(SharedStorageComponent))] [ComponentReference(typeof(SharedStorageComponent))]
public sealed class ClientStorageComponent : SharedStorageComponent public sealed partial class ClientStorageComponent : SharedStorageComponent
{ {
private List<EntityUid> _storedEntities = new(); private List<EntityUid> _storedEntities = new();
public override IReadOnlyList<EntityUid> StoredEntities => _storedEntities; public override IReadOnlyList<EntityUid> StoredEntities => _storedEntities;

View File

@@ -4,7 +4,7 @@ using Robust.Shared.GameStates;
namespace Content.Client.Storage.Components; namespace Content.Client.Storage.Components;
[RegisterComponent, ComponentReference(typeof(SharedEntityStorageComponent))] [RegisterComponent, ComponentReference(typeof(SharedEntityStorageComponent))]
public sealed class EntityStorageComponent : SharedEntityStorageComponent public sealed partial class EntityStorageComponent : SharedEntityStorageComponent
{ {
} }

View File

@@ -2,7 +2,7 @@ namespace Content.Client.Storage.Visualizers;
[RegisterComponent] [RegisterComponent]
[Access(typeof(EntityStorageVisualizerSystem))] [Access(typeof(EntityStorageVisualizerSystem))]
public sealed class EntityStorageVisualsComponent : Component public sealed partial class EntityStorageVisualsComponent : Component
{ {
/// <summary> /// <summary>
/// The RSI state used for the base layer of the storage entity sprite while the storage is closed. /// The RSI state used for the base layer of the storage entity sprite while the storage is closed.

View File

@@ -4,7 +4,7 @@ namespace Content.Client.SubFloor;
/// Added clientside if an entity is revealed for TRay. /// Added clientside if an entity is revealed for TRay.
/// </summary> /// </summary>
[RegisterComponent] [RegisterComponent]
public sealed class TrayRevealedComponent : Component public sealed partial class TrayRevealedComponent : Component
{ {
} }

View File

@@ -1,7 +1,7 @@
namespace Content.Client.SurveillanceCamera; namespace Content.Client.SurveillanceCamera;
[RegisterComponent] [RegisterComponent]
public sealed class ActiveSurveillanceCameraMonitorVisualsComponent : Component public sealed partial class ActiveSurveillanceCameraMonitorVisualsComponent : Component
{ {
public float TimeLeft = 10f; public float TimeLeft = 10f;

View File

@@ -5,8 +5,8 @@ namespace Content.Client.SurveillanceCamera;
// Dummy component so that targetted events work on client for // Dummy component so that targetted events work on client for
// appearance events. // appearance events.
[RegisterComponent] [RegisterComponent]
public sealed class SurveillanceCameraVisualsComponent : Component public sealed partial class SurveillanceCameraVisualsComponent : Component
{ {
[DataField("sprites")] [DataField("sprites")]
public readonly Dictionary<SurveillanceCameraVisuals, string> CameraSprites = new(); public Dictionary<SurveillanceCameraVisuals, string> CameraSprites = new();
} }

View File

@@ -4,7 +4,7 @@
/// This is an active component for tracking <see cref="TextScreenVisualsComponent"/> /// This is an active component for tracking <see cref="TextScreenVisualsComponent"/>
/// </summary> /// </summary>
[RegisterComponent] [RegisterComponent]
public sealed class TextScreenTimerComponent : Component public sealed partial class TextScreenTimerComponent : Component
{ {
} }

View File

@@ -6,7 +6,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Client.TextScreen; namespace Content.Client.TextScreen;
[RegisterComponent] [RegisterComponent]
public sealed class TextScreenVisualsComponent : Component public sealed partial class TextScreenVisualsComponent : Component
{ {
/// <summary> /// <summary>
/// 1/32 - the size of a pixel /// 1/32 - the size of a pixel

View File

@@ -10,7 +10,7 @@ namespace Content.Client.Toggleable;
/// visuals. This will modify the color of any attached point lights. /// visuals. This will modify the color of any attached point lights.
/// </remarks> /// </remarks>
[RegisterComponent] [RegisterComponent]
public sealed class ToggleableLightVisualsComponent : Component public sealed partial class ToggleableLightVisualsComponent : Component
{ {
/// <summary> /// <summary>
/// Sprite layer that will have its visibility toggled when this item is toggled. /// Sprite layer that will have its visibility toggled when this item is toggled.
@@ -28,5 +28,5 @@ public sealed class ToggleableLightVisualsComponent : Component
/// Layers to add to the sprite of the player that is wearing this entity (while the component is toggled on). /// Layers to add to the sprite of the player that is wearing this entity (while the component is toggled on).
/// </summary> /// </summary>
[DataField("clothingVisuals")] [DataField("clothingVisuals")]
public readonly Dictionary<string, List<PrototypeLayerData>> ClothingVisuals = new(); public Dictionary<string, List<PrototypeLayerData>> ClothingVisuals = new();
} }

View File

@@ -3,7 +3,7 @@ using Content.Shared.Tools.Components;
namespace Content.Client.Tools.Components; namespace Content.Client.Tools.Components;
[RegisterComponent] [RegisterComponent]
public sealed class WeldableComponent : SharedWeldableComponent public sealed partial class WeldableComponent : SharedWeldableComponent
{ {
} }

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