pvs content (#5484)

Co-authored-by: Paul <ritter.paul1+git@googlemail.com>
This commit is contained in:
Paul Ritter
2021-11-30 15:20:38 +01:00
committed by GitHub
parent d0efe50e83
commit fbcb53dcc0
63 changed files with 72 additions and 68 deletions

View File

@@ -99,7 +99,7 @@ namespace Content.IntegrationTests.Tests.Buckle
Assert.True(buckle.Buckled); Assert.True(buckle.Buckled);
var player = IoCManager.Resolve<IPlayerManager>().Sessions.Single(); var player = IoCManager.Resolve<IPlayerManager>().Sessions.Single();
Assert.True(((BuckleComponentState) buckle.GetComponentState(player)).Buckled); Assert.True(((BuckleComponentState) buckle.GetComponentState()).Buckled);
Assert.False(actionBlocker.CanMove(human.Uid)); Assert.False(actionBlocker.CanMove(human.Uid));
Assert.False(actionBlocker.CanChangeDirection(human.Uid)); Assert.False(actionBlocker.CanChangeDirection(human.Uid));
Assert.False(standingState.Down(human.Uid)); Assert.False(standingState.Down(human.Uid));

View File

@@ -418,7 +418,7 @@ namespace Content.IntegrationTests.Tests.Networking
Foo = pred.Foo; Foo = pred.Foo;
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new PredictionComponentState(Foo); return new PredictionComponentState(Foo);
} }

View File

@@ -42,7 +42,7 @@ namespace Content.Server.Atmos.Components
Owner.TryGetComponent(out _appearance); Owner.TryGetComponent(out _appearance);
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new GasAnalyzerComponentState(_pressureDanger); return new GasAnalyzerComponentState(_pressureDanger);
} }

View File

@@ -390,7 +390,7 @@ namespace Content.Server.Buckle.Components
base.Shutdown(); base.Shutdown();
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
int? drawDepth = null; int? drawDepth = null;

View File

@@ -158,7 +158,7 @@ namespace Content.Server.Buckle.Components
_occupiedSize = 0; _occupiedSize = 0;
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new StrapComponentState(Position); return new StrapComponentState(Position);
} }

View File

@@ -17,7 +17,7 @@ namespace Content.Server.Cargo.Components
Database = EntitySystem.Get<CargoConsoleSystem>().StationOrderDatabase; Database = EntitySystem.Get<CargoConsoleSystem>().StationOrderDatabase;
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
if (!ConnectedToDatabase) if (!ConnectedToDatabase)
return new CargoOrderDatabaseState(null); return new CargoOrderDatabaseState(null);

View File

@@ -7,7 +7,7 @@ namespace Content.Server.Cargo.Components
[RegisterComponent] [RegisterComponent]
public class GalacticMarketComponent : SharedGalacticMarketComponent public class GalacticMarketComponent : SharedGalacticMarketComponent
{ {
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new GalacticMarketState(GetProductIdList()); return new GalacticMarketState(GetProductIdList());
} }

View File

@@ -122,7 +122,7 @@ namespace Content.Server.Chemistry.Components
return true; return true;
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
var solutionSys = Owner.EntityManager.EntitySysManager.GetEntitySystem<SolutionContainerSystem>(); var solutionSys = Owner.EntityManager.EntitySysManager.GetEntitySystem<SolutionContainerSystem>();
return solutionSys.TryGetSolution(Owner.Uid, SolutionName, out var solution) return solutionSys.TryGetSolution(Owner.Uid, SolutionName, out var solution)

View File

@@ -313,7 +313,7 @@ namespace Content.Server.Chemistry.Components
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
Owner.EntityManager.EntitySysManager.GetEntitySystem<SolutionContainerSystem>() Owner.EntityManager.EntitySysManager.GetEntitySystem<SolutionContainerSystem>()
.TryGetSolution(Owner.Uid, SolutionName, out var solution); .TryGetSolution(Owner.Uid, SolutionName, out var solution);

View File

