Shuttle console + FTL rework (#24430)

* Add shuttle interior drawing back

Just do it per-tile she'll be right, at least it's done with 1 draw call.

* Revamp shuttle console

* Bunch of cleanup work

* Lables sortito

* dok

* Pixel alignment and colours

* Fix a bunch of drawing bugs

* Shuttle map drawing

* Drawing fixes

* Map parallax working finally

* weh

* Commit all my stuff

* mic

* deez

* Update everything

* Xamlify everything

* uh

* Rudimentary blocker range

* My enemies have succeeded

* Bunch of changes to FTL

* Heaps of cleanup

* Fix FTL bugs

* FTL

* weewoo

* FTL fallback

* wew

* weh

* Basic FTL working

* FTL working

* FTL destination fixes

* a

* Exclusion zones

* Fix drawing / FTL

* Beacons working

* Coordinates drawing

* Fix unknown map names

* Dorks beginning

* State + docking cleanup start

* Basic dock drawing

* Bunch of drawing fixes

* Batching / color fixes

* Cleanup and beacons support

* weh

* weh

* Begin pings

* First draft at map objects

* Map fixup

* Faster drawing

* Fix perf + FTL

* Cached drawing

* Fix drawing

* Best I got

* strips

* Back to lists but with caching

* Final optimisation

* Fix dock bounds

* Docking work

* stinker

* kobolds

* Btns

* Docking vis working

* Fix docking pre-vis

* canasses

* Helldivers 2

* a

* Array life

* Fix

* Fix TODOs

* liltenhead feature club

* dorking

* Merge artifacts

* Last-minute touchup
This commit is contained in:
metalgearsloth
2024-03-03 18:39:19 +11:00
committed by GitHub
parent 2ef38f8a62
commit c5486873db
99 changed files with 4896 additions and 2371 deletions

View File

@@ -1,14 +0,0 @@
namespace Content.Server.Shuttles.Components;
/// <summary>
/// Added to entities when they are actively trying to dock with something else.
/// We track it because checking every dock constantly would be expensive.
/// </summary>
[RegisterComponent]
public sealed partial class AutoDockComponent : Component
{
/// <summary>
/// Track who has requested autodocking so we can know when to be removed.
/// </summary>
public HashSet<EntityUid> Requesters = new();
}

View File

@@ -0,0 +1,10 @@
namespace Content.Server.Shuttles.Components;
/// <summary>
/// Shows up on a shuttle's map as an FTL target.
/// </summary>
[RegisterComponent]
public sealed partial class FTLBeaconComponent : Component
{
}

View File

@@ -2,6 +2,7 @@ using Content.Shared.Shuttles.Systems;
using Content.Shared.Tag;
using Robust.Shared.Audio;
using Robust.Shared.Map;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.Shuttles.Components;
@@ -25,25 +26,19 @@ public sealed partial class FTLComponent : Component
public float Accumulator = 0f;
/// <summary>
/// Target Uid to dock with at the end of FTL.
/// Coordinates to arrive it: May be relative to another grid (for docking) or map coordinates.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("targetUid")]
public EntityUid? TargetUid;
[ViewVariables(VVAccess.ReadWrite), DataField("targetCoordinates")]
[ViewVariables(VVAccess.ReadWrite), DataField]
public EntityCoordinates TargetCoordinates;
/// <summary>
/// Should we dock with the target when arriving or show up nearby.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("dock")]
public bool Dock;
[DataField]
public Angle TargetAngle;
/// <summary>
/// If we're docking after FTL what is the prioritised dock tag (if applicable).
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("priorityTag", customTypeSerializer:typeof(PrototypeIdSerializer<TagPrototype>))]
public string? PriorityTag;
[ViewVariables(VVAccess.ReadWrite), DataField]
public ProtoId<TagPrototype>? PriorityTag;
[ViewVariables(VVAccess.ReadWrite), DataField("soundTravel")]
public SoundSpecifier? TravelSound = new SoundPathSpecifier("/Audio/Effects/Shuttle/hyperspace_progress.ogg")
@@ -51,5 +46,6 @@ public sealed partial class FTLComponent : Component
Params = AudioParams.Default.WithVolume(-3f).WithLoop(true)
};
[DataField]
public EntityUid? TravelStream;
}

View File

@@ -1,19 +0,0 @@
using Content.Shared.Whitelist;
namespace Content.Server.Shuttles.Components;
[RegisterComponent]
public sealed partial class FTLDestinationComponent : Component
{
/// <summary>
/// Should this destination be restricted in some form from console visibility.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("whitelist")]
public EntityWhitelist? Whitelist;
/// <summary>
/// Is this destination visible but available to be warped to?
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("enabled")]
public bool Enabled = true;
}

View File

@@ -0,0 +1,16 @@
using Content.Shared.Shuttles.Systems;
namespace Content.Server.Shuttles.Components;
/// <summary>
/// Prevents FTL from occuring around this entity.
/// </summary>
[RegisterComponent, Access(typeof(SharedShuttleSystem))]
public sealed partial class FTLExclusionComponent : Component
{
[DataField]
public bool Enabled = true;
[DataField(required: true)]
public float Range = 32f;
}

View File

@@ -1,15 +0,0 @@
namespace Content.Server.Shuttles.Components;
/// <summary>
/// Added to <see cref="DockingComponent"/> that have recently undocked.
/// This checks for whether they've left the specified radius before allowing them to automatically dock again.
/// </summary>
[RegisterComponent]
public sealed partial class RecentlyDockedComponent : Component
{
[DataField("lastDocked")]
public EntityUid LastDocked;
[ViewVariables(VVAccess.ReadWrite), DataField("radius")]
public float Radius = 1.5f;
}