using Content.Server.Chat.Managers;
using Content.Server.Chat.Systems;
using Content.Server.Communications;
+using Content.Server.RandomMetadata;
using Content.Server.GameTicking.Rules.Components;
using Content.Server.Ghost.Roles.Components;
using Content.Server.Ghost.Roles.Events;
[Dependency] private readonly IServerPreferencesManager _prefs = default!;
[Dependency] private readonly MapLoaderSystem _map = default!;
[Dependency] private readonly MetaDataSystem _metaData = default!;
+ [Dependency] private readonly RandomMetadataSystem _randomMetadata = default!;
[Dependency] private readonly MindSystem _mind = default!;
[Dependency] private readonly NpcFactionSystem _npcFaction = default!;
[Dependency] private readonly PopupSystem _popupSystem = default!;
[Dependency] private readonly TagSystem _tag = default!;
[Dependency] private readonly WarDeclaratorSystem _warDeclarator = default!;
+
[ValidatePrototypeId<CurrencyPrototype>]
private const string TelecrystalCurrencyPrototype = "Telecrystal";
[ValidatePrototypeId<AntagPrototype>]
public const string NukeopsId = "Nukeops";
+ [ValidatePrototypeId<DatasetPrototype>]
+ private const string OperationPrefixDataset = "operationPrefix";
+
+ [ValidatePrototypeId<DatasetPrototype>]
+ private const string OperationSuffixDataset = "operationSuffix";
+
public override void Initialize()
{
base.Initialize();
return;
component.TargetStation = _random.Pick(eligible);
+ component.OperationName = _randomMetadata.GetRandomFromSegments(new List<string> {OperationPrefixDataset, OperationSuffixDataset}, " ");
var filter = Filter.Empty();
var query = EntityQueryEnumerator<NukeOperativeComponent, ActorComponent>();
}
}
+ /// <summary>
+ /// Display a greeting message and play a sound for a nukie
+ /// </summary>
+ private void NotifyNukie(ICommonSession session, NukeOperativeComponent nukeop, NukeopsRuleComponent nukeopsRule)
+ {
+ if (nukeopsRule.TargetStation is not { } station)
+ return;
+
+ _chatManager.DispatchServerMessage(session, Loc.GetString("nukeops-welcome", ("station", station), ("name", nukeopsRule.OperationName)));
+ _audio.PlayGlobal(nukeop.GreetSoundNotification, session);
+ }
+
+
private void SpawnOperativesForGhostRoles(EntityUid uid, NukeopsRuleComponent? component = null)
{
if (!Resolve(uid, ref component))
SpawnOperatives(numNukies, operatives, true, component);
}
- /// <summary>
- /// Display a greeting message and play a sound for a nukie
- /// </summary>
- private void NotifyNukie(ICommonSession session, NukeOperativeComponent nukeop, NukeopsRuleComponent nukeopsRule)
- {
- if (nukeopsRule.TargetStation is not { } station)
- return;
-
- _chatManager.DispatchServerMessage(session, Loc.GetString("nukeops-welcome", ("station", station)));
- _audio.PlayGlobal(nukeop.GreetSoundNotification, session);
- }
-
//For admins forcing someone to nukeOps.
public void MakeLoneNukie(EntityUid mindId, MindComponent mind)
{