Skip to content

Commit

Permalink
little fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ReeZer2 committed Jan 9, 2025
1 parent ab58cd1 commit ce8339b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Content.Server/SS220/Contractor/ContractorServerSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down Expand Up @@ -138,7 +138,6 @@ private void OnNewContractAccepted(Entity<ContractorPdaComponent> ent, ref Contr

contractorComponent.CurrentContractData = ev.ContractData;
contractorComponent.CurrentContractEntity = ev.ContractEntity;
//contractorComponent.PdaEntity = ev.Entity; //why this shit here?

Dirty(ev.Actor, contractorComponent);

Expand Down Expand Up @@ -358,10 +357,8 @@ public void GenerateContracts(Entity<ContractorComponent> ent)
return allLocations;
}

private bool IsCloseWithPosition(NetEntity playerNet)
private bool IsCloseWithPosition(EntityUid player)
{
var player = GetEntity(playerNet);

if (!TryComp<ContractorComponent>(player, out var contractorComponent))
return false;

Expand Down

0 comments on commit ce8339b

Please sign in to comment.