diff --git a/Content.Server/Atmos/Piping/Binary/EntitySystems/GasPressurePumpSystem.cs b/Content.Server/Atmos/Piping/Binary/EntitySystems/GasPressurePumpSystem.cs index 49b69fc6739..ccbfa66cebd 100644 --- a/Content.Server/Atmos/Piping/Binary/EntitySystems/GasPressurePumpSystem.cs +++ b/Content.Server/Atmos/Piping/Binary/EntitySystems/GasPressurePumpSystem.cs @@ -9,6 +9,7 @@ using Content.Shared.Atmos.Piping; using Content.Shared.Atmos.Piping.Binary.Components; using Content.Shared.Audio; +using Content.Shared.CombatMode.Pacification; //A-13 Eblan system update using Content.Shared.Database; using Content.Shared.Examine; using Content.Shared.Interaction; @@ -108,6 +109,14 @@ private void OnPumpActivate(EntityUid uid, GasPressurePumpComponent pump, Activa if (!EntityManager.TryGetComponent(args.User, out ActorComponent? actor)) return; + //A-13 Eblan system update start + if (HasComp(args.User)) + { + _popup.PopupCursor(Loc.GetString("Вы не можете пока что пользоваться этим устройством, потому что, наиграли слишком мало времени"), args.User, PopupType.Large); + return; + } + //A-13 Eblan system update end + if (Transform(uid).Anchored) { _userInterfaceSystem.TryOpen(uid, GasPressurePumpUiKey.Key, actor.PlayerSession); diff --git a/Content.Server/Atmos/Piping/Binary/EntitySystems/GasValveSystem.cs b/Content.Server/Atmos/Piping/Binary/EntitySystems/GasValveSystem.cs index 934ce8a7a47..a6c1acea6a1 100644 --- a/Content.Server/Atmos/Piping/Binary/EntitySystems/GasValveSystem.cs +++ b/Content.Server/Atmos/Piping/Binary/EntitySystems/GasValveSystem.cs @@ -4,6 +4,7 @@ using Content.Server.NodeContainer.Nodes; using Content.Shared.Atmos.Piping; using Content.Shared.Audio; +using Content.Shared.CombatMode.Pacification; //A-13 Eblan system update using Content.Shared.Examine; using Content.Shared.Interaction; using JetBrains.Annotations; @@ -52,6 +53,11 @@ private void OnStartup(EntityUid uid, GasValveComponent component, ComponentStar private void OnActivate(EntityUid uid, GasValveComponent component, ActivateInWorldEvent args) { + //A-13 Eblan system update start + if (HasComp(args.User)) + return; + //A-13 Eblan system update end + Toggle(uid, component); _audio.PlayPvs(component.ValveSound, uid, AudioParams.Default.WithVariation(0.25f)); } diff --git a/Content.Server/Atmos/Piping/Unary/EntitySystems/GasCanisterSystem.cs b/Content.Server/Atmos/Piping/Unary/EntitySystems/GasCanisterSystem.cs index ad647fad1b8..c80ef51aabd 100644 --- a/Content.Server/Atmos/Piping/Unary/EntitySystems/GasCanisterSystem.cs +++ b/Content.Server/Atmos/Piping/Unary/EntitySystems/GasCanisterSystem.cs @@ -11,6 +11,7 @@ using Content.Server.Popups; using Content.Shared.Atmos; using Content.Shared.Atmos.Piping.Binary.Components; +using Content.Shared.CombatMode.Pacification; //A-13 Eblan system update using Content.Shared.Containers.ItemSlots; using Content.Shared.Database; using Content.Shared.Hands.EntitySystems; @@ -207,6 +208,11 @@ private void OnCanisterActivate(EntityUid uid, GasCanisterComponent component, A if (!TryComp(args.User, out var actor)) return; + //A-13 Eblan system update start + if (HasComp(args.User)) + return; + //A-13 Eblan system update end + if (CheckLocked(uid, component, args.User)) return; @@ -224,6 +230,11 @@ private void OnCanisterInteractHand(EntityUid uid, GasCanisterComponent componen if (!TryComp(args.User, out var actor)) return; + //A-13 Eblan system update start + if (HasComp(args.User)) + return; + //A-13 Eblan system update end + if (CheckLocked(uid, component, args.User)) return; diff --git a/Content.Server/Communications/CommunicationsConsoleSystem.cs b/Content.Server/Communications/CommunicationsConsoleSystem.cs index d0ade6b51aa..42429c82dd8 100644 --- a/Content.Server/Communications/CommunicationsConsoleSystem.cs +++ b/Content.Server/Communications/CommunicationsConsoleSystem.cs @@ -231,10 +231,7 @@ private void OnSelectAlertLevelMessage(EntityUid uid, CommunicationsConsoleCompo //A-13 Eblan system update start if (HasComp(mob)) - { - _popupSystem.PopupEntity(Loc.GetString("В данный момент вы наиграли слишком мало времени, новички не могут пользоваться консолью связи."), uid, message.Session); return; - } //A-13 Eblan system update end if (!CanUse(mob, uid)) @@ -265,10 +262,7 @@ private void OnAnnounceMessage(EntityUid uid, CommunicationsConsoleComponent com //A-13 Eblan system update start if (HasComp(mob)) - { - _popupSystem.PopupEntity(Loc.GetString("В данный момент вы наиграли слишком мало времени, новички не могут пользоваться консолью связи."), uid, message.Session); return; - } //A-13 Eblan system update end if (!CanUse(mob, uid)) diff --git a/Content.Server/Kitchen/EntitySystems/MicrowaveSystem.cs b/Content.Server/Kitchen/EntitySystems/MicrowaveSystem.cs index 6efb50b2c6a..34913d5ab98 100644 --- a/Content.Server/Kitchen/EntitySystems/MicrowaveSystem.cs +++ b/Content.Server/Kitchen/EntitySystems/MicrowaveSystem.cs @@ -294,7 +294,7 @@ private void OnInteractUsing(Entity ent, ref InteractUsingEv //A-13 Eblan system update start if (HasComp(args.User) && TryComp(args.Used, out var _)) { - _popupSystem.PopupEntity(Loc.GetString("Вы не можете вставить батарейку в микроволновку!"), ent, args.User); + _popupSystem.PopupCursor(Loc.GetString("Вы не можете вставить батарейку в микроволновку."), args.User, PopupType.Large); return; } //A-13 Eblan system update end diff --git a/Content.Server/Morgue/CrematoriumSystem.cs b/Content.Server/Morgue/CrematoriumSystem.cs index 0359abe9bb3..b61a0fcc775 100644 --- a/Content.Server/Morgue/CrematoriumSystem.cs +++ b/Content.Server/Morgue/CrematoriumSystem.cs @@ -81,9 +81,7 @@ private void AddCremateVerb(EntityUid uid, CrematoriumComponent component, GetVe //A-13 Eblan system update start if (HasComp(args.User)) - { return; - } //A-13 Eblan system update end if (!args.CanAccess || !args.CanInteract || args.Hands == null || storage.Open) diff --git a/Content.Server/Singularity/EntitySystems/EmitterSystem.cs b/Content.Server/Singularity/EntitySystems/EmitterSystem.cs index a9763b64d90..69510a182db 100644 --- a/Content.Server/Singularity/EntitySystems/EmitterSystem.cs +++ b/Content.Server/Singularity/EntitySystems/EmitterSystem.cs @@ -6,6 +6,7 @@ using Content.Server.Power.EntitySystems; using Content.Server.Projectiles; using Content.Server.Weapons.Ranged.Systems; +using Content.Shared.CombatMode.Pacification; //A-13 Eblan system update using Content.Shared.Database; using Content.Shared.Examine; using Content.Shared.Interaction; @@ -64,6 +65,14 @@ private void OnInteractHand(EntityUid uid, EmitterComponent component, InteractH if (args.Handled) return; + //A-13 Eblan system update start + if (HasComp(args.User)) + { + _popup.PopupCursor(Loc.GetString("Вы не можете пока что пользоватсья такими устройствами, потому что, наиграли ещё слишком мало времени."), args.User, PopupType.Large); + return; + } + //A-13 Eblan system update end + if (TryComp(uid, out LockComponent? lockComp) && lockComp.Locked) { _popup.PopupEntity(Loc.GetString("comp-emitter-access-locked", @@ -103,6 +112,11 @@ private void OnGetVerb(EntityUid uid, EmitterComponent component, GetVerbsEvent< if (!args.CanAccess || !args.CanInteract || args.Hands == null) return; + //A-13 Eblan system update start + if (HasComp(args.User)) + return; + //A-13 Eblan system update end + if (TryComp(uid, out var lockComp) && lockComp.Locked) return; diff --git a/Content.Server/Tools/ToolSystem.cs b/Content.Server/Tools/ToolSystem.cs index 73ea83abbd8..65bc233f386 100644 --- a/Content.Server/Tools/ToolSystem.cs +++ b/Content.Server/Tools/ToolSystem.cs @@ -1,10 +1,7 @@ using Content.Server.Atmos.EntitySystems; using Content.Server.Chemistry.Containers.EntitySystems; using Content.Server.Popups; -using Content.Shared.Popups; //A-13 Eblan system update using Content.Server.Tools.Components; -using Content.Shared.CombatMode.Pacification; //A-13 Eblan system update -using Content.Shared.Tools.Components; //A-13 Eblan system update using Robust.Server.GameObjects; using Robust.Shared.Audio.Systems; @@ -17,17 +14,14 @@ public sealed partial class ToolSystem : SharedToolSystem { [Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!; [Dependency] private readonly PopupSystem _popup = default!; - [Dependency] private readonly SharedPopupSystem _popupSystem = default!; //A-13 Eblan system update [Dependency] private readonly SharedAudioSystem _audio = default!; [Dependency] private readonly SolutionContainerSystem _solutionContainer = default!; [Dependency] private readonly TransformSystem _transformSystem = default!; - private const string WeldingQualityId = "Welding"; //A-13 Eblan system update public override void Initialize() { base.Initialize(); - SubscribeLocalEvent(OnToolUseAttempt); //A-13 Eblan system update InitializeWelders(); } @@ -38,20 +32,9 @@ public override void Update(float frameTime) UpdateWelders(frameTime); } - //A-13 Eblan system update start - private void OnToolUseAttempt(EntityUid uid, ToolComponent component, ToolUseAttemptEvent args) - { - if (component.Qualities.Contains(WeldingQualityId) && EntityManager.HasComponent(args.User)) - { - args.Cancel(); - _popupSystem.PopupCursor(Loc.GetString("Вы наиграли слишком мало времени, вы не можете пользоваться сваркой."), args.User, PopupType.Large); - } - } - //A-13 Eblan system update end - protected override bool IsWelder(EntityUid uid) { return HasComp(uid); } } -} +} \ No newline at end of file diff --git a/Content.Shared/Item/ItemToggle/SharedItemToggleSystem.cs b/Content.Shared/Item/ItemToggle/SharedItemToggleSystem.cs index e2e5fc2e3c3..e0ea313ddf6 100644 --- a/Content.Shared/Item/ItemToggle/SharedItemToggleSystem.cs +++ b/Content.Shared/Item/ItemToggle/SharedItemToggleSystem.cs @@ -6,6 +6,8 @@ using Robust.Shared.Audio; using Robust.Shared.Audio.Systems; using Robust.Shared.Network; +using Content.Shared.CombatMode.Pacification; //A-13 Eblan system update +using Content.Shared.Tools.Components; //A-13 Eblan system update namespace Content.Shared.Item.ItemToggle; /// @@ -39,6 +41,14 @@ private void OnUseInHand(EntityUid uid, ItemToggleComponent itemToggle, UseInHan if (args.Handled) return; + //A-13 Eblan system update start + if (HasComp(args.User)) + { + if (TryComp(uid, out var toolComponent) && toolComponent.Qualities.Contains("Welding")) + return; + } + //A-13 Eblan system update end + args.Handled = true; Toggle(uid, args.User, predicted: itemToggle.Predictable, itemToggle: itemToggle); diff --git a/Content.Shared/RCD/Systems/RCDSystem.cs b/Content.Shared/RCD/Systems/RCDSystem.cs index 50a7c0fef97..4d4c9a5917f 100644 --- a/Content.Shared/RCD/Systems/RCDSystem.cs +++ b/Content.Shared/RCD/Systems/RCDSystem.cs @@ -1,6 +1,7 @@ using Content.Shared.Administration.Logs; using Content.Shared.Charges.Components; using Content.Shared.Charges.Systems; +using Content.Shared.CombatMode.Pacification; //A-13 Eblan system update using Content.Shared.Database; using Content.Shared.DoAfter; using Content.Shared.Examine; @@ -66,6 +67,11 @@ private void OnUseInHand(EntityUid uid, RCDComponent comp, UseInHandEvent args) if (args.Handled) return; + //A-13 Eblan system update start + if (HasComp(args.User)) + return; + //A-13 Eblan system update end + NextMode(uid, comp, args.User); args.Handled = true; } @@ -75,6 +81,11 @@ private void OnAfterInteract(EntityUid uid, RCDComponent comp, AfterInteractEven if (args.Handled || !args.CanReach) return; + //A-13 Eblan system update start + if (HasComp(args.User)) + return; + //A-13 Eblan system update end + var user = args.User; TryComp(uid, out var charges);