Fixes & more (#548)

* - fix: Narsie not spawning, items not dropping on paralyze, cult tweaks.

* - fix: Diagonal grilles layer.

* - add: Cockroaches don't drop organs.

* - add: Magic hands now work on interact & disable context menu interaction.

* - fix: Shackles speech after doafter.

* - tweak: Reduce flashbang knockdown, check for CanLieDown.

* - tweak: Hspear limit.

* - tweak: Remove knockdown tile friction.

* - tweak: Engi belt in sus box.

* - fix: Constructs can hear cult chat.

* - fix: Desword audio.

* - fix: Context menu.

* - fix: Actually drop items on paralyze.

* - tweak: Revert range reduction.

* - add: Update thermal visibility.

* - add: NPCs can miss.

* - tweak: Update desc.

* - fix: Actually fix desword audio.

* - tweak: Secret weights & game presets.

* - fix: Cult stun.
This commit is contained in:
Aviu00
2024-08-03 15:23:46 +00:00
committed by GitHub
parent 7f7cb34c0c
commit d4525a91e6
33 changed files with 152 additions and 125 deletions

View File

@@ -3,12 +3,15 @@ using System.Numerics;
using Content.Client.CombatMode;
using Content.Client.Examine;
using Content.Client.Gameplay;
using Content.Client.Popups;
using Content.Client.Verbs;
using Content.Client.Verbs.UI;
using Content.Shared.CCVar;
using Content.Shared.Examine;
using Content.Shared.IdentityManagement;
using Content.Shared.Input;
using Content.Shared.Mobs.Components;
using Content.Shared.Popups;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Client.Input;
@@ -50,6 +53,7 @@ namespace Content.Client.ContextMenu.UI
[UISystemDependency] private readonly ExamineSystem _examineSystem = default!;
[UISystemDependency] private readonly TransformSystem _xform = default!;
[UISystemDependency] private readonly CombatModeSystem _combatMode = default!;
[UISystemDependency] private readonly PopupSystem _popup = default!; // WD EDIT
private bool _updating;
@@ -124,6 +128,19 @@ namespace Content.Client.ContextMenu.UI
return;
}
// WD START
var localEntity = _playerManager.LocalEntity;
if (args.Function == EngineKeyFunctions.Use &&
EntityManager.HasComponent<MobStateComponent>(entity.Value) && entity.Value != localEntity)
{
_popup.PopupClient(Loc.GetString("context-menu-cant-interact"),
entity.Value, localEntity, PopupType.MediumCaution);
_context.Close();
args.Handle();
return;
}
// WD END
// do some other server-side interaction?
if (args.Function == EngineKeyFunctions.Use ||
args.Function == ContentKeyFunctions.ActivateItemInWorld ||

View File

@@ -1,7 +1,9 @@
using System.Linq;
using System.Numerics;
using Content.Client.Stealth;
using Content.Shared._White.Overlays;
using Content.Shared.Body.Components;
using Content.Shared.Stealth.Components;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Client.Player;
@@ -19,6 +21,7 @@ public sealed class ThermalVisionOverlay : Overlay
private readonly TransformSystem _transform;
private readonly OccluderSystem _occluder;
private readonly PointLightSystem _pointLight;
private readonly StealthSystem _stealth;
public override OverlaySpace Space => OverlaySpace.WorldSpace;
@@ -33,6 +36,7 @@ public sealed class ThermalVisionOverlay : Overlay
_transform = _entity.System<TransformSystem>();
_occluder = _entity.System<OccluderSystem>();
_pointLight = _entity.System<PointLightSystem>();
_stealth = _entity.System<StealthSystem>();
ZIndex = -1;
}
@@ -125,7 +129,9 @@ public sealed class ThermalVisionOverlay : Overlay
private bool CanSee(EntityUid ent, SpriteComponent sprite)
{
return sprite.Visible && !_entity.HasComponent<ThermalBlockerComponent>(ent);
return sprite.Visible && !_entity.HasComponent<ThermalBlockerComponent>(ent) &&
(!_entity.TryGetComponent(ent, out StealthComponent? stealth) ||
_stealth.GetVisibility(ent, stealth) > 0.5f);
}
private bool HasOccluders(EntityUid ent)