Syndicate Reinforcement Specializations: Medic, Spy, Thief (#29853)

* Syndicate thief, spy, medic

* Fixes description for nukies

* update description for uplink

* Implement the radial menu

* forgot these were necessary to push lol

---------

Co-authored-by: plykiya <plykiya@protonmail.com>
This commit is contained in:
Plykiya
2024-07-21 03:32:25 -07:00
committed by GitHub
parent bd302a0ee9
commit aded74a88a
16 changed files with 326 additions and 23 deletions

View File

@@ -3,7 +3,6 @@ using Content.Server.Administration.Logs;
using Content.Server.EUI;
using Content.Server.Ghost.Roles.Components;
using Content.Server.Ghost.Roles.Events;
using Content.Server.Ghost.Roles.Raffles;
using Content.Shared.Ghost.Roles.Raffles;
using Content.Server.Ghost.Roles.UI;
using Content.Server.Mind.Commands;
@@ -31,6 +30,7 @@ using Robust.Shared.Utility;
using Content.Server.Popups;
using Content.Shared.Verbs;
using Robust.Shared.Collections;
using Content.Shared.Ghost.Roles.Components;
namespace Content.Server.Ghost.Roles
{
@@ -80,6 +80,7 @@ namespace Content.Server.Ghost.Roles
SubscribeLocalEvent<GhostRoleMobSpawnerComponent, TakeGhostRoleEvent>(OnSpawnerTakeRole);
SubscribeLocalEvent<GhostTakeoverAvailableComponent, TakeGhostRoleEvent>(OnTakeoverTakeRole);
SubscribeLocalEvent<GhostRoleMobSpawnerComponent, GetVerbsEvent<Verb>>(OnVerb);
SubscribeLocalEvent<GhostRoleMobSpawnerComponent, GhostRoleRadioMessage>(OnGhostRoleRadioMessage);
_playerManager.PlayerStatusChanged += PlayerStatusChanged;
}
@@ -786,6 +787,21 @@ namespace Content.Server.Ghost.Roles
_popupSystem.PopupEntity(msg, uid, userUid.Value);
}
}
public void OnGhostRoleRadioMessage(Entity<GhostRoleMobSpawnerComponent> entity, ref GhostRoleRadioMessage args)
{
if (!_prototype.TryIndex(args.ProtoId, out var ghostRoleProto))
return;
// if the prototype chosen isn't actually part of the selectable options, ignore it
foreach (var selectableProto in entity.Comp.SelectablePrototypes)
{
if (selectableProto == ghostRoleProto.EntityPrototype.Id)
return;
}
SetMode(entity.Owner, ghostRoleProto, ghostRoleProto.Name, entity.Comp);
}
}
[AnyCommand]