- tweak: No meaty ores during nukie war. (#276)

This commit is contained in:
Aviu00
2024-04-08 03:22:39 +09:00
committed by GitHub
parent 4dc14d2105
commit 3d15c80a23

View File

@@ -12,6 +12,8 @@ using Content.Server.Popups;
using Content.Server.Store.Components;
using Content.Server.Store.Systems;
using Content.Server._White.Sponsors;
using Content.Server.GameTicking;
using Content.Server.GameTicking.Rules.Components;
using Content.Shared.FixedPoint;
using Content.Shared.GameTicking;
using Content.Shared.Humanoid;
@@ -49,9 +51,9 @@ public sealed class MeatyOreStoreSystem : EntitySystem
[Dependency] private readonly SponsorsManager _sponsorsManager = default!;
[Dependency] private readonly PvsOverrideSystem _pvsOverrideSystem = default!;
[Dependency] private readonly RoleSystem _roleSystem = default!;
[Dependency] private readonly MindSystem _mindSystem = default!;
[Dependency] private readonly SharedJobSystem _jobSystem = default!;
[Dependency] private readonly PopupSystem _popupSystem = default!;
[Dependency] private readonly GameTicker _gameTicker = default!;
private HttpClient _httpClient = default!;
@@ -221,7 +223,11 @@ public sealed class MeatyOreStoreSystem : EntitySystem
return;
var fake = _roleSystem.MindIsAntagonist(targetMind.Mind.Value) || !_jobSystem.CanBeAntag(mindComponent.Session);
var fake = _roleSystem.MindIsAntagonist(targetMind.Mind.Value)
|| !_jobSystem.CanBeAntag(mindComponent.Session)
// If nukeops declared war
|| _gameTicker.GetActiveGameRules().Any(x =>
TryComp(x, out NukeopsRuleComponent? nukeops) && nukeops.WarDeclaredTime != null);
var ckey = userActorComponent.PlayerSession.Name;
var grant = user == target;