Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream sync #1787

Merged
merged 107 commits into from
Jan 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
ad23306
Fix comp.Owner (#24206)
Partmedia Jan 17, 2024
2c0e1fc
Repairable shuttles (#24193)
TheShuEd Jan 17, 2024
4536bad
Automatic changelog update
PJBot Jan 17, 2024
1e9eab0
Do not log missing components in OpenableSystem (#24208)
Partmedia Jan 18, 2024
a61e24a
fix flippo not igniting plasma (#24207)
TheGoudaMan Jan 18, 2024
a32f0da
Automatic changelog update
PJBot Jan 18, 2024
7a7d001
Use old reagent dispenser beaker slot ID (#24209)
0x6273 Jan 18, 2024
eefec00
reach update (#24211)
Emisse Jan 18, 2024
9ad1ae5
Fix error when starting a DoAfter while handling one on the same enti…
DrSmugleaf Jan 18, 2024
9968cc1
Golden honker glow (#24230)
UbaserB Jan 18, 2024
08c2cac
Paramedic void suit is now a soft suit. (#24229)
UbaserB Jan 18, 2024
882e277
Carrots now properly contain Oculine (#24228)
UbaserB Jan 18, 2024
e3bcdcc
Automatic changelog update
PJBot Jan 18, 2024
9882827
Automatic changelog update
PJBot Jan 18, 2024
da7ed4b
Add pacifism description and clean up traits a little (#24216)
UbaserB Jan 18, 2024
4315531
make terminator immune to rev and zombie (#24239)
deltanedas Jan 18, 2024
20dadf4
Fix solution corruption when grinding a stack of items (#24242)
Tayrtahn Jan 18, 2024
6931848
Add fill visuals and inhand sprites to water bottle (#24240)
themias Jan 18, 2024
9b97c7f
Fix entity menu grouping and sorting (#24243)
koteq Jan 18, 2024
d470528
Automatic changelog update
PJBot Jan 18, 2024
0d53dad
Wrap objective briefing text (#24244)
Partmedia Jan 18, 2024
3506e67
Fix drink examine text (#24241)
Partmedia Jan 18, 2024
0c944ed
More sprite movement states (#24237)
themias Jan 18, 2024
ea299ca
Finally fix cryostorage duping (#24251)
EmoGarbage404 Jan 19, 2024
38eaf9e
Automatic changelog update
PJBot Jan 19, 2024
21b7b11
Spawn guidebooks on random bookshelves (#24036)
lapatison Jan 19, 2024
b543c05
Automatic changelog update
PJBot Jan 19, 2024
f69f3e0
fix gas canister names (#24252)
EmoGarbage404 Jan 19, 2024
a7388e5
Add trade stations (#23863)
metalgearsloth Jan 19, 2024
c01b5a3
Automatic changelog update
PJBot Jan 19, 2024
5887745
Update submodule to 207.0.0 (#24255)
metalgearsloth Jan 19, 2024
61704f0
Title2 (#24254)
Emisse Jan 19, 2024
b94265a
Automatic changelog update
PJBot Jan 19, 2024
09b3a44
Botany guide chemicals (#24194)
IlyaElDunaev Jan 19, 2024
f0b21e2
Adjust produce (#24220)
UbaserB Jan 19, 2024
4b77d55
Fix salvage wreck names (#24256)
UbaserB Jan 19, 2024
243491d
Rework wheelchairbound (#24173)
metalgearsloth Jan 19, 2024
8cc24c9
Make super bite burger easier to craft (#24231)
UbaserB Jan 19, 2024
c35b996
Change the station map dot color to cyan (#24082)
iacore Jan 19, 2024
7bf62f1
Restart votes check player count and ghost levels (#23453)
Titian3 Jan 19, 2024
129892f
Run fixgridatmos on trading outpost (#24264)
metalgearsloth Jan 19, 2024
217e865
Automatic changelog update
PJBot Jan 19, 2024
ad23fac
Add ability to put spesos into cargo console (#24263)
metalgearsloth Jan 19, 2024
8aeeacc
Automatic changelog update
PJBot Jan 19, 2024
170467c
Added defib to Brigmed on Box (#24269)
Krunklehorn Jan 19, 2024
fd9c654
Moved Gemini's Brigmed defib to the inside (#24273)
Krunklehorn Jan 19, 2024
27005d7
Added defib to Brigmed on Origin (#24272)
Krunklehorn Jan 19, 2024
caed22b
Added defib to Brigmed on Meta (#24271)
Krunklehorn Jan 19, 2024
f82fd23
Clear cargo orders on approval (#24278)
metalgearsloth Jan 19, 2024
8364086
Update Trading Outpost (#24281)
UbaserB Jan 19, 2024
b535909
Fix gun bolt crash (#24283)
metalgearsloth Jan 19, 2024
95815c7
Automatic changelog update
PJBot Jan 19, 2024
e3d5dc4
Improve light tube sprites (#24270)
UbaserB Jan 19, 2024
bdb1399
Actually fix carrot oculine this time (#24290)
UbaserB Jan 19, 2024
818b07e
Destruction & impact sound rework pass 1 (#24282)
mirrorcult Jan 19, 2024
884c866
Automatic changelog update
PJBot Jan 19, 2024
fd673cf
Can emag artifact crusher (#23957)
SpeltIncorrectyl Jan 19, 2024
f44661c
Automatic changelog update
PJBot Jan 19, 2024
16a1f2f
Adds more grindables (#24267)
Flareguy Jan 19, 2024
08c7386
Fix reagents obtained from grinding iron ore. (#24215)
UbaserB Jan 19, 2024
a6e16d9
Mustard, ketchup and mayonnaise now tastes distinct (#24297)
UbaserB Jan 19, 2024
00e770d
Update Trade Station (#24295)
UbaserB Jan 19, 2024
0a71f8a
Update Core (#24294)
UbaserB Jan 19, 2024
7583662
Update Rod and Transit evacuation shuttles (#24296)
UbaserB Jan 19, 2024
73e94df
Lathe Categories (#24247)
EmoGarbage404 Jan 20, 2024
ac809c4
Automatic changelog update
PJBot Jan 20, 2024
7a2e500
Unrevivable trait (#24226)
Scribbles0 Jan 20, 2024
f33a3f9
Automatic changelog update
PJBot Jan 20, 2024
f71df97
Toolboxes (#24305)
Drayff Jan 20, 2024
df768b2
Automatic changelog update
PJBot Jan 20, 2024
3480640
Revert "Adds more grindables (#24267)" (#24311)
metalgearsloth Jan 20, 2024
559ff13
Rebalance of Lobbying bundle (#24303)
Agoichi Jan 20, 2024
91e8234
Automatic changelog update
PJBot Jan 20, 2024
e89be95
Prevent EntityStorages from being opened while inside another contain…
Arendian Jan 20, 2024
a65e3ee
Automatic changelog update
PJBot Jan 20, 2024
ed2fa96
Add netserializable to test doafter (#24313)
metalgearsloth Jan 20, 2024
5af1d0e
Fixes round restart audio clipping (#24044)
FairlySadPanda Jan 20, 2024
0b37dbb
Automatic changelog update
PJBot Jan 20, 2024
21e77df
Fix cargo product groups (#24212)
EmoGarbage404 Jan 20, 2024
87f324b
Cargo fixes (#24318)
metalgearsloth Jan 20, 2024
1ff31f8
Change what items can be fultoned while stopping anchored items from …
casperr04 Jan 20, 2024
28f0387
Automatic changelog update
PJBot Jan 20, 2024
542aa11
Make crushers not craftable/researchable (#24319)
Blackern5000 Jan 20, 2024
f10ecf4
Automatic changelog update
PJBot Jan 20, 2024
4a13dbe
Fix some test warnings (#24324)
metalgearsloth Jan 20, 2024
bbbacf9
Fix drag-drop buckle sound playing twice (#24321)
metalgearsloth Jan 20, 2024
18a111b
Automatic changelog update
PJBot Jan 20, 2024
efdc6f8
Beacon localization (#24138)
Errant-4 Jan 20, 2024
bd4a0b9
fix scram implant uplink desc (#24336)
Ilya246 Jan 20, 2024
25cde97
Add admin log messages for gamerule addition and end (#24092)
tday93 Jan 20, 2024
0312196
Automatic changelog update
PJBot Jan 20, 2024
4f307a4
Fix issue where round could reset all job priorities to high (#24340)
koteq Jan 20, 2024
6a0c800
Add snake kebab (#24341)
Nimfar11 Jan 20, 2024
113ee78
Cerberus Wideswing (#24328)
Alekshhh Jan 20, 2024
949b07d
Buff potassium availability from bananas (#24257)
UbaserB Jan 20, 2024
9efa01d
Automatic changelog update
PJBot Jan 20, 2024
1085dbe
Remove ability to start pulling while inside a container (#24235)
GreyMario Jan 20, 2024
d8367b4
Merge remote-tracking branch 'upstream/master' into upstream-sync
Morb0 Jan 21, 2024
5471137
Update locale
Morb0 Jan 21, 2024
f451c79
Fix locale
Morb0 Jan 21, 2024
ecc21d8
Update Credits (#24352)
github-actions[bot] Jan 21, 2024
691c3d5
Allow chemical-fueled generators to use multiple reagents (#24258)
EmoGarbage404 Jan 21, 2024
adbbfe9
Use MetalBreak collection
Morb0 Jan 21, 2024
b3b64e6
The glowing forest anomaly (#24351)
TheShuEd Jan 21, 2024
8f1d670
Automatic changelog update
PJBot Jan 21, 2024
b12f127
Merge remote-tracking branch 'upstream/master' into upstream-sync
Morb0 Jan 21, 2024
eeb399f
Update locale
Morb0 Jan 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 10 additions & 8 deletions Content.Client/Audio/AmbientSoundSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public sealed class AmbientSoundSystem : SharedAmbientSoundSystem
{
[Dependency] private readonly AmbientSoundTreeSystem _treeSys = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly SharedTransformSystem _xformSystem = default!;
[Dependency] private readonly IConfigurationManager _cfg = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
Expand Down Expand Up @@ -172,7 +173,7 @@ public override void Update(float frameTime)

_targetTime = _gameTiming.CurTime+TimeSpan.FromSeconds(_cooldown);

var player = _playerManager.LocalPlayer?.ControlledEntity;
var player = _playerManager.LocalEntity;
if (!EntityManager.TryGetComponent(player, out TransformComponent? xform))
{
ClearSounds();
Expand All @@ -198,13 +199,13 @@ private readonly struct QueryState
public readonly Dictionary<string, List<(float Importance, AmbientSoundComponent)>> SourceDict = new();
public readonly Vector2 MapPos;
public readonly TransformComponent Player;
public readonly EntityQuery<TransformComponent> Query;
public readonly SharedTransformSystem TransformSystem;

public QueryState(Vector2 mapPos, TransformComponent player, EntityQuery<TransformComponent> query)
public QueryState(Vector2 mapPos, TransformComponent player, SharedTransformSystem transformSystem)
{
MapPos = mapPos;
Player = player;
Query = query;
TransformSystem = transformSystem;
}
}

Expand All @@ -218,7 +219,7 @@ private static bool Callback(

var delta = xform.ParentUid == state.Player.ParentUid
? xform.LocalPosition - state.Player.LocalPosition
: xform.WorldPosition - state.MapPos;
: state.TransformSystem.GetWorldPosition(xform) - state.MapPos;

var range = delta.Length();
if (range >= ambientComp.Range)
Expand All @@ -244,7 +245,7 @@ private void ProcessNearbyAmbience(TransformComponent playerXform)
{
var query = GetEntityQuery<TransformComponent>();
var metaQuery = GetEntityQuery<MetaDataComponent>();
var mapPos = playerXform.MapPosition;
var mapPos = _xformSystem.GetMapCoordinates(playerXform);

// Remove out-of-range ambiences
foreach (var (comp, sound) in _playingSounds)
Expand All @@ -258,9 +259,10 @@ private void ProcessNearbyAmbience(TransformComponent playerXform)
xform.MapID == playerXform.MapID &&
!metaQuery.GetComponent(entity).EntityPaused)
{
// TODO: This is just trydistance for coordinates.
var distance = (xform.ParentUid == playerXform.ParentUid)
? xform.LocalPosition - playerXform.LocalPosition
: xform.WorldPosition - mapPos.Position;
: _xformSystem.GetWorldPosition(xform) - mapPos.Position;

if (distance.LengthSquared() < comp.Range * comp.Range)
continue;
Expand All @@ -277,7 +279,7 @@ private void ProcessNearbyAmbience(TransformComponent playerXform)
return;

var pos = mapPos.Position;
var state = new QueryState(pos, playerXform, query);
var state = new QueryState(pos, playerXform, _xformSystem);
var worldAabb = new Box2(pos - MaxAmbientVector, pos + MaxAmbientVector);
_treeSys.QueryAabb(ref state, Callback, mapPos.MapId, worldAabb);

Expand Down
21 changes: 21 additions & 0 deletions Content.Client/Audio/BackgroundAudioSystem.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Content.Client.GameTicking.Managers;
using Content.Client.Lobby;
using Content.Shared.CCVar;
using Content.Shared.GameTicking;
using JetBrains.Annotations;
using Robust.Client;
using Robust.Client.State;
Expand Down Expand Up @@ -39,6 +40,8 @@ public override void Initialize()
_client.PlayerLeaveServer += OnLeave;

_gameTicker.LobbySongUpdated += LobbySongUpdated;

SubscribeNetworkEvent<RoundRestartCleanupEvent>(PlayRestartSound);
}

public override void Shutdown()
Expand Down Expand Up @@ -129,4 +132,22 @@ private void EndLobbyMusic()
{
LobbyStream = _audio.Stop(LobbyStream);
}

private void PlayRestartSound(RoundRestartCleanupEvent ev)
{
if (!_configManager.GetCVar(CCVars.LobbyMusicEnabled))
return;

var file = _gameTicker.RestartSound;
if (string.IsNullOrEmpty(file))
{
return;
}

var volume = _lobbyParams.WithVolume(_lobbyParams.Volume +
SharedAudioSystem.GainToVolume(
_configManager.GetCVar(CCVars.LobbyMusicVolume)));

_audio.PlayGlobal(file, Filter.Local(), false, volume);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ protected override void Open()
base.Open();

var spriteSystem = EntMan.System<SpriteSystem>();
_menu = new CargoConsoleMenu(IoCManager.Resolve<IPrototypeManager>(), spriteSystem);
var localPlayer = IoCManager.Resolve<IPlayerManager>()?.LocalPlayer?.ControlledEntity;
var dependencies = IoCManager.Instance!;
_menu = new CargoConsoleMenu(Owner, EntMan, dependencies.Resolve<IPrototypeManager>(), spriteSystem);
var localPlayer = dependencies.Resolve<IPlayerManager>().LocalEntity;
var description = new FormattedMessage();

string orderRequester;
Expand Down
25 changes: 22 additions & 3 deletions Content.Client/Cargo/UI/CargoConsoleMenu.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Linq;
using Content.Client.UserInterface.Controls;
using Content.Shared.Cargo;
using Content.Shared.Cargo.Components;
using Content.Shared.Cargo.Prototypes;
using Robust.Client.AutoGenerated;
using Robust.Client.GameObjects;
Expand All @@ -14,8 +15,10 @@ namespace Content.Client.Cargo.UI
[GenerateTypedNameReferences]
public sealed partial class CargoConsoleMenu : FancyWindow
{
private IEntityManager _entityManager;
private IPrototypeManager _protoManager;
private SpriteSystem _spriteSystem;
private EntityUid _owner;

public event Action<ButtonEventArgs>? OnItemSelected;
public event Action<ButtonEventArgs>? OnOrderApproved;
Expand All @@ -24,11 +27,13 @@ public sealed partial class CargoConsoleMenu : FancyWindow
private readonly List<string> _categoryStrings = new();
private string? _category;

public CargoConsoleMenu(IPrototypeManager protoManager, SpriteSystem spriteSystem)
public CargoConsoleMenu(EntityUid owner, IEntityManager entMan, IPrototypeManager protoManager, SpriteSystem spriteSystem)
{
RobustXamlLoader.Load(this);
_entityManager = entMan;
_protoManager = protoManager;
_spriteSystem = spriteSystem;
_owner = owner;

Title = Loc.GetString("cargo-console-menu-title");

Expand All @@ -53,7 +58,21 @@ private void SetCategoryText(int id)
Categories.SelectId(id);
}

public IEnumerable<CargoProductPrototype> ProductPrototypes => _protoManager.EnumeratePrototypes<CargoProductPrototype>();
public IEnumerable<CargoProductPrototype> ProductPrototypes
{
get
{
var allowedGroups = _entityManager.GetComponentOrNull<CargoOrderConsoleComponent>(_owner)?.AllowedGroups;

foreach (var cargoPrototype in _protoManager.EnumeratePrototypes<CargoProductPrototype>())
{
if (!allowedGroups?.Contains(cargoPrototype.Group) ?? false)
continue;

yield return cargoPrototype;
}
}
}

/// <summary>
/// Populates the list of products that will actually be shown, using the current filters.
Expand All @@ -80,7 +99,7 @@ public void PopulateProducts()
Product = prototype,
ProductName = { Text = prototype.Name },
MainButton = { ToolTip = prototype.Description },
PointCost = { Text = Loc.GetString("cargo-console-menu-points-amount", ("amount", prototype.PointCost.ToString())) },
PointCost = { Text = Loc.GetString("cargo-console-menu-points-amount", ("amount", prototype.Cost.ToString())) },
Icon = { Texture = _spriteSystem.Frame0(prototype.Icon) },
};
button.MainButton.OnPressed += args =>
Expand Down
8 changes: 4 additions & 4 deletions Content.Client/Cargo/UI/CargoPalletMenu.xaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<controls:FancyWindow xmlns="https://spacestation14.io"
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
SetSize="300 150"
MinSize="300 150">
<BoxContainer Orientation="Vertical">
MinSize="300 150"
Title="{Loc 'cargo-pallet-console-menu-title'}">
<BoxContainer Orientation="Vertical" Margin="5">
<BoxContainer Orientation="Horizontal">
<Label Text="{Loc 'cargo-pallet-menu-appraisal-label'}"
StyleClasses="LabelKeyText" />
Expand Down
1 change: 0 additions & 1 deletion Content.Client/Cargo/UI/CargoPalletMenu.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public CargoPalletMenu()
RobustXamlLoader.Load(this);
SellButton.OnPressed += OnSellPressed;
AppraiseButton.OnPressed += OnAppraisePressed;
Title = Loc.GetString("cargo-pallet-console-menu-title");
}

public void SetAppraisal(int amount)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ private List<List<EntityUid>> GroupEntities(IEnumerable<EntityUid> entities, int
{
if (GroupingContextMenuType == 0)
{
var newEntities = entities.GroupBy(e => Identity.Name(e, _entityManager) + (_entityManager.GetComponent<MetaDataComponent>(e).EntityPrototype?.ID ?? string.Empty)).ToList();
var newEntities = entities.GroupBy(e => Identity.Name(e, _entityManager)).ToList();
return newEntities.Select(grp => grp.ToList()).ToList();
}
else
Expand Down
6 changes: 5 additions & 1 deletion Content.Client/ContextMenu/UI/EntityMenuUIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Content.Client.Verbs.UI;
using Content.Shared.CCVar;
using Content.Shared.Examine;
using Content.Shared.IdentityManagement;
using Content.Shared.Input;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
Expand Down Expand Up @@ -91,7 +92,10 @@ public void OpenRootMenu(List<EntityUid> entities)

var entitySpriteStates = GroupEntities(entities);
var orderedStates = entitySpriteStates.ToList();
orderedStates.Sort((x, y) => string.CompareOrdinal(_entityManager.GetComponent<MetaDataComponent>(x.First()).EntityPrototype?.Name, _entityManager.GetComponent<MetaDataComponent>(y.First()).EntityPrototype?.Name));
orderedStates.Sort((x, y) => string.Compare(
Identity.Name(x.First(), _entityManager),
Identity.Name(y.First(), _entityManager),
StringComparison.CurrentCulture));
Elements.Clear();
AddToUI(orderedStates);

Expand Down
2 changes: 2 additions & 0 deletions Content.Client/GameTicking/Managers/ClientGameTicker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public sealed class ClientGameTicker : SharedGameTicker
[ViewVariables] public bool AreWeReady { get; private set; }
[ViewVariables] public bool IsGameStarted { get; private set; }
[ViewVariables] public string? LobbySong { get; private set; }
[ViewVariables] public string? RestartSound { get; private set; }
[ViewVariables] public string? LobbyBackground { get; private set; }
[ViewVariables] public bool DisallowedLateJoin { get; private set; }
[ViewVariables] public string? ServerInfoBlob { get; private set; }
Expand Down Expand Up @@ -151,6 +152,7 @@ private void RoundEnd(RoundEndMessageEvent message)
{
// Force an update in the event of this song being the same as the last.
SetLobbySong(message.LobbySong, true);
RestartSound = message.RestartSound;

// Don't open duplicate windows (mainly for replays).
if (_window?.RoundId == message.RoundId)
Expand Down
3 changes: 2 additions & 1 deletion Content.Client/Lathe/UI/LatheBoundUserInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ protected override void UpdateState(BoundUserInterfaceState state)
case LatheUpdateState msg:
if (_menu != null)
_menu.Recipes = msg.Recipes;
_menu?.PopulateRecipes(Owner);
_menu?.PopulateRecipes();
_menu?.UpdateCategories();
_menu?.PopulateQueueList(msg.Queue);
_menu?.SetQueueInfo(msg.CurrentlyProducing);
break;
Expand Down
12 changes: 4 additions & 8 deletions Content.Client/Lathe/UI/LatheMenu.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,10 @@
PlaceHolder="{Loc 'lathe-menu-search-designs'}"
HorizontalExpand="True">
</LineEdit>
<Button
Name="FilterButton"
Text="{Loc 'lathe-menu-search-filter'}"
TextAlign="Center"
Margin="5 0 0 0"
Disabled="True"
StyleClasses="ButtonSquare">
</Button>
<OptionButton
Name="FilterOption"
MinWidth="100"
StyleClasses="ButtonSquare"/>
</BoxContainer>
<BoxContainer Orientation="Vertical"
MinHeight="225"
Expand Down
Loading
Loading