Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
… into keybindup-input-changes
  • Loading branch information
EmoGarbage404 committed Nov 27, 2023
2 parents 91c9478 + adc5051 commit e355f95
Show file tree
Hide file tree
Showing 164 changed files with 3,123 additions and 1,625 deletions.
2 changes: 1 addition & 1 deletion MSBuild/Robust.Engine.Version.props
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project>
<!-- This file automatically reset by Tools/version.py -->
<PropertyGroup><Version>175.0.0</Version></PropertyGroup>
<PropertyGroup><Version>183.0.0</Version></PropertyGroup>
</Project>
Expand Down
188 changes: 188 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,194 @@ END TEMPLATE-->
*None yet*


## 183.0.0

### Breaking changes

* Audio rework has been re-merged now that the issues with packaging on server have been rectified (thanks PJB!)
* Reverted Arch pending further performance work on making TryGetComponent competitive with live.


## 182.1.1

### Internal

* Remove AggressiveInlining from Arch for debugging.


## 182.1.0

### New features

* Add IRobustRandom.SetSeed

### Other

* Add Arch.TrimExcess() back to remove excess archetypes on map load / EntityManager flush.


## 182.0.0

### Breaking changes

* Add EntityUid's generation / version to the hashcode.


## 181.0.2

### Bugfixes

* Fix exceptions from having too many lights on screen and causing the game to go black.
* Fix components having events raised in ClientGameStateManager before fully set and causing nullable reference exceptions.
* Replace tile intersection IEnumerables with TileEnumerator internally. Also made it public for external callers that wish to avoid IEnumerable.


## 181.0.1

### Bugfixes

* Fix the non-generic HasComp and add a test for good measure.


## 181.0.0

### Breaking changes

- Arch is merged refactoring how components are stored on engine. There's minimal changes on the API end to facilitate component nullability with much internal refactoring.


## 180.2.1


## 180.2.0

### New features

* Add EnsureEntity variants that take in collections.
* Add more MapSystem helper methods.

### Internal

* Cache some more PVS data to avoid re-allocating every tick.


## 180.1.0

### New features

* Add the map name to lsmap.
* Add net.pool_size to CVars to control the message data pool size in Lidgren and to also toggle pooling.

### Bugfixes

* Fix physics contraints causing enormous heap allocations.
* Fix potential error when writing a runtime log.
* Fix shape lookups for non-hard fixtures in EntityLookupSystem from 180.0.0


## 180.0.0

### Breaking changes

* Removed some obsolete methods from EntityLookupSystem.

### New features

* PhysicsSystem.TryGetNearest now supports chain shapes.
* Add IPhysShape methods to EntityLookupSystem rather than relying on AABB checks.
* Add some more helper methods to SharedTransformSystem.
* Add GetOrNew dictionary extension that also returns a bool on whether the key existed.
* Add a GetAnchoredEntities overload that takes in a list.

### Other

* Use NetEntities for the F3 debug panel to align with command usage.


## 179.0.0

### Breaking changes

* EyeComponent.Eye is no longer nullable

### New features

* Light rendering can now be enabled or disable per eye.

### Bugfixes

* Deserializing old maps with empty grid chunks should now just ignore those chunks.

### Other

* UnknownPrototypeException now also tells you the prototype kind instead of just the unkown ID.
* Adding or removing networked components while resetting predicted entities now results in a more informative exception.


## 178.0.0

### Breaking changes

* Most methods in ActorSystem have been moved to ISharedPlayerManager.
* Several actor/player related components and events have been moved to shared.

### New features

* Added `NetListAsArray<T>.Value` to the sandbox whitelist


## 177.0.0

### Breaking changes

* Removed toInsertXform and added containerXform in SharedContainerSystem.CanInsert.
* Removed EntityQuery parameters from SharedContainerSystem.IsEntityOrParentInContainer.
* Changed the signature of ContainsEntity in SharedTransformSystem to use Entity<T>.
* Removed one obsoleted SharedTransformSystem.AnchorEntity method.
* Changed signature of SharedTransformSystem.SetCoordinates to use Entity<T>.

### New features

* Added more Entity<T> query methods.
* Added BeforeApplyState event to replay playback.

### Bugfixes

* Fixed inverted GetAllMapGrids map id check.
* Fixed transform test warnings.
* Fixed PlacementManager warnings.
* Fixed reparenting bug for entities that are being deleted.

### Other

* Changed VerticalAlignment of RichTextLabel to Center to be consistent with Label.
* Changed PVS error log to be a warning instead.
* Marked insert and remove container methods as obsolete, added container system methods to replace them.
* Marked TransformComponent.MapPosition as obsolete, added GetMapCoordinates system method to replace it.

### Internal

* Moved TryGetUi/TryToggleUi/ToggleUi/TryOpen/OpenUi/TryClose/CloseUi methods from UserInterfaceSystem to SharedUserInterfaceSystem.


## 176.0.0

### Breaking changes

* Reverted audio rework temporarily until packaging is fixed.
* Changes to Robust.Packaging to facilitate Content.Packaging ports from the python packaging scripts.

### New features

* Add a cvar for max game state buffer size.
* Add an overload for GetEntitiesInRange that takes in a set.

### Bugfixes

* Fix PVS initial list capacity always being 0.
* Fix replay lerp error spam.


## 175.0.0

### Breaking changes
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions Resources/Locale/en-US/commands.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -561,3 +561,7 @@ cmd-vfs_ls-hint-path = <path>
cmd-reloadtiletextures-desc = Reloads the tile texture atlas to allow hot reloading tile sprites
cmd-reloadtiletextures-help = Usage: reloadtiletextures
cmd-audio_length-desc = Shows the length of an audio file
cmd-audio_length-help = Usage: audio_length { cmd-audio_length-arg-file-name }
cmd-audio_length-arg-file-name = <file name>
11 changes: 6 additions & 5 deletions Robust.Client/Audio/AudioManager.Public.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Robust.Client.Audio.Sources;
using Robust.Client.Graphics;
using Robust.Shared.Audio;
using Robust.Shared.Audio.AudioLoading;
using Robust.Shared.Audio.Sources;
using Robust.Shared.Maths;

Expand Down Expand Up @@ -78,9 +79,9 @@ public void SetRotation(Angle angle)
}

/// <inheritdoc/>
public override AudioStream LoadAudioOggVorbis(Stream stream, string? name = null)
public AudioStream LoadAudioOggVorbis(Stream stream, string? name = null)
{
var vorbis = _readOggVorbis(stream);
var vorbis = AudioLoaderOgg.LoadAudioData(stream);

var buffer = AL.GenBuffer();

Expand Down Expand Up @@ -119,9 +120,9 @@ public override AudioStream LoadAudioOggVorbis(Stream stream, string? name = nul
}

/// <inheritdoc/>
public override AudioStream LoadAudioWav(Stream stream, string? name = null)
public AudioStream LoadAudioWav(Stream stream, string? name = null)
{
var wav = _readWav(stream);
var wav = AudioLoaderWav.LoadAudioData(stream);

var buffer = AL.GenBuffer();

Expand Down Expand Up @@ -178,7 +179,7 @@ public override AudioStream LoadAudioWav(Stream stream, string? name = null)
}

/// <inheritdoc/>
public override AudioStream LoadAudioRaw(ReadOnlySpan<short> samples, int channels, int sampleRate, string? name = null)
public AudioStream LoadAudioRaw(ReadOnlySpan<short> samples, int channels, int sampleRate, string? name = null)
{
var fmt = channels switch
{
Expand Down
2 changes: 1 addition & 1 deletion Robust.Client/Audio/AudioManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace Robust.Client.Audio;

internal sealed partial class AudioManager : SharedAudioManager, IAudioInternal
internal sealed partial class AudioManager : IAudioInternal
{
[Shared.IoC.Dependency] private readonly IConfigurationManager _cfg = default!;
[Shared.IoC.Dependency] private readonly ILogManager _logMan = default!;
Expand Down
2 changes: 1 addition & 1 deletion Robust.Client/Audio/AudioOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public sealed class AudioOverlay : Overlay

private Font _font;

public AudioOverlay(IEntityManager entManager, IPlayerManager playerManager, IClientResourceCache cache, AudioSystem audio, SharedTransformSystem transform)
public AudioOverlay(IEntityManager entManager, IPlayerManager playerManager, IResourceCache cache, AudioSystem audio, SharedTransformSystem transform)
{
_entManager = entManager;
_playerManager = playerManager;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using Robust.Shared.Graphics;

namespace Robust.Shared.Audio;
namespace Robust.Client.Audio;

/// <summary>
/// Has the metadata for a particular audio stream as well as the relevant internal handle to it.
Expand Down
8 changes: 6 additions & 2 deletions Robust.Client/Audio/AudioSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
using Robust.Shared.Physics.Systems;
using Robust.Shared.Player;
using Robust.Shared.Replays;
using Robust.Shared.ResourceManagement.ResourceTypes;
using Robust.Shared.Threading;
using Robust.Shared.Utility;
using AudioComponent = Robust.Shared.Audio.Components.AudioComponent;
Expand All @@ -37,7 +36,7 @@ public sealed partial class AudioSystem : SharedAudioSystem

[Dependency] private readonly IReplayRecordingManager _replayRecording = default!;
[Dependency] private readonly IEyeManager _eyeManager = default!;
[Dependency] private readonly IClientResourceCache _resourceCache = default!;
[Dependency] private readonly IResourceCache _resourceCache = default!;
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly IParallelManager _parMan = default!;
[Dependency] private readonly IRuntimeLog _runtimeLog = default!;
Expand Down Expand Up @@ -593,4 +592,9 @@ private void OnGlobalAudio(PlayAudioGlobalMessage ev)
{
PlayGlobal(ev.FileName, ev.AudioParams, false);
}

protected override TimeSpan GetAudioLengthImpl(string filename)
{
return _resourceCache.GetResource<AudioResource>(filename).AudioStream.Length;
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
using System;
using System.IO;
using System.Numerics;
using Robust.Shared.Audio;
using Robust.Shared.Audio.AudioLoading;
using Robust.Shared.Audio.Sources;
using Robust.Shared.Maths;

namespace Robust.Shared.Audio;
namespace Robust.Client.Audio;

/// <summary>
/// Headless client audio.
/// </summary>
internal sealed class HeadlessAudioManager : SharedAudioManager, IAudioInternal
internal sealed class HeadlessAudioManager : IAudioInternal
{
/// <inheritdoc />
public void InitializePostWindowing()
Expand All @@ -25,7 +29,7 @@ public void FlushALDisposeQueues()
}

/// <inheritdoc />
public IAudioSource? CreateAudioSource(AudioStream stream)
public IAudioSource CreateAudioSource(AudioStream stream)
{
return DummyAudioSource.Instance;
}
Expand Down Expand Up @@ -76,4 +80,27 @@ public float GetAttenuationGain(float distance, float rolloffFactor, float refer
{
return 0f;
}

public AudioStream LoadAudioOggVorbis(Stream stream, string? name = null)
{
var metadata = AudioLoaderOgg.LoadAudioMetadata(stream);
return AudioStreamFromMetadata(metadata, name);
}

public AudioStream LoadAudioWav(Stream stream, string? name = null)
{
var metadata = AudioLoaderWav.LoadAudioMetadata(stream);
return AudioStreamFromMetadata(metadata, name);
}

public AudioStream LoadAudioRaw(ReadOnlySpan<short> samples, int channels, int sampleRate, string? name = null)
{
var length = TimeSpan.FromSeconds((double) samples.Length / channels / sampleRate);
return new AudioStream(null, length, channels, name);
}

private static AudioStream AudioStreamFromMetadata(AudioMetadata metadata, string? name)
{
return new AudioStream(null, metadata.Length, metadata.ChannelCount, name, metadata.Title, metadata.Artist);
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
using System;
using System.IO;
using System.Numerics;
using System.Runtime.CompilerServices;
using Robust.Shared.Audio;
using Robust.Shared.Audio.Sources;
using Robust.Shared.Maths;

namespace Robust.Shared.Audio;
namespace Robust.Client.Audio;

/// <summary>
/// Handles clientside audio.
Expand Down Expand Up @@ -51,4 +54,10 @@ internal interface IAudioInternal
/// Manually calculates the specified gain for an attenuation source with the specified distance.
/// </summary>
float GetAttenuationGain(float distance, float rolloffFactor, float referenceDistance, float maxDistance);

AudioStream LoadAudioOggVorbis(Stream stream, string? name = null);

AudioStream LoadAudioWav(Stream stream, string? name = null);

AudioStream LoadAudioRaw(ReadOnlySpan<short> samples, int channels, int sampleRate, string? name = null);
}
2 changes: 1 addition & 1 deletion Robust.Client/Audio/ShowAudioCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Robust.Client.Commands;
/// </summary>
public sealed class ShowAudioCommand : LocalizedCommands
{
[Dependency] private readonly IClientResourceCache _client = default!;
[Dependency] private readonly IResourceCache _client = default!;
[Dependency] private readonly IEntityManager _entManager = default!;
[Dependency] private readonly IOverlayManager _overlayManager = default!;
[Dependency] private readonly IPlayerManager _playerMgr = default!;
Expand Down
Loading

0 comments on commit e355f95

Please sign in to comment.