@@ -99,7 +99,7 @@ namespace Content.Server.Climbing.Components
IsClimbing = false; IsClimbing = false;
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new ClimbModeComponentState(_isClimbing, OwnerIsTransitioning); return new ClimbModeComponentState(_isClimbing, OwnerIsTransitioning);
} }

View File

@@ -52,7 +52,7 @@ namespace Content.Server.Clothing.Components
} }
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new ClothingComponentState(ClothingEquippedPrefix, EquippedPrefix); return new ClothingComponentState(ClothingEquippedPrefix, EquippedPrefix);
} }

View File

@@ -114,7 +114,7 @@ namespace Content.Server.Clothing.Components
Toggle(eventArgs.User); Toggle(eventArgs.User);
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new MagbootsComponentState(On); return new MagbootsComponentState(On);
} }

View File

@@ -89,7 +89,7 @@ namespace Content.Server.Crayon
} }
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new CrayonComponentState(_color, SelectedState, Charges, Capacity); return new CrayonComponentState(_color, SelectedState, Charges, Capacity);
} }

View File

@@ -56,7 +56,7 @@ namespace Content.Server.Cuffs.Components
Owner.EnsureComponentWarn<HandsComponent>(); Owner.EnsureComponentWarn<HandsComponent>();
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
// there are 2 approaches i can think of to handle the handcuff overlay on players // there are 2 approaches i can think of to handle the handcuff overlay on players
// 1 - make the current RSI the handcuff type that's currently active. all handcuffs on the player will appear the same. // 1 - make the current RSI the handcuff type that's currently active. all handcuffs on the player will appear the same.

View File

@@ -138,7 +138,7 @@ namespace Content.Server.Cuffs.Components
/// </summary> /// </summary>
private bool _cuffing; private bool _cuffing;
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new HandcuffedComponentState(Broken ? BrokenState : string.Empty); return new HandcuffedComponentState(Broken ? BrokenState : string.Empty);
} }

View File

@@ -15,7 +15,7 @@ namespace Content.Server.DoAfter
// we'll just send them the index. Doesn't matter if it wraps around. // we'll just send them the index. Doesn't matter if it wraps around.
private byte _runningIndex; private byte _runningIndex;
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
var toAdd = new List<ClientDoAfter>(); var toAdd = new List<ClientDoAfter>();

View File

@@ -769,7 +769,7 @@ namespace Content.Server.Doors.Components
*/ */
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new DoorComponentState(State, StateChangeStartTime, CurrentlyCrushing, GameTiming.CurTime); return new DoorComponentState(State, StateChangeStartTime, CurrentlyCrushing, GameTiming.CurTime);
} }

View File

@@ -517,7 +517,7 @@ namespace Content.Server.Inventory.Components
} }
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
var list = new List<KeyValuePair<Slots, EntityUid>>(); var list = new List<KeyValuePair<Slots, EntityUid>>();
foreach (var (slot, container) in _slotContainers) foreach (var (slot, container) in _slotContainers)

View File

@@ -18,7 +18,7 @@ namespace Content.Server.Lathe.Components
[DataField("static")] [DataField("static")]
public bool Static { get; private set; } = false; public bool Static { get; private set; } = false;
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new LatheDatabaseState(GetRecipeIdList()); return new LatheDatabaseState(GetRecipeIdList());
} }

View File

@@ -22,7 +22,7 @@ namespace Content.Server.Lathe.Components
[DataField("StorageLimit")] [DataField("StorageLimit")]
private int _storageLimit = -1; private int _storageLimit = -1;
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new MaterialStorageState(Storage); return new MaterialStorageState(Storage);
} }

View File

@@ -17,7 +17,7 @@ namespace Content.Server.Lathe.Components
public override string Name => "ProtolatheDatabase"; public override string Name => "ProtolatheDatabase";
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new ProtolatheDatabaseState(GetRecipeIdList()); return new ProtolatheDatabaseState(GetRecipeIdList());
} }

View File

@@ -241,7 +241,7 @@ namespace Content.Server.Light.Components
return (byte?) ContentHelpers.RoundToNearestLevels(currentCharge / Cell.MaxCharge * 255, 255, StatusLevels); return (byte?) ContentHelpers.RoundToNearestLevels(currentCharge / Cell.MaxCharge * 255, 255, StatusLevels);
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new HandheldLightComponentState(GetLevel()); return new HandheldLightComponentState(GetLevel());
} }

