Allow stations to specify their own custom emergency shuttles. (#12747)
* Allow individual stations to specify a custom emergency shuttle. * Use better assert message.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using Content.Server.Shuttles.Systems;
|
||||
using Content.Server.Station.Systems;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Server.Station.Components;
|
||||
|
||||
@@ -31,10 +30,4 @@ public sealed class StationDataComponent : Component
|
||||
/// </summary>
|
||||
[ViewVariables, Access(typeof(ShuttleSystem), Friend = AccessPermissions.ReadWrite)]
|
||||
public EntityUid? EmergencyShuttle;
|
||||
|
||||
/// <summary>
|
||||
/// Emergency shuttle map path for this station.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite), Access(typeof(ShuttleSystem), Other = AccessPermissions.ReadWriteExecute)]
|
||||
public ResourcePath EmergencyShuttlePath = new("/Maps/Shuttles/emergency.yml");
|
||||
}
|
||||
|
||||
13
Content.Server/Station/StationConfig.Shuttles.cs
Normal file
13
Content.Server/Station/StationConfig.Shuttles.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Robust.Shared.Utility;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations;
|
||||
|
||||
namespace Content.Server.Station;
|
||||
|
||||
public sealed partial class StationConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// Emergency shuttle map path for this station.
|
||||
/// </summary>
|
||||
[DataField("emergencyShuttlePath", customTypeSerializer: typeof(ResourcePathSerializer))]
|
||||
public ResourcePath EmergencyShuttlePath { get; set; } = new("/Maps/Shuttles/emergency.yml");
|
||||
}
|
||||
Reference in New Issue
Block a user