Skip to content

Commit

Permalink
Merge branch 'logitechdrip' of https://github.com/kushbreth/Delta-v-f…
Browse files Browse the repository at this point in the history
  • Loading branch information
kushbreth committed Jan 26, 2025
2 parents eaf698e + ef25553 commit d907c41
Show file tree
Hide file tree
Showing 416 changed files with 3,935 additions and 863 deletions.
5 changes: 5 additions & 0 deletions Content.Client/_DV/Abilities/Felinid/FelinidSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
using Content.Shared._DV.Abilities.Felinid;

namespace Content.Shared._DV.Abilities.Felinid;

public sealed class FelinidSystem : SharedFelinidSystem;
10 changes: 10 additions & 0 deletions Content.Server/Chemistry/EntitySystems/InjectorSystem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Content.Server.Body.Components;
using Content.Server.Body.Systems;
using Content.Shared._DV.Chemistry.Components; // DeltaV
using Content.Shared.Chemistry;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Components.SolutionManager;
Expand Down Expand Up @@ -108,6 +109,12 @@ private void OnInjectorAfterInteract(Entity<InjectorComponent> entity, ref After
/// </summary>
private void InjectDoAfter(Entity<InjectorComponent> injector, EntityUid target, EntityUid user)
{
if (HasComp<BlockInjectionComponent>(target)) // DeltaV
{
Popup.PopupEntity(Loc.GetString("injector-component-deny-user"), target, user);
return;
}

// Create a pop-up for the user
if (injector.Comp.ToggleState == InjectorToggleMode.Draw)
{
Expand Down Expand Up @@ -253,6 +260,9 @@ private bool TryInjectIntoBloodstream(Entity<InjectorComponent> injector, Entity
private bool TryInject(Entity<InjectorComponent> injector, EntityUid targetEntity,
Entity<SolutionComponent> targetSolution, EntityUid user, bool asRefill)
{
if (HasComp<BlockInjectionComponent>(targetEntity)) // DeltaV
return false;

if (!SolutionContainers.TryGetSolution(injector.Owner, injector.Comp.SolutionName, out var soln,
out var solution) || solution.Volume == 0)
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,6 @@ public enum WinCondition : byte
NukiesAbandoned,
AllNukiesDead,
SomeNukiesAlive,
AllNukiesAlive
AllNukiesAlive,
NukiesKidnappedHeads, // DeltaV - Hostage ops
}
35 changes: 34 additions & 1 deletion Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using Content.Server._DV.Objectives.Components; // DeltaV
using Content.Server._DV.Objectives.Systems; // DeltaV
using Content.Server.Antag;
using Content.Server.Communications;
using Content.Server.GameTicking.Rules.Components;
Expand Down Expand Up @@ -37,6 +39,8 @@ public sealed class NukeopsRuleSystem : GameRuleSystem<NukeopsRuleComponent>
[Dependency] private readonly RoundEndSystem _roundEndSystem = default!;
[Dependency] private readonly StoreSystem _store = default!;
[Dependency] private readonly TagSystem _tag = default!;
[Dependency] private readonly KidnapHeadsConditionSystem _kidnap = default!; // DeltaV
[Dependency] private readonly SharedMapSystem _map = default!; // DeltaV

[ValidatePrototypeId<CurrencyPrototype>]
private const string TelecrystalCurrencyPrototype = "Telecrystal";
Expand All @@ -49,6 +53,7 @@ public override void Initialize()
base.Initialize();

SubscribeLocalEvent<NukeExplodedEvent>(OnNukeExploded);
SubscribeLocalEvent<NukeOpsShuttleComponent, FTLCompletedEvent>(OnFTLCompleted); // DeltaV - Kidnap heads objective
SubscribeLocalEvent<GameRunLevelChangedEvent>(OnRunLevelChanged);
SubscribeLocalEvent<NukeDisarmSuccessEvent>(OnNukeDisarm);

Expand Down Expand Up @@ -156,6 +161,34 @@ private void OnNukeExploded(NukeExplodedEvent ev)
}
}

// DeltaV - Kidnap heads nukie objective
private void OnFTLCompleted(Entity<NukeOpsShuttleComponent> ent, ref FTLCompletedEvent args)
{
var query = QueryActiveRules();
while (query.MoveNext(out var uid, out _, out var nukeops, out _))
{
// Get the nukie outpost map.
if (!TryComp<RuleGridsComponent>(uid, out var ruleGridsComp) || ruleGridsComp.Map == null)
return;

// Make sure your on the same map as the nukie outposts map.
if (args.MapUid == _map.GetMap(ruleGridsComp.Map.Value))
{
// Now check of the kidnap heads objective is complete... (Yes this is suspect)
var objectives = EntityQueryEnumerator<KidnapHeadsConditionComponent>();
if (!objectives.MoveNext(out var objUid, out var kidnapHeads)) // No kidnap head objectives
return;

if (!_kidnap.IsCompleted((objUid, kidnapHeads)))
return;

nukeops.WinConditions.Add(WinCondition.NukiesKidnappedHeads);
SetWinType((uid, nukeops), WinType.OpsMajor);
_roundEndSystem.EndRound();
}
}
}

private void OnRunLevelChanged(GameRunLevelChangedEvent ev)
{
if (ev.New is not GameRunLevel.PostRound)
Expand Down Expand Up @@ -487,7 +520,7 @@ private void OnAfterAntagEntSelected(Entity<NukeopsRuleComponent> ent, ref After
private void OnGetBriefing(Entity<NukeopsRoleComponent> role, ref GetBriefingEvent args)
{
// TODO Different character screen briefing for the 3 nukie types
args.Append(Loc.GetString("nukeops-briefing"));
// args.Append(Loc.GetString("nukeops-briefing")); Delta-V - Nukie operations take care of this.
}

/// <remarks>
Expand Down
11 changes: 11 additions & 0 deletions Content.Server/Nuke/NukeCodePaperSystem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Diagnostics.CodeAnalysis;
using Content.Server._DV.Antag; // DeltaV
using Content.Server.Chat.Systems;
using Content.Server.Fax;
using Content.Shared.Fax.Components;
Expand Down Expand Up @@ -35,6 +36,16 @@ private void SetupPaper(EntityUid uid, NukeCodePaperComponent? component = null,
if (!Resolve(uid, ref component))
return;

// DeltaV - Not the best way of doing this
var evnt = new GetNukeCodePaperWriting();
RaiseLocalEvent(ref evnt);
if (evnt.ToWrite != null)
{
if (TryComp<PaperComponent>(uid, out var deltavpaperComp))
_paper.SetContent((uid, deltavpaperComp), evnt.ToWrite);
return;
}
// DeltaV - End
if (TryGetRelativeNukeCode(uid, out var paperContent, station, onlyCurrentStation: component.AllNukesAvailable))
{
if (TryComp<PaperComponent>(uid, out var paperComp))
Expand Down

This file was deleted.

36 changes: 0 additions & 36 deletions Content.Server/Nyanotrasen/Abilities/Felinid/FelinidComponent.cs

This file was deleted.

This file was deleted.

195 changes: 0 additions & 195 deletions Content.Server/Nyanotrasen/Abilities/Felinid/FelinidSystem.cs

This file was deleted.

This file was deleted.

Loading

0 comments on commit d907c41

Please sign in to comment.