Skip to content

Commit

Permalink
Revert Bodycams (#260)
Browse files Browse the repository at this point in the history
* i

* Revert "Bodycams"

This reverts commit 000d116.

* Revert "Bodycam Working"

This reverts commit 3ed911c.

* Revert "Bodycam"

This reverts body cams (for now)

it didnt cause client lag locally and was neat but should have reviewed it more betterer, will be ready in the coming days hopefully

* one more
  • Loading branch information
Cheackraze authored Aug 23, 2023
1 parent eac28e0 commit 5fc07bb
Show file tree
Hide file tree
Showing 26 changed files with 21 additions and 622 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using Content.Server._NF.Bodycam;
using Content.Shared.DeviceNetwork;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;

Expand Down Expand Up @@ -35,17 +34,10 @@ public sealed class SurveillanceCameraComponent : Component
[DataField("id")]
public string CameraId { get; set; } = "camera";

[ViewVariables]
public EntityUid? CameraIdUser = null;

[ViewVariables(VVAccess.ReadWrite)]
[DataField("nameSet")]
public bool NameSet { get; set; }

[ViewVariables(VVAccess.ReadWrite)]
[DataField("nameSetUser")]
public bool NameSetUser { get; set; }

[ViewVariables(VVAccess.ReadWrite)]
[DataField("networkSet")]
public bool NetworkSet { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@
using Content.Server.Power.Components;
using Content.Shared.ActionBlocker;
using Content.Shared.DeviceNetwork;
using Content.Shared.Inventory.Events;
using Content.Shared.SurveillanceCamera;
using Content.Shared.Verbs;
using Robust.Server.GameObjects;
using Robust.Shared.Prototypes;
using Content.Server.Access.Systems;


namespace Content.Server.SurveillanceCamera;

Expand All @@ -24,8 +21,6 @@ public sealed class SurveillanceCameraSystem : EntitySystem
[Dependency] private readonly UserInterfaceSystem _userInterface = default!;
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;

[Dependency] private readonly IdCardSystem _idCardSystem = default!;

// Pings a surveillance camera subnet. All cameras will always respond
// with a data message if they are on the same subnet.
public const string CameraPingSubnetMessage = "surveillance_camera_ping_subnet";
Expand Down Expand Up @@ -66,8 +61,6 @@ public override void Initialize()

SubscribeLocalEvent<SurveillanceCameraComponent, EmpPulseEvent>(OnEmpPulse);
SubscribeLocalEvent<SurveillanceCameraComponent, EmpDisabledRemoved>(OnEmpDisabledRemoved);

SubscribeLocalEvent<SurveillanceCameraComponent, GotEquippedEvent>(OnEquipped);
}

private void OnPacketReceived(EntityUid uid, SurveillanceCameraComponent component, DeviceNetworkPacketEvent args)
Expand Down Expand Up @@ -213,11 +206,6 @@ private void OpenSetupInterface(EntityUid uid, EntityUid player, SurveillanceCam
UpdateSetupInterface(uid, camera);
}

private void OnEquipped(EntityUid uid, SurveillanceCameraComponent component, GotEquippedEvent args)
{
component.CameraIdUser = args.Equipee;
}

private void UpdateSetupInterface(EntityUid uid, SurveillanceCameraComponent? camera = null, DeviceNetworkComponent? deviceNet = null)
{
if (!Resolve(uid, ref camera, ref deviceNet))
Expand All @@ -244,21 +232,6 @@ private void UpdateSetupInterface(EntityUid uid, SurveillanceCameraComponent? ca
}
}

if (camera.NameSetUser)
{
var userName = Loc.GetString("bodycam-component-unknown-name");
var userJob = Loc.GetString("bodycam-component-unknown-job");
if (_idCardSystem.TryFindIdCard(camera.CameraIdUser!.Value, out var card))
{
if (card.FullName != null)
userName = card.FullName;
if (card.JobTitle != null)
userJob = card.JobTitle;
}
string cameraName = userJob + " - " + userName;
camera.CameraId = cameraName;
}

var state = new SurveillanceCameraSetupBoundUiState(camera.CameraId, deviceNet.ReceiveFrequency ?? 0,
camera.AvailableNetworks, camera.NameSet, camera.NetworkSet);
_userInterface.TrySetUiState(uid, SurveillanceCameraSetupUiKey.Camera, state);
Expand Down
70 changes: 0 additions & 70 deletions Content.Server/_NF/Bodycam/BodycamComponent.cs

This file was deleted.

Loading

0 comments on commit 5fc07bb

Please sign in to comment.