фиксы апстрима
This commit is contained in:
parent
0cbccf6f0e
commit
892e1cc442
6 changed files with 24 additions and 43 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Устанавливает новые доступы в соответствии с текущим кодом угрозы.
|
||||
/// Сбрасывает аварийные доступы, если не нашлось доступов при текущем коде угрозы.
|
||||
/// </summary>
|
||||
private void UpdateAccess(Entity<AccessReaderComponent> ent, Entity<AlertLevelComponent> 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();
|
||||
|
|
|
|||
|
|
@ -757,4 +757,14 @@ public sealed class AccessReaderSystem : EntitySystem
|
|||
|
||||
Dirty(ent);
|
||||
}
|
||||
|
||||
public void UpdateAccess(Entity<AccessReaderComponent> ent, string currentLevel)
|
||||
{
|
||||
if (ent.Comp.AlertAccesses.TryGetValue(currentLevel, out var value))
|
||||
ent.Comp.Group = value;
|
||||
else
|
||||
ent.Comp.Group = null;
|
||||
|
||||
Dirty(ent);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue