Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Content.Client/Lobby/UI/HumanoidProfileEditor.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,15 @@ SPDX-License-Identifier: AGPL-3.0-or-later
<Button Name="ShowClothes" Pressed="True" ToggleMode="True" Text="{Loc 'humanoid-profile-editor-clothing-show'}" HorizontalAlignment="Right" />
</BoxContainer>
<!-- Spawn Priority -->
<!-- MAID BEGIN remove-spawn-priority -->
<!--
<BoxContainer HorizontalExpand="True">
<Label Text="{Loc 'humanoid-profile-editor-spawn-priority-label'}" />
<Control HorizontalExpand="True"/>
<OptionButton Name="SpawnPriorityButton" HorizontalAlignment="Right" />
</BoxContainer>
-->
<!-- MAID END remove-spawn-priority -->
<!-- Height Slider --> <!-- begin Goobstation: port EE height/width sliders -->
<BoxContainer HorizontalExpand="True">
<Label Name="HeightLabel" MinWidth="110" />
Expand Down
11 changes: 10 additions & 1 deletion Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,8 @@ public HumanoidProfileEditor(

#endregion Hair

// MAID BEGIN remove-spawn-priority
/*
#region SpawnPriority

foreach (var value in Enum.GetValues<SpawnPriorityPreference>())
Expand All @@ -582,6 +584,8 @@ public HumanoidProfileEditor(
};

#endregion SpawnPriority
*/
// MAID END remove-spawn-priority

#region Eyes

Expand Down Expand Up @@ -988,7 +992,8 @@ public void SetProfile(HumanoidCharacterProfile? profile, int? slot)
UpdateBodyTypes(); // WD EDIT
UpdateGenderControls();
UpdateSkinColor();
UpdateSpawnPriorityControls();
// MAID remove-spawn-priority
// UpdateSpawnPriorityControls();
UpdateAgeEdit();
UpdateEyePickers();
UpdateSaveButton();
Expand Down Expand Up @@ -1818,6 +1823,8 @@ private void UpdateGenderControls()
PronounsButton.SelectId((int) Profile.Gender);
}

// MAID BEGIN remove-spawn-priority
/*
private void UpdateSpawnPriorityControls()
{
if (Profile == null)
Expand All @@ -1827,6 +1834,8 @@ private void UpdateSpawnPriorityControls()

SpawnPriorityButton.SelectId((int) Profile.SpawnPriority);
}
*/
// MAID END remove-spawn-priority

// begin Goobstation: port EE height/width sliders
private void UpdateHeightWidthSliders()
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Database/ServerDbBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ private static HumanoidCharacterProfile ConvertProfiles(Profile profile)
if (Enum.TryParse<Sex>(profile.Sex, true, out var sexVal))
sex = sexVal;

var spawnPriority = (SpawnPriorityPreference) profile.SpawnPriority;
var spawnPriority = SpawnPriorityPreference.None; // MAID remove-spawn-priority

var gender = sex == Sex.Male ? Gender.Male : Gender.Female;
if (Enum.TryParse<Gender>(profile.Gender, true, out var genderVal))
Expand Down
40 changes: 38 additions & 2 deletions Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Numerics;
using Content.Server._Maid.FasterThanLight.Components;
using Content.Server.Shuttles.Components;
using Content.Server.Shuttles.Events;
using Content.Server.Station.Events;
Expand Down Expand Up @@ -435,7 +436,17 @@ private bool TrySetupFTL(EntityUid uid, ShuttleComponent shuttle, [NotNullWhen(t

component = AddComp<FTLComponent>(uid);
component.State = FTLState.Starting;
// MAID BEGIN custom arrivals sound

/*
var audio = _audio.PlayPvs(_startupSound, uid);
*/

var audio = TryComp(uid, out CustomFTLSoundComponent? customSoundComponent)
&& customSoundComponent.StartupSound is not null
? _audio.PlayPvs(customSoundComponent.StartupSound, uid)
: _audio.PlayPvs(_startupSound, uid);
Comment thread
coderabbitai[bot] marked this conversation as resolved.
// MAID END
_audio.SetGridAudio(audio);
component.StartupStream = audio?.Entity;

Expand Down Expand Up @@ -469,7 +480,14 @@ private void UpdateFTLStarting(Entity<FTLComponent, ShuttleComponent> entity)
// Just so we don't clip
if (fromMapUid != null && TryComp(comp.StartupStream, out AudioComponent? startupAudio))
{
var clippedAudio = _audio.PlayStatic(_startupSound, Filter.Broadcast(),
// MAID BEGIN custom arrivals sound
var startupSound = TryComp(uid, out CustomFTLSoundComponent? customSoundComponent)
&& customSoundComponent.StartupSound is not null
? customSoundComponent.StartupSound
: _startupSound;
// MAID END

var clippedAudio = _audio.PlayStatic(startupSound, Filter.Broadcast(), // MAID custom arrivals sound
new EntityCoordinates(fromMapUid.Value, _mapSystem.GetGridPosition(entity.Owner)), true, startupAudio.Params);

_audio.SetPlaybackPosition(clippedAudio, entity.Comp1.StartupTime);
Expand Down Expand Up @@ -503,7 +521,17 @@ private void UpdateFTLStarting(Entity<FTLComponent, ShuttleComponent> entity)
RaiseLocalEvent(uid, ref ev, true);

// Audio
// MAID BEGIN custom arrivals sound
/*
var wowdio = _audio.PlayPvs(comp.TravelSound, uid);
*/

var wowdio = TryComp(uid, out CustomFTLSoundComponent? customSound)
&& customSound.TravelSound is not null
? _audio.PlayPvs(customSound.TravelSound, uid)
: _audio.PlayPvs(comp.TravelSound, uid);
// MAID END

comp.TravelStream = wowdio?.Entity;
_audio.SetGridAudio(wowdio);
}
Expand Down Expand Up @@ -614,7 +642,15 @@ private void UpdateFTLArriving(Entity<FTLComponent, ShuttleComponent> entity)
_thruster.DisableLinearThrusters(entity.Comp2);

comp.TravelStream = _audio.Stop(comp.TravelStream);
// MAID BEGIN custom arrivals sound
/*
var audio = _audio.PlayPvs(_arrivalSound, uid);
*/
var audio = TryComp(uid, out CustomFTLSoundComponent? customSoundComponent) &&
customSoundComponent.ArrivalSound is not null
? _audio.PlayPvs(customSoundComponent.ArrivalSound, uid)
: _audio.PlayPvs(_arrivalSound, uid);
// MAID END
_audio.SetGridAudio(audio);

if (TryComp<FTLDestinationComponent>(uid, out var dest))
Expand Down Expand Up @@ -1094,4 +1130,4 @@ private void Smimsh(EntityUid uid, FixturesComponent? manager = null, MapGridCom
var ev = new ShuttleFlattenEvent(xform.MapUid.Value, aabbs);
RaiseLocalEvent(ref ev);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using Robust.Shared.Audio;

namespace Content.Server._Maid.FasterThanLight.Components;

[RegisterComponent]
public sealed partial class CustomFTLSoundComponent : Component
{
[DataField]
public SoundSpecifier? StartupSound { get; set; } = null;

[DataField]
public SoundSpecifier? ArrivalSound { get; set; } = null;

[DataField]
public SoundSpecifier? TravelSound { get; set; } = null;
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Loading