Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 19 additions & 10 deletions Content.Client/_White/Overlays/ThermalVisionOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
using Robust.Shared.Enums;
using Robust.Shared.Map;
using Robust.Shared.Timing;
using Content.Shared.Tag;
using Robust.Shared.Prototypes;

namespace Content.Client._White.Overlays;

Expand All @@ -19,11 +21,13 @@ public sealed partial class ThermalVisionOverlay : Overlay
[Dependency] private IEntityManager _entity = default!;
[Dependency] private IPlayerManager _player = default!;
[Dependency] private IGameTiming _timing = default!;
private static readonly ProtoId<TagPrototype> ScreenedTag = "Screened";

private readonly TransformSystem _transform;
private readonly StealthSystem _stealth;
private readonly ContainerSystem _container;
private readonly SharedPointLightSystem _light;
private readonly TagSystem _tag;

public override bool RequestScreenTexture => true;
public override OverlaySpace Space => OverlaySpace.WorldSpace;
Expand All @@ -44,6 +48,7 @@ public ThermalVisionOverlay()
_transform = _entity.System<TransformSystem>();
_stealth = _entity.System<StealthSystem>();
_light = _entity.System<SharedPointLightSystem>();
_tag = _entity.System<TagSystem>();

ZIndex = -1;
}
Expand Down Expand Up @@ -93,6 +98,9 @@ protected override void Draw(in OverlayDrawArgs args)
// Mono - teargas hides you from smoke
if (_entity.HasComponent<SmokeAffectedComponent>(uid))
continue;
// Mono - ignore entity if it has "Screened" tag
if (_tag.HasTag(uid, ScreenedTag))
continue;

var entity = uid;

Expand All @@ -102,21 +110,22 @@ protected override void Draw(in OverlayDrawArgs args)

// Mono edit, Thermals don't reveal people in lockers
/*
var owner = container.Owner;
if (_entity.TryGetComponent<SpriteComponent>(owner, out var ownerSprite)
&& _entity.TryGetComponent<TransformComponent>(owner, out var ownerXform))
{
entity = owner;
sprite = ownerSprite;
xform = ownerXform;
}
*/
var owner = container.Owner;
if (_entity.TryGetComponent<SpriteComponent>(owner, out var ownerSprite)
&& _entity.TryGetComponent<TransformComponent>(owner, out var ownerXform))
{
entity = owner;
sprite = ownerSprite;
xform = ownerXform;
}
*/
// Mono End
}

if (_entries.Any(e => e.Ent.Owner == entity))
continue;


_entries.Add(new ThermalVisionRenderEntry((entity, sprite, xform), mapId, eyeRot));
}

Expand Down Expand Up @@ -152,7 +161,7 @@ private void Render(Entity<SpriteComponent, TransformComponent> ent,
private bool CanSee(EntityUid uid, SpriteComponent sprite)
{
return sprite.Visible && (!_entity.TryGetComponent(uid, out StealthComponent? stealth) ||
_stealth.GetVisibility(uid, stealth) > 0.5f);
_stealth.GetVisibility(uid, stealth) > 0.5f);
}

public void ResetLight(bool checkFirstTimePredicted = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
using Content.Shared.ProximityDetection;
using Robust.Shared.Containers;
using Robust.Shared.Physics.Components;
using Content.Shared.Tag;
using Robust.Shared.Prototypes;

namespace Content.Shared._Mono.MotionDetector.Systems;

Expand All @@ -13,6 +15,8 @@ namespace Content.Shared._Mono.MotionDetector.Systems;
public sealed partial class MotionDetectorIgnoreHolderSystem : EntitySystem
{
[Dependency] private SharedContainerSystem _containerSystem = default!;
[Dependency] private TagSystem _tag = default!;
private static readonly ProtoId<TagPrototype> ScreenedTag = "Screened";

public override void Initialize()
{
Expand Down Expand Up @@ -46,6 +50,11 @@ private void OnProximityDetectionAttempt(EntityUid targetEntity, MetaDataCompone
{
args.Cancel = true;
}
// Prevents motion detector from detecting screened players
if (_tag.HasTag(targetEntity, ScreenedTag))
{
args.Cancel = true;
}
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
name: cybersun stealth hardsuit helmet
description: A helmet with plating for stealth operations.
components:
- type: BreathMask
- type: Sprite
sprite: _Goobstation/Clothing/Head/Hardsuits/cybersunstealth.rsi
- type: Clothing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,27 @@
action: ActionToggleNightVision
phosphorColor: "#41D7D9"
lightingColor: "#FFFFFF32"

- type: entity
parent: [ClothingHeadHelmetHardsuitSyndie, ShowSecurityIcons]
id: ClothingHeadHelmetHardsuitSnake
name: PDV CV-64 'Snake' covert hardsuit helmet
description: A combat hardsuit helmet designed by the Phaethon Dynasty for covert operators. A full gen-4 NVD suite is installed.
categories: [ HideSpawnMenu ]
components:
- type: Sprite
sprite: _Goobstation/Clothing/Head/Hardsuits/cybersunstealth.rsi
- type: Clothing
sprite: _Goobstation/Clothing/Head/Hardsuits/cybersunstealth.rsi
- type: NightVision # Gen 4 quadtube-wide
relayOverlay: true
goggleEffect: true
viewCircleRadius: 450
viewCircleCount: 4
viewCircleSpacing: 280
action: ActionToggleNightVision
phosphorColor: "#41D7D9"
lightingColor: "#FFFFFF32"
- type: ClothingGrantTag
tag: Screened

Original file line number Diff line number Diff line change
Expand Up @@ -277,3 +277,46 @@
coefficient: 0.3
- type: ClothingSlowOnDamageModifier # Sorry dude. It's my awesome fucking exosuit.
modifier: 0.5

# vanguard stealth

- type: entity
parent: ClothingOuterHardsuitAshen
id: ClothingOuterHardsuitSnake
name: "PDV CV-64 'Snake' combat hardsuit"
description: A combat hardsuit designed by the Phaethon Dynasty for stealth movement. Utilizes an experimental screening field and heat insulation to avoid detection on motion detectors and night vision pulses. Altho its unconventional plating leads it very exposed to most forms of kinetic damage.
components:
- type: Sprite
sprite: _Goobstation/Clothing/OuterClothing/Hardsuits/cybersunstealth.rsi
- type: Clothing
sprite: _Goobstation/Clothing/OuterClothing/Hardsuits/cybersunstealth.rsi
- type: PressureProtection
highPressureMultiplier: 0.05
lowPressureMultiplier: 1000
- type: ExplosionResistance
damageCoefficient: 0.3
- type: FireProtection
reduction: 0.8
- type: Armor
modifiers:
coefficients:
Blunt: 0.7
Slash: 0.7
Piercing: 0.7
Heat: 0.5
Radiation: 0.3
Caustic: 0.3
- type: ClothingSpeedModifier
walkModifier: 0.95
sprintModifier: 0.95
- type: ToggleableClothing
requiredSlot: outerclothing
blockUnequipWhenAttached: false
replaceCurrentClothing: true
clothingPrototypes:
head: ClothingHeadHelmetHardsuitSnake
helmetcover: ClothingHeadHelmetCoverBlock
helmetattachment: ClothingHeadHelmetAttachmentBlock
- type: Tag
tags:
- RogueHardsuit
9 changes: 7 additions & 2 deletions Resources/Prototypes/_Mono/tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -773,14 +773,19 @@

- type: Tag
id: Central

# Stashes

- type: Tag
id: Unstashable

# Map migration tags for door autorotation thing.

- type: Tag
id: DoorAutorotate

#Stealth Armor

- type: Tag
id: Screened

Loading