From 5c8304eb5c450099a7ac11472232349ead2edf70 Mon Sep 17 00:00:00 2001 From: Cinkafox <70429757+Cinkafox@users.noreply.github.com> Date: Wed, 20 Mar 2024 09:56:22 +0300 Subject: [PATCH] - fix: your devstvennost MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * - fix: AntiTroopYablyaSystem * - add: command for penis * - fix: Я вам починил ширинку, не благодарите --- Content.Client/_Amour/Hole/HoleSystem.cs | 2 +- Content.Server/_Amour/Hole/HoleSystem.cs | 20 ++++++++++++++++++- .../InteractionPanelSystem.cs | 10 ++++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/Content.Client/_Amour/Hole/HoleSystem.cs b/Content.Client/_Amour/Hole/HoleSystem.cs index 0ba0be2e7e..cb779948dc 100644 --- a/Content.Client/_Amour/Hole/HoleSystem.cs +++ b/Content.Client/_Amour/Hole/HoleSystem.cs @@ -29,7 +29,7 @@ public sealed class HoleSystem : SharedHoleSystem if (component.Parent is not null) { - UpdateVisual(GetEntity(component.Parent.Value),uid); + UpdateVisual(GetEntity(component.Parent.Value),uid,!HasAccessTo(GetEntity(component.Parent.Value),uid)); } } diff --git a/Content.Server/_Amour/Hole/HoleSystem.cs b/Content.Server/_Amour/Hole/HoleSystem.cs index d0e6ace6df..673e42be68 100644 --- a/Content.Server/_Amour/Hole/HoleSystem.cs +++ b/Content.Server/_Amour/Hole/HoleSystem.cs @@ -1,9 +1,14 @@ -using Content.Server.Chemistry.Containers.EntitySystems; +using Content.Server.Administration; +using Content.Server.Chemistry.Containers.EntitySystems; using Content.Shared._Amour.Hole; +using Content.Shared.Administration; using Robust.Server.Containers; using Robust.Shared.Containers; using Robust.Shared.GameStates; +using Robust.Shared.Prototypes; using Robust.Shared.Timing; +using Robust.Shared.Toolshed; +using Robust.Shared.Toolshed.TypeParsers; namespace Content.Server._Amour.Hole; @@ -29,3 +34,16 @@ public sealed partial class HoleSystem : SharedHoleSystem UpdateSolution(frameTime); } } + +[ToolshedCommand, AdminCommand(AdminFlags.Fun)] +internal sealed class AddHoleCommand : ToolshedCommand +{ + [CommandImplementation] + public void AddHole( + [CommandInvocationContext] IInvocationContext ctx, + [PipedArgument] EntityUid target, + [CommandArgument] Prototype prototype) + { + GetSys().AddHole(target,prototype.Value.ID); + } +} diff --git a/Content.Server/_Amour/InteractionPanel/InteractionPanelSystem.cs b/Content.Server/_Amour/InteractionPanel/InteractionPanelSystem.cs index 26c6869b28..a674258365 100644 --- a/Content.Server/_Amour/InteractionPanel/InteractionPanelSystem.cs +++ b/Content.Server/_Amour/InteractionPanel/InteractionPanelSystem.cs @@ -18,6 +18,7 @@ using Content.Shared.Fluids; using Content.Shared.Humanoid; using Content.Shared.Interaction.Events; using Content.Shared.Mind; +using Content.Shared.Mobs.Systems; using Content.Shared.Movement.Events; using Content.Shared.Random.Helpers; using Content.Shared.Verbs; @@ -44,6 +45,7 @@ public sealed class InteractionPanelSystem : EntitySystem [Dependency] private readonly IChatManager _chatManager = default!; [Dependency] private readonly DoAfterSystem _doAfterSystem = default!; [Dependency] private readonly ActionBlockerSystem _actionBlockerSystem = default!; + [Dependency] private readonly MobStateSystem _mobStateSystem = default!; public override void Initialize() { @@ -86,6 +88,8 @@ public sealed class InteractionPanelSystem : EntitySystem private void OnVerb(EntityUid uid, InteractionPanelComponent component, GetVerbsEvent args) { + if (!_mobStateSystem.IsAlive(args.User) || !_mobStateSystem.IsAlive(uid)) + return; args.Verbs.Add(new Verb() { Text = Loc.GetString("interaction-open"), @@ -100,6 +104,9 @@ public sealed class InteractionPanelSystem : EntitySystem || !_playerManager.TryGetSessionByEntity(panelOpener, out var session)) return; + if (!_mobStateSystem.IsAlive(user) || !_mobStateSystem.IsAlive(target)) + return; + _eui.OpenEui(new InteractionPanelEui( new Entity(user,user.Comp), new Entity(target,target.Comp)), @@ -119,6 +126,9 @@ public sealed class InteractionPanelSystem : EntitySystem || !_prototypeManager.TryIndex(protoId, out var prototype)) return; + if (!_mobStateSystem.IsAlive(user) || !_mobStateSystem.IsAlive(target)) + return; + if(!Check(user!,target!,prototype, out var check)) { if(_playerManager.TryGetSessionByEntity(user,out var session) || session is null)