Syndicate traitors can now purchase nuke codes (#26280)

This commit is contained in:
chromiumboy 2024-03-19 23:16:27 -05:00 committed by NullWanderer
parent f21b2275b4
commit e0ad8c0da0
No known key found for this signature in database
GPG Key ID: 65CF92BD1D26F4AC
3 changed files with 36 additions and 1 deletions

View File

@ -1,4 +1,6 @@
using Content.Server.Store.Components;
using Content.Server.Paper;
using Content.Server.Store.Components;
using Content.Shared.UserInterface;
using Robust.Shared.Containers;
namespace Content.Server.Store.Systems;
@ -11,6 +13,17 @@ public sealed partial class StoreSystem
SubscribeLocalEvent<StoreRefundComponent, EntityTerminatingEvent>(OnRefundTerminating);
SubscribeLocalEvent<StoreRefundComponent, EntRemovedFromContainerMessage>(OnEntityRemoved);
SubscribeLocalEvent<StoreRefundComponent, EntInsertedIntoContainerMessage>(OnEntityInserted);
SubscribeLocalEvent<StoreRefundComponent, BeforeActivatableUIOpenEvent>(BeforeUIOpen);
}
private void BeforeUIOpen(EntityUid uid, StoreRefundComponent component, BeforeActivatableUIOpenEvent args)
{
if (component.StoreEntity == null || _actions.TryGetActionData(uid, out _) || !TryComp<StoreComponent>(component.StoreEntity.Value, out var storeComp))
return;
if (!TryComp<PaperComponent>(uid, out var paper) || string.IsNullOrEmpty(paper.Content))
return;
DisableRefund(component.StoreEntity.Value, storeComp);
}
private void OnEntityRemoved(EntityUid uid, StoreRefundComponent component, EntRemovedFromContainerMessage args)

View File

@ -160,6 +160,9 @@ uplink-syndicate-weapon-module-desc = This module will give a cyborg advanced la
uplink-singularity-beacon-name = Singularity Beacon
uplink-singularity-beacon-desc = A device that attracts singularities. Has to be anchored and powered. Causes singularities to grow when consumed.
uplink-nuke-code-paper-name = Stolen nuclear authentication codes
uplink-nuke-code-paper-desc = A slip of paper with the authentication codes for a nearby nuclear fission explosive device.
# Implants
uplink-storage-implanter-name = Storage Implanter
uplink-storage-implanter-desc = Hide goodies inside of yourself with new bluespace technology!

View File

@ -860,6 +860,25 @@
categories:
- UplinkDisruption
- type: listing
id: UplinkNukeCodePaper
name: uplink-nuke-code-paper-name
description: uplink-nuke-code-paper-desc
productEntity: NukeCodePaper
cost:
Telecrystal: 2
categories:
- UplinkDisruption
conditions:
- !type:StoreWhitelistCondition
blacklist:
tags:
- NukeOpsUplink
- !type:BuyerWhitelistCondition
blacklist:
components:
- SurplusBundle
# Allies
#- type: listing