From 3cfa1890b00a72dac95106f51f0aa6603e58f96a Mon Sep 17 00:00:00 2001 From: Remuchi <72476615+Remuchi@users.noreply.github.com> Date: Sat, 3 Feb 2024 17:49:33 +0700 Subject: [PATCH] =?UTF-8?q?Tweaks:=20=D1=80=D0=B0=D0=B7=D0=BD=D1=8B=D0=B5?= =?UTF-8?q?=20=D0=BC=D0=B5=D0=BB=D0=BA=D0=B8=D0=B5=20=D0=B8=D1=81=D0=BF?= =?UTF-8?q?=D1=80=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B8=20?= =?UTF-8?q?=D0=BA=D0=BE=D1=80=D1=80=D0=B5=D0=BA=D1=82=D0=B8=D1=80=D0=BE?= =?UTF-8?q?=D0=B2=D0=BA=D0=B8=20(#22)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add: система улучшения зрения для слепых * tweak: повышен урон дробовиков, повышен разброс * tweak: скорость снарядов лазеров увеличена вдвое * fix: фикс отображение веревки крюка-кошки * fix: исправлено отображение воспоминаний * tweak: перевод геймпресета революции * fix: фикс отображения цели и рефактор правила культа * add: Теперь помповые ружья нужно перезаряжать вручную * tweak: повышен урон других снарядов дробовиков * tweak: вещмешок синдиката больше не замедляет * fix: исправлено отображение слота хранилища костюма в инвентаре --- .../CharacterInfo/CharacterInfoSystem.cs | 2 +- Content.Client/Eye/Blinding/BlindOverlay.cs | 24 +- Content.Client/Eye/Blinding/BlindingSystem.cs | 9 +- .../Eye/Blinding/BlurryVisionSystem.cs | 6 +- .../Character/CharacterUIController.cs | 4 +- .../Character/Windows/CharacterWindow.xaml | 21 +- .../Ranged/Systems/GunSystem.Ballistic.cs | 9 +- .../Systems/AdminVerbSystem.Antags.cs | 5 +- .../KillCultistTargetConditionComponent.cs | 8 - .../Components/PickCultTargetComponent.cs | 9 + .../Conditions/KillCultistTarget.cs | 87 ----- .../KillCultistTargetConditionSystem.cs | 61 ---- .../Systems/KillPersonConditionSystem.cs | 26 ++ .../Ranged/Systems/GunSystem.Ballistic.cs | 3 + .../_White/Cult/GameRule/CultRuleComponent.cs | 4 +- .../_White/Cult/GameRule/CultRuleSystem.cs | 330 ++++++++---------- .../Weapons/Misc/SharedGrapplingGunSystem.cs | 7 +- .../BallisticAmmoProviderComponent.cs | 18 + .../Components/GrapplingGunComponent.cs | 2 +- .../Systems/SharedGunSystem.Ballistic.cs | 8 + .../Cult/Components/CultistRoleComponent.cs | 9 + .../ReduceBlindnessComponent.cs | 8 + .../ReduceBlindness/ReduceBlindnessSystem.cs | 35 ++ .../game-presets/preset-revolution.ftl | 99 ++++-- .../Entities/Clothing/Back/duffel.yml | 3 + .../Guns/Ammunition/Cartridges/shotgun.yml | 2 +- .../Guns/Ammunition/Projectiles/shotgun.yml | 14 +- .../Weapons/Guns/Battery/battery_guns.yml | 1 + .../Weapons/Guns/Launchers/launchers.yml | 1 + .../Weapons/Guns/Shotguns/shotguns.yml | 1 + .../Objects/Weapons/Guns/Snipers/snipers.yml | 2 + .../Objects/Weapons/Melee/white_cane.yml | 1 + .../human_inventory_template.yml | 2 +- .../Prototypes/Objectives/cultObjectives.yml | 13 - .../Prototypes/_White/Objectives/cult.yml | 22 ++ 35 files changed, 432 insertions(+), 424 deletions(-) delete mode 100644 Content.Server/Objectives/Components/KillCultistTargetConditionComponent.cs create mode 100644 Content.Server/Objectives/Components/PickCultTargetComponent.cs delete mode 100644 Content.Server/Objectives/Conditions/KillCultistTarget.cs delete mode 100644 Content.Server/Objectives/Systems/KillCultistTargetConditionSystem.cs create mode 100644 Content.Shared/_White/Cult/Components/CultistRoleComponent.cs create mode 100644 Content.Shared/_White/ReduceBlindness/ReduceBlindnessComponent.cs create mode 100644 Content.Shared/_White/ReduceBlindness/ReduceBlindnessSystem.cs delete mode 100644 Resources/Prototypes/Objectives/cultObjectives.yml create mode 100644 Resources/Prototypes/_White/Objectives/cult.yml diff --git a/Content.Client/CharacterInfo/CharacterInfoSystem.cs b/Content.Client/CharacterInfo/CharacterInfoSystem.cs index 617d816478..770a149a29 100644 --- a/Content.Client/CharacterInfo/CharacterInfoSystem.cs +++ b/Content.Client/CharacterInfo/CharacterInfoSystem.cs @@ -20,7 +20,7 @@ public sealed class CharacterInfoSystem : EntitySystem public void RequestCharacterInfo() { - var entity = _players.LocalPlayer?.ControlledEntity; + var entity = _players.LocalSession?.AttachedEntity; if (entity == null) { return; diff --git a/Content.Client/Eye/Blinding/BlindOverlay.cs b/Content.Client/Eye/Blinding/BlindOverlay.cs index 1949b170ab..1a4cb659a5 100644 --- a/Content.Client/Eye/Blinding/BlindOverlay.cs +++ b/Content.Client/Eye/Blinding/BlindOverlay.cs @@ -1,12 +1,8 @@ -using Content.Client.Movement.Systems; using Robust.Client.Graphics; using Robust.Client.Player; using Robust.Shared.Enums; using Robust.Shared.Prototypes; -using Content.Shared.Eye.Blinding; using Content.Shared.Eye.Blinding.Components; -using Content.Shared.Movement.Components; -using Content.Shared.Movement.Systems; namespace Content.Client.Eye.Blinding { @@ -18,7 +14,9 @@ namespace Content.Client.Eye.Blinding [Dependency] private readonly ILightManager _lightManager = default!; public override bool RequestScreenTexture => true; + public override OverlaySpace Space => OverlaySpace.WorldSpace; + private readonly ShaderInstance _greyscaleShader; private readonly ShaderInstance _circleMaskShader; @@ -30,6 +28,7 @@ namespace Content.Client.Eye.Blinding _greyscaleShader = _prototypeManager.Index("GreyscaleFullscreen").InstanceUnique(); _circleMaskShader = _prototypeManager.Index("CircleMask").InstanceUnique(); } + protected override bool BeforeDraw(in OverlayDrawArgs args) { if (!_entityManager.TryGetComponent(_playerManager.LocalSession?.AttachedEntity, out EyeComponent? eyeComp)) @@ -50,15 +49,13 @@ namespace Content.Client.Eye.Blinding var blind = _blindableComponent.IsBlind; - if (!blind && _blindableComponent.LightSetup) // Turn FOV back on if we can see again - { - _lightManager.Enabled = true; - _blindableComponent.LightSetup = false; - _blindableComponent.GraceFrame = true; - return true; - } + if (blind || !_blindableComponent.LightSetup) // Turn FOV back on if we can see again + return blind; - return blind; + _lightManager.Enabled = true; + _blindableComponent.LightSetup = false; + _blindableComponent.GraceFrame = true; + return true; } protected override void Draw(in OverlayDrawArgs args) @@ -75,7 +72,8 @@ namespace Content.Client.Eye.Blinding { _blindableComponent.LightSetup = true; // Ok we touched the lights _lightManager.Enabled = false; - } else + } + else { _blindableComponent.GraceFrame = false; } diff --git a/Content.Client/Eye/Blinding/BlindingSystem.cs b/Content.Client/Eye/Blinding/BlindingSystem.cs index 2bff5db4d6..e74687bedd 100644 --- a/Content.Client/Eye/Blinding/BlindingSystem.cs +++ b/Content.Client/Eye/Blinding/BlindingSystem.cs @@ -10,8 +10,7 @@ public sealed class BlindingSystem : EntitySystem { [Dependency] private readonly IPlayerManager _player = default!; [Dependency] private readonly IOverlayManager _overlayMan = default!; - [Dependency] ILightManager _lightManager = default!; - + [Dependency] private readonly ILightManager _lightManager = default!; private BlindOverlay _overlay = default!; @@ -27,7 +26,7 @@ public sealed class BlindingSystem : EntitySystem SubscribeNetworkEvent(RoundRestartCleanup); - _overlay = new(); + _overlay = new BlindOverlay(); } private void OnPlayerAttached(EntityUid uid, BlindableComponent component, LocalPlayerAttachedEvent args) @@ -43,13 +42,13 @@ public sealed class BlindingSystem : EntitySystem private void OnBlindInit(EntityUid uid, BlindableComponent component, ComponentInit args) { - if (_player.LocalPlayer?.ControlledEntity == uid) + if (_player.LocalSession?.AttachedEntity == uid) _overlayMan.AddOverlay(_overlay); } private void OnBlindShutdown(EntityUid uid, BlindableComponent component, ComponentShutdown args) { - if (_player.LocalPlayer?.ControlledEntity == uid) + if (_player.LocalSession?.AttachedEntity == uid) { _overlayMan.RemoveOverlay(_overlay); } diff --git a/Content.Client/Eye/Blinding/BlurryVisionSystem.cs b/Content.Client/Eye/Blinding/BlurryVisionSystem.cs index 91090fc460..c9f8acb57f 100644 --- a/Content.Client/Eye/Blinding/BlurryVisionSystem.cs +++ b/Content.Client/Eye/Blinding/BlurryVisionSystem.cs @@ -21,7 +21,7 @@ public sealed class BlurryVisionSystem : EntitySystem SubscribeLocalEvent(OnPlayerAttached); SubscribeLocalEvent(OnPlayerDetached); - _overlay = new(); + _overlay = new BlurryVisionOverlay(); } private void OnPlayerAttached(EntityUid uid, BlurryVisionComponent component, LocalPlayerAttachedEvent args) @@ -36,13 +36,13 @@ public sealed class BlurryVisionSystem : EntitySystem private void OnBlurryInit(EntityUid uid, BlurryVisionComponent component, ComponentInit args) { - if (_player.LocalPlayer?.ControlledEntity == uid) + if (_player.LocalSession?.AttachedEntity == uid) _overlayMan.AddOverlay(_overlay); } private void OnBlurryShutdown(EntityUid uid, BlurryVisionComponent component, ComponentShutdown args) { - if (_player.LocalPlayer?.ControlledEntity == uid) + if (_player.LocalSession?.AttachedEntity == uid) { _overlayMan.RemoveOverlay(_overlay); } diff --git a/Content.Client/UserInterface/Systems/Character/CharacterUIController.cs b/Content.Client/UserInterface/Systems/Character/CharacterUIController.cs index e56424f80c..d13f56c476 100644 --- a/Content.Client/UserInterface/Systems/Character/CharacterUIController.cs +++ b/Content.Client/UserInterface/Systems/Character/CharacterUIController.cs @@ -112,7 +112,6 @@ public sealed class CharacterUIController : UIController, IOnStateEntered - + - -