View File

@@ -223,7 +223,7 @@ namespace Content.Server.Nutrition.Components
UpdateCurrentThreshold(); UpdateCurrentThreshold();
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new HungerComponentState(_currentHungerThreshold); return new HungerComponentState(_currentHungerThreshold);
} }

View File

@@ -220,7 +220,7 @@ namespace Content.Server.Nutrition.Components
UpdateCurrentThreshold(); UpdateCurrentThreshold();
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new ThirstComponentState(_currentThirstThreshold); return new ThirstComponentState(_currentThirstThreshold);
} }

View File

@@ -38,7 +38,7 @@ namespace Content.Server.Projectiles.Components
Dirty(); Dirty();
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new ProjectileComponentState(Shooter, IgnoreShooter); return new ProjectileComponentState(Shooter, IgnoreShooter);
} }

View File

@@ -98,7 +98,7 @@ namespace Content.Server.Radiation
Dirty(); Dirty();
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new RadiationPulseState(_radsPerSecond, _range, Draw, Decay, _endTime); return new RadiationPulseState(_radsPerSecond, _range, Draw, Decay, _endTime);
} }

View File

@@ -8,7 +8,7 @@ namespace Content.Server.Research.Components
[RegisterComponent] [RegisterComponent]
public class TechnologyDatabaseComponent : SharedTechnologyDatabaseComponent public class TechnologyDatabaseComponent : SharedTechnologyDatabaseComponent
{ {
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new TechnologyDatabaseState(_technologies); return new TechnologyDatabaseState(_technologies);
} }

View File

@@ -73,7 +73,7 @@ namespace Content.Server.Singularity.Components
[DataField("singularityFormingSound")] private SoundSpecifier _singularityFormingSound = new SoundPathSpecifier("/Audio/Effects/singularity_form.ogg"); [DataField("singularityFormingSound")] private SoundSpecifier _singularityFormingSound = new SoundPathSpecifier("/Audio/Effects/singularity_form.ogg");
[DataField("singularityCollapsingSound")] private SoundSpecifier _singularityCollapsingSound = new SoundPathSpecifier("/Audio/Effects/singularity_collapse.ogg"); [DataField("singularityCollapsingSound")] private SoundSpecifier _singularityCollapsingSound = new SoundPathSpecifier("/Audio/Effects/singularity_collapse.ogg");
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new SingularityComponentState(Level); return new SingularityComponentState(Level);
} }

View File

@@ -142,7 +142,7 @@ namespace Content.Server.Suspicion
message.AddMarkup(tooltip); message.AddMarkup(tooltip);
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
if (Role == null) if (Role == null)
{ {

View File

@@ -117,7 +117,7 @@ namespace Content.Server.Weapon.Ranged.Barrels.Components
UpdateAppearance(); UpdateAppearance();
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
(int, int)? count = (ShotsLeft, Capacity); (int, int)? count = (ShotsLeft, Capacity);
var chamberedExists = _chamberContainer.ContainedEntity != null; var chamberedExists = _chamberContainer.ContainedEntity != null;

View File

@@ -78,7 +78,7 @@ namespace Content.Server.Weapon.Ranged.Barrels.Components
UpdateAppearance(); UpdateAppearance();
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
(int, int)? count = (ShotsLeft, Capacity); (int, int)? count = (ShotsLeft, Capacity);
var chamberedExists = _chamberContainer.ContainedEntity != null; var chamberedExists = _chamberContainer.ContainedEntity != null;

View File

@@ -75,7 +75,7 @@ namespace Content.Server.Weapon.Ranged.Barrels.Components
_ammoSlots = new IEntity[_serializedCapacity]; _ammoSlots = new IEntity[_serializedCapacity];
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
var slotsSpent = new bool?[Capacity]; var slotsSpent = new bool?[Capacity];
for (var i = 0; i < Capacity; i++) for (var i = 0; i < Capacity; i++)

View File

@@ -81,7 +81,7 @@ namespace Content.Server.Weapon.Ranged.Barrels.Components
[DataField("soundPowerCellEject", required: true)] [DataField("soundPowerCellEject", required: true)]
private SoundSpecifier _soundPowerCellEject = default!; private SoundSpecifier _soundPowerCellEject = default!;
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
(int, int)? count = (ShotsLeft, Capacity); (int, int)? count = (ShotsLeft, Capacity);

View File

@@ -149,7 +149,7 @@ namespace Content.Server.Weapon.Ranged.Barrels.Components
return types; return types;
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
(int, int)? count = null; (int, int)? count = null;
var magazine = MagazineContainer.ContainedEntity; var magazine = MagazineContainer.ContainedEntity;

View File

@@ -134,7 +134,7 @@ namespace Content.Server.Weapon.Ranged
} }
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new RangedWeaponComponentState(FireRateSelector); return new RangedWeaponComponentState(FireRateSelector);
} }

