mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 13:37:47 +03:00
# 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:  Maints Bar:  Security Checkpoint now a Senior Officer's Office  New Salvage Dock, the old salvage dock now contains a fun easter egg that I won't show here (Faridabirb.png):  Atmos changes to accomodate for Supermatter & upcoming Malf AI update  Power room changes:  New Supermatter Engine!  Engine Control Room & Senior Engineer's Office!  </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)
106 lines
3.4 KiB
C#
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,
|
|
}
|
|
}
|