diff --git a/Content.Server/GameTicking/Rules/Components/NukeopsRuleComponent.cs b/Content.Server/GameTicking/Rules/Components/NukeopsRuleComponent.cs index 02a9a6de57..c66161d92e 100644 --- a/Content.Server/GameTicking/Rules/Components/NukeopsRuleComponent.cs +++ b/Content.Server/GameTicking/Rules/Components/NukeopsRuleComponent.cs @@ -1,4 +1,3 @@ -using Content.Server._DV.Antag; // DeltaV using Content.Server.RoundEnd; using Content.Shared.Dataset; using Content.Shared.NPC.Prototypes; @@ -9,7 +8,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; namespace Content.Server.GameTicking.Rules.Components; -[RegisterComponent, Access(typeof(NukeopsRuleSystem), typeof(NukieOperationSystem))] // DeltaV - Auto war declare +[RegisterComponent, Access(typeof(NukeopsRuleSystem))] public sealed partial class NukeopsRuleComponent : Component { /// diff --git a/Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs b/Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs index ae6e903423..d656039d21 100644 --- a/Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs @@ -404,7 +404,7 @@ public sealed class NukeopsRuleSystem : GameRuleSystem return WarConditionStatus.YesWar; } - public void DistributeExtraTc(Entity nukieRule) // DeltaV - Public so our war can work + private void DistributeExtraTc(Entity nukieRule) { var enumerator = EntityQueryEnumerator(); while (enumerator.MoveNext(out var uid, out var component)) diff --git a/Content.Server/_DV/Antag/NukieAutoWarComponent.cs b/Content.Server/_DV/Antag/NukieAutoWarComponent.cs deleted file mode 100644 index e03d1b54a6..0000000000 --- a/Content.Server/_DV/Antag/NukieAutoWarComponent.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Content.Server._DV.Antag; - -[RegisterComponent, Access(typeof(NukieOperationSystem)), AutoGenerateComponentPause] -public sealed partial class NukieAutoWarComponent : Component -{ - /// - /// Automatically calls war after set time. - /// - [DataField, AutoPausedField] - public TimeSpan AutoWarCallTime; -} diff --git a/Content.Server/_DV/Antag/NukieOperationSystem.cs b/Content.Server/_DV/Antag/NukieOperationSystem.cs index 37b151b255..1d3da1ca3f 100644 --- a/Content.Server/_DV/Antag/NukieOperationSystem.cs +++ b/Content.Server/_DV/Antag/NukieOperationSystem.cs @@ -1,29 +1,20 @@ using Content.Server.Antag; -using Content.Server.Chat.Systems; -using Content.Server.GameTicking.Rules; -using Content.Server.GameTicking.Rules.Components; using Content.Server.Objectives; using Content.Shared._DV.FeedbackOverwatch; using Content.Shared.Mind; using Content.Shared.Random.Helpers; -using Robust.Shared.Audio; using Robust.Shared.Prototypes; using Robust.Shared.Random; -using Robust.Shared.Timing; namespace Content.Server._DV.Antag; public sealed class NukieOperationSystem : EntitySystem { - [Dependency] private readonly ChatSystem _chat = default!; - [Dependency] private readonly IGameTiming _time = default!; - [Dependency] private readonly IPrototypeManager _proto = default!; [Dependency] private readonly IRobustRandom _random = default!; - [Dependency] private readonly NukeopsRuleSystem _nukeops = default!; - [Dependency] private readonly ObjectivesSystem _objectives = default!; - [Dependency] private readonly SharedFeedbackOverwatchSystem _feedback = default!; [Dependency] private readonly SharedMindSystem _mind = default!; - + [Dependency] private readonly ObjectivesSystem _objectives = default!; + [Dependency] private readonly IPrototypeManager _proto = default!; + [Dependency] private readonly SharedFeedbackOverwatchSystem _feedback = default!; public override void Initialize() { base.Initialize(); @@ -32,29 +23,6 @@ public sealed class NukieOperationSystem : EntitySystem SubscribeLocalEvent(OnNukeCodePaperWritingEvent); } - /// - /// This runs the automatic war declaration, distributes TC, and makes sure it only happens when it's not hostage ops. - /// - public override void Update(float frameTime) - { - base.Update(frameTime); - - var query = EntityQueryEnumerator(); - while (query.MoveNext(out var uid, out var comp)) - { - if (_time.CurTime < comp.AutoWarCallTime) - continue; - - RemCompDeferred(uid); - var nukeops = Comp(uid); - nukeops.WarDeclaredTime = _time.CurTime; - _nukeops.DistributeExtraTc((uid, nukeops)); - _chat.DispatchGlobalAnnouncement(Loc.GetString("nuke-ops-auto-war-message"), - Loc.GetString("chat-manager-sender-announcement"), - true, new SoundPathSpecifier("/Audio/Announcements/war.ogg"), Color.DarkRed); - } - } - private void OnAntagSelected(Entity ent, ref AfterAntagEntitySelectedEvent args) { // Yes this is bad, but I couldn't easily find an event that would work. @@ -86,11 +54,6 @@ public sealed class NukieOperationSystem : EntitySystem if (objectiveProto.Id == "KidnapHeadsObjective") _feedback.SendPopupMind(mindId, "NukieHostageRoundStartPopup"); } - if (chosenOp.AutoWarAfter is { } duration) - { - var autoWar = EnsureComp(ent); - autoWar.AutoWarCallTime = _time.CurTime + duration; - } } private void OnNukeCodePaperWritingEvent(ref GetNukeCodePaperWriting ev) diff --git a/Content.Shared/_DV/Antag/NukieOperationPrototype.cs b/Content.Shared/_DV/Antag/NukieOperationPrototype.cs index 0751469ffa..b800cdc479 100644 --- a/Content.Shared/_DV/Antag/NukieOperationPrototype.cs +++ b/Content.Shared/_DV/Antag/NukieOperationPrototype.cs @@ -17,10 +17,4 @@ public sealed partial class NukieOperationPrototype : IPrototype [DataField] public LocId? NukeCodePaperOverride; - - /// - /// If non-null, calls war after the given duration - /// - [DataField] - public TimeSpan? AutoWarAfter; } diff --git a/Resources/Locale/en-US/_DV/nukie-operations/autowar.ftl b/Resources/Locale/en-US/_DV/nukie-operations/autowar.ftl deleted file mode 100644 index 4c2823d1ea..0000000000 --- a/Resources/Locale/en-US/_DV/nukie-operations/autowar.ftl +++ /dev/null @@ -1,3 +0,0 @@ -# Played when war is automatically called - -nuke-ops-auto-war-message = Our intelligence indicates that a hostile boarding party is enroute to your location. diff --git a/Resources/Prototypes/_DV/Objectives/nukies.yml b/Resources/Prototypes/_DV/Objectives/nukies.yml index d57716f15e..b50fd7c606 100644 --- a/Resources/Prototypes/_DV/Objectives/nukies.yml +++ b/Resources/Prototypes/_DV/Objectives/nukies.yml @@ -4,7 +4,6 @@ id: NukieOperations weights: NukieOperationDestroyStation: 1 - NukieOperationDestroyStationWar: 1 # NukieOperationKidnapHeads: 1 - type: nukieOperation @@ -12,12 +11,6 @@ operationObjectives: - NukeStationObjective -- type: nukieOperation - id: NukieOperationDestroyStationWar - autoWarAfter: 120 - operationObjectives: - - NukeStationObjective - - type: nukieOperation id: NukieOperationKidnapHeads operationObjectives: