Files
wwdpublic/Content.Server/Shuttles/Components/ShuttleConsoleComponent.cs
VMSolidus 4e13279a9b Planet Maps Prep For Glacier Rework (#1774)
# Description

Goddamn do I love Adderall.

This PR lays the entire groundwork needed for the "Glacier Rework", and
it does so by fixing every problem I could think of between FTL and
StationBiome that was preventing it from being a reality. Essentially,
I'm hitting several birds with one stone by refactoring both systems to
be a LOT more flexible. You can technically say that this basically is
also partly enabling Lavaland maps, since I conveniently included
options in the StationBiomeComponent to generate dungeons. Technically a
planet map should probably also have a RestrictedRangeComponent added to
it so that players can't wander so far from the station that they
generate a truly excessive number of entities.

Yes, this does infact mean you can now run Nukie gamemodes on planet
maps.

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

https://github.com/user-attachments/assets/7a3730af-c521-42d4-8abd-5aa5989c369c

</p>
</details>

---

# Changelog

🆑
- add: Shuttles can now take off and land from planet surfaces. They
however will still respect exclusion zone beacons set by stations. Maybe
in the future there might be a special shuttle (drop pod) that is set to
ignore these exclusion zones.

---------

Signed-off-by: VMSolidus <evilexecutive@gmail.com>
Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com>
(cherry picked from commit fb4ca1af6a48eda92f15b5a70273e27c2c352f22)
2025-02-15 00:31:46 +03:00

55 lines
2.1 KiB
C#

using System.Numerics;
using Content.Shared.Shuttles.Components;
namespace Content.Server.Shuttles.Components
{
[RegisterComponent]
public sealed partial class ShuttleConsoleComponent : SharedShuttleConsoleComponent
{
[ViewVariables]
public readonly List<EntityUid> SubscribedPilots = new();
/// <summary>
/// How much should the pilot's eye be zoomed by when piloting using this console?
/// </summary>
[DataField("zoom")]
public Vector2 Zoom = new(1.5f, 1.5f);
/// <summary>
/// Should this console have access to restricted FTL destinations?
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("whitelistSpecific")]
public List<EntityUid> FTLWhitelist = new List<EntityUid>();
/// <summary>
/// How far the shuttle is allowed to jump(in meters).
/// TODO: This technically won't work until this component is migrated to Shared. The client console screen will only ever know the hardcoded 512 meter constant otherwise. Fix it in ShuttleMapControl.xaml.cs when that's done.
/// </summary>
[DataField]
public float FTLRange = 512f;
/// <summary>
/// If the shuttle is allowed to "Forcibly" land on planet surfaces, destroying anything it lands on. Used for SSTO capable shuttles.
/// </summary>
[DataField]
public bool FtlToPlanets;
/// <summary>
/// If the shuttle is allowed to forcibly land on stations, smimshing everything it lands on. This is where the hypothetical "Nukie drop pod" comes into play.
/// </summary>
[DataField]
public bool IgnoreExclusionZones;
/// <summary>
/// If the shuttle is only ever allowed to FTL once. Also used for the hypothetical "Nukie drop pod."
/// </summary>
[DataField]
public bool OneWayTrip;
/// <summary>
/// Tracks whether or not the above "One way trip" has been taken.
/// </summary>
public bool OneWayTripTaken;
}
}