diff --git a/Content.Server/Construction/Components/MachineFrameComponent.cs b/Content.Server/Construction/Components/MachineFrameComponent.cs index 34bb43b867..2d9a57636d 100644 --- a/Content.Server/Construction/Components/MachineFrameComponent.cs +++ b/Content.Server/Construction/Components/MachineFrameComponent.cs @@ -125,7 +125,7 @@ namespace Content.Server.Construction.Components if (Owner.TryGetComponent(out var construction)) { // Attempt to set pathfinding to the machine node... - EntitySystem.Get().SetPathfindingTarget(Owner.Uid, "machine", construction); + EntitySystem.Get().SetPathfindingTarget(OwnerUid, "machine", construction); } } @@ -272,7 +272,7 @@ namespace Content.Server.Construction.Components if (Owner.TryGetComponent(out ConstructionComponent? construction)) { // So prying the components off works correctly. - EntitySystem.Get().ResetEdge(Owner.Uid, construction); + EntitySystem.Get().ResetEdge(OwnerUid, construction); } return true; diff --git a/Content.Shared/Actions/Components/ItemActionsComponent.cs b/Content.Shared/Actions/Components/ItemActionsComponent.cs index 74f9f25299..8540492155 100644 --- a/Content.Shared/Actions/Components/ItemActionsComponent.cs +++ b/Content.Shared/Actions/Components/ItemActionsComponent.cs @@ -85,7 +85,7 @@ namespace Content.Shared.Actions.Components if (_holderActionsComponent == null) return; foreach (var (actionType, state) in _actions) { - _holderActionsComponent.GrantOrUpdateItemAction(actionType, Owner.Uid, state); + _holderActionsComponent.GrantOrUpdateItemAction(actionType, OwnerUid, state); } } @@ -94,7 +94,7 @@ namespace Content.Shared.Actions.Components if (_holderActionsComponent == null) return; foreach (var (actionType, state) in _actions) { - _holderActionsComponent.RevokeItemAction(actionType, Owner.Uid); + _holderActionsComponent.RevokeItemAction(actionType, OwnerUid); } } @@ -151,7 +151,7 @@ namespace Content.Shared.Actions.Components if (!dirty) return; _actions[actionType] = actionState; - _holderActionsComponent?.GrantOrUpdateItemAction(actionType, Owner.Uid, actionState); + _holderActionsComponent?.GrantOrUpdateItemAction(actionType, OwnerUid, actionState); } /// diff --git a/Content.Shared/Body/Components/SharedBodyComponent.cs b/Content.Shared/Body/Components/SharedBodyComponent.cs index f3e0326c59..2322217d51 100644 --- a/Content.Shared/Body/Components/SharedBodyComponent.cs +++ b/Content.Shared/Body/Components/SharedBodyComponent.cs @@ -152,7 +152,7 @@ namespace Content.Shared.Body.Components var argsAdded = new BodyPartAddedEventArgs(slot.Id, part); - EntitySystem.Get().BodyPartAdded(Owner.Uid, argsAdded); + EntitySystem.Get().BodyPartAdded(OwnerUid, argsAdded); foreach (var component in Owner.GetAllComponents().ToArray()) { component.BodyPartAdded(argsAdded); @@ -180,7 +180,7 @@ namespace Content.Shared.Body.Components var args = new BodyPartRemovedEventArgs(slot.Id, part); - EntitySystem.Get().BodyPartRemoved(Owner.Uid, args); + EntitySystem.Get().BodyPartRemoved(OwnerUid, args); foreach (var component in Owner.GetAllComponents()) { component.BodyPartRemoved(args); @@ -190,14 +190,14 @@ namespace Content.Shared.Body.Components if (part.PartType == BodyPartType.Leg && GetPartsOfType(BodyPartType.Leg).ToArray().Length == 0) { - EntitySystem.Get().Down(Owner.Uid); + EntitySystem.Get().Down(OwnerUid); } if (part.IsVital && SlotParts.Count(x => x.Value.PartType == part.PartType) == 0) { // TODO BODY SYSTEM KILL : Find a more elegant way of killing em than just dumping bloodloss damage. var damage = new DamageSpecifier(_prototypeManager.Index("Bloodloss"), 300); - EntitySystem.Get().TryChangeDamage(part.Owner.Uid, damage); + EntitySystem.Get().TryChangeDamage(part.OwnerUid, damage); } OnBodyChanged(); @@ -556,7 +556,7 @@ namespace Content.Shared.Body.Components var i = 0; foreach (var (part, slot) in SlotParts) { - parts[i] = (slot.Id, part.Owner.Uid); + parts[i] = (slot.Id, part.OwnerUid); i++; } diff --git a/Content.Shared/Body/Part/SharedBodyPartComponent.cs b/Content.Shared/Body/Part/SharedBodyPartComponent.cs index 1fd1f4dee9..76d2a2997b 100644 --- a/Content.Shared/Body/Part/SharedBodyPartComponent.cs +++ b/Content.Shared/Body/Part/SharedBodyPartComponent.cs @@ -146,7 +146,7 @@ namespace Content.Shared.Body.Part var i = 0; foreach (var mechanism in _mechanisms) { - mechanismIds[i] = mechanism.Owner.Uid; + mechanismIds[i] = mechanism.OwnerUid; i++; } diff --git a/Content.Shared/Buckle/SharedBuckleSystem.cs b/Content.Shared/Buckle/SharedBuckleSystem.cs index cdbbe06a91..86f8724fb4 100644 --- a/Content.Shared/Buckle/SharedBuckleSystem.cs +++ b/Content.Shared/Buckle/SharedBuckleSystem.cs @@ -57,7 +57,7 @@ namespace Content.Shared.Buckle private void PreventCollision(EntityUid uid, SharedBuckleComponent component, PreventCollideEvent args) { - if (args.BodyB.Owner.Uid != component.LastEntityBuckledTo) return; + if (args.BodyB.OwnerUid != component.LastEntityBuckledTo) return; component.IsOnStrapEntityThisFrame = true; if (component.Buckled || component.DontCollide) diff --git a/Content.Shared/Containers/ItemSlot/SharedItemSlotsSystem.cs b/Content.Shared/Containers/ItemSlot/SharedItemSlotsSystem.cs index bd38d1a60b..96c89d0f54 100644 --- a/Content.Shared/Containers/ItemSlot/SharedItemSlotsSystem.cs +++ b/Content.Shared/Containers/ItemSlot/SharedItemSlotsSystem.cs @@ -163,7 +163,7 @@ namespace Content.Shared.Containers.ItemSlots { // insert item slot.ContainerSlot.Insert(item); - RaiseLocalEvent(itemSlots.Owner.Uid, new ItemSlotChangedEvent(itemSlots, slotName, slot)); + RaiseLocalEvent(itemSlots.OwnerUid, new ItemSlotChangedEvent(itemSlots, slotName, slot)); // play sound if (slot.InsertSound != null) @@ -248,7 +248,7 @@ namespace Content.Shared.Containers.ItemSlots if (slot.EjectSound != null) SoundSystem.Play(Filter.Pvs(itemSlots.Owner), slot.EjectSound.GetSound(), itemSlots.Owner); - RaiseLocalEvent(itemSlots.Owner.Uid, new ItemSlotChangedEvent(itemSlots, slotName, slot)); + RaiseLocalEvent(itemSlots.OwnerUid, new ItemSlotChangedEvent(itemSlots, slotName, slot)); return true; } } diff --git a/Content.Shared/Damage/DamageableComponent.cs b/Content.Shared/Damage/DamageableComponent.cs index 80283e52fe..39b9dd787b 100644 --- a/Content.Shared/Damage/DamageableComponent.cs +++ b/Content.Shared/Damage/DamageableComponent.cs @@ -92,7 +92,7 @@ namespace Content.Shared.Damage damage.DamageDict.Add(typeID, damageValue); } - EntitySystem.Get().TryChangeDamage(Owner.Uid, damage); + EntitySystem.Get().TryChangeDamage(OwnerUid, damage); } // TODO EXPLOSION Remove this. @@ -113,7 +113,7 @@ namespace Content.Shared.Damage damage.DamageDict.Add(typeID, damageValue); } - EntitySystem.Get().TryChangeDamage(Owner.Uid, damage); + EntitySystem.Get().TryChangeDamage(OwnerUid, damage); } } diff --git a/Content.Shared/Damage/DamageableSystem.cs b/Content.Shared/Damage/DamageableSystem.cs index af450f80f9..f20773e853 100644 --- a/Content.Shared/Damage/DamageableSystem.cs +++ b/Content.Shared/Damage/DamageableSystem.cs @@ -85,9 +85,9 @@ namespace Content.Shared.Damage component.TotalDamage = component.Damage.Total; component.Dirty(); - if (EntityManager.TryGetComponent(component.Owner.Uid, out var appearance) && damageDelta != null) + if (EntityManager.TryGetComponent(component.OwnerUid, out var appearance) && damageDelta != null) appearance.SetData(DamageVisualizerKeys.DamageUpdateGroups, damageDelta.GetDamagePerGroup().Keys.ToList()); - RaiseLocalEvent(component.Owner.Uid, new DamageChangedEvent(component, damageDelta), false); + RaiseLocalEvent(component.OwnerUid, new DamageChangedEvent(component, damageDelta), false); } /// diff --git a/Content.Shared/Disposal/SharedDisposalUnitSystem.cs b/Content.Shared/Disposal/SharedDisposalUnitSystem.cs index 7e14549624..8452994613 100644 --- a/Content.Shared/Disposal/SharedDisposalUnitSystem.cs +++ b/Content.Shared/Disposal/SharedDisposalUnitSystem.cs @@ -31,7 +31,7 @@ namespace Content.Shared.Disposal private void HandlePreventCollide(EntityUid uid, SharedDisposalUnitComponent component, PreventCollideEvent args) { - var otherBody = args.BodyB.Owner.Uid; + var otherBody = args.BodyB.OwnerUid; // Items dropped shouldn't collide but items thrown should if (EntityManager.HasComponent(otherBody) && diff --git a/Content.Shared/Friction/SharedTileFrictionController.cs b/Content.Shared/Friction/SharedTileFrictionController.cs index 9b8d163937..1486f20f62 100644 --- a/Content.Shared/Friction/SharedTileFrictionController.cs +++ b/Content.Shared/Friction/SharedTileFrictionController.cs @@ -56,7 +56,7 @@ namespace Content.Shared.Friction if (body.Deleted || prediction && !body.Predict || body.BodyStatus == BodyStatus.InAir || - Mover.UseMobMovement(body.Owner.Uid)) continue; + Mover.UseMobMovement(body.OwnerUid)) continue; var surfaceFriction = GetTileFriction(body); var bodyModifier = body.Owner.GetComponentOrNull()?.Modifier ?? 1.0f; diff --git a/Content.Shared/Hands/SharedHandsSystem.cs b/Content.Shared/Hands/SharedHandsSystem.cs index d56510a34d..9f7226d760 100644 --- a/Content.Shared/Hands/SharedHandsSystem.cs +++ b/Content.Shared/Hands/SharedHandsSystem.cs @@ -46,7 +46,7 @@ namespace Content.Shared.Hands if (entity.TryGetContainerMan(out var containerManager)) { var parentMsg = new ContainedEntityDropHandItemsAttemptEvent(uid); - eventBus.RaiseLocalEvent(containerManager.Owner.Uid, parentMsg); + eventBus.RaiseLocalEvent(containerManager.OwnerUid, parentMsg); if (parentMsg.Cancelled) return; diff --git a/Content.Shared/MobState/Components/MobStateComponent.cs b/Content.Shared/MobState/Components/MobStateComponent.cs index f19c4e78d3..fac23da4b7 100644 --- a/Content.Shared/MobState/Components/MobStateComponent.cs +++ b/Content.Shared/MobState/Components/MobStateComponent.cs @@ -290,7 +290,7 @@ namespace Content.Shared.MobState.Components { if (!current.HasValue) { - old?.ExitState(Owner.Uid, Owner.EntityManager); + old?.ExitState(OwnerUid, Owner.EntityManager); return; } @@ -300,16 +300,16 @@ namespace Content.Shared.MobState.Components if (state == old) { - state.UpdateState(Owner.Uid, threshold, Owner.EntityManager); + state.UpdateState(OwnerUid, threshold, Owner.EntityManager); return; } - old?.ExitState(Owner.Uid, Owner.EntityManager); + old?.ExitState(OwnerUid, Owner.EntityManager); CurrentState = state; - state.EnterState(Owner.Uid, Owner.EntityManager); - state.UpdateState(Owner.Uid, threshold, Owner.EntityManager); + state.EnterState(OwnerUid, Owner.EntityManager); + state.UpdateState(OwnerUid, threshold, Owner.EntityManager); var message = new MobStateChangedMessage(this, old, state); #pragma warning disable 618 diff --git a/Content.Shared/Movement/SharedMoverController.cs b/Content.Shared/Movement/SharedMoverController.cs index e49a9089ba..acfde3f0b8 100644 --- a/Content.Shared/Movement/SharedMoverController.cs +++ b/Content.Shared/Movement/SharedMoverController.cs @@ -95,15 +95,15 @@ namespace Content.Shared.Movement protected void HandleMobMovement(IMoverComponent mover, PhysicsComponent physicsComponent, IMobMoverComponent mobMover) { - DebugTools.Assert(!UsedMobMovement.ContainsKey(mover.Owner.Uid)); + DebugTools.Assert(!UsedMobMovement.ContainsKey(mover.OwnerUid)); if (!UseMobMovement(physicsComponent)) { - UsedMobMovement[mover.Owner.Uid] = false; + UsedMobMovement[mover.OwnerUid] = false; return; } - UsedMobMovement[mover.Owner.Uid] = true; + UsedMobMovement[mover.OwnerUid] = true; var transform = mover.Owner.Transform; var weightless = mover.Owner.IsWeightless(physicsComponent, mapManager: _mapManager, entityManager: _entityManager); var (walkDir, sprintDir) = mover.VelocityDir; diff --git a/Content.Shared/Projectiles/ProjectileSystem.cs b/Content.Shared/Projectiles/ProjectileSystem.cs index fe2284e87f..227b2a74e0 100644 --- a/Content.Shared/Projectiles/ProjectileSystem.cs +++ b/Content.Shared/Projectiles/ProjectileSystem.cs @@ -13,7 +13,7 @@ namespace Content.Shared.Projectiles private void PreventCollision(EntityUid uid, SharedProjectileComponent component, PreventCollideEvent args) { - if (component.IgnoreShooter && args.BodyB.Owner.Uid == component.Shooter) + if (component.IgnoreShooter && args.BodyB.OwnerUid == component.Shooter) { args.Cancel(); return; diff --git a/Content.Shared/Pulling/Systems/SharedPullerSystem.cs b/Content.Shared/Pulling/Systems/SharedPullerSystem.cs index e09c2e6add..b8838b386b 100644 --- a/Content.Shared/Pulling/Systems/SharedPullerSystem.cs +++ b/Content.Shared/Pulling/Systems/SharedPullerSystem.cs @@ -45,7 +45,7 @@ namespace Content.Shared.Pulling.Systems SharedPullerComponent component, PullStartedMessage args) { - if (args.Puller.Owner.Uid != uid) + if (args.Puller.OwnerUid != uid) return; if (component.Owner.TryGetComponent(out SharedAlertsComponent? alerts)) @@ -59,7 +59,7 @@ namespace Content.Shared.Pulling.Systems SharedPullerComponent component, PullStoppedMessage args) { - if (args.Puller.Owner.Uid != uid) + if (args.Puller.OwnerUid != uid) return; if (component.Owner.TryGetComponent(out SharedAlertsComponent? alerts)) diff --git a/Content.Shared/Pulling/Systems/SharedPullingStateManagementSystem.cs b/Content.Shared/Pulling/Systems/SharedPullingStateManagementSystem.cs index 7a0a2d50ed..6f008d69e5 100644 --- a/Content.Shared/Pulling/Systems/SharedPullingStateManagementSystem.cs +++ b/Content.Shared/Pulling/Systems/SharedPullingStateManagementSystem.cs @@ -59,10 +59,10 @@ namespace Content.Shared.Pulling // Messaging var message = new PullStoppedMessage(pullerPhysics, pullablePhysics); - RaiseLocalEvent(puller.Owner.Uid, message, broadcast: false); + RaiseLocalEvent(puller.OwnerUid, message, broadcast: false); if (pullable.Owner.LifeStage <= EntityLifeStage.MapInitialized) - RaiseLocalEvent(pullable.Owner.Uid, message); + RaiseLocalEvent(pullable.OwnerUid, message); // Networking puller.Dirty(); @@ -106,7 +106,7 @@ namespace Content.Shared.Pulling var union = pullerPhysics.GetWorldAABB().Union(pullablePhysics.GetWorldAABB()); var length = Math.Max(union.Size.X, union.Size.Y) * 0.75f; - pullable.PullJoint = _jointSystem.CreateDistanceJoint(pullablePhysics.Owner.Uid, pullerPhysics.Owner.Uid, id:$"pull-joint-{pullablePhysics.Owner.Uid}"); + pullable.PullJoint = _jointSystem.CreateDistanceJoint(pullablePhysics.OwnerUid, pullerPhysics.Owner.Uid, id:$"pull-joint-{pullablePhysics.Owner.Uid}"); pullable.PullJoint.CollideConnected = false; // This maximum has to be there because if the object is constrained too closely, the clamping goes backwards and asserts. pullable.PullJoint.MaxLength = Math.Max(1.0f, length); @@ -117,8 +117,8 @@ namespace Content.Shared.Pulling // Messaging var message = new PullStartedMessage(pullerPhysics, pullablePhysics); - RaiseLocalEvent(puller.Owner.Uid, message, broadcast: false); - RaiseLocalEvent(pullable.Owner.Uid, message); + RaiseLocalEvent(puller.OwnerUid, message, broadcast: false); + RaiseLocalEvent(pullable.OwnerUid, message); // Networking puller.Dirty(); diff --git a/Content.Shared/Pulling/Systems/SharedPullingSystem.Actions.cs b/Content.Shared/Pulling/Systems/SharedPullingSystem.Actions.cs index adab67979d..93393e9e49 100644 --- a/Content.Shared/Pulling/Systems/SharedPullingSystem.Actions.cs +++ b/Content.Shared/Pulling/Systems/SharedPullingSystem.Actions.cs @@ -73,7 +73,7 @@ namespace Content.Shared.Pulling } var msg = new StopPullingEvent(user?.Uid); - RaiseLocalEvent(pullable.Owner.Uid, msg); + RaiseLocalEvent(pullable.OwnerUid, msg); if (msg.Cancelled) return false; @@ -154,14 +154,14 @@ namespace Content.Shared.Pulling var pullAttempt = new PullAttemptMessage(pullerPhysics, pullablePhysics); - RaiseLocalEvent(puller.Owner.Uid, pullAttempt, broadcast: false); + RaiseLocalEvent(puller.OwnerUid, pullAttempt, broadcast: false); if (pullAttempt.Cancelled) { return false; } - RaiseLocalEvent(pullable.Owner.Uid, pullAttempt); + RaiseLocalEvent(pullable.OwnerUid, pullAttempt); if (pullAttempt.Cancelled) { diff --git a/Content.Shared/Pulling/Systems/SharedPullingSystem.cs b/Content.Shared/Pulling/Systems/SharedPullingSystem.cs index 25c2181407..8fcf548769 100644 --- a/Content.Shared/Pulling/Systems/SharedPullingSystem.cs +++ b/Content.Shared/Pulling/Systems/SharedPullingSystem.cs @@ -102,7 +102,7 @@ namespace Content.Shared.Pulling // Raise a "you are being pulled" alert if the pulled entity has alerts. private static void PullableHandlePullStarted(EntityUid uid, SharedPullableComponent component, PullStartedMessage args) { - if (args.Pulled.Owner.Uid != uid) + if (args.Pulled.OwnerUid != uid) return; if (component.Owner.TryGetComponent(out SharedAlertsComponent? alerts)) @@ -111,7 +111,7 @@ namespace Content.Shared.Pulling private static void PullableHandlePullStopped(EntityUid uid, SharedPullableComponent component, PullStoppedMessage args) { - if (args.Pulled.Owner.Uid != uid) + if (args.Pulled.OwnerUid != uid) return; if (component.Owner.TryGetComponent(out SharedAlertsComponent? alerts)) diff --git a/Content.Shared/Shuttles/PilotComponent.cs b/Content.Shared/Shuttles/PilotComponent.cs index 2303c3a1dc..04241d8e46 100644 --- a/Content.Shared/Shuttles/PilotComponent.cs +++ b/Content.Shared/Shuttles/PilotComponent.cs @@ -41,7 +41,7 @@ namespace Content.Shared.Shuttles public override ComponentState GetComponentState(ICommonSession player) { - return new PilotComponentState(Console?.Owner.Uid); + return new PilotComponentState(Console?.OwnerUid); } [Serializable, NetSerializable] diff --git a/Content.Shared/Slippery/SharedSlipperySystem.cs b/Content.Shared/Slippery/SharedSlipperySystem.cs index 26c1b5e796..411d22ca26 100644 --- a/Content.Shared/Slippery/SharedSlipperySystem.cs +++ b/Content.Shared/Slippery/SharedSlipperySystem.cs @@ -30,7 +30,7 @@ namespace Content.Shared.Slippery private void HandleCollide(EntityUid uid, SlipperyComponent component, StartCollideEvent args) { - var otherUid = args.OtherFixture.Body.Owner.Uid; + var otherUid = args.OtherFixture.Body.OwnerUid; if (!CanSlip(component, otherUid)) return; @@ -71,7 +71,7 @@ namespace Content.Shared.Slippery private bool TrySlip(SlipperyComponent component, IPhysBody ourBody, IPhysBody otherBody) { - if (!CanSlip(component, otherBody.Owner.Uid)) return false; + if (!CanSlip(component, otherBody.OwnerUid)) return false; if (otherBody.LinearVelocity.Length < component.RequiredSlipSpeed) { @@ -86,14 +86,14 @@ namespace Content.Shared.Slippery } var ev = new SlipAttemptEvent(); - RaiseLocalEvent(otherBody.Owner.Uid, ev, false); + RaiseLocalEvent(otherBody.OwnerUid, ev, false); if (ev.Cancelled) return false; otherBody.LinearVelocity *= component.LaunchForwardsMultiplier; - _stunSystem.TryParalyze(otherBody.Owner.Uid, TimeSpan.FromSeconds(5)); - component.Slipped.Add(otherBody.Owner.Uid); + _stunSystem.TryParalyze(otherBody.OwnerUid, TimeSpan.FromSeconds(5)); + component.Slipped.Add(otherBody.OwnerUid); component.Dirty(); PlaySound(component);