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

@@ -0,0 +1,26 @@
using Content.Shared.Whitelist;
using Robust.Shared.GameStates;
namespace Content.Shared.Shuttles.Components;
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class FTLDestinationComponent : Component
{
/// <summary>
/// Should this destination be restricted in some form from console visibility.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
public EntityWhitelist? Whitelist;
/// <summary>
/// Is this destination visible but available to be warped to?
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
public bool Enabled = true;
/// <summary>
/// Can we only FTL to beacons on this map.
/// </summary>
[DataField, AutoNetworkedField]
public bool BeaconsOnly;
}

View File

@@ -0,0 +1,28 @@
using Robust.Shared.GameStates;
namespace Content.Shared.Shuttles.Components;
/// <summary>
/// Marker that specifies a map as being for FTLing entities.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class FTLMapComponent : Component
{
/// <summary>
/// Offset for FTLing shuttles so they don't overlap each other.
/// </summary>
[DataField]
public int Index;
/// <summary>
/// What parallax to use for the background, immediately gets deffered to ParallaxComponent.
/// </summary>
[DataField]
public string Parallax = "FastSpace";
/// <summary>
/// Can FTL on this map only be done to beacons.
/// </summary>
[DataField, AutoNetworkedField]
public bool Beacons;
}

View File

@@ -15,10 +15,12 @@ public sealed partial class IFFComponent : Component
/// </summary>
public const bool ShowIFFDefault = true;
public static readonly Color SelfColor = Color.MediumSpringGreen;
/// <summary>
/// Default color to use for IFF if no component is found.
/// </summary>
public static readonly Color IFFColor = Color.Aquamarine;
public static readonly Color IFFColor = Color.Gold;
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
public IFFFlags Flags = IFFFlags.None;

View File

@@ -22,8 +22,6 @@ namespace Content.Shared.Shuttles.Components
[ViewVariables]
public EntityCoordinates? Position { get; set; }
public const float BreakDistance = 0.25f;
public Vector2 CurTickStrafeMovement = Vector2.Zero;
public float CurTickRotationMovement;
public float CurTickBraking;

View File

@@ -0,0 +1,17 @@
using Robust.Shared.GameStates;
using Robust.Shared.Utility;
namespace Content.Shared.Shuttles.Components;
/// <summary>
/// Shows a parallax background on the shuttle map console.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class ShuttleMapParallaxComponent : Component
{
public static readonly ResPath FallbackTexture = new ResPath("/Textures/Parallaxes/space_map2.png");
// TODO: This should ideally be shared with parallax stuff to avoid duplication, for now it's just a texture
[DataField, AutoNetworkedField]
public ResPath TexturePath;
}