Skip to content

Commit

Permalink
Merge pull request impstation#852 from TGRCdev/vent-crawling-tweaks
Browse files Browse the repository at this point in the history
Vent crawling tweaks
  • Loading branch information
widgetbeck authored Dec 1, 2024
2 parents 3b6c429 + f2f4e06 commit 602e5b3
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 5 deletions.
3 changes: 3 additions & 0 deletions Content.Server/VentCraw/VentCrawTubeSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.Map.Components;
using Content.Shared.Eye.Blinding.Systems;

namespace Content.Server.VentCraw
{
Expand All @@ -28,6 +29,7 @@ public sealed class VentCrawTubeSystem : EntitySystem
[Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!;
[Dependency] private readonly PopupSystem _popup = default!;
[Dependency] private readonly SharedMoverController _mover = default!;
[Dependency] private readonly BlindableSystem _blind = default!;

public override void Initialize()
{
Expand Down Expand Up @@ -220,6 +222,7 @@ private bool TryInsert(EntityUid uid, EntityUid entity, VentCrawEntryComponent?
_mover.SetRelay(entity, holder);
ventCrawlerComponent.InTube = true;
Dirty(entity, ventCrawlerComponent);
_blind.UpdateIsBlind(entity);

return _ventCrawableSystemSystem.EnterTube(holder, uid, holderComponent);
}
Expand Down
4 changes: 4 additions & 0 deletions Content.Server/VentCraw/VentCrawableSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Robust.Shared.Physics.Components;
using Robust.Shared.Physics.Systems;
using Robust.Shared.Containers;
using Content.Shared.Eye.Blinding.Systems;

namespace Content.Server.VentCraw;

Expand All @@ -15,6 +16,7 @@ public sealed class VentCrawableSystem : EntitySystem
[Dependency] private readonly SharedPhysicsSystem _physicsSystem = default!;
[Dependency] private readonly SharedContainerSystem _containerSystem = default!;
[Dependency] private readonly SharedTransformSystem _xformSystem = default!;
[Dependency] private readonly BlindableSystem _blind = default!;

public override void Initialize()
{
Expand Down Expand Up @@ -70,6 +72,8 @@ private void OnVentCrawExitEvent(EntityUid uid, VentCrawHolderComponent holder,
{
_physicsSystem.WakeBody(entity, body: physics);
}

_blind.UpdateIsBlind(entity);
}

EntityManager.DeleteEntity(uid);
Expand Down
15 changes: 15 additions & 0 deletions Content.Shared/VentCraw/SharedVentCrawableSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using Robust.Shared.Physics.Components;
using Robust.Shared.Physics.Systems;
using Robust.Shared.Timing;
using Content.Shared.Eye.Blinding.Systems;

namespace Content.Shared.VentCraw;

Expand All @@ -33,6 +34,20 @@ public override void Initialize()

SubscribeLocalEvent<VentCrawHolderComponent, ComponentStartup>(OnComponentStartup);
SubscribeLocalEvent<VentCrawHolderComponent, MoveInputEvent>(OnMoveInput);

SubscribeLocalEvent<VentCrawlerComponent, CanSeeAttemptEvent>(OnCanSee);
}

/// <summary>
/// Blinds entities that are inside of vents
/// </summary>
/// <param name="uid"></param>
/// <param name="comp"></param>
/// <param name="args"></param>
private void OnCanSee(EntityUid uid, VentCrawlerComponent comp, ref CanSeeAttemptEvent args)
{
if (comp.InTube)
args.Cancel();
}

/// <summary>
Expand Down
3 changes: 2 additions & 1 deletion Content.Shared/VentCraw/VentCrawlerComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ public sealed partial class VentCrawlerComponent : Component
[ViewVariables, AutoNetworkedField]
public bool InTube = false;

public float EnterDelay = 2.5f;
[DataField, ViewVariables, AutoNetworkedField]
public TimeSpan EnterDelay = TimeSpan.FromSeconds(5);
}


Expand Down
5 changes: 1 addition & 4 deletions Resources/Prototypes/_StarLight/Catalog/uplink_catalog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@
name: uplink-contortionist-jumpsuit-name
description: uplink-contortionist-jumpsuit-desc
productEntity: ClothingUniformJumpsuitAtmosSyndie
discountCategory: usualDiscounts
discountDownTo:
Telecrystal: 3
cost:
Telecrystal: 6
Telecrystal: 9
categories:
- UplinkJob
conditions:
Expand Down

0 comments on commit 602e5b3

Please sign in to comment.