Skip to content

Commit

Permalink
Merge pull request #391
Browse files Browse the repository at this point in the history
* Update BorgSystem.cs

* Remove-AA

* Update borg.yml

* Update BorgSystem.cs
  • Loading branch information
dvir001 committed Oct 7, 2023
1 parent 536d8d4 commit 348b3bd
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
25 changes: 24 additions & 1 deletion Content.Server/Silicons/Borgs/BorgSystem.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
using Content.Server.Actions;
using Content.Server.Actions;
using Content.Server.Administration.Logs;
using Content.Server.Administration.Managers;
using Content.Server.Hands.Systems;
using Content.Server.PowerCell;
using Content.Server.UserInterface;
using Content.Shared.Access;
using Content.Shared.Access.Components;
using Content.Shared.Access.Systems;
using Content.Shared.Alert;
using Content.Shared.Database;
Expand All @@ -22,7 +24,9 @@
using Robust.Server.GameObjects;
using Robust.Shared.Containers;
using Robust.Shared.Players;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
using System.Linq;

namespace Content.Server.Silicons.Borgs;

Expand All @@ -44,6 +48,8 @@ public sealed partial class BorgSystem : SharedBorgSystem
[Dependency] private readonly ThrowingSystem _throwing = default!;
[Dependency] private readonly UserInterfaceSystem _ui = default!;

[Dependency] private readonly IPrototypeManager _prototypeManager = default!;

[ValidatePrototypeId<JobPrototype>]
public const string BorgJobId = "Borg";

Expand Down Expand Up @@ -281,7 +287,24 @@ public void BorgActivate(EntityUid uid, BorgChassisComponent component)
{
Popup.PopupEntity(Loc.GetString("borg-mind-added", ("name", Identity.Name(uid, EntityManager))), uid);
_powerCell.SetPowerCellDrawEnabled(uid, true);

if (TryComp<AccessComponent>(uid, out var oldAccess))
{
var access = oldAccess.Tags.ToList();

access.Clear();
access.Add($"Captain");
access.Add($"Cargo");
access.Add($"Salvage");
access.Add($"Medical");
access.Add($"Service");
access.Add($"Research");
access.Add($"Engineering");

_access.TrySetTags(uid, access);
}
_access.SetAccessEnabled(uid, true);

_appearance.SetData(uid, BorgVisuals.HasPlayer, true);
Dirty(uid, component);
}
Expand Down
1 change: 1 addition & 0 deletions Resources/Prototypes/Roles/Jobs/Science/borg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
icon: JobIconBorg
supervisors: job-supervisors-rd
jobEntity: PlayerBorgGeneric

0 comments on commit 348b3bd

Please sign in to comment.