diff --git a/Content.Client/Conveyor/Visualizers/ConveyorVisualizer.cs b/Content.Client/Conveyor/Visualizers/ConveyorVisualizer.cs index 7afcbe687a..b845572dc2 100644 --- a/Content.Client/Conveyor/Visualizers/ConveyorVisualizer.cs +++ b/Content.Client/Conveyor/Visualizers/ConveyorVisualizer.cs @@ -1,4 +1,4 @@ -using System; +using System; using Content.Shared.Conveyor; using JetBrains.Annotations; using Robust.Client.GameObjects; @@ -23,7 +23,7 @@ namespace Content.Client.Conveyor.Visualizers private void ChangeState(AppearanceComponent appearance) { var entities = IoCManager.Resolve(); - if (!entities.TryGetComponent(appearance.Owner, out ISpriteComponent? sprite)) + if (!entities.TryGetComponent(appearance.OwnerUid, out ISpriteComponent? sprite)) { return; } @@ -45,8 +45,8 @@ namespace Content.Client.Conveyor.Visualizers public override void InitializeEntity(EntityUid entity) { base.InitializeEntity(entity); - - var appearance = entity.EnsureComponent(); + var entities = IoCManager.Resolve(); + var appearance = entities.EnsureComponent(entity); ChangeState(appearance); } diff --git a/Content.Client/Conveyor/Visualizers/TwoWayLeverVisualizer.cs b/Content.Client/Conveyor/Visualizers/TwoWayLeverVisualizer.cs index 7006dedcc3..c36fd08ebb 100644 --- a/Content.Client/Conveyor/Visualizers/TwoWayLeverVisualizer.cs +++ b/Content.Client/Conveyor/Visualizers/TwoWayLeverVisualizer.cs @@ -22,7 +22,7 @@ namespace Content.Client.Conveyor.Visualizers private void ChangeState(AppearanceComponent appearance) { var entities = IoCManager.Resolve(); - if (!entities.TryGetComponent(appearance.Owner, out ISpriteComponent? sprite)) + if (!entities.TryGetComponent(appearance.OwnerUid, out ISpriteComponent? sprite)) { return; } @@ -44,7 +44,8 @@ namespace Content.Client.Conveyor.Visualizers { base.InitializeEntity(entity); - var appearance = entity.EnsureComponent(); + var entities = IoCManager.Resolve(); + var appearance = entities.EnsureComponent(entity); ChangeState(appearance); } diff --git a/Content.Client/Disposal/Visualizers/DisposalUnitVisualizer.cs b/Content.Client/Disposal/Visualizers/DisposalUnitVisualizer.cs index 78ff4bb4e7..d78bdfc145 100644 --- a/Content.Client/Disposal/Visualizers/DisposalUnitVisualizer.cs +++ b/Content.Client/Disposal/Visualizers/DisposalUnitVisualizer.cs @@ -71,7 +71,7 @@ namespace Content.Client.Disposal.Visualizers } var entities = IoCManager.Resolve(); - if (!entities.TryGetComponent(appearance.Owner, out ISpriteComponent? sprite)) + if (!entities.TryGetComponent(appearance.OwnerUid, out ISpriteComponent? sprite)) { return; } @@ -90,7 +90,7 @@ namespace Content.Client.Disposal.Visualizers case VisualState.Flushing: sprite.LayerSetState(DisposalUnitVisualLayers.Base, _stateAnchored); - var animPlayer = IoCManager.Resolve().GetComponent(appearance.Owner); + var animPlayer = IoCManager.Resolve().GetComponent(appearance.OwnerUid); if (!animPlayer.HasRunningAnimation(AnimationKey)) { @@ -148,9 +148,9 @@ namespace Content.Client.Disposal.Visualizers public override void InitializeEntity(EntityUid entity) { base.InitializeEntity(entity); - - entity.EnsureComponent(); - var appearance = entity.EnsureComponent(); + var entities = IoCManager.Resolve(); + entities.EnsureComponent(entity); + var appearance = entities.EnsureComponent(entity); ChangeState(appearance); } diff --git a/Content.Client/Disposal/Visualizers/DisposalVisualizer.cs b/Content.Client/Disposal/Visualizers/DisposalVisualizer.cs index a8b865982e..d8f8a03c90 100644 --- a/Content.Client/Disposal/Visualizers/DisposalVisualizer.cs +++ b/Content.Client/Disposal/Visualizers/DisposalVisualizer.cs @@ -24,7 +24,7 @@ namespace Content.Client.Disposal.Visualizers private void ChangeState(AppearanceComponent appearance) { var entities = IoCManager.Resolve(); - if (!entities.TryGetComponent(appearance.Owner, out ISpriteComponent? sprite)) + if (!entities.TryGetComponent(appearance.OwnerUid, out ISpriteComponent? sprite)) { return; } @@ -48,17 +48,17 @@ namespace Content.Client.Disposal.Visualizers { appearance.Owner.EnsureComponent(); } - else if (IoCManager.Resolve().HasComponent(appearance.Owner)) + else if (IoCManager.Resolve().HasComponent(appearance.OwnerUid)) { - IoCManager.Resolve().RemoveComponent(appearance.Owner); + IoCManager.Resolve().RemoveComponent(appearance.OwnerUid); } } public override void InitializeEntity(EntityUid entity) { base.InitializeEntity(entity); - - var appearance = entity.EnsureComponent(); + var entityManager = IoCManager.Resolve(); + var appearance = entityManager.EnsureComponent(entity); ChangeState(appearance); } diff --git a/Content.Client/Singularity/SingularityOverlay.cs b/Content.Client/Singularity/SingularityOverlay.cs index 9157e859a1..a1abd79119 100644 --- a/Content.Client/Singularity/SingularityOverlay.cs +++ b/Content.Client/Singularity/SingularityOverlay.cs @@ -76,7 +76,7 @@ namespace Content.Client.Singularity var distortions = _entityManager.EntityQuery(); foreach (var distortion in distortions) //Add all singulos that are not added yet but qualify { - var singuloEntity = distortion.Owner; + var singuloEntity = distortion.OwnerUid; if (!_singularities.Keys.Contains(singuloEntity) && SinguloQualifies(singuloEntity, currentEyeLoc)) { diff --git a/Content.Client/StationEvents/RadiationPulseOverlay.cs b/Content.Client/StationEvents/RadiationPulseOverlay.cs index a4f8f0ad15..79b22b680d 100644 --- a/Content.Client/StationEvents/RadiationPulseOverlay.cs +++ b/Content.Client/StationEvents/RadiationPulseOverlay.cs @@ -84,7 +84,7 @@ namespace Content.Client.StationEvents var pulses = _entityManager.EntityQuery(); foreach (var pulse in pulses) //Add all pulses that are not added yet but qualify { - var pulseEntity = pulse.Owner; + var pulseEntity = pulse.OwnerUid; if (!_pulses.Keys.Contains(pulseEntity) && PulseQualifies(pulseEntity, currentEyeLoc)) { diff --git a/Content.Server/Access/Systems/AccessReaderSystem.cs b/Content.Server/Access/Systems/AccessReaderSystem.cs index 0a14852427..4557d8983a 100644 --- a/Content.Server/Access/Systems/AccessReaderSystem.cs +++ b/Content.Server/Access/Systems/AccessReaderSystem.cs @@ -84,7 +84,7 @@ namespace Content.Server.Access.Systems { if (inventoryComponent.HasSlot(EquipmentSlotDefines.Slots.IDCARD) && inventoryComponent.TryGetSlotItem(EquipmentSlotDefines.Slots.IDCARD, out ItemComponent? item) && - FindAccessTagsItem(item.Owner, out tags) + FindAccessTagsItem(item.OwnerUid, out tags) ) { return tags; diff --git a/Content.Server/Advertise/AdvertiseSystem.cs b/Content.Server/Advertise/AdvertiseSystem.cs index 6bce9a8d8d..a0572699c2 100644 --- a/Content.Server/Advertise/AdvertiseSystem.cs +++ b/Content.Server/Advertise/AdvertiseSystem.cs @@ -61,7 +61,7 @@ namespace Content.Server.Advertise return; if (_prototypeManager.TryIndex(advertise.PackPrototypeId, out AdvertisementsPackPrototype? advertisements)) - _chatManager.EntitySay(advertise.Owner, Loc.GetString(_random.Pick(advertisements.Advertisements)), hideChat: true); + _chatManager.EntitySay(advertise.OwnerUid, Loc.GetString(_random.Pick(advertisements.Advertisements)), hideChat: true); if(refresh) RefreshTimer(uid, true, advertise); @@ -117,7 +117,7 @@ namespace Content.Server.Advertise if (advertise.NextAdvertisementTime > curTime) continue; - SayAdvertisement(advertise.Owner, true, advertise); + SayAdvertisement(advertise.OwnerUid, true, advertise); } } } diff --git a/Content.Server/Atmos/EntitySystems/AirtightSystem.cs b/Content.Server/Atmos/EntitySystems/AirtightSystem.cs index 8765ec1fcd..f128b7437a 100644 --- a/Content.Server/Atmos/EntitySystems/AirtightSystem.cs +++ b/Content.Server/Atmos/EntitySystems/AirtightSystem.cs @@ -29,7 +29,7 @@ namespace Content.Server.Atmos.EntitySystems { if (airtight.FixAirBlockedDirectionInitialize) { - var rotateEvent = new RotateEvent(airtight.Owner, Angle.Zero, IoCManager.Resolve().GetComponent(airtight.Owner).WorldRotation); + var rotateEvent = new RotateEvent(airtight.OwnerUid, Angle.Zero, IoCManager.Resolve().GetComponent(airtight.Owner).WorldRotation); OnAirtightRotated(uid, airtight, ref rotateEvent); } @@ -79,7 +79,7 @@ namespace Content.Server.Atmos.EntitySystems { airtight.AirBlocked = airblocked; UpdatePosition(airtight); - RaiseLocalEvent(((IComponent) airtight).Owner, new AirtightChanged(airtight)); + RaiseLocalEvent(((IComponent) airtight).OwnerUid, new AirtightChanged(airtight)); } public void UpdatePosition(AirtightComponent airtight) diff --git a/Content.Server/Climbing/Components/ClimbableComponent.cs b/Content.Server/Climbing/Components/ClimbableComponent.cs index f5d687ef97..183e909524 100644 --- a/Content.Server/Climbing/Components/ClimbableComponent.cs +++ b/Content.Server/Climbing/Components/ClimbableComponent.cs @@ -190,7 +190,7 @@ namespace Content.Server.Climbing.Components } } - public async void TryClimb(EntityUiduser) + public async void TryClimb(EntityUid user) { if (!IoCManager.Resolve().TryGetComponent(user, out ClimbingComponent? climbingComponent) || climbingComponent.IsClimbing) return; diff --git a/Content.Server/Clothing/Components/ClothingComponent.cs b/Content.Server/Clothing/Components/ClothingComponent.cs index 762e7a75f0..fa1c0a19d9 100644 --- a/Content.Server/Clothing/Components/ClothingComponent.cs +++ b/Content.Server/Clothing/Components/ClothingComponent.cs @@ -95,7 +95,7 @@ namespace Content.Server.Clothing.Components return false; } - public bool TryEquip(InventoryComponent inv, Slots slot, EntityUiduser) + public bool TryEquip(InventoryComponent inv, Slots slot, EntityUid user) { if (!inv.Equip(slot, this, true, out var reason)) { diff --git a/Content.Server/Clothing/Components/MagbootsComponent.cs b/Content.Server/Clothing/Components/MagbootsComponent.cs index 8e987943a4..ba73bc992d 100644 --- a/Content.Server/Clothing/Components/MagbootsComponent.cs +++ b/Content.Server/Clothing/Components/MagbootsComponent.cs @@ -47,7 +47,7 @@ namespace Content.Server.Clothing.Components } } - public void Toggle(EntityUiduser) + public void Toggle(EntityUid user) { On = !On; } diff --git a/Content.Server/Cuffs/CuffableSystem.cs b/Content.Server/Cuffs/CuffableSystem.cs index 204a92428b..c646080474 100644 --- a/Content.Server/Cuffs/CuffableSystem.cs +++ b/Content.Server/Cuffs/CuffableSystem.cs @@ -55,7 +55,7 @@ namespace Content.Server.Cuffs { return; } - if (!EntityManager.EntityExists(args.User) + if (!EntityManager.EntityExists(args.User)) { // Should this even be possible? args.Cancel(); diff --git a/Content.Server/DeviceNetwork/Systems/WiredNetworkSystem.cs b/Content.Server/DeviceNetwork/Systems/WiredNetworkSystem.cs index 3e23796215..191ab9a748 100644 --- a/Content.Server/DeviceNetwork/Systems/WiredNetworkSystem.cs +++ b/Content.Server/DeviceNetwork/Systems/WiredNetworkSystem.cs @@ -19,10 +19,7 @@ namespace Content.Server.DeviceNetwork.Systems /// private void OnBeforePacketSent(EntityUid uid, WiredNetworkComponent component, BeforePacketSentEvent args) { - args.Sender - uid - - if (IoCManager.Resolve().GetComponent(receiver).GridID != IoCManager.Resolve().GetComponent(sender).GridID) + if (IoCManager.Resolve().GetComponent(uid).GridID != IoCManager.Resolve().GetComponent(args.Sender).GridID) { args.Cancel(); } diff --git a/Content.Server/Flash/FlashSystem.cs b/Content.Server/Flash/FlashSystem.cs index 1355d2f2ea..b26612af86 100644 --- a/Content.Server/Flash/FlashSystem.cs +++ b/Content.Server/Flash/FlashSystem.cs @@ -81,7 +81,7 @@ namespace Content.Server.Flash } } - private bool UseFlash(FlashComponent comp, EntityUiduser) + private bool UseFlash(FlashComponent comp, EntityUid user) { if (comp.HasUses) { diff --git a/Content.Server/Ghost/Components/GhostRadioComponent.cs b/Content.Server/Ghost/Components/GhostRadioComponent.cs index 1f8d25f85d..1d064702dc 100644 --- a/Content.Server/Ghost/Components/GhostRadioComponent.cs +++ b/Content.Server/Ghost/Components/GhostRadioComponent.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using Content.Server.Radio.Components; using Content.Shared.Chat; using Robust.Server.GameObjects; @@ -23,7 +23,7 @@ namespace Content.Server.Ghost.Components public IReadOnlyList Channels => _channels; - public void Receive(string message, int channel, EntityUidspeaker) + public void Receive(string message, int channel, EntityUid speaker) { if (!IoCManager.Resolve().TryGetComponent(Owner, out ActorComponent? actor)) return; @@ -39,6 +39,6 @@ namespace Content.Server.Ghost.Components _netManager.ServerSendMessage(msg, playerChannel); } - public void Broadcast(string message, EntityUidspeaker) { } + public void Broadcast(string message, EntityUid speaker) { } } } diff --git a/Content.Server/Hands/Systems/HandsSystem.cs b/Content.Server/Hands/Systems/HandsSystem.cs index c9060bd148..92a80ae13a 100644 --- a/Content.Server/Hands/Systems/HandsSystem.cs +++ b/Content.Server/Hands/Systems/HandsSystem.cs @@ -70,7 +70,7 @@ namespace Content.Server.Hands.Systems private void HandlePullStarted(EntityUid uid, HandsComponent component, PullStartedMessage args) { - if (!_virtualItemSystem.TrySpawnVirtualItemInHand(args.Pulled.Owner, uid)) + if (!_virtualItemSystem.TrySpawnVirtualItemInHand(args.Pulled.OwnerUid, uid)) { DebugTools.Assert("Unable to find available hand when starting pulling??"); } @@ -84,7 +84,7 @@ namespace Content.Server.Hands.Systems { if (hand.HeldEntity == default || !EntityManager.TryGetComponent(hand.HeldEntity, out HandVirtualItemComponent? virtualItem) - || virtualItem.BlockingEntity != args.Pulled.Owner) + || virtualItem.BlockingEntity != args.Pulled.OwnerUid) continue; EntityManager.DeleteEntity(hand.HeldEntity); @@ -94,7 +94,7 @@ namespace Content.Server.Hands.Systems private void SwapHandsPressed(ICommonSession? session) { - var player = session?.AttachedEntity; + var player = session?.AttachedEntityUid; if (!player.HasValue || !player.Value.IsValid()) return; @@ -110,9 +110,9 @@ namespace Content.Server.Hands.Systems private bool DropPressed(ICommonSession? session, EntityCoordinates coords, EntityUid uid) { - var player = session?.AttachedEntity; + var player = session?.AttachedEntityUid; - if (player == default) + if (!player.HasValue || !player.Value.IsValid()) return false; if (!EntityManager.TryGetComponent(player.Value, out SharedHandsComponent? hands)) @@ -171,7 +171,7 @@ namespace Content.Server.Hands.Systems { foreach (var inhand in component.GetAllHeldItems()) { - if (EntityManager.HasComponent(inhand.Owner)) + if (EntityManager.HasComponent(inhand.OwnerUid)) continue; args.PushText(Loc.GetString("comp-hands-examine", ("user", component.Owner), ("item", inhand.Owner))); @@ -187,14 +187,14 @@ namespace Content.Server.Hands.Systems if (session is not IPlayerSession playerSession) return false; - var playerEnt = playerSession.AttachedEntity; + var player = playerSession.AttachedEntityUid; - if (playerEnt == default || !EntityManager.EntityExists(playerEnt)) + if (!player.HasValue || !player.Value.IsValid()) return false; - return EntityManager.TryGetComponent(playerEnt, out hands); + return EntityManager.TryGetComponent(player.Value, out hands); } - + private void HandleActivateItem(ICommonSession? session) { if (!TryGetHandsComp(session, out var hands)) @@ -216,14 +216,15 @@ namespace Content.Server.Hands.Systems if (session is not IPlayerSession playerSession) return false; - var playerEnt = playerSession.AttachedEntity; + var maybePlayer = playerSession.AttachedEntityUid; + if (!maybePlayer.HasValue) return false; + var player = maybePlayer.Value; - if (playerEnt == default || - !EntityManager.EntityExists(playerEnt) || - playerEnt.IsInContainer() || - !EntityManager.TryGetComponent(playerEnt, out SharedHandsComponent? hands) || + if (!EntityManager.EntityExists(player) || + player.IsInContainer() || + !EntityManager.TryGetComponent(player, out SharedHandsComponent? hands) || !hands.TryGetActiveHeldEntity(out var throwEnt) || - !_actionBlockerSystem.CanThrow(playerEnt)) + !_actionBlockerSystem.CanThrow(player)) return false; if (EntityManager.TryGetComponent(throwEnt, out StackComponent? stack) && stack.Count > 1 && stack.ThrowIndividually) @@ -275,7 +276,7 @@ namespace Content.Server.Hands.Systems return; if (!inventory.TryGetSlotItem(equipmentSlot, out ItemComponent? equipmentItem) || - !EntityManager.TryGetComponent(equipmentItem.Owner, out ServerStorageComponent? storageComponent)) + !EntityManager.TryGetComponent(equipmentItem.OwnerUid, out ServerStorageComponent? storageComponent)) { plyEnt.PopupMessage(Loc.GetString("hands-system-missing-equipment-slot", ("slotName", SlotNames[equipmentSlot].ToLower()))); return; diff --git a/Content.Server/Headset/HeadsetComponent.cs b/Content.Server/Headset/HeadsetComponent.cs index fb459a490d..2e3232ec84 100644 --- a/Content.Server/Headset/HeadsetComponent.cs +++ b/Content.Server/Headset/HeadsetComponent.cs @@ -50,16 +50,16 @@ namespace Content.Server.Headset _radioSystem = EntitySystem.Get(); } - public bool CanListen(string message, EntityUidsource) + public bool CanListen(string message, EntityUid source) { return RadioRequested; } - public void Receive(string message, int channel, EntityUidsource) + public void Receive(string message, int channel, EntityUid source) { if (Owner.TryGetContainer(out var container)) { - if (!IoCManager.Resolve().TryGetComponent(container.Owner, out ActorComponent? actor)) + if (!IoCManager.Resolve().TryGetComponent(container.OwnerUid, out ActorComponent? actor)) return; var playerChannel = actor.PlayerSession.ConnectedClient; @@ -74,12 +74,12 @@ namespace Content.Server.Headset } } - public void Listen(string message, EntityUidspeaker) + public void Listen(string message, EntityUid speaker) { Broadcast(message, speaker); } - public void Broadcast(string message, EntityUidspeaker) + public void Broadcast(string message, EntityUid speaker) { _radioSystem.SpreadMessage(this, speaker, message, BroadcastFrequency); RadioRequested = false; diff --git a/Content.Server/Jobs/AddComponentSpecial.cs b/Content.Server/Jobs/AddComponentSpecial.cs index 4bf1c87c3d..b154a52c80 100644 --- a/Content.Server/Jobs/AddComponentSpecial.cs +++ b/Content.Server/Jobs/AddComponentSpecial.cs @@ -13,7 +13,7 @@ namespace Content.Server.Jobs [DataField("component", required:true)] public string Component { get; } = string.Empty; - public override void AfterEquip(EntityUidmob) + public override void AfterEquip(EntityUid mob) { // Yes, this will throw if your component is invalid. var component = (Component)IoCManager.Resolve().GetComponent(Component); diff --git a/Content.Server/Jobs/GiveItemOnHolidaySpecial.cs b/Content.Server/Jobs/GiveItemOnHolidaySpecial.cs index 2233e6952e..4f5b85a7b6 100644 --- a/Content.Server/Jobs/GiveItemOnHolidaySpecial.cs +++ b/Content.Server/Jobs/GiveItemOnHolidaySpecial.cs @@ -21,7 +21,7 @@ namespace Content.Server.Jobs [DataField("prototype", customTypeSerializer:typeof(PrototypeIdSerializer))] public string Prototype { get; } = string.Empty; - public override void AfterEquip(EntityUidmob) + public override void AfterEquip(EntityUid mob) { if (string.IsNullOrEmpty(Holiday) || string.IsNullOrEmpty(Prototype)) return; diff --git a/Content.Server/Kitchen/Components/KitchenSpikeComponent.cs b/Content.Server/Kitchen/Components/KitchenSpikeComponent.cs index f7bc1c25c6..7f9be4d5c2 100644 --- a/Content.Server/Kitchen/Components/KitchenSpikeComponent.cs +++ b/Content.Server/Kitchen/Components/KitchenSpikeComponent.cs @@ -95,7 +95,7 @@ namespace Content.Server.Kitchen.Components return true; } - public async void TrySpike(EntityUid victim, EntityUiduser) + public async void TrySpike(EntityUid victim, EntityUid user) { var victimUid = (EntityUid) victim; if (_beingButchered.Contains(victimUid)) return; diff --git a/Content.Server/Light/Components/HandheldLightComponent.cs b/Content.Server/Light/Components/HandheldLightComponent.cs index e46b95da19..aeffe30419 100644 --- a/Content.Server/Light/Components/HandheldLightComponent.cs +++ b/Content.Server/Light/Components/HandheldLightComponent.cs @@ -102,7 +102,7 @@ namespace Content.Server.Light.Components /// Illuminates the light if it is not active, extinguishes it if it is active. /// /// True if the light's status was toggled, false otherwise. - public bool ToggleStatus(EntityUiduser) + public bool ToggleStatus(EntityUid user) { if (!EntitySystem.Get().CanUse(user)) return false; return Activated ? TurnOff() : TurnOn(user); @@ -128,7 +128,7 @@ namespace Content.Server.Light.Components return true; } - public bool TurnOn(EntityUiduser) + public bool TurnOn(EntityUid user) { if (Activated) { diff --git a/Content.Server/Light/EntitySystems/MatchstickSystem.cs b/Content.Server/Light/EntitySystems/MatchstickSystem.cs index 6b974d14ed..3557453428 100644 --- a/Content.Server/Light/EntitySystems/MatchstickSystem.cs +++ b/Content.Server/Light/EntitySystems/MatchstickSystem.cs @@ -58,7 +58,7 @@ namespace Content.Server.Light.EntitySystems args.IsHot = component.CurrentState == SmokableState.Lit; } - public void Ignite(MatchstickComponent component, EntityUiduser) + public void Ignite(MatchstickComponent component, EntityUid user) { // Play Sound SoundSystem.Play( diff --git a/Content.Server/Medical/Components/MedicalScannerComponent.cs b/Content.Server/Medical/Components/MedicalScannerComponent.cs index 861f6098ac..77de6dbfd9 100644 --- a/Content.Server/Medical/Components/MedicalScannerComponent.cs +++ b/Content.Server/Medical/Components/MedicalScannerComponent.cs @@ -165,7 +165,7 @@ namespace Content.Server.Medical.Components UserInterface?.Open(actor.PlayerSession); } - public void InsertBody(EntityUiduser) + public void InsertBody(EntityUid user) { _bodyContainer.Insert(user); UpdateUserInterface(); diff --git a/Content.Server/PDA/PDASystem.cs b/Content.Server/PDA/PDASystem.cs index a0bcebb971..d88334c9c6 100644 --- a/Content.Server/PDA/PDASystem.cs +++ b/Content.Server/PDA/PDASystem.cs @@ -110,7 +110,7 @@ namespace Content.Server.PDA UpdatePDAUserInterface(pda); } - private bool OpenUI(PDAComponent pda, EntityUiduser) + private bool OpenUI(PDAComponent pda, EntityUid user) { if (!IoCManager.Resolve().TryGetComponent(user, out ActorComponent? actor)) return false; diff --git a/Content.Server/PneumaticCannon/PneumaticCannonSystem.cs b/Content.Server/PneumaticCannon/PneumaticCannonSystem.cs index f5775d2b74..0e2f6762a6 100644 --- a/Content.Server/PneumaticCannon/PneumaticCannonSystem.cs +++ b/Content.Server/PneumaticCannon/PneumaticCannonSystem.cs @@ -305,7 +305,7 @@ namespace Content.Server.PneumaticCannon args.Verbs.Add(ejectItems); } - public void TryRemoveGasTank(PneumaticCannonComponent component, EntityUiduser) + public void TryRemoveGasTank(PneumaticCannonComponent component, EntityUid user) { if (component.GasTankSlot.ContainedEntity == null) { @@ -328,7 +328,7 @@ namespace Content.Server.PneumaticCannon } } - public void TryEjectAllItems(PneumaticCannonComponent component, EntityUiduser) + public void TryEjectAllItems(PneumaticCannonComponent component, EntityUid user) { if (IoCManager.Resolve().TryGetComponent(component.Owner, out var storage)) { diff --git a/Content.Server/Power/Components/BaseCharger.cs b/Content.Server/Power/Components/BaseCharger.cs index 5486d5f920..a657da4ce3 100644 --- a/Content.Server/Power/Components/BaseCharger.cs +++ b/Content.Server/Power/Components/BaseCharger.cs @@ -88,7 +88,7 @@ namespace Content.Server.Power.Components /// This will remove the item directly into the user's hand / floor /// /// - public void RemoveItem(EntityUiduser) + public void RemoveItem(EntityUid user) { var heldItem = Container.ContainedEntity; if (heldItem == null) diff --git a/Content.Server/Radio/Components/HandheldRadioComponent.cs b/Content.Server/Radio/Components/HandheldRadioComponent.cs index c55da536b2..f05181d5b4 100644 --- a/Content.Server/Radio/Components/HandheldRadioComponent.cs +++ b/Content.Server/Radio/Components/HandheldRadioComponent.cs @@ -63,7 +63,7 @@ namespace Content.Server.Radio.Components _chatManager.EntitySay(Owner, message); } - public bool Use(EntityUiduser) + public bool Use(EntityUid user) { RadioOn = !RadioOn; @@ -79,13 +79,13 @@ namespace Content.Server.Radio.Components return Use(eventArgs.User); } - public bool CanListen(string message, EntityUidsource) + public bool CanListen(string message, EntityUid source) { return RadioOn && Owner.InRangeUnobstructed(IoCManager.Resolve().GetComponent(source).Coordinates, range: ListenRange); } - public void Receive(string message, int channel, EntityUidspeaker) + public void Receive(string message, int channel, EntityUid speaker) { if (RadioOn) { @@ -93,12 +93,12 @@ namespace Content.Server.Radio.Components } } - public void Listen(string message, EntityUidspeaker) + public void Listen(string message, EntityUid speaker) { Broadcast(message, speaker); } - public void Broadcast(string message, EntityUidspeaker) + public void Broadcast(string message, EntityUid speaker) { _radioSystem.SpreadMessage(this, speaker, message, BroadcastFrequency); } diff --git a/Content.Server/Radio/Components/IListen.cs b/Content.Server/Radio/Components/IListen.cs index 8bb6fba7f3..daeb227d3b 100644 --- a/Content.Server/Radio/Components/IListen.cs +++ b/Content.Server/Radio/Components/IListen.cs @@ -1,4 +1,4 @@ -using Robust.Shared.GameObjects; +using Robust.Shared.GameObjects; namespace Content.Server.Radio.Components { @@ -10,8 +10,8 @@ namespace Content.Server.Radio.Components { int ListenRange { get; } - bool CanListen(string message, EntityUidsource); + bool CanListen(string message, EntityUid source); - void Listen(string message, EntityUidspeaker); + void Listen(string message, EntityUid speaker); } } diff --git a/Content.Server/Radio/Components/IRadio.cs b/Content.Server/Radio/Components/IRadio.cs index 5e9f2becdd..3c44bff0c1 100644 --- a/Content.Server/Radio/Components/IRadio.cs +++ b/Content.Server/Radio/Components/IRadio.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using Robust.Shared.GameObjects; +using System.Collections.Generic; namespace Content.Server.Radio.Components { @@ -6,8 +7,8 @@ namespace Content.Server.Radio.Components { IReadOnlyList Channels { get; } - void Receive(string message, int channel, EntityUidspeaker); + void Receive(string message, int channel, EntityUid speaker); - void Broadcast(string message, EntityUidspeaker); + void Broadcast(string message, EntityUid speaker); } } diff --git a/Content.Server/Rotatable/RotatableSystem.cs b/Content.Server/Rotatable/RotatableSystem.cs index d1f8019b82..d60b844f17 100644 --- a/Content.Server/Rotatable/RotatableSystem.cs +++ b/Content.Server/Rotatable/RotatableSystem.cs @@ -74,7 +74,7 @@ namespace Content.Server.Rotatable /// /// Replace a flippable entity with it's flipped / mirror-symmetric entity. /// - public static void TryFlip(FlippableComponent component, EntityUiduser) + public static void TryFlip(FlippableComponent component, EntityUid user) { if (IoCManager.Resolve().TryGetComponent(component.Owner, out IPhysBody? physics) && physics.BodyType == BodyType.Static) diff --git a/Content.Server/Sandbox/SandboxManager.cs b/Content.Server/Sandbox/SandboxManager.cs index af319fbb14..4f4bcf05c4 100644 --- a/Content.Server/Sandbox/SandboxManager.cs +++ b/Content.Server/Sandbox/SandboxManager.cs @@ -157,7 +157,7 @@ namespace Content.Server.Sandbox } } - void UpgradeId(EntityUidid) + void UpgradeId(EntityUid id) { var accessSystem = EntitySystem.Get(); accessSystem.TrySetTags(id, allAccess); diff --git a/Content.Server/Shuttles/EntitySystems/DockingSystem.cs b/Content.Server/Shuttles/EntitySystems/DockingSystem.cs index ff94f88fe2..2441ce8c75 100644 --- a/Content.Server/Shuttles/EntitySystems/DockingSystem.cs +++ b/Content.Server/Shuttles/EntitySystems/DockingSystem.cs @@ -110,7 +110,7 @@ namespace Content.Server.Shuttles.EntitySystems if (dockingFixture == null) { DebugTools.Assert(false); - Logger.ErrorS("docking", $"Found null fixture on {((IComponent) body).Owner)}" + Logger.ErrorS("docking", $"Found null fixture on {((IComponent) body).OwnerUid}"); return null; } @@ -144,7 +144,7 @@ namespace Content.Server.Shuttles.EntitySystems if (otherDockingFixture == null) { DebugTools.Assert(false); - Logger.ErrorS("docking", $"Found null docking fixture on {ent)}" + Logger.ErrorS("docking", $"Found null docking fixture on {ent}"); continue; } @@ -200,8 +200,8 @@ namespace Content.Server.Shuttles.EntitySystems dockA.DockedWith = null; // If these grids are ever invalid then need to look at fixing ordering for unanchored events elsewhere. - var gridAUid = _mapManager.GetGrid(EntityManager.GetComponent(((IComponent) dockA).Owner).GridID).GridEntityId; - var gridBUid = _mapManager.GetGrid(EntityManager.GetComponent(((IComponent) dockB).Owner).GridID).GridEntityId; + var gridAUid = _mapManager.GetGrid(EntityManager.GetComponent(((IComponent) dockA).OwnerUid).GridID).GridEntityId; + var gridBUid = _mapManager.GetGrid(EntityManager.GetComponent(((IComponent) dockB).OwnerUid).GridID).GridEntityId; var msg = new UndockEvent { @@ -211,8 +211,8 @@ namespace Content.Server.Shuttles.EntitySystems GridBUid = gridBUid, }; - EntityManager.EventBus.RaiseLocalEvent(((IComponent) dockA).Owner, msg, false); - EntityManager.EventBus.RaiseLocalEvent(((IComponent) dockB).Owner, msg, false); + EntityManager.EventBus.RaiseLocalEvent(((IComponent) dockA).OwnerUid, msg, false); + EntityManager.EventBus.RaiseLocalEvent(((IComponent) dockB).OwnerUid, msg, false); EntityManager.EventBus.RaiseEvent(EventSource.Local, msg); } @@ -308,8 +308,8 @@ namespace Content.Server.Shuttles.EntitySystems // We could also potentially use a prismatic joint? Depending if we want clamps that can extend or whatever - var dockAXform = EntityManager.GetComponent(((IComponent) dockA).Owner); - var dockBXform = EntityManager.GetComponent(((IComponent) dockB).Owner); + var dockAXform = EntityManager.GetComponent(((IComponent) dockA).OwnerUid); + var dockBXform = EntityManager.GetComponent(((IComponent) dockB).OwnerUid); var gridA = _mapManager.GetGrid(dockAXform.GridID).GridEntityId; var gridB = _mapManager.GetGrid(dockBXform.GridID).GridEntityId; @@ -344,13 +344,13 @@ namespace Content.Server.Shuttles.EntitySystems dockA.DockJoint = joint; dockB.DockJoint = joint; - if (EntityManager.TryGetComponent(((IComponent) dockA).Owner, out ServerDoorComponent? doorA)) + if (EntityManager.TryGetComponent(((IComponent) dockA).OwnerUid, out ServerDoorComponent? doorA)) { doorA.ChangeAirtight = false; doorA.Open(); } - if (EntityManager.TryGetComponent(((IComponent) dockB).Owner, out ServerDoorComponent? doorB)) + if (EntityManager.TryGetComponent(((IComponent) dockB).OwnerUid, out ServerDoorComponent? doorB)) { doorB.ChangeAirtight = false; doorB.Open(); @@ -364,8 +364,8 @@ namespace Content.Server.Shuttles.EntitySystems GridBUid = gridB, }; - EntityManager.EventBus.RaiseLocalEvent(((IComponent) dockA).Owner, msg, false); - EntityManager.EventBus.RaiseLocalEvent(((IComponent) dockB).Owner, msg, false); + EntityManager.EventBus.RaiseLocalEvent(((IComponent) dockA).OwnerUid, msg, false); + EntityManager.EventBus.RaiseLocalEvent(((IComponent) dockB).OwnerUid, msg, false); EntityManager.EventBus.RaiseEvent(EventSource.Local, msg); } @@ -374,8 +374,8 @@ namespace Content.Server.Shuttles.EntitySystems /// private void TryDock(DockingComponent dockA, DockingComponent dockB) { - if (!EntityManager.TryGetComponent(((IComponent) dockA).Owner, out PhysicsComponent? bodyA) || - !EntityManager.TryGetComponent(((IComponent) dockB).Owner, out PhysicsComponent? bodyB) || + if (!EntityManager.TryGetComponent(((IComponent) dockA).OwnerUid, out PhysicsComponent? bodyA) || + !EntityManager.TryGetComponent(((IComponent) dockB).OwnerUid, out PhysicsComponent? bodyB) || !dockA.Enabled || !dockB.Enabled) { @@ -425,13 +425,13 @@ namespace Content.Server.Shuttles.EntitySystems return; } - if (EntityManager.TryGetComponent(((IComponent) dock).Owner, out ServerDoorComponent? doorA)) + if (EntityManager.TryGetComponent(((IComponent) dock).OwnerUid, out ServerDoorComponent? doorA)) { doorA.ChangeAirtight = true; doorA.Close(); } - if (EntityManager.TryGetComponent(((IComponent) dock.DockedWith).Owner, out ServerDoorComponent? doorB)) + if (EntityManager.TryGetComponent(((IComponent) dock.DockedWith).OwnerUid, out ServerDoorComponent? doorB)) { doorB.ChangeAirtight = true; doorB.Close(); diff --git a/Content.Server/Shuttles/EntitySystems/ShuttleSystem.cs b/Content.Server/Shuttles/EntitySystems/ShuttleSystem.cs index 98d1c9c9cf..646e2e0646 100644 --- a/Content.Server/Shuttles/EntitySystems/ShuttleSystem.cs +++ b/Content.Server/Shuttles/EntitySystems/ShuttleSystem.cs @@ -52,7 +52,7 @@ namespace Content.Server.Shuttles.EntitySystems private void OnGridInit(GridInitializeEvent ev) { - ev.EntityUid).EnsureComponent( + EntityManager.EnsureComponent(ev.EntityUid); } private void OnShuttleStartup(EntityUid uid, ShuttleComponent component, ComponentStartup args) diff --git a/Content.Server/Singularity/Components/ContainmentFieldConnection.cs b/Content.Server/Singularity/Components/ContainmentFieldConnection.cs index 0f6f586c4e..f2f6a26eae 100644 --- a/Content.Server/Singularity/Components/ContainmentFieldConnection.cs +++ b/Content.Server/Singularity/Components/ContainmentFieldConnection.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Threading; using Robust.Shared.GameObjects; @@ -71,7 +71,7 @@ namespace Content.Server.Singularity.Components Timer.SpawnRepeating(1000, () => { SharedEnergyPool--;}, _powerDecreaseCancellationTokenSource.Token); } - public bool CanRepell(EntityUidtoRepell) + public bool CanRepell(EntityUid toRepell) { var powerNeeded = 1; if (IoCManager.Resolve().TryGetComponent(toRepell, out var singularityComponent)) diff --git a/Content.Server/Singularity/Components/ContainmentFieldGeneratorComponent.cs b/Content.Server/Singularity/Components/ContainmentFieldGeneratorComponent.cs index d8d1f5113f..dd7c353cc8 100644 --- a/Content.Server/Singularity/Components/ContainmentFieldGeneratorComponent.cs +++ b/Content.Server/Singularity/Components/ContainmentFieldGeneratorComponent.cs @@ -62,7 +62,7 @@ namespace Content.Server.Singularity.Components private Tuple? _connection1; private Tuple? _connection2; - public bool CanRepell(EntityUidtoRepell) => _connection1?.Item2?.CanRepell(toRepell) == true || + public bool CanRepell(EntityUid toRepell) => _connection1?.Item2?.CanRepell(toRepell) == true || _connection2?.Item2?.CanRepell(toRepell) == true; public void OnAnchoredChanged() diff --git a/Content.Server/Storage/Components/SecretStashComponent.cs b/Content.Server/Storage/Components/SecretStashComponent.cs index 30a98e34ee..b691d85ddd 100644 --- a/Content.Server/Storage/Components/SecretStashComponent.cs +++ b/Content.Server/Storage/Components/SecretStashComponent.cs @@ -76,7 +76,7 @@ namespace Content.Server.Storage.Components /// /// /// True if user recieved item - public bool TryGetItem(EntityUiduser) + public bool TryGetItem(EntityUid user) { if (_itemContainer.ContainedEntity == null) return false; diff --git a/Content.Server/Stunnable/StunbatonSystem.cs b/Content.Server/Stunnable/StunbatonSystem.cs index dfda1a94f3..8a49e83682 100644 --- a/Content.Server/Stunnable/StunbatonSystem.cs +++ b/Content.Server/Stunnable/StunbatonSystem.cs @@ -167,7 +167,7 @@ namespace Content.Server.Stunnable comp.Activated = false; } - private void TurnOn(StunbatonComponent comp, EntityUiduser) + private void TurnOn(StunbatonComponent comp, EntityUid user) { if (comp.Activated) { diff --git a/Content.Server/Tabletop/TabletopChessSetup.cs b/Content.Server/Tabletop/TabletopChessSetup.cs index d77d218391..55b34b4a73 100644 --- a/Content.Server/Tabletop/TabletopChessSetup.cs +++ b/Content.Server/Tabletop/TabletopChessSetup.cs @@ -35,9 +35,9 @@ namespace Content.Server.Tabletop SpawnPiecesRow(session, entityManager, "White", new MapCoordinates(x, y - 7 * separation, mapId), separation); // Extra queens - EntityUidtempQualifier = entityManager.SpawnEntity("BlackQueen", new MapCoordinates(x + 9 * separation + 9f / 32, y - 3 * separation, mapId)); + EntityUid tempQualifier = entityManager.SpawnEntity("BlackQueen", new MapCoordinates(x + 9 * separation + 9f / 32, y - 3 * separation, mapId)); session.Entities.Add(tempQualifier); - EntityUidtempQualifier1 = entityManager.SpawnEntity("WhiteQueen", new MapCoordinates(x + 9 * separation + 9f / 32, y - 4 * separation, mapId)); + EntityUid tempQualifier1 = entityManager.SpawnEntity("WhiteQueen", new MapCoordinates(x + 9 * separation + 9f / 32, y - 4 * separation, mapId)); session.Entities.Add(tempQualifier1); } @@ -53,23 +53,23 @@ namespace Content.Server.Tabletop switch (piecesRow[i]) { case 'r': - EntityUidtempQualifier = entityManager.SpawnEntity(color + "Rook", new MapCoordinates(x + i * separation, y, mapId)); + EntityUid tempQualifier = entityManager.SpawnEntity(color + "Rook", new MapCoordinates(x + i * separation, y, mapId)); session.Entities.Add(tempQualifier); break; case 'n': - EntityUidtempQualifier1 = entityManager.SpawnEntity(color + "Knight", new MapCoordinates(x + i * separation, y, mapId)); + EntityUid tempQualifier1 = entityManager.SpawnEntity(color + "Knight", new MapCoordinates(x + i * separation, y, mapId)); session.Entities.Add(tempQualifier1); break; case 'b': - EntityUidtempQualifier2 = entityManager.SpawnEntity(color + "Bishop", new MapCoordinates(x + i * separation, y, mapId)); + EntityUid tempQualifier2 = entityManager.SpawnEntity(color + "Bishop", new MapCoordinates(x + i * separation, y, mapId)); session.Entities.Add(tempQualifier2); break; case 'q': - EntityUidtempQualifier3 = entityManager.SpawnEntity(color + "Queen", new MapCoordinates(x + i * separation, y, mapId)); + EntityUid tempQualifier3 = entityManager.SpawnEntity(color + "Queen", new MapCoordinates(x + i * separation, y, mapId)); session.Entities.Add(tempQualifier3); break; case 'k': - EntityUidtempQualifier4 = entityManager.SpawnEntity(color + "King", new MapCoordinates(x + i * separation, y, mapId)); + EntityUid tempQualifier4 = entityManager.SpawnEntity(color + "King", new MapCoordinates(x + i * separation, y, mapId)); session.Entities.Add(tempQualifier4); break; } @@ -83,7 +83,7 @@ namespace Content.Server.Tabletop for (int i = 0; i < 8; i++) { - EntityUidtempQualifier = entityManager.SpawnEntity(color + "Pawn", new MapCoordinates(x + i * separation, y, mapId)); + EntityUid tempQualifier = entityManager.SpawnEntity(color + "Pawn", new MapCoordinates(x + i * separation, y, mapId)); session.Entities.Add(tempQualifier); } } diff --git a/Content.Server/Tabletop/TabletopParchisSetup.cs b/Content.Server/Tabletop/TabletopParchisSetup.cs index a5f69fdd58..38b6f5a5d2 100644 --- a/Content.Server/Tabletop/TabletopParchisSetup.cs +++ b/Content.Server/Tabletop/TabletopParchisSetup.cs @@ -35,43 +35,43 @@ namespace Content.Server.Tabletop var center = session.Position; // Red pieces. - EntityUidtempQualifier = entityManager.SpawnEntity(RedPiecePrototype, center.Offset(-x1, -y1)); + EntityUid tempQualifier = entityManager.SpawnEntity(RedPiecePrototype, center.Offset(-x1, -y1)); session.Entities.Add(tempQualifier); - EntityUidtempQualifier1 = entityManager.SpawnEntity(RedPiecePrototype, center.Offset(-x1, -y2)); + EntityUid tempQualifier1 = entityManager.SpawnEntity(RedPiecePrototype, center.Offset(-x1, -y2)); session.Entities.Add(tempQualifier1); - EntityUidtempQualifier2 = entityManager.SpawnEntity(RedPiecePrototype, center.Offset(-x2, -y1)); + EntityUid tempQualifier2 = entityManager.SpawnEntity(RedPiecePrototype, center.Offset(-x2, -y1)); session.Entities.Add(tempQualifier2); - EntityUidtempQualifier3 = entityManager.SpawnEntity(RedPiecePrototype, center.Offset(-x2, -y2)); + EntityUid tempQualifier3 = entityManager.SpawnEntity(RedPiecePrototype, center.Offset(-x2, -y2)); session.Entities.Add(tempQualifier3); // Green pieces. - EntityUidtempQualifier4 = entityManager.SpawnEntity(GreenPiecePrototype, center.Offset(x1, -y1)); + EntityUid tempQualifier4 = entityManager.SpawnEntity(GreenPiecePrototype, center.Offset(x1, -y1)); session.Entities.Add(tempQualifier4); - EntityUidtempQualifier5 = entityManager.SpawnEntity(GreenPiecePrototype, center.Offset(x1, -y2)); + EntityUid tempQualifier5 = entityManager.SpawnEntity(GreenPiecePrototype, center.Offset(x1, -y2)); session.Entities.Add(tempQualifier5); - EntityUidtempQualifier6 = entityManager.SpawnEntity(GreenPiecePrototype, center.Offset(x2, -y1)); + EntityUid tempQualifier6 = entityManager.SpawnEntity(GreenPiecePrototype, center.Offset(x2, -y1)); session.Entities.Add(tempQualifier6); - EntityUidtempQualifier7 = entityManager.SpawnEntity(GreenPiecePrototype, center.Offset(x2, -y2)); + EntityUid tempQualifier7 = entityManager.SpawnEntity(GreenPiecePrototype, center.Offset(x2, -y2)); session.Entities.Add(tempQualifier7); // Yellow pieces. - EntityUidtempQualifier8 = entityManager.SpawnEntity(YellowPiecePrototype, center.Offset(x1, y1)); + EntityUid tempQualifier8 = entityManager.SpawnEntity(YellowPiecePrototype, center.Offset(x1, y1)); session.Entities.Add(tempQualifier8); - EntityUidtempQualifier9 = entityManager.SpawnEntity(YellowPiecePrototype, center.Offset(x1, y2)); + EntityUid tempQualifier9 = entityManager.SpawnEntity(YellowPiecePrototype, center.Offset(x1, y2)); session.Entities.Add(tempQualifier9); - EntityUidtempQualifier10 = entityManager.SpawnEntity(YellowPiecePrototype, center.Offset(x2, y1)); + EntityUid tempQualifier10 = entityManager.SpawnEntity(YellowPiecePrototype, center.Offset(x2, y1)); session.Entities.Add(tempQualifier10); - EntityUidtempQualifier11 = entityManager.SpawnEntity(YellowPiecePrototype, center.Offset(x2, y2)); + EntityUid tempQualifier11 = entityManager.SpawnEntity(YellowPiecePrototype, center.Offset(x2, y2)); session.Entities.Add(tempQualifier11); // Blue pieces. - EntityUidtempQualifier12 = entityManager.SpawnEntity(BluePiecePrototype, center.Offset(-x1, y1)); + EntityUid tempQualifier12 = entityManager.SpawnEntity(BluePiecePrototype, center.Offset(-x1, y1)); session.Entities.Add(tempQualifier12); - EntityUidtempQualifier13 = entityManager.SpawnEntity(BluePiecePrototype, center.Offset(-x1, y2)); + EntityUid tempQualifier13 = entityManager.SpawnEntity(BluePiecePrototype, center.Offset(-x1, y2)); session.Entities.Add(tempQualifier13); - EntityUidtempQualifier14 = entityManager.SpawnEntity(BluePiecePrototype, center.Offset(-x2, y1)); + EntityUid tempQualifier14 = entityManager.SpawnEntity(BluePiecePrototype, center.Offset(-x2, y1)); session.Entities.Add(tempQualifier14); - EntityUidtempQualifier15 = entityManager.SpawnEntity(BluePiecePrototype, center.Offset(-x2, y2)); + EntityUid tempQualifier15 = entityManager.SpawnEntity(BluePiecePrototype, center.Offset(-x2, y2)); session.Entities.Add(tempQualifier15); } } diff --git a/Content.Server/Traitor/Uplink/UplinkSystem.cs b/Content.Server/Traitor/Uplink/UplinkSystem.cs index cdbbfcad77..a8f3405c0f 100644 --- a/Content.Server/Traitor/Uplink/UplinkSystem.cs +++ b/Content.Server/Traitor/Uplink/UplinkSystem.cs @@ -205,7 +205,7 @@ namespace Content.Server.Traitor.Uplink return true; } - private EntityUid FindUplinkTarget(EntityUiduser) + private EntityUid FindUplinkTarget(EntityUid user) { // Try to find PDA in inventory if (IoCManager.Resolve().TryGetComponent(user, out InventoryComponent? inventory)) diff --git a/Content.Server/UserInterface/ActivatableUISystem.cs b/Content.Server/UserInterface/ActivatableUISystem.cs index 504986ba35..e286866e26 100644 --- a/Content.Server/UserInterface/ActivatableUISystem.cs +++ b/Content.Server/UserInterface/ActivatableUISystem.cs @@ -83,10 +83,10 @@ namespace Content.Server.UserInterface // If we've gotten this far, fire a cancellable event that indicates someone is about to activate this. // This is so that stuff can require further conditions (like power). var oae = new ActivatableUIOpenAttemptEvent(user); - RaiseLocalEvent(((IComponent) aui).Owner, oae, false); + RaiseLocalEvent(((IComponent) aui).OwnerUid, oae, false); if (oae.Cancelled) return false; - SetCurrentSingleUser(((IComponent) aui).Owner, actor.PlayerSession, aui); + SetCurrentSingleUser(((IComponent) aui).OwnerUid, actor.PlayerSession, aui); ui.Toggle(actor.PlayerSession); return true; } @@ -133,8 +133,8 @@ namespace Content.Server.UserInterface public class ActivatableUIOpenAttemptEvent : CancellableEntityEventArgs { - public EntityUidUser { get; } - public ActivatableUIOpenAttemptEvent(EntityUidwho) + public EntityUid User { get; } + public ActivatableUIOpenAttemptEvent(EntityUid who) { User = who; } diff --git a/Content.Server/Verbs/Commands/InvokeVerbCommand.cs b/Content.Server/Verbs/Commands/InvokeVerbCommand.cs index a97905be3f..bf31e5ab89 100644 --- a/Content.Server/Verbs/Commands/InvokeVerbCommand.cs +++ b/Content.Server/Verbs/Commands/InvokeVerbCommand.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Linq; using Content.Server.Administration; using Content.Shared.Administration; @@ -29,12 +29,12 @@ namespace Content.Server.Verbs.Commands var verbSystem = EntitySystem.Get(); // get the 'player' entity (defaulting to command user, otherwise uses a uid) - EntityUid playerEntity = null; + EntityUid playerEntity = default; if (!int.TryParse(args[0], out var intPlayerUid)) { if (args[0] == "self" && shell.Player?.AttachedEntity != null) { - playerEntity = shell.Player.AttachedEntity; + playerEntity = shell.Player.AttachedEntityUid.Value; } else { @@ -54,14 +54,14 @@ namespace Content.Server.Verbs.Commands return; } - if (playerEntity == null) + if (playerEntity == default) { shell.WriteError(Loc.GetString("invoke-verb-command-invalid-player-entity")); return; } var entUid = new EntityUid(intUid); - if (!entityManager.EntityExists(entUid) + if (!entityManager.EntityExists(entUid)) { shell.WriteError(Loc.GetString("invoke-verb-command-invalid-target-entity")); return; diff --git a/Content.Server/Weapon/Ranged/Ammunition/Components/AmmoBoxComponent.cs b/Content.Server/Weapon/Ranged/Ammunition/Components/AmmoBoxComponent.cs index 3bb0b83d4e..2b7704d5e8 100644 --- a/Content.Server/Weapon/Ranged/Ammunition/Components/AmmoBoxComponent.cs +++ b/Content.Server/Weapon/Ranged/Ammunition/Components/AmmoBoxComponent.cs @@ -158,7 +158,7 @@ namespace Content.Server.Weapon.Ranged.Ammunition.Components return false; } - private bool TryUse(EntityUiduser) + private bool TryUse(EntityUid user) { if (!IoCManager.Resolve().TryGetComponent(user, out HandsComponent? handsComponent)) { diff --git a/Content.Server/Weapon/Ranged/Barrels/Components/ServerMagazineBarrelComponent.cs b/Content.Server/Weapon/Ranged/Barrels/Components/ServerMagazineBarrelComponent.cs index bdf400ddfe..522a256c9f 100644 --- a/Content.Server/Weapon/Ranged/Barrels/Components/ServerMagazineBarrelComponent.cs +++ b/Content.Server/Weapon/Ranged/Barrels/Components/ServerMagazineBarrelComponent.cs @@ -319,7 +319,7 @@ namespace Content.Server.Weapon.Ranged.Barrels.Components return true; } - public void RemoveMagazine(EntityUiduser) + public void RemoveMagazine(EntityUid user) { var mag = MagazineContainer.ContainedEntity; @@ -384,7 +384,7 @@ namespace Content.Server.Weapon.Ranged.Barrels.Components return false; } - public void InsertMagazine(EntityUid user, EntityUidmagazine) + public void InsertMagazine(EntityUid user, EntityUid magazine) { SoundSystem.Play(Filter.Pvs(Owner), _soundMagInsert.GetSound(), Owner, AudioParams.Default.WithVolume(-2)); Owner.PopupMessage(user, Loc.GetString("server-magazine-barrel-component-interact-using-success"));