View File

@@ -75,7 +75,7 @@ namespace Content.Shared.Actions.Components
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new ActionComponentState(_actions, _itemActions); return new ActionComponentState(_actions, _itemActions);
} }

View File

@@ -36,7 +36,7 @@ namespace Content.Shared.Alert
_alerts = state.Alerts; _alerts = state.Alerts;
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new AlertsComponentState(_alerts); return new AlertsComponentState(_alerts);
} }

View File

@@ -547,7 +547,7 @@ namespace Content.Shared.Body.Components
return SlotParts.ElementAt(index); return SlotParts.ElementAt(index);
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
var parts = new (string slot, EntityUid partId)[SlotParts.Count]; var parts = new (string slot, EntityUid partId)[SlotParts.Count];

View File

@@ -138,7 +138,7 @@ namespace Content.Shared.Body.Components
Dirty(); Dirty();
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
var mechanismIds = new EntityUid[_mechanisms.Count]; var mechanismIds = new EntityUid[_mechanisms.Count];

View File

@@ -31,7 +31,7 @@ namespace Content.Shared.Chemistry.Components
[ViewVariables] [ViewVariables]
public TimeSpan ModifierTimer { get; set; } = TimeSpan.Zero; public TimeSpan ModifierTimer { get; set; } = TimeSpan.Zero;
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new MovespeedModifierMetabolismComponentState(WalkSpeedModifier, SprintSpeedModifier, ModifierTimer); return new MovespeedModifierMetabolismComponentState(WalkSpeedModifier, SprintSpeedModifier, ModifierTimer);
} }

View File

@@ -65,7 +65,7 @@ namespace Content.Shared.CombatMode
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new CombatModeComponentState(IsInCombatMode, ActiveZone); return new CombatModeComponentState(IsInCombatMode, ActiveZone);
} }

View File

@@ -53,7 +53,7 @@ namespace Content.Shared.Cooldown
} }
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new ItemCooldownComponentState return new ItemCooldownComponentState
{ {

View File

@@ -68,7 +68,7 @@ namespace Content.Shared.Disposal.Components
Pressurizing Pressurizing
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new DisposalUnitComponentState(RecentlyEjected); return new DisposalUnitComponentState(RecentlyEjected);
} }

View File

@@ -28,7 +28,7 @@ namespace Content.Shared.Emoting
} }
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new EmotingComponentState(Enabled); return new EmotingComponentState(Enabled);
} }

View File

@@ -10,14 +10,18 @@ namespace Content.Shared.Flash
base.Initialize(); base.Initialize();
SubscribeLocalEvent<SharedFlashableComponent, ComponentGetState>(OnFlashableGetState); SubscribeLocalEvent<SharedFlashableComponent, ComponentGetState>(OnFlashableGetState);
SubscribeLocalEvent<SharedFlashableComponent, ComponentGetStateAttemptEvent>(OnGetStateAttempt);
}
private void OnGetStateAttempt(EntityUid uid, SharedFlashableComponent component, ComponentGetStateAttemptEvent args)
{
// Only send state to the player attached to the entity.
if (args.Player.AttachedEntityUid != uid)
args.Cancel();
} }
private void OnFlashableGetState(EntityUid uid, SharedFlashableComponent component, ref ComponentGetState args) private void OnFlashableGetState(EntityUid uid, SharedFlashableComponent component, ref ComponentGetState args)
{ {
// Only send state to the player attached to the entity.
if (args.Player.AttachedEntityUid != uid)
return;
args.State = new FlashableComponentState(component.Duration, component.LastFlash); args.State = new FlashableComponentState(component.Duration, component.LastFlash);
} }
} }

