Tweaks: разные мелкие исправления и корректировки (#22)

* add: система улучшения зрения для слепых

* tweak: повышен урон дробовиков, повышен разброс

* tweak: скорость снарядов лазеров увеличена вдвое

* fix: фикс отображение веревки крюка-кошки

* fix: исправлено отображение воспоминаний

* tweak: перевод геймпресета революции

* fix: фикс отображения цели и рефактор правила культа

* add: Теперь помповые ружья нужно перезаряжать вручную

* tweak: повышен урон других снарядов дробовиков

* tweak: вещмешок синдиката больше не замедляет

* fix: исправлено отображение слота хранилища костюма в инвентаре
This commit is contained in:
Remuchi
2024-02-03 17:49:33 +07:00
committed by GitHub
parent 66e628e476
commit 3cfa1890b0
35 changed files with 432 additions and 424 deletions

View File

@@ -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;

View File

@@ -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<ShaderPrototype>("GreyscaleFullscreen").InstanceUnique();
_circleMaskShader = _prototypeManager.Index<ShaderPrototype>("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;
}

View File

@@ -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<RoundRestartCleanupEvent>(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);
}

View File

@@ -21,7 +21,7 @@ public sealed class BlurryVisionSystem : EntitySystem
SubscribeLocalEvent<BlurryVisionComponent, LocalPlayerAttachedEvent>(OnPlayerAttached);
SubscribeLocalEvent<BlurryVisionComponent, LocalPlayerDetachedEvent>(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);
}

View File

@@ -112,7 +112,6 @@ public sealed class CharacterUIController : UIController, IOnStateEntered<Gamepl
_window.SubText.Text = job;
_window.Objectives.RemoveAllChildren();
_window.Memories.RemoveAllChildren();
_window.ObjectivesLabel.Visible = objectives.Any();
foreach (var (groupId, conditions) in objectives)
{
@@ -183,7 +182,8 @@ public sealed class CharacterUIController : UIController, IOnStateEntered<Gamepl
_window.Objectives.AddChild(control);
}
_window.RolePlaceholder.Visible = briefing == null && !controls.Any() && !objectives.Any();
_window.RolePlaceholder.Visible = briefing == null && controls.Count == 0 && objectives.Count == 0;
_window.MemoriesPlaceholder.Visible = memories.Count == 0;
}
private void CharacterDetached(EntityUid uid)

View File

@@ -8,22 +8,25 @@
<ScrollContainer>
<BoxContainer Orientation="Vertical">
<BoxContainer Orientation="Horizontal">
<SpriteView OverrideDirection="South" Scale="2 2" Name="SpriteView" Access="Public" SetSize="64 64"/>
<SpriteView OverrideDirection="South" Scale="2 2" Name="SpriteView" Access="Public" SetSize="64 64" />
<BoxContainer Orientation="Vertical" VerticalAlignment="Top">
<Label Name="NameLabel" Access="Public"/>
<Label Name="SubText" VerticalAlignment="Top" StyleClasses="LabelSubText" Access="Public"/>
<Label Name="NameLabel" Access="Public" />
<Label Name="SubText" VerticalAlignment="Top" StyleClasses="LabelSubText" Access="Public" />
</BoxContainer>
</BoxContainer>
<!-- WD EDIT -->
<Label Text="{Loc 'character-info-memories-label'}" HorizontalAlignment="Center"/>
<BoxContainer Orientation="Vertical" Name="Memories" Access="Public"/>
<cc:Placeholder PlaceholderText="{Loc 'character-info-memories-placeholder-text'}"/>
<Label Text="{Loc 'character-info-memories-label'}" HorizontalAlignment="Center" />
<BoxContainer Orientation="Vertical" Name="Memories" Access="Public" />
<cc:Placeholder Name="MemoriesPlaceholder" Access="Public"
PlaceholderText="{Loc 'character-info-memories-placeholder-text'}" />
<!-- WD EDIT END -->
<Label Name="ObjectivesLabel" Access="Public" Text="{Loc 'character-info-objectives-label'}" HorizontalAlignment="Center"/>
<BoxContainer Orientation="Vertical" Name="Objectives" Access="Public"/>
<cc:Placeholder Name="RolePlaceholder" Access="Public" PlaceholderText="{Loc 'character-info-roles-antagonist-text'}"/>
<Label Name="ObjectivesLabel" Access="Public" Text="{Loc 'character-info-objectives-label'}"
HorizontalAlignment="Center" />
<BoxContainer Orientation="Vertical" Name="Objectives" Access="Public" />
<cc:Placeholder Name="RolePlaceholder" Access="Public"
PlaceholderText="{Loc 'character-info-roles-antagonist-text'}" />
</BoxContainer>
</ScrollContainer>
</windows:CharacterWindow>

View File

@@ -12,7 +12,10 @@ public sealed partial class GunSystem
SubscribeLocalEvent<BallisticAmmoProviderComponent, UpdateAmmoCounterEvent>(OnBallisticAmmoCount);
}
private void OnBallisticAmmoCount(EntityUid uid, BallisticAmmoProviderComponent component, UpdateAmmoCounterEvent args)
private void OnBallisticAmmoCount(
EntityUid uid,
BallisticAmmoProviderComponent component,
UpdateAmmoCounterEvent args)
{
if (args.Control is DefaultStatusControl control)
{
@@ -25,6 +28,9 @@ public sealed partial class GunSystem
if (!Timing.IsFirstTimePredicted)
return;
if (!component.IsCycled)
return;
EntityUid? ent = null;
// TODO: Combine with TakeAmmo
@@ -48,5 +54,6 @@ public sealed partial class GunSystem
var cycledEvent = new GunCycledEvent();
RaiseLocalEvent(uid, ref cycledEvent);
}
}