Files
wwdpublic/Content.Client/Cargo/Systems/CargoSystem.Telepad.cs
VMSolidus 6996f8457b Lighthouse Update (SiN Mapping Team) (#1806)
# Description

Done in cooperation with the SiN Mapping Team. This PR gives a partial
detailing pass to lighthouse. Some of its key new features are:

1. The largest and most advanced Supermatter Engine mapped thus far.
2. Reworks to the Salvage/Cargo department
3. Spawners for senior roles
4. More detailed office spaces for many roles.
5. Detailing pass for Security & Engineering
6. Rebalancing the station's engineering department to accomodate for
having such a massive new engine. No roundstart TEG anymore, AME is
"Undersized", uranium generators with fuel added, along with a variety
of power device related flatpacks supplied to engineering. There's many
flatpacks in the solar arrays for engineers looking to upgrade solars.
7. Reworked maints bar.

Don't merge this until @OldDanceJacket signs off on it.

<details><summary><h1>Media</h1></summary>
<p>

Security detailing:

![image](https://github.com/user-attachments/assets/fc0cbf66-2e17-4486-8e98-d90f54dceb21)

Maints Bar:

![image](https://github.com/user-attachments/assets/14e9d97f-2932-4aef-8456-72c0c0c09065)

Security Checkpoint now a Senior Officer's Office

![image](https://github.com/user-attachments/assets/77fa9b69-954a-4f2b-b517-ddda9de03cbc)

New Salvage Dock, the old salvage dock now contains a fun easter egg
that I won't show here (Faridabirb.png):

![image](https://github.com/user-attachments/assets/6c086962-5230-41a0-b748-6a7d898c3306)

Atmos changes to accomodate for Supermatter & upcoming Malf AI update

![image](https://github.com/user-attachments/assets/25ab8aae-4c3f-4355-a5ea-797230bfb073)

Power room changes:

![image](https://github.com/user-attachments/assets/29de8409-d4a3-42f9-8fb3-568f68d376d3)

New Supermatter Engine!

![image](https://github.com/user-attachments/assets/9b686160-1755-4c07-a9f1-67d84e1b3213)

Engine Control Room & Senior Engineer's Office!

![image](https://github.com/user-attachments/assets/b646053a-4026-467f-98c9-8a7abd9c7294)

</p>
</details>

# Changelog

🆑 VMSolidus & The SiN Mapping Team
- add: Lighthouse Detailing Pass, including the new largest, most
advanced supermatter engine to date!
- tweak: Lighthouse Cargo fully updated
- tweak: Lighthouse medical given a surgery room along with some minor
brush up work.
- tweak: New kitchen and botany area for Lighthouse
- tweak: Lighthouse' laser tag arena is now a large boxing arena.
- tweak: Lighthouse reporter area moved to dorms.
- fix: Fixed a crash to desktop with the cargo telepad that was
unreported despite being on 5 of our maps.

(cherry picked from commit 7c4953a0f774c08a55780b704c52bc29d687b8dc)
2025-02-28 16:25:12 +03:00

106 lines
3.4 KiB
C#

using Content.Shared.Cargo;
using Content.Shared.Cargo.Components;
using JetBrains.Annotations;
using Robust.Client.Animations;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
namespace Content.Client.Cargo.Systems;
public sealed partial class CargoSystem
{
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
private static readonly Animation CargoTelepadBeamAnimation = new()
{
Length = TimeSpan.FromSeconds(0.5),
AnimationTracks =
{
new AnimationTrackSpriteFlick
{
LayerKey = CargoTelepadLayers.Beam,
KeyFrames =
{
new AnimationTrackSpriteFlick.KeyFrame(new RSI.StateId("beam"), 0f)
}
}
}
};
private static readonly Animation CargoTelepadIdleAnimation = new()
{
Length = TimeSpan.FromSeconds(0.8),
AnimationTracks =
{
new AnimationTrackSpriteFlick
{
LayerKey = CargoTelepadLayers.Beam,
KeyFrames =
{
new AnimationTrackSpriteFlick.KeyFrame(new RSI.StateId("idle"), 0f)
}
}
}
};
private const string TelepadBeamKey = "cargo-telepad-beam";
private const string TelepadIdleKey = "cargo-telepad-idle";
private void InitializeCargoTelepad()
{
SubscribeLocalEvent<CargoTelepadComponent, AppearanceChangeEvent>(OnCargoAppChange);
SubscribeLocalEvent<CargoTelepadComponent, AnimationCompletedEvent>(OnCargoAnimComplete);
}
private void OnCargoAppChange(EntityUid uid, CargoTelepadComponent component, ref AppearanceChangeEvent args)
{
OnChangeData(uid, args.Sprite);
}
private void OnCargoAnimComplete(EntityUid uid, CargoTelepadComponent component, AnimationCompletedEvent args)
{
OnChangeData(uid);
}
private void OnChangeData(EntityUid uid, SpriteComponent? sprite = null)
{
if (!Resolve(uid, ref sprite)
|| !EntityManager.TryGetComponent(uid, out AnimationPlayerComponent? animation))
return;
var entity = new Entity<AnimationPlayerComponent>(uid, animation);
_appearance.TryGetData<CargoTelepadState?>(uid, CargoTelepadVisuals.State, out var state);
switch (state)
{
case CargoTelepadState.Teleporting:
if (_player.HasRunningAnimation(uid, animation, TelepadBeamKey))
return;
_player.Stop(entity, animation, TelepadIdleKey);
_player.Play(entity, CargoTelepadBeamAnimation, TelepadBeamKey);
break;
case CargoTelepadState.Unpowered:
sprite.LayerSetVisible(CargoTelepadLayers.Beam, false);
_player.Stop(uid, animation, TelepadBeamKey);
_player.Stop(uid, animation, TelepadIdleKey);
break;
default:
sprite.LayerSetVisible(CargoTelepadLayers.Beam, true);
if (_player.HasRunningAnimation(uid, animation, TelepadIdleKey) ||
_player.HasRunningAnimation(uid, animation, TelepadBeamKey))
return;
_player.Play(entity, CargoTelepadIdleAnimation, TelepadIdleKey);
break;
}
}
[UsedImplicitly]
private enum CargoTelepadLayers : byte
{
Base = 0,
Beam = 1,
}
}