using Content.Server.Shuttles.Systems;
+using Robust.Shared.Audio;
using Robust.Shared.Serialization.TypeSerializers.Implementations;
using Robust.Shared.Utility;
/// </summary>
[DataField("emergencyShuttlePath", customTypeSerializer: typeof(ResPathSerializer))]
public ResPath EmergencyShuttlePath { get; set; } = new("/Maps/Shuttles/emergency.yml");
+
+ /// <summary>
+ /// The announcement made when the shuttle has successfully docked with the station.
+ /// </summary>
+ public LocId DockedAnnouncement = "emergency-shuttle-docked";
+
+ /// <summary>
+ /// Sound played when the shuttle has successfully docked with the station.
+ /// </summary>
+ public SoundSpecifier DockedAudio = new SoundPathSpecifier("/Audio/Announcements/shuttle_dock.ogg");
+
+ /// <summary>
+ /// The announcement made when the shuttle is unable to dock and instead parks in nearby space.
+ /// </summary>
+ public LocId NearbyAnnouncement = "emergency-shuttle-nearby";
+
+ /// <summary>
+ /// Sound played when the shuttle is unable to dock and instead parks in nearby space.
+ /// </summary>
+ public SoundSpecifier NearbyAudio = new SoundPathSpecifier("/Audio/Misc/notice1.ogg");
+
+ /// <summary>
+ /// The announcement made when the shuttle is unable to find a station.
+ /// </summary>
+ public LocId FailureAnnouncement = "emergency-shuttle-good-luck";
+
+ /// <summary>
+ /// Sound played when the shuttle is unable to find a station.
+ /// </summary>
+ public SoundSpecifier FailureAudio = new SoundPathSpecifier("/Audio/Misc/notice1.ogg");
+
+ /// <summary>
+ /// Text appended to the docking announcement if the launch time has been extended.
+ /// </summary>
+ public LocId LaunchExtendedMessage = "emergency-shuttle-extended";
}
/// </summary>
public void AnnounceShuttleDock(ShuttleDockResult result, bool extended)
{
+ var stationShuttleComp = result.Station.Comp;
var shuttle = result.Station.Comp.EmergencyShuttle;
DebugTools.Assert(shuttle != null);
{
_chatSystem.DispatchStationAnnouncement(
result.Station,
- Loc.GetString("emergency-shuttle-good-luck"),
+ Loc.GetString(stationShuttleComp.FailureAnnouncement),
playDefaultSound: false);
// TODO: Need filter extensions or something don't blame me.
- _audio.PlayGlobal("/Audio/Misc/notice1.ogg", Filter.Broadcast(), true);
+ _audio.PlayGlobal(stationShuttleComp.FailureAudio, Filter.Broadcast(), true);
return;
}
var location = FormattedMessage.RemoveMarkupPermissive(
_navMap.GetNearestBeaconString((shuttle.Value, Transform(shuttle.Value))));
- var extendedText = extended ? Loc.GetString("emergency-shuttle-extended") : "";
+ var extendedText = extended ? Loc.GetString(stationShuttleComp.LaunchExtendedMessage) : "";
var locKey = result.ResultType == ShuttleDockResultType.NoDock
- ? "emergency-shuttle-nearby"
- : "emergency-shuttle-docked";
+ ? stationShuttleComp.NearbyAnnouncement
+ : stationShuttleComp.DockedAnnouncement;
_chatSystem.DispatchStationAnnouncement(
result.Station,
// Play announcement audio.
var audioFile = result.ResultType == ShuttleDockResultType.NoDock
- ? "/Audio/Misc/notice1.ogg"
- : "/Audio/Announcements/shuttle_dock.ogg";
+ ? stationShuttleComp.NearbyAudio
+ : stationShuttleComp.DockedAudio;
// TODO: Need filter extensions or something don't blame me.
_audio.PlayGlobal(audioFile, Filter.Broadcast(), true);