View File

@@ -31,7 +31,7 @@ namespace Content.Shared.Friction
[DataField("modifier")] [DataField("modifier")]
private float _modifier = 1.0f; private float _modifier = 1.0f;
public override ComponentState GetComponentState(ICommonSession session) public override ComponentState GetComponentState()
{ {
return new TileFrictionComponentState(_modifier); return new TileFrictionComponentState(_modifier);
} }

View File

@@ -47,7 +47,7 @@ namespace Content.Shared.Ghost
[DataField("canReturnToBody")] [DataField("canReturnToBody")]
private bool _canReturnToBody; private bool _canReturnToBody;
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new GhostComponentState(CanReturnToBody, CanGhostInteract); return new GhostComponentState(CanReturnToBody, CanGhostInteract);
} }

View File

@@ -41,7 +41,7 @@ namespace Content.Shared.Gravity
private bool _enabled; private bool _enabled;
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new GravityComponentState(_enabled); return new GravityComponentState(_enabled);
} }

View File

@@ -26,7 +26,7 @@ namespace Content.Shared.Hands.Components
} }
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new VirtualItemComponentState(BlockingEntity); return new VirtualItemComponentState(BlockingEntity);
} }

View File

@@ -78,7 +78,7 @@ namespace Content.Shared.Hands.Components
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]
public float ThrowRange { get; set; } = 8f; public float ThrowRange { get; set; } = 8f;
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
var hands = new HandState[Hands.Count]; var hands = new HandState[Hands.Count];

View File

@@ -88,7 +88,7 @@ namespace Content.Shared.Item
[DataField("sprite")] [DataField("sprite")]
private string? _rsiPath; private string? _rsiPath;
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new ItemComponentState(Size, EquippedPrefix, Color, RsiPath); return new ItemComponentState(Size, EquippedPrefix, Color, RsiPath);
} }

View File

@@ -73,7 +73,7 @@ namespace Content.Shared.MobState.Components
base.OnRemove(); base.OnRemove();
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new MobStateComponentState(CurrentThreshold); return new MobStateComponentState(CurrentThreshold);
} }

View File

@@ -198,7 +198,7 @@ namespace Content.Shared.Movement.Components
} }
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new MoverComponentState(_heldMoveButtons); return new MoverComponentState(_heldMoveButtons);
} }

View File

@@ -91,7 +91,7 @@ namespace Content.Shared.Movement.Components
} }
} }
public override ComponentState GetComponentState(ICommonSession session) public override ComponentState GetComponentState()
{ {
return new PlayerMobMoverComponentState(_grabRange, _pushStrength, _weightlessStrength); return new PlayerMobMoverComponentState(_grabRange, _pushStrength, _weightlessStrength);
} }

View File

@@ -28,7 +28,7 @@ namespace Content.Shared.Placeable
[DataField("positionOffset")] [DataField("positionOffset")]
public Vector2 PositionOffset { get; set; } public Vector2 PositionOffset { get; set; }
public override ComponentState GetComponentState(ICommonSession session) public override ComponentState GetComponentState()
{ {
return new PlaceableSurfaceComponentState(IsPlaceable,PlaceCentered, PositionOffset); return new PlaceableSurfaceComponentState(IsPlaceable,PlaceCentered, PositionOffset);
} }

View File

@@ -38,7 +38,7 @@ namespace Content.Shared.Pulling.Components
public EntityCoordinates? MovingTo { get; set; } public EntityCoordinates? MovingTo { get; set; }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new PullableComponentState(Puller?.Uid); return new PullableComponentState(Puller?.Uid);
} }

View File

@@ -47,7 +47,7 @@ namespace Content.Shared.Shuttles.Components
Console = shuttleConsoleComponent; Console = shuttleConsoleComponent;
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new PilotComponentState(Console?.OwnerUid); return new PilotComponentState(Console?.OwnerUid);
} }

View File

@@ -34,7 +34,7 @@ namespace Content.Shared.Singularity.Components
set => this.SetAndDirtyIfChanged(ref _falloff, value); set => this.SetAndDirtyIfChanged(ref _falloff, value);
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new SingularityDistortionComponentState(Intensity, Falloff); return new SingularityDistortionComponentState(Intensity, Falloff);
} }

View File

@@ -138,7 +138,7 @@ namespace Content.Shared.Slippery
} }
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new SlipperyComponentState(ParalyzeTime, IntersectPercentage, RequiredSlipSpeed, LaunchForwardsMultiplier, Slippery, SlipSound.GetSound(), Slipped.ToArray()); return new SlipperyComponentState(ParalyzeTime, IntersectPercentage, RequiredSlipSpeed, LaunchForwardsMultiplier, Slippery, SlipSound.GetSound(), Slipped.ToArray());
} }

View File

@@ -24,7 +24,7 @@ namespace Content.Shared.Standing
[DataField("standing")] [DataField("standing")]
public bool Standing { get; set; } = true; public bool Standing { get; set; } = true;
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new StandingComponentState(Standing); return new StandingComponentState(Standing);
} }

View File

@@ -35,7 +35,7 @@ namespace Content.Shared.SubFloor
[DataField("requireAnchored")] [DataField("requireAnchored")]
public bool RequireAnchored { get; set; } = true; public bool RequireAnchored { get; set; } = true;
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
return new SubFloorHideComponentState(Enabled, RequireAnchored); return new SubFloorHideComponentState(Enabled, RequireAnchored);
} }

View File

@@ -32,7 +32,7 @@ namespace Content.Shared.Tag
} }
} }
public override ComponentState GetComponentState(ICommonSession player) public override ComponentState GetComponentState()
{ {
var tags = new string[_tags.Count]; var tags = new string[_tags.Count];
var i = 0; var i = 0;

View File

@@ -52,18 +52,18 @@ namespace Content.Tests.Server.GameObjects.Components.Mobs
Assert.That(alertManager.TryGet(AlertType.HighPressure, out var highpressure)); Assert.That(alertManager.TryGet(AlertType.HighPressure, out var highpressure));
alertsComponent.ShowAlert(AlertType.LowPressure); alertsComponent.ShowAlert(AlertType.LowPressure);
var alertState = alertsComponent.GetComponentState(null) as AlertsComponentState; var alertState = alertsComponent.GetComponentState() as AlertsComponentState;
Assert.NotNull(alertState); Assert.NotNull(alertState);
Assert.That(alertState.Alerts.Count, Is.EqualTo(1)); Assert.That(alertState.Alerts.Count, Is.EqualTo(1));
Assert.That(alertState.Alerts.ContainsKey(lowpressure.AlertKey)); Assert.That(alertState.Alerts.ContainsKey(lowpressure.AlertKey));
alertsComponent.ShowAlert(AlertType.HighPressure); alertsComponent.ShowAlert(AlertType.HighPressure);
alertState = alertsComponent.GetComponentState(null) as AlertsComponentState; alertState = alertsComponent.GetComponentState() as AlertsComponentState;
Assert.That(alertState.Alerts.Count, Is.EqualTo(1)); Assert.That(alertState.Alerts.Count, Is.EqualTo(1));
Assert.That(alertState.Alerts.ContainsKey(highpressure.AlertKey)); Assert.That(alertState.Alerts.ContainsKey(highpressure.AlertKey));
alertsComponent.ClearAlertCategory(AlertCategory.Pressure); alertsComponent.ClearAlertCategory(AlertCategory.Pressure);
alertState = alertsComponent.GetComponentState(null) as AlertsComponentState; alertState = alertsComponent.GetComponentState() as AlertsComponentState;
Assert.That(alertState.Alerts.Count, Is.EqualTo(0)); Assert.That(alertState.Alerts.Count, Is.EqualTo(0));
} }
} }