From ce8339b0e5f864a788f40535bb74d3a5f5b57923 Mon Sep 17 00:00:00 2001 From: ReeZer2 Date: Thu, 9 Jan 2025 18:23:22 +0200 Subject: [PATCH] little fixes --- Content.Server/SS220/Contractor/ContractorServerSystem.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Content.Server/SS220/Contractor/ContractorServerSystem.cs b/Content.Server/SS220/Contractor/ContractorServerSystem.cs index 08a0381172a8..1ebd10a3f9fc 100644 --- a/Content.Server/SS220/Contractor/ContractorServerSystem.cs +++ b/Content.Server/SS220/Contractor/ContractorServerSystem.cs @@ -64,7 +64,7 @@ public override void Update(float frameTime) if (comp.PdaEntity == null) continue; - var isEnabled = IsCloseWithPosition(GetNetEntity(uid)); + var isEnabled = IsCloseWithPosition(uid); if (_uiSystem.IsUiOpen(GetEntity(comp.PdaEntity)!.Value, ContractorPdaKey.Key)) { @@ -138,7 +138,6 @@ private void OnNewContractAccepted(Entity ent, ref Contr contractorComponent.CurrentContractData = ev.ContractData; contractorComponent.CurrentContractEntity = ev.ContractEntity; - //contractorComponent.PdaEntity = ev.Entity; //why this shit here? Dirty(ev.Actor, contractorComponent); @@ -358,10 +357,8 @@ public void GenerateContracts(Entity ent) return allLocations; } - private bool IsCloseWithPosition(NetEntity playerNet) + private bool IsCloseWithPosition(EntityUid player) { - var player = GetEntity(playerNet); - if (!TryComp(player, out var contractorComponent)) return false;