mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-19 06:28:40 +03:00
# Description The bug in question is the one where if you return from Lavaland the shuttle would not dock to the station but instead send you approximately around the station. I replaced the original function and lookup completely where when the station and lavaland are initialized it will add them to destinations and then use a list to warp to the gridUIDs. This allows for more consistent warping and less time for looking up what the largest grid is. This fix also fixes the issue of smaller maps like Northway where a wreck could be much larger than the station and would not warp to it. Here is the new format for the mining shuttle console  --- # TODO - [x] Rework the shuttle, adding destinations to make it more modular. --- # Changelog 🆑 - fix: NT has finally patched the mining shuttle and now docks to the station on returning from lavaland. --------- Co-authored-by: Nathaniel Adams <60526456+Nathaniel-Adams@users.noreply.github.com> (cherry picked from commit 7492387f78be4c0dcd0150b190d58df9c10b2436)
64 lines
1.6 KiB
C#
64 lines
1.6 KiB
C#
using System.Collections;
|
|
using Content.Shared._Lavaland.Shuttles.Systems;
|
|
using Content.Shared.Tag;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Map;
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Serialization;
|
|
|
|
namespace Content.Shared._Lavaland.Shuttles.Components;
|
|
|
|
/// <summary>
|
|
/// Component that stores destinations a docking-only shuttle can use.
|
|
/// Used by <see cref="DockingConsoleComponent"/> to access destinations.
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent, Access(typeof(SharedDockingShuttleSystem))]
|
|
public sealed partial class DockingShuttleComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// The station this shuttle belongs to.
|
|
/// </summary>
|
|
[DataField]
|
|
public EntityUid? Station;
|
|
|
|
/// <summary>
|
|
/// Every destination this console can FTL to.
|
|
/// </summary>
|
|
[DataField]
|
|
public List<DockingDestination> Destinations = new();
|
|
|
|
/// <summary>
|
|
/// Location UID list
|
|
/// </summary>
|
|
[DataField]
|
|
public List<EntityUid> LocationUID = new();
|
|
|
|
/// <summary>
|
|
/// Airlock tag that it will prioritize docking to.
|
|
/// </summary>
|
|
[DataField]
|
|
public ProtoId<TagPrototype> DockTag = "DockMining";
|
|
|
|
public int? currentlocation;
|
|
}
|
|
|
|
/// <summary>
|
|
/// A map a shuttle can FTL to.
|
|
/// Created automatically on shuttle mapinit.
|
|
/// </summary>
|
|
[DataDefinition, Serializable, NetSerializable]
|
|
public partial struct DockingDestination
|
|
{
|
|
/// <summary>
|
|
/// The name of the destination to use in UI.
|
|
/// </summary>
|
|
[DataField]
|
|
public LocId Name;
|
|
|
|
/// <summary>
|
|
/// The map ID.
|
|
/// </summary>
|
|
[DataField]
|
|
public MapId Map;
|
|
}
|