From b36cb8d8733adef497470c0e40424a543cc5f7d7 Mon Sep 17 00:00:00 2001 From: Zack Backmen Date: Sun, 12 Nov 2023 23:12:25 +0300 Subject: [PATCH 1/2] nuke centcom --- .../Rules/Components/NukeopsRuleComponent.cs | 1 + .../GameTicking/Rules/NukeopsRuleSystem.cs | 16 +++++++++++++++- .../game-ticking/game-presets/preset-nukeops.ftl | 3 +++ .../game-ticking/game-presets/preset-nukeops.ftl | 4 ++++ 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/Content.Server/GameTicking/Rules/Components/NukeopsRuleComponent.cs b/Content.Server/GameTicking/Rules/Components/NukeopsRuleComponent.cs index 55c14f88d4e..26bbd647ef8 100644 --- a/Content.Server/GameTicking/Rules/Components/NukeopsRuleComponent.cs +++ b/Content.Server/GameTicking/Rules/Components/NukeopsRuleComponent.cs @@ -220,6 +220,7 @@ public enum WinCondition : byte NukeExplodedOnCorrectStation, NukeExplodedOnNukieOutpost, NukeExplodedOnIncorrectLocation, + NukeExplodedOnCentComLocation, // backmen: centcom NukeActiveInStation, NukeActiveAtCentCom, NukeDiskOnCentCom, diff --git a/Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs b/Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs index a86bc855de0..074ffc36dd3 100644 --- a/Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs @@ -81,6 +81,7 @@ public sealed class NukeopsRuleSystem : GameRuleSystem [Dependency] private readonly StoreSystem _store = default!; [Dependency] private readonly TagSystem _tag = default!; [Dependency] private readonly WarDeclaratorSystem _warDeclarator = default!; + [Dependency] private readonly Backmen.Arrivals.CentcommSystem _centcommSystem = default!; [ValidatePrototypeId] private const string TelecrystalCurrencyPrototype = "Telecrystal"; @@ -273,8 +274,19 @@ private void OnNukeExploded(NukeExplodedEvent ev) if (TryComp(nukeops.TargetStation, out StationDataComponent? data)) { var correctStation = false; + var centcomStation = false; // backmen: centcom foreach (var grid in data.Grids) { + // start-backmen: centcom + if (_centcommSystem.CentComGrid == grid) + { + nukeops.WinConditions.Add(WinCondition.NukeExplodedOnCentComLocation); + SetWinType(uid, WinType.OpsMajor, nukeops); + centcomStation = true; + break; + } + // end-backmen: centcom + if (grid != ev.OwningStation) { continue; @@ -285,10 +297,12 @@ private void OnNukeExploded(NukeExplodedEvent ev) correctStation = true; } - if (correctStation) + if (correctStation || centcomStation) // backmen: centcom continue; } + + nukeops.WinConditions.Add(WinCondition.NukeExplodedOnIncorrectLocation); } else diff --git a/Resources/Locale/en-US/game-ticking/game-presets/preset-nukeops.ftl b/Resources/Locale/en-US/game-ticking/game-presets/preset-nukeops.ftl index 68646881572..d3d049a8895 100644 --- a/Resources/Locale/en-US/game-ticking/game-presets/preset-nukeops.ftl +++ b/Resources/Locale/en-US/game-ticking/game-presets/preset-nukeops.ftl @@ -32,3 +32,6 @@ nukeops-no-one-ready = No players readied up! Can't start Nukeops. nukeops-role-commander = Commander nukeops-role-agent = Agent nukeops-role-operator = Operator + + +nukeops-cond-nukeexplodedoncentcomlocation = The nuclear operatives managed to blow up the Central Command. diff --git a/Resources/Locale/ru-RU/game-ticking/game-presets/preset-nukeops.ftl b/Resources/Locale/ru-RU/game-ticking/game-presets/preset-nukeops.ftl index 584bde4c260..4692d98901d 100644 --- a/Resources/Locale/ru-RU/game-ticking/game-presets/preset-nukeops.ftl +++ b/Resources/Locale/ru-RU/game-ticking/game-presets/preset-nukeops.ftl @@ -27,3 +27,7 @@ nukeops-no-one-ready = Нет готовых игроков! Нельзя зап nukeops-role-commander = Командир nukeops-role-agent = Агент nukeops-role-operator = Оператор + + + +nukeops-cond-nukeexplodedoncentcomlocation = Ядерным оперативникам удалось взорвать центральное командование. From 6787e5b1af52428c313af21a58514aab6b9c1fc3 Mon Sep 17 00:00:00 2001 From: Kayzel Date: Wed, 15 Nov 2023 00:31:52 +0300 Subject: [PATCH 2/2] some fixes(from pr 328) --- Resources/Prototypes/Backmen/Adminbuse/centFifa.yml | 12 ++++++++++++ .../Backmen/Entities/Objects/Devices/door_remote.yml | 1 + .../Prototypes/Entities/Mobs/Player/admin_ghost.yml | 1 + 3 files changed, 14 insertions(+) diff --git a/Resources/Prototypes/Backmen/Adminbuse/centFifa.yml b/Resources/Prototypes/Backmen/Adminbuse/centFifa.yml index 2b702b2c254..f14d5ffbc4f 100644 --- a/Resources/Prototypes/Backmen/Adminbuse/centFifa.yml +++ b/Resources/Prototypes/Backmen/Adminbuse/centFifa.yml @@ -2076,6 +2076,12 @@ makeSentient: true name: Ядерный оперативник description: GET DAT FUKKEN DISK + requirements: + - !type:DepartmentTimeRequirement + department: Security + time: 18000 + - !type:OverallPlaytimeRequirement + time: 36000 - type: NukeOperative - type: Loadout prototypes: [SyndicateOperativeGearFull] @@ -2107,6 +2113,12 @@ makeSentient: true name: Ядерный оперативник description: GET DAT FUKKEN DISK + requirements: + - !type:DepartmentTimeRequirement + department: Security + time: 18000 + - !type:OverallPlaytimeRequirement + time: 36000 - type: NukeOperative - type: Loadout prototypes: [SyndicateOperativeMedicFull] diff --git a/Resources/Prototypes/Backmen/Entities/Objects/Devices/door_remote.yml b/Resources/Prototypes/Backmen/Entities/Objects/Devices/door_remote.yml index e8b0ea75f5d..d827a8c3264 100644 --- a/Resources/Prototypes/Backmen/Entities/Objects/Devices/door_remote.yml +++ b/Resources/Prototypes/Backmen/Entities/Objects/Devices/door_remote.yml @@ -32,6 +32,7 @@ groups: - AllAccess - CentCom + - MTFLeader # AI door remotes # All access door remote diff --git a/Resources/Prototypes/Entities/Mobs/Player/admin_ghost.yml b/Resources/Prototypes/Entities/Mobs/Player/admin_ghost.yml index 5b0dafcaf38..ed5886524a1 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/admin_ghost.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/admin_ghost.yml @@ -28,6 +28,7 @@ groups: - AllAccess - CentCom + - MTFLeader tags: - NuclearOperative - SyndicateAgent