From 892e1cc4422878a129288969d134c95e36ffd869 Mon Sep 17 00:00:00 2001 From: Vigers Ray Date: Mon, 9 Jun 2025 03:42:18 +0300 Subject: [PATCH] =?UTF-8?q?=D1=84=D0=B8=D0=BA=D1=81=D1=8B=20=D0=B0=D0=BF?= =?UTF-8?q?=D1=81=D1=82=D1=80=D0=B8=D0=BC=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Systems/ChameleonClothingSystem.cs | 2 ++ .../ExtendedAccess/ExtendedAccessSystem.cs | 21 +++---------------- .../Access/Systems/AccessReaderSystem.cs | 10 +++++++++ .../Prototypes/Catalog/uplink_catalog.yml | 11 ++++++++-- .../_Sunrise/Catalog/uplink_catalog.yml | 17 --------------- Resources/Prototypes/tags.yml | 6 ------ 6 files changed, 24 insertions(+), 43 deletions(-) diff --git a/Content.Client/Clothing/Systems/ChameleonClothingSystem.cs b/Content.Client/Clothing/Systems/ChameleonClothingSystem.cs index ae4264db60..fc6583e920 100644 --- a/Content.Client/Clothing/Systems/ChameleonClothingSystem.cs +++ b/Content.Client/Clothing/Systems/ChameleonClothingSystem.cs @@ -11,6 +11,8 @@ namespace Content.Client.Clothing.Systems; // All valid items for chameleon are calculated on client startup and stored in dictionary. public sealed class ChameleonClothingSystem : SharedChameleonClothingSystem { + [Dependency] private readonly IPrototypeManager _proto = default!; + public override void Initialize() { base.Initialize(); diff --git a/Content.Server/_Sunrise/ExtendedAccess/ExtendedAccessSystem.cs b/Content.Server/_Sunrise/ExtendedAccess/ExtendedAccessSystem.cs index d5787af878..82731fa4be 100644 --- a/Content.Server/_Sunrise/ExtendedAccess/ExtendedAccessSystem.cs +++ b/Content.Server/_Sunrise/ExtendedAccess/ExtendedAccessSystem.cs @@ -2,6 +2,7 @@ using Content.Server.AlertLevel; using Content.Server.Chat.Systems; using Content.Shared.Access.Components; +using Content.Shared.Access.Systems; using Content.Shared.GameTicking; using Content.Shared.Station.Components; using Timer = Robust.Shared.Timing.Timer; @@ -11,6 +12,7 @@ namespace Content.Server._Sunrise.ExtendedAccess; public sealed class ExtendedAccessSystem : EntitySystem { [Dependency] private readonly ChatSystem _chat = default!; + [Dependency] private readonly AccessReaderSystem _accessReader = default!; private static CancellationTokenSource _token = new(); @@ -85,27 +87,10 @@ public sealed class ExtendedAccessSystem : EntitySystem if (reader.AlertAccesses.Count == 0) continue; - UpdateAccess((uid, reader), station); + _accessReader.UpdateAccess((uid, reader), station.Comp.CurrentLevel); } } - /// - /// Устанавливает новые доступы в соответствии с текущим кодом угрозы. - /// Сбрасывает аварийные доступы, если не нашлось доступов при текущем коде угрозы. - /// - private void UpdateAccess(Entity ent, Entity station) - { - if (station.Comp.AlertLevels == null) - return; - - if (ent.Comp.AlertAccesses.TryGetValue(station.Comp.CurrentLevel, out var value)) - ent.Comp.Group = value; - else - ent.Comp.Group = null; - - Dirty(ent); - } - private static void RecreateToken() { _token.Cancel(); diff --git a/Content.Shared/Access/Systems/AccessReaderSystem.cs b/Content.Shared/Access/Systems/AccessReaderSystem.cs index ae96161d82..9de9280e6c 100644 --- a/Content.Shared/Access/Systems/AccessReaderSystem.cs +++ b/Content.Shared/Access/Systems/AccessReaderSystem.cs @@ -757,4 +757,14 @@ public sealed class AccessReaderSystem : EntitySystem Dirty(ent); } + + public void UpdateAccess(Entity ent, string currentLevel) + { + if (ent.Comp.AlertAccesses.TryGetValue(currentLevel, out var value)) + ent.Comp.Group = value; + else + ent.Comp.Group = null; + + Dirty(ent); + } } diff --git a/Resources/Prototypes/Catalog/uplink_catalog.yml b/Resources/Prototypes/Catalog/uplink_catalog.yml index 48d6c8326a..2119d4fd86 100644 --- a/Resources/Prototypes/Catalog/uplink_catalog.yml +++ b/Resources/Prototypes/Catalog/uplink_catalog.yml @@ -614,6 +614,13 @@ Telecrystal: 3 categories: - UplinkAmmo + # Sunrise-Start + conditions: + - !type:StoreWhitelistCondition + blacklist: + tags: + - AssaultOpsUplink + # Sunrise-End # For the Cobra - type: listing @@ -707,14 +714,14 @@ cost: Telecrystal: 6 categories: - - UplinkChemicals + - UplinkChemicals # Sunrise-Start conditions: - !type:StoreWhitelistCondition blacklist: tags: - SubdermalImplant - - NukeOpsUplink + - NukeOpsUplink # Sunrise-End - type: listing diff --git a/Resources/Prototypes/_Sunrise/Catalog/uplink_catalog.yml b/Resources/Prototypes/_Sunrise/Catalog/uplink_catalog.yml index 692047cdd7..a9db793388 100644 --- a/Resources/Prototypes/_Sunrise/Catalog/uplink_catalog.yml +++ b/Resources/Prototypes/_Sunrise/Catalog/uplink_catalog.yml @@ -69,23 +69,6 @@ tags: - NukeOpsUplink -# For the Buldog -- type: listing - id: UplinkMagazineShotgunSlug - name: uplink-magazine-shotgun-name - description: uplink-magazine-shotgun-desc - icon: { sprite: /Textures/Objects/Weapons/Guns/Ammunition/Magazine/Shotgun/m12.rsi, state: slug } - productEntity: MagazineShotgunSlug - cost: - Telecrystal: 2 - categories: - - UplinkAmmo - conditions: - - !type:StoreWhitelistCondition - blacklist: - tags: - - AssaultOpsUplink - - type: listing id: UplinkMagazineShotgun name: uplink-magazine-shotgun-name diff --git a/Resources/Prototypes/tags.yml b/Resources/Prototypes/tags.yml index e6e6704f41..5b6db51f9f 100644 --- a/Resources/Prototypes/tags.yml +++ b/Resources/Prototypes/tags.yml @@ -30,9 +30,6 @@ - type: Tag id: AppraisalTool -- type: Tag #Sunrise-Edit - id: Apron #Sunrise-Edit - - type: Tag id: Apron @@ -1413,9 +1410,6 @@ - type: Tag id: UraniumGlassShard -- type: Tag #Sunrise-Edit - id: UtilityBelt #Sunrise-Edit - - type: Tag id: UtilityBelt