Revert "Return of warops" (#3807)

Revert "Return of warops (#3561)"

This reverts commit ac1604d0bc.
This commit is contained in:
Avalon 2025-05-21 01:14:47 -04:00 committed by GitHub
parent 7e28ec2455
commit b94cf51f0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 5 additions and 70 deletions

View File

@ -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
{
/// <summary>

View File

@ -404,7 +404,7 @@ public sealed class NukeopsRuleSystem : GameRuleSystem<NukeopsRuleComponent>
return WarConditionStatus.YesWar;
}
public void DistributeExtraTc(Entity<NukeopsRuleComponent> nukieRule) // DeltaV - Public so our war can work
private void DistributeExtraTc(Entity<NukeopsRuleComponent> nukieRule)
{
var enumerator = EntityQueryEnumerator<StoreComponent>();
while (enumerator.MoveNext(out var uid, out var component))

View File

@ -1,11 +0,0 @@
namespace Content.Server._DV.Antag;
[RegisterComponent, Access(typeof(NukieOperationSystem)), AutoGenerateComponentPause]
public sealed partial class NukieAutoWarComponent : Component
{
/// <summary>
/// Automatically calls war after set time.
/// </summary>
[DataField, AutoPausedField]
public TimeSpan AutoWarCallTime;
}

View File

@ -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<GetNukeCodePaperWriting>(OnNukeCodePaperWritingEvent);
}
/// <summary>
/// This runs the automatic war declaration, distributes TC, and makes sure it only happens when it's not hostage ops.
/// </summary>
public override void Update(float frameTime)
{
base.Update(frameTime);
var query = EntityQueryEnumerator<NukieAutoWarComponent>();
while (query.MoveNext(out var uid, out var comp))
{
if (_time.CurTime < comp.AutoWarCallTime)
continue;
RemCompDeferred<NukieAutoWarComponent>(uid);
var nukeops = Comp<NukeopsRuleComponent>(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<NukieOperationComponent> 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<NukieAutoWarComponent>(ent);
autoWar.AutoWarCallTime = _time.CurTime + duration;
}
}
private void OnNukeCodePaperWritingEvent(ref GetNukeCodePaperWriting ev)

View File

@ -17,10 +17,4 @@ public sealed partial class NukieOperationPrototype : IPrototype
[DataField]
public LocId? NukeCodePaperOverride;
/// <summary>
/// If non-null, calls war after the given duration
/// </summary>
[DataField]
public TimeSpan? AutoWarAfter;
}

View File

@ -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.

View File

@ -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: