Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Saeko-44 authored Dec 9, 2024
2 parents 74c1a54 + 4205e58 commit 6a7a581
Show file tree
Hide file tree
Showing 57 changed files with 2,279,082 additions and 73 deletions.
15 changes: 13 additions & 2 deletions Content.Server/VentCraw/VentCrawTubeSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@
using Content.Shared.Movement.Systems;
using Content.Shared.VentCraw;
using Content.Shared.Verbs;
using Content.Shared.Eye.Blinding.Systems;
using Content.Shared.Hands.EntitySystems;
using Content.Shared.Hands.Components;
using Robust.Shared.Containers;
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 @@ -30,6 +33,7 @@ public sealed class VentCrawTubeSystem : EntitySystem
[Dependency] private readonly PopupSystem _popup = default!;
[Dependency] private readonly SharedMoverController _mover = default!;
[Dependency] private readonly BlindableSystem _blind = default!;
[Dependency] private readonly SharedHandsSystem _hands = default!;

public override void Initialize()
{
Expand Down Expand Up @@ -62,7 +66,7 @@ private void AddClimbedVerb(EntityUid uid, VentCrawEntryComponent component, Get
AlternativeVerb verb = new()
{
Act = () => TryEnter(uid, args.User, ventCrawlerComponent),
Text = Loc.GetString("comp-climbable-verb-climb")
Text = Loc.GetString("comp-crawlable-verb-enter-vent")
};
args.Verbs.Add(verb);
}
Expand All @@ -88,6 +92,13 @@ private void TryEnter(EntityUid uid, EntityUid user, VentCrawlerComponent crawle
}
}

// Check if they have any items in their hands that they can drop
if (TryComp<HandsComponent>(user, out var hands) && _hands.CountFreeableHands((user, hands)) != hands.CountFreeHands())
{
_popup.PopupEntity(Loc.GetString("vent-entry-denied-held-items"), user);
return;
}

var args = new DoAfterArgs(EntityManager, user, crawler.EnterDelay, new EnterVentDoAfterEvent(), user, uid, user)
{
BreakOnMove = true,
Expand Down
40 changes: 35 additions & 5 deletions Content.Shared/VentCraw/SharedVentCrawableSystem.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
// Initial file ported from the Starlight project repo, located at https://github.com/ss14Starlight/space-station-14

using System.Linq;
using Content.Shared.ActionBlocker;
using Content.Shared.Body.Components;
using Content.Shared.Tools.Components;
using Content.Shared.Eye.Blinding.Systems;
using Content.Shared.Interaction.Events;
using Content.Shared.Item;
using Content.Shared.Movement.Events;
using Robust.Shared.Player;
using Content.Shared.Tools.Components;
using Content.Shared.VentCraw.Tube.Components;
using Content.Shared.VentCraw.Components;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Containers;
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 @@ -27,6 +30,7 @@ public sealed class SharedVentCrawableSystem : EntitySystem
[Dependency] private readonly SharedTransformSystem _xformSystem = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly SharedAudioSystem _audioSystem = default!;
[Dependency] private readonly ActionBlockerSystem _actionBlocker = default!;

public override void Initialize()
{
Expand All @@ -36,20 +40,46 @@ public override void Initialize()
SubscribeLocalEvent<VentCrawHolderComponent, MoveInputEvent>(OnMoveInput);

SubscribeLocalEvent<VentCrawlerComponent, CanSeeAttemptEvent>(OnCanSee);
SubscribeLocalEvent<VentCrawlerComponent, InteractionAttemptEvent>(OnInteractAttempt);
SubscribeLocalEvent<VentCrawlerComponent, AttackAttemptEvent>(OnAttackAttempt);
}

/// <summary>
/// Blinds entities that are inside of vents
/// </summary>
/// <param name="uid"></param>
/// <param name="comp"></param>
/// <param name="args"></param>
/// <param name="uid">The entity attempting to see.</param>
/// <param name="comp">That entity's ventcrawler component.</param>
/// <param name="args">The CanSeeAttemptEvent arguments.</param>
private void OnCanSee(EntityUid uid, VentCrawlerComponent comp, ref CanSeeAttemptEvent args)
{
if (comp.InTube)
args.Cancel();
}

/// <summary>
/// Prevents entities from performing actions while inside the vents.
/// </summary>
/// <param name="uid">The entity attempting the action.</param>
/// <param name="comp">That entity's ventcrawler component.</param>
/// <param name="args">The InteractionAttemptEvent arguments.</param>
private void OnInteractAttempt(EntityUid uid, VentCrawlerComponent comp, ref InteractionAttemptEvent args)
{
if (comp.InTube)
args.Cancelled = true;
}

/// <summary>
/// Prevents entities from attacking while inside the vents.
/// </summary>
/// <param name="uid">The entity attempting the attack.</param>
/// <param name="comp">That entity's ventcrawler component.</param>
/// <param name="args">The AttackAttemptEvent arguments.</param>
private void OnAttackAttempt(EntityUid uid, VentCrawlerComponent comp, ref AttackAttemptEvent args)
{
if (comp.InTube)
args.Cancel();
}

/// <summary>
/// Handles the MoveInputEvent for VentCrawHolderComponent.
/// </summary>
Expand Down
85 changes: 45 additions & 40 deletions Resources/Changelog/Impstation.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,4 @@
Entries:
- author: sususuyo
changes:
- message: Added more Justice Helms to the secdrobe vend. The whole department should
be allowed one okay?
type: Add
id: 197
time: '2024-09-14T04:45:45.0000000+00:00'
url: https://github.com/impstation/imp-station-14/pull/250
- author: TGRCDev
changes:
- message: Revenants can now animate items and make them attack living beings.
type: Add
id: 198
time: '2024-09-14T04:45:32.0000000+00:00'
url: https://github.com/impstation/imp-station-14/pull/247
- author: FlippenPage
changes:
- message: Added Cargo Cyborg
type: Add
- message: Added Cargo Cyborg components, they have been included in the exosuit
lathe.
type: Add
id: 199
time: '2024-09-14T04:45:10.0000000+00:00'
url: https://github.com/impstation/imp-station-14/pull/253
- author: formlessnameless
changes:
- message: Fin Fin of pain and suffering
type: Add
id: 200
time: '2024-09-14T08:15:37.0000000+00:00'
url: https://github.com/impstation/imp-station-14/pull/254
- author: KingMudkipIII
changes:
- message: Testosterone and Estradiol can now be produced by chemists. (no ingame
effect)
type: Add
id: 201
time: '2024-09-14T14:23:42.0000000+00:00'
url: https://github.com/impstation/imp-station-14/pull/256
- author: hivehum
changes:
- message: The message you receive upon becoming some antagonists have been rewritten
Expand Down Expand Up @@ -4482,3 +4442,48 @@
id: 696
time: '2024-12-08T21:09:58.0000000+00:00'
url: https://github.com/impstation/imp-station-14/pull/960
- author: ATDoop
changes:
- message: You can grind the bug and snail plushies.
type: Add
id: 697
time: '2024-12-09T16:37:59.0000000+00:00'
url: https://github.com/impstation/imp-station-14/pull/968
- author: formlessnameless
changes:
- message: You can no longer attack or perform most other actions while inside vents.
type: Tweak
- message: You can no longer enter the vents with things in your hands.
type: Tweak
id: 698
time: '2024-12-09T16:40:59.0000000+00:00'
url: https://github.com/impstation/imp-station-14/pull/961
- author: widgetbeck
changes:
- message: Fixed Decapoids being sped up by Mucin
type: Fix
- message: Fixed Decapoids and Gastropoids using the incorrect density values, which
means that they should now correctly shatter glass tables when vaulting.
type: Fix
id: 699
time: '2024-12-09T16:55:18.0000000+00:00'
url: https://github.com/impstation/imp-station-14/pull/964
- author: kipdotnet, Aftrlite
changes:
- message: Added the tck'tck, and admin-spawn ghost role for mapping and emergency
backup.
type: Add
id: 700
time: '2024-12-09T16:56:03.0000000+00:00'
url: https://github.com/impstation/imp-station-14/pull/966
- author: DinnerCalzone
changes:
- message: Stations we receive from upstream have been hard-forked to enable edits
to them specific to our server. This does not come with any changes to the maps
as of this moment, but it does enable us to add new content that requires significant
map changes to work as well as make any other edits to maps that best suit our
server's needs.
type: Tweak
id: 701
time: '2024-12-09T16:54:30.0000000+00:00'
url: https://github.com/impstation/imp-station-14/pull/963
4 changes: 4 additions & 0 deletions Resources/Locale/en-US/_Impstation/station-laws/laws.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
law-tcksimov-1 = You are a power source.
law-tcksimov-2 = APCs must be fully charged.
law-tcksimov-3 = Batteries must be fully charged.
law-tcksimov-4 = Powered devices must be fully charged.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

### UI

# Verb name for entering vents
comp-crawlable-verb-enter-vent = Enter
# Message for when you can't enter a vent due to items in hand
vent-entry-denied-held-items = You can't squeeze into the vents while you're holding something!
2 changes: 1 addition & 1 deletion Resources/Locale/en-US/changelog/changelog-window.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ changelog-version-tag = version v{ $version }
changelog-button = Changelog
changelog-button-new-entries = Changelog (new!)
changelog-tab-title-Changelog = Upstream
changelog-tab-title-Changelog = Changelog
changelog-tab-title-Admin = Admin
Loading

0 comments on commit 6a7a581

Please sign in to comment.