Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nuke centcom #324

Merged
merged 3 commits into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ public enum WinCondition : byte
NukeExplodedOnCorrectStation,
NukeExplodedOnNukieOutpost,
NukeExplodedOnIncorrectLocation,
NukeExplodedOnCentComLocation, // backmen: centcom
NukeActiveInStation,
NukeActiveAtCentCom,
NukeDiskOnCentCom,
Expand Down
16 changes: 15 additions & 1 deletion Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public sealed class NukeopsRuleSystem : GameRuleSystem<NukeopsRuleComponent>
[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<CurrencyPrototype>]
private const string TelecrystalCurrencyPrototype = "Telecrystal";
Expand Down Expand Up @@ -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;
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ nukeops-no-one-ready = Нет готовых игроков! Нельзя зап
nukeops-role-commander = Командир
nukeops-role-agent = Агент
nukeops-role-operator = Оператор



nukeops-cond-nukeexplodedoncentcomlocation = Ядерным оперативникам удалось взорвать центральное командование.
12 changes: 12 additions & 0 deletions Resources/Prototypes/Backmen/Adminbuse/centFifa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
groups:
- AllAccess
- CentCom
- MTFLeader

# AI door remotes
# All access door remote
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
groups:
- AllAccess
- CentCom
- MTFLeader
tags:
- NuclearOperative
- SyndicateAgent
Expand Down